"));
+ assertThat(resp, containsString(" "));
+ assertThat(resp, containsString("
"));
+ assertThat(resp, containsString(" "));
+ assertThat(resp, containsString("
",
+ " "));
+ //@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 extends Enum> 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 extends Enum> 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