");
+ }
@Test
@@ -111,7 +110,7 @@ public class XmlParserHl7OrgDstu2Test {
}
- @Test
+ @Test
public void testContainedResourceInExtensionUndeclared() {
Patient p = new Patient();
p.addName().addFamily("PATIENT");
@@ -133,6 +132,7 @@ public class XmlParserHl7OrgDstu2Test {
assertEquals("ORG", o.getName());
}
+
@Test
public void testDuplicateContainedResources() {
@@ -152,6 +152,159 @@ public class XmlParserHl7OrgDstu2Test {
}
+ @Test
+ public void testEncodeAndParseContained() {
+ IParser xmlParser = ourCtx.newXmlParser().setPrettyPrint(true);
+
+ // Create an organization, note that the organization does not have an ID
+ Organization org = new Organization();
+ org.getNameElement().setValue("Contained Test Organization");
+
+ // Create a patient
+ Patient patient = new Patient();
+ patient.setId("Patient/1333");
+ patient.addIdentifier().setSystem("urn:mrns").setValue("253345");
+
+ // Put the organization as a reference in the patient resource
+ patient.getManagingOrganization().setResource(org);
+
+ String encoded = xmlParser.encodeResourceToString(patient);
+ ourLog.info(encoded);
+ assertThat(encoded, containsString("
"));
+ assertThat(encoded, containsString(""));
+
+ // Create a bundle with just the patient resource
+ Bundle b = new Bundle();
+ b.addEntry().setResource(patient);
+
+ // Encode the bundle
+ encoded = xmlParser.encodeResourceToString(b);
+ ourLog.info(encoded);
+ assertThat(encoded, stringContainsInOrder(Arrays.asList("", "", "")));
+ assertThat(encoded, containsString(""));
+ assertThat(encoded, stringContainsInOrder(Arrays.asList("", "")));
+ assertThat(encoded, not(stringContainsInOrder(Arrays.asList("", "", ""))));
+
+ // Re-parse the bundle
+ patient = (Patient) xmlParser.parseResource(xmlParser.encodeResourceToString(patient));
+ assertEquals("#1", patient.getManagingOrganization().getReferenceElement().getValue());
+
+ assertNotNull(patient.getManagingOrganization().getResource());
+ org = (Organization) patient.getManagingOrganization().getResource();
+ assertEquals("#1", org.getIdElement().getValue());
+ assertEquals("Contained Test Organization", org.getName());
+
+ // And re-encode a second time
+ encoded = xmlParser.encodeResourceToString(patient);
+ ourLog.info(encoded);
+ assertThat(encoded, stringContainsInOrder(Arrays.asList("", "", "", "")));
+ assertThat(encoded, not(stringContainsInOrder(Arrays.asList("", ""))));
+ assertThat(encoded, containsString(""));
+
+ // And re-encode once more, with the references cleared
+ patient.getContained().clear();
+ patient.getManagingOrganization().setReference(null);
+ encoded = xmlParser.encodeResourceToString(patient);
+ ourLog.info(encoded);
+ assertThat(encoded, stringContainsInOrder(Arrays.asList("", "", "", "")));
+ assertThat(encoded, not(stringContainsInOrder(Arrays.asList("", ""))));
+ assertThat(encoded, containsString(""));
+
+ // And re-encode once more, with the references cleared and a manually set local ID
+ patient.getContained().clear();
+ patient.getManagingOrganization().setReference(null);
+ patient.getManagingOrganization().getResource().setId(("#333"));
+ encoded = xmlParser.encodeResourceToString(patient);
+ ourLog.info(encoded);
+ assertThat(encoded, stringContainsInOrder(Arrays.asList("", "", "", "")));
+ assertThat(encoded, not(stringContainsInOrder(Arrays.asList("", ""))));
+
+ }
+
+ @Test
+ public void testEncodeAndParseExtensions() throws Exception {
+
+ Patient patient = new Patient();
+ patient.addIdentifier().setUse(IdentifierUse.OFFICIAL).setSystem("urn:example").setValue("7000135");
+
+ Extension ext = new Extension();
+ ext.setUrl("http://example.com/extensions#someext");
+ ext.setValue(new DateTimeType("2011-01-02T11:13:15"));
+ patient.getExtension().add(ext);
+
+ Extension parent = new Extension().setUrl("http://example.com#parent");
+ patient.getExtension().add(parent);
+ Extension child1 = new Extension().setUrl("http://example.com#child").setValue(new StringType("value1"));
+ parent.getExtension().add(child1);
+ Extension child2 = new Extension().setUrl("http://example.com#child").setValue(new StringType("value2"));
+ parent.getExtension().add(child2);
+
+ Extension modExt = new Extension();
+ modExt.setUrl("http://example.com/extensions#modext");
+ modExt.setValue(new DateType("1995-01-02"));
+ patient.getModifierExtension().add(modExt);
+
+ HumanName name = patient.addName();
+ name.addFamily("Blah");
+ StringType given = name.addGivenElement();
+ given.setValue("Joe");
+ Extension ext2 = new Extension().setUrl("http://examples.com#givenext").setValue(new StringType("given"));
+ given.getExtension().add(ext2);
+
+ StringType given2 = name.addGivenElement();
+ given2.setValue("Shmoe");
+ Extension given2ext = new Extension().setUrl("http://examples.com#givenext_parent");
+ given2.getExtension().add(given2ext);
+ given2ext.addExtension().setUrl("http://examples.com#givenext_child").setValue(new StringType("CHILD"));
+
+ String output = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient);
+ ourLog.info(output);
+
+ String enc = ourCtx.newXmlParser().encodeResourceToString(patient);
+ assertThat(enc, containsString(""));
+ assertThat(enc, containsString(""));
+ assertThat(enc, containsString(""));
+ assertThat(enc, containsString(""));
+ assertThat(enc, containsString(""));
+
+ /*
+ * Now parse this back
+ */
+
+ Patient parsed = ourCtx.newXmlParser().parseResource(Patient.class, enc);
+ ext = parsed.getExtension().get(0);
+ assertEquals("http://example.com/extensions#someext", ext.getUrl());
+ assertEquals("2011-01-02T11:13:15", ((DateTimeType) ext.getValue()).getValueAsString());
+
+ parent = patient.getExtension().get(1);
+ assertEquals("http://example.com#parent", parent.getUrl());
+ assertNull(parent.getValue());
+ child1 = parent.getExtension().get(0);
+ assertEquals("http://example.com#child", child1.getUrl());
+ assertEquals("value1", ((StringType) child1.getValue()).getValueAsString());
+ child2 = parent.getExtension().get(1);
+ assertEquals("http://example.com#child", child2.getUrl());
+ assertEquals("value2", ((StringType) child2.getValue()).getValueAsString());
+
+ modExt = parsed.getModifierExtension().get(0);
+ assertEquals("http://example.com/extensions#modext", modExt.getUrl());
+ assertEquals("1995-01-02", ((DateType) modExt.getValue()).getValueAsString());
+
+ name = parsed.getName().get(0);
+
+ ext2 = name.getGiven().get(0).getExtension().get(0);
+ assertEquals("http://examples.com#givenext", ext2.getUrl());
+ assertEquals("given", ((StringType) ext2.getValue()).getValueAsString());
+
+ given2ext = name.getGiven().get(1).getExtension().get(0);
+ assertEquals("http://examples.com#givenext_parent", given2ext.getUrl());
+ assertNull(given2ext.getValue());
+ Extension given2ext2 = given2ext.getExtension().get(0);
+ assertEquals("http://examples.com#givenext_child", given2ext2.getUrl());
+ assertEquals("CHILD", ((StringType) given2ext2.getValue()).getValue());
+
+ }
+
// TODO: uncomment with new model updates
// @Test
// public void testEncodeAndParseExtensionOnResourceReference() {
@@ -409,159 +562,6 @@ public class XmlParserHl7OrgDstu2Test {
- @Test
- public void testEncodeAndParseContained() {
- IParser xmlParser = ourCtx.newXmlParser().setPrettyPrint(true);
-
- // Create an organization, note that the organization does not have an ID
- Organization org = new Organization();
- org.getNameElement().setValue("Contained Test Organization");
-
- // Create a patient
- Patient patient = new Patient();
- patient.setId("Patient/1333");
- patient.addIdentifier().setSystem("urn:mrns").setValue("253345");
-
- // Put the organization as a reference in the patient resource
- patient.getManagingOrganization().setResource(org);
-
- String encoded = xmlParser.encodeResourceToString(patient);
- ourLog.info(encoded);
- assertThat(encoded, containsString(""));
- assertThat(encoded, containsString(""));
-
- // Create a bundle with just the patient resource
- Bundle b = new Bundle();
- b.addEntry().setResource(patient);
-
- // Encode the bundle
- encoded = xmlParser.encodeResourceToString(b);
- ourLog.info(encoded);
- assertThat(encoded, stringContainsInOrder(Arrays.asList("", "", "")));
- assertThat(encoded, containsString(""));
- assertThat(encoded, stringContainsInOrder(Arrays.asList("", "")));
- assertThat(encoded, not(stringContainsInOrder(Arrays.asList("", "", ""))));
-
- // Re-parse the bundle
- patient = (Patient) xmlParser.parseResource(xmlParser.encodeResourceToString(patient));
- assertEquals("#1", patient.getManagingOrganization().getReferenceElement().getValue());
-
- assertNotNull(patient.getManagingOrganization().getResource());
- org = (Organization) patient.getManagingOrganization().getResource();
- assertEquals("#1", org.getIdElement().getValue());
- assertEquals("Contained Test Organization", org.getName());
-
- // And re-encode a second time
- encoded = xmlParser.encodeResourceToString(patient);
- ourLog.info(encoded);
- assertThat(encoded, stringContainsInOrder(Arrays.asList("", "", "", "")));
- assertThat(encoded, not(stringContainsInOrder(Arrays.asList("", ""))));
- assertThat(encoded, containsString(""));
-
- // And re-encode once more, with the references cleared
- patient.getContained().clear();
- patient.getManagingOrganization().setReference(null);
- encoded = xmlParser.encodeResourceToString(patient);
- ourLog.info(encoded);
- assertThat(encoded, stringContainsInOrder(Arrays.asList("", "", "", "")));
- assertThat(encoded, not(stringContainsInOrder(Arrays.asList("", ""))));
- assertThat(encoded, containsString(""));
-
- // And re-encode once more, with the references cleared and a manually set local ID
- patient.getContained().clear();
- patient.getManagingOrganization().setReference(null);
- patient.getManagingOrganization().getResource().setId(("#333"));
- encoded = xmlParser.encodeResourceToString(patient);
- ourLog.info(encoded);
- assertThat(encoded, stringContainsInOrder(Arrays.asList("", "", "", "")));
- assertThat(encoded, not(stringContainsInOrder(Arrays.asList("", ""))));
-
- }
-
- @Test
- public void testEncodeAndParseExtensions() throws Exception {
-
- Patient patient = new Patient();
- patient.addIdentifier().setUse(IdentifierUse.OFFICIAL).setSystem("urn:example").setValue("7000135");
-
- Extension ext = new Extension();
- ext.setUrl("http://example.com/extensions#someext");
- ext.setValue(new DateTimeType("2011-01-02T11:13:15"));
- patient.getExtension().add(ext);
-
- Extension parent = new Extension().setUrl("http://example.com#parent");
- patient.getExtension().add(parent);
- Extension child1 = new Extension().setUrl("http://example.com#child").setValue(new StringType("value1"));
- parent.getExtension().add(child1);
- Extension child2 = new Extension().setUrl("http://example.com#child").setValue(new StringType("value2"));
- parent.getExtension().add(child2);
-
- Extension modExt = new Extension();
- modExt.setUrl("http://example.com/extensions#modext");
- modExt.setValue(new DateType("1995-01-02"));
- patient.getModifierExtension().add(modExt);
-
- HumanName name = patient.addName();
- name.addFamily("Blah");
- StringType given = name.addGivenElement();
- given.setValue("Joe");
- Extension ext2 = new Extension().setUrl("http://examples.com#givenext").setValue(new StringType("given"));
- given.getExtension().add(ext2);
-
- StringType given2 = name.addGivenElement();
- given2.setValue("Shmoe");
- Extension given2ext = new Extension().setUrl("http://examples.com#givenext_parent");
- given2.getExtension().add(given2ext);
- given2ext.addExtension().setUrl("http://examples.com#givenext_child").setValue(new StringType("CHILD"));
-
- String output = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient);
- ourLog.info(output);
-
- String enc = ourCtx.newXmlParser().encodeResourceToString(patient);
- assertThat(enc, containsString(""));
- assertThat(enc, containsString(""));
- assertThat(enc, containsString(""));
- assertThat(enc, containsString(""));
- assertThat(enc, containsString(""));
-
- /*
- * Now parse this back
- */
-
- Patient parsed = ourCtx.newXmlParser().parseResource(Patient.class, enc);
- ext = parsed.getExtension().get(0);
- assertEquals("http://example.com/extensions#someext", ext.getUrl());
- assertEquals("2011-01-02T11:13:15", ((DateTimeType) ext.getValue()).getValueAsString());
-
- parent = patient.getExtension().get(1);
- assertEquals("http://example.com#parent", parent.getUrl());
- assertNull(parent.getValue());
- child1 = parent.getExtension().get(0);
- assertEquals("http://example.com#child", child1.getUrl());
- assertEquals("value1", ((StringType) child1.getValue()).getValueAsString());
- child2 = parent.getExtension().get(1);
- assertEquals("http://example.com#child", child2.getUrl());
- assertEquals("value2", ((StringType) child2.getValue()).getValueAsString());
-
- modExt = parsed.getModifierExtension().get(0);
- assertEquals("http://example.com/extensions#modext", modExt.getUrl());
- assertEquals("1995-01-02", ((DateType) modExt.getValue()).getValueAsString());
-
- name = parsed.getName().get(0);
-
- ext2 = name.getGiven().get(0).getExtension().get(0);
- assertEquals("http://examples.com#givenext", ext2.getUrl());
- assertEquals("given", ((StringType) ext2.getValue()).getValueAsString());
-
- given2ext = name.getGiven().get(1).getExtension().get(0);
- assertEquals("http://examples.com#givenext_parent", given2ext.getUrl());
- assertNull(given2ext.getValue());
- Extension given2ext2 = given2ext.getExtension().get(0);
- assertEquals("http://examples.com#givenext_child", given2ext2.getUrl());
- assertEquals("CHILD", ((StringType) given2ext2.getValue()).getValue());
-
- }
-
/**
* See #216 - Profiled datatypes should use their unprofiled parent type as the choice[x] name
*
@@ -581,7 +581,6 @@ public class XmlParserHl7OrgDstu2Test {
assertThat(output, containsString(""));
}
-
@Test
public void testEncodeBinaryResource() {
@@ -605,6 +604,7 @@ public class XmlParserHl7OrgDstu2Test {
assertEquals("", output);
}
+
@Test
public void testEncodeBoundCode() {
@@ -619,6 +619,7 @@ public class XmlParserHl7OrgDstu2Test {
assertThat(val, containsString("home"));
assertThat(val, containsString("male"));
}
+
@Test
public void testEncodeBundle() throws InterruptedException {
Bundle b = new Bundle();
@@ -655,7 +656,7 @@ public class XmlParserHl7OrgDstu2Test {
assertThat(bundleString, StringContainsInOrder.stringContainsInOrder(strings));
}
-
+
@Test
public void testEncodeBundleCategory() {
@@ -682,7 +683,6 @@ public class XmlParserHl7OrgDstu2Test {
assertEquals("term", b.getEntry().get(0).getResource().getMeta().getTag().get(0).getCode());
assertEquals("label", b.getEntry().get(0).getResource().getMeta().getTag().get(0).getDisplay());
}
-
@Test
public void testEncodeContainedAndIncludedResources() {
@@ -699,7 +699,7 @@ public class XmlParserHl7OrgDstu2Test {
ourLog.info(str);
}
-
+
@Test
public void testEncodeContainedResources() throws Exception {
@@ -724,7 +724,6 @@ public class XmlParserHl7OrgDstu2Test {
}
-
@Test
public void testEncodeContainedWithNarrativeIsSuppresed() throws Exception {
IParser parser = ourCtx.newXmlParser().setPrettyPrint(true);
@@ -771,6 +770,7 @@ public class XmlParserHl7OrgDstu2Test {
}
+
@Test
public void testEncodeDeclaredExtensionWithResourceContent() {
IParser parser = ourCtx.newXmlParser();
@@ -833,6 +833,82 @@ public class XmlParserHl7OrgDstu2Test {
assertEquals("uuml ü", p.getName().get(0).getFamily().get(0).getValue());
}
+ @Test
+ public void testEncodeExtensionUndeclaredNonModifier() {
+ Observation obs = new Observation();
+ obs.setId("1");
+ obs.getMeta().addProfile("http://profile");
+ Extension ext = obs.addExtension();
+ ext.setUrl("http://exturl").setValue(new StringType("ext_url_value"));
+
+ obs.getCode().setText("CODE");
+
+ IParser parser = ourCtx.newXmlParser();
+
+ String output = parser.setPrettyPrint(true).encodeResourceToString(obs);
+ ourLog.info(output);
+
+ //@formatter:off
+ assertThat(output, stringContainsInOrder(
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ));
+ assertThat(output, not(stringContainsInOrder(
+ ""
+ )));
+ //@formatter:on
+
+ obs = parser.parseResource(Observation.class, output);
+ assertEquals(1, obs.getExtension().size());
+ assertEquals("http://exturl", obs.getExtension().get(0).getUrl());
+ assertEquals("ext_url_value", ((StringType)obs.getExtension().get(0).getValue()).getValue());
+ }
+
+ @Test
+ public void testEncodeExtensionUndeclaredNonModifierWithChildExtension() {
+ Observation obs = new Observation();
+ obs.setId("1");
+ obs.getMeta().addProfile("http://profile");
+ Extension ext = obs.addExtension();
+ ext.setUrl("http://exturl");
+
+ Extension subExt = ext.addExtension();
+ subExt.setUrl("http://subext").setValue(new StringType("sub_ext_value"));
+
+ obs.getCode().setText("CODE");
+
+ IParser parser = ourCtx.newXmlParser();
+
+ String output = parser.setPrettyPrint(true).encodeResourceToString(obs);
+ ourLog.info(output);
+
+ //@formatter:off
+ assertThat(output, stringContainsInOrder(
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ));
+ assertThat(output, not(stringContainsInOrder(
+ ""
+ )));
+ //@formatter:on
+
+ obs = parser.parseResource(Observation.class, output);
+ assertEquals(1, obs.getExtension().size());
+ assertEquals("http://exturl", obs.getExtension().get(0).getUrl());
+ assertEquals(1, obs.getExtension().get(0).getExtension().size());
+ assertEquals("http://subext", obs.getExtension().get(0).getExtension().get(0).getUrl());
+ assertEquals("sub_ext_value", ((StringType)obs.getExtension().get(0).getExtension().get(0).getValue()).getValue());
+ }
+
@Test
public void testEncodeExtensionWithResourceContent() {
IParser parser = ourCtx.newXmlParser();
@@ -1235,9 +1311,6 @@ public class XmlParserHl7OrgDstu2Test {
" \n" +
" \n" +
" \n" +
- " \n" +
- " \n" +
- " \n" +
" \n" +
" \n" +
" \n" +
@@ -1254,6 +1327,9 @@ public class XmlParserHl7OrgDstu2Test {
" \n" +
" \n" +
" \n" +
+ " \n" +
+ " \n" +
+ " \n" +
" \n" +
" \n" +
" \n" +
@@ -1270,7 +1346,7 @@ public class XmlParserHl7OrgDstu2Test {
assertEquals("2013-01-12", resource.getBar1().get(0).getBar12().get(0).getBar121().get(1).getValueAsString());
assertEquals("2013-01-03", resource.getBar1().get(0).getBar12().get(0).getBar122().get(0).getValueAsString());
- String encoded = p.encodeResourceToString(resource);
+ String encoded = p.setPrettyPrint(true).encodeResourceToString(resource);
ourLog.info(encoded);
Diff d = new Diff(new StringReader(msg), new StringReader(encoded));
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/test/resources/example-patient-general-hl7orgdstu2.json b/hapi-fhir-structures-hl7org-dstu2/src/test/resources/example-patient-general-hl7orgdstu2.json
index 1b21190ab60..2e740d86b27 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/test/resources/example-patient-general-hl7orgdstu2.json
+++ b/hapi-fhir-structures-hl7org-dstu2/src/test/resources/example-patient-general-hl7orgdstu2.json
@@ -1,5 +1,9 @@
{
"resourceType":"Patient",
+ "text":{
+ "status":"generated",
+ "div":"\n
\n \n \n Name | \n Peter James Chalmers (\"Jim\") | \n
\n \n Address | \n 534 Erewhon, Pleasantville, Vic, 3999 | \n
\n \n Contacts | \n Home: unknown. Work: (03) 5555 6473 | \n
\n \n Id | \n MRN: 12345 (Acme Healthcare) | \n
\n \n
\n
"
+ },
"extension":[
{
"url":"urn:patientext:att",
@@ -28,10 +32,6 @@
"valueDate":"2011-01-02"
}
],
- "text":{
- "status":"generated",
- "div":"\n
\n \n \n Name | \n Peter James Chalmers (\"Jim\") | \n
\n \n Address | \n 534 Erewhon, Pleasantville, Vic, 3999 | \n
\n \n Contacts | \n Home: unknown. Work: (03) 5555 6473 | \n
\n \n Id | \n MRN: 12345 (Acme Healthcare) | \n
\n \n
\n
"
- },
"identifier":[
{
"use":"usual",
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/test/resources/example-patient-general-hl7orgdstu2.xml b/hapi-fhir-structures-hl7org-dstu2/src/test/resources/example-patient-general-hl7orgdstu2.xml
index 0a9d055e455..2cfd768c113 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/test/resources/example-patient-general-hl7orgdstu2.xml
+++ b/hapi-fhir-structures-hl7org-dstu2/src/test/resources/example-patient-general-hl7orgdstu2.xml
@@ -1,24 +1,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -45,6 +25,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hapi-tinder-plugin/dstu2/fhirversion.properties b/hapi-tinder-plugin/dstu2/fhirversion.properties
new file mode 100644
index 00000000000..f9c235c15b4
--- /dev/null
+++ b/hapi-tinder-plugin/dstu2/fhirversion.properties
@@ -0,0 +1,164 @@
+# This file contains version definitions
+
+resource.Account=ca.uhn.fhir.model.dstu2.resource.Account
+resource.AllergyIntolerance=ca.uhn.fhir.model.dstu2.resource.AllergyIntolerance
+resource.Appointment=ca.uhn.fhir.model.dstu2.resource.Appointment
+resource.AppointmentResponse=ca.uhn.fhir.model.dstu2.resource.AppointmentResponse
+resource.AuditEvent=ca.uhn.fhir.model.dstu2.resource.AuditEvent
+resource.Basic=ca.uhn.fhir.model.dstu2.resource.Basic
+resource.Binary=ca.uhn.fhir.model.dstu2.resource.Binary
+resource.BodySite=ca.uhn.fhir.model.dstu2.resource.BodySite
+resource.Bundle=ca.uhn.fhir.model.dstu2.resource.Bundle
+resource.CarePlan=ca.uhn.fhir.model.dstu2.resource.CarePlan
+resource.Claim=ca.uhn.fhir.model.dstu2.resource.Claim
+resource.ClaimResponse=ca.uhn.fhir.model.dstu2.resource.ClaimResponse
+resource.ClinicalImpression=ca.uhn.fhir.model.dstu2.resource.ClinicalImpression
+resource.Communication=ca.uhn.fhir.model.dstu2.resource.Communication
+resource.CommunicationRequest=ca.uhn.fhir.model.dstu2.resource.CommunicationRequest
+resource.Composition=ca.uhn.fhir.model.dstu2.resource.Composition
+resource.ConceptMap=ca.uhn.fhir.model.dstu2.resource.ConceptMap
+resource.Condition=ca.uhn.fhir.model.dstu2.resource.Condition
+resource.Conformance=ca.uhn.fhir.model.dstu2.resource.Conformance
+resource.Contract=ca.uhn.fhir.model.dstu2.resource.Contract
+resource.Coverage=ca.uhn.fhir.model.dstu2.resource.Coverage
+resource.DataElement=ca.uhn.fhir.model.dstu2.resource.DataElement
+resource.DetectedIssue=ca.uhn.fhir.model.dstu2.resource.DetectedIssue
+resource.Device=ca.uhn.fhir.model.dstu2.resource.Device
+resource.DeviceComponent=ca.uhn.fhir.model.dstu2.resource.DeviceComponent
+resource.DeviceMetric=ca.uhn.fhir.model.dstu2.resource.DeviceMetric
+resource.DeviceUseRequest=ca.uhn.fhir.model.dstu2.resource.DeviceUseRequest
+resource.DeviceUseStatement=ca.uhn.fhir.model.dstu2.resource.DeviceUseStatement
+resource.DiagnosticOrder=ca.uhn.fhir.model.dstu2.resource.DiagnosticOrder
+resource.DiagnosticReport=ca.uhn.fhir.model.dstu2.resource.DiagnosticReport
+resource.DocumentManifest=ca.uhn.fhir.model.dstu2.resource.DocumentManifest
+resource.DocumentReference=ca.uhn.fhir.model.dstu2.resource.DocumentReference
+resource.Documentation=ca.uhn.fhir.model.dstu2.resource.Documentation
+resource.EligibilityRequest=ca.uhn.fhir.model.dstu2.resource.EligibilityRequest
+resource.EligibilityResponse=ca.uhn.fhir.model.dstu2.resource.EligibilityResponse
+resource.Encounter=ca.uhn.fhir.model.dstu2.resource.Encounter
+resource.EnrollmentRequest=ca.uhn.fhir.model.dstu2.resource.EnrollmentRequest
+resource.EnrollmentResponse=ca.uhn.fhir.model.dstu2.resource.EnrollmentResponse
+resource.EpisodeOfCare=ca.uhn.fhir.model.dstu2.resource.EpisodeOfCare
+resource.ExplanationOfBenefit=ca.uhn.fhir.model.dstu2.resource.ExplanationOfBenefit
+resource.FamilyMemberHistory=ca.uhn.fhir.model.dstu2.resource.FamilyMemberHistory
+resource.Flag=ca.uhn.fhir.model.dstu2.resource.Flag
+resource.Goal=ca.uhn.fhir.model.dstu2.resource.Goal
+resource.Group=ca.uhn.fhir.model.dstu2.resource.Group
+resource.HealthcareService=ca.uhn.fhir.model.dstu2.resource.HealthcareService
+resource.ImagingObjectSelection=ca.uhn.fhir.model.dstu2.resource.ImagingObjectSelection
+resource.ImagingStudy=ca.uhn.fhir.model.dstu2.resource.ImagingStudy
+resource.Immunization=ca.uhn.fhir.model.dstu2.resource.Immunization
+resource.ImmunizationRecommendation=ca.uhn.fhir.model.dstu2.resource.ImmunizationRecommendation
+resource.ImplementationGuide=ca.uhn.fhir.model.dstu2.resource.ImplementationGuide
+resource.List=ca.uhn.fhir.model.dstu2.resource.ListResource
+resource.Location=ca.uhn.fhir.model.dstu2.resource.Location
+resource.Media=ca.uhn.fhir.model.dstu2.resource.Media
+resource.Medication=ca.uhn.fhir.model.dstu2.resource.Medication
+resource.MedicationAdministration=ca.uhn.fhir.model.dstu2.resource.MedicationAdministration
+resource.MedicationDispense=ca.uhn.fhir.model.dstu2.resource.MedicationDispense
+resource.MedicationOrder=ca.uhn.fhir.model.dstu2.resource.MedicationOrder
+resource.MedicationStatement=ca.uhn.fhir.model.dstu2.resource.MedicationStatement
+resource.MessageHeader=ca.uhn.fhir.model.dstu2.resource.MessageHeader
+resource.NamingSystem=ca.uhn.fhir.model.dstu2.resource.NamingSystem
+resource.NutritionOrder=ca.uhn.fhir.model.dstu2.resource.NutritionOrder
+resource.Observation=ca.uhn.fhir.model.dstu2.resource.Observation
+resource.OperationDefinition=ca.uhn.fhir.model.dstu2.resource.OperationDefinition
+resource.OperationOutcome=ca.uhn.fhir.model.dstu2.resource.OperationOutcome
+resource.Order=ca.uhn.fhir.model.dstu2.resource.Order
+resource.OrderResponse=ca.uhn.fhir.model.dstu2.resource.OrderResponse
+resource.Organization=ca.uhn.fhir.model.dstu2.resource.Organization
+resource.Parameters=ca.uhn.fhir.model.dstu2.resource.Parameters
+resource.Patient=ca.uhn.fhir.model.dstu2.resource.Patient
+resource.PaymentNotice=ca.uhn.fhir.model.dstu2.resource.PaymentNotice
+resource.PaymentReconciliation=ca.uhn.fhir.model.dstu2.resource.PaymentReconciliation
+resource.Person=ca.uhn.fhir.model.dstu2.resource.Person
+resource.Practitioner=ca.uhn.fhir.model.dstu2.resource.Practitioner
+resource.Procedure=ca.uhn.fhir.model.dstu2.resource.Procedure
+resource.ProcedureRequest=ca.uhn.fhir.model.dstu2.resource.ProcedureRequest
+resource.ProcessRequest=ca.uhn.fhir.model.dstu2.resource.ProcessRequest
+resource.ProcessResponse=ca.uhn.fhir.model.dstu2.resource.ProcessResponse
+resource.Provenance=ca.uhn.fhir.model.dstu2.resource.Provenance
+resource.Questionnaire=ca.uhn.fhir.model.dstu2.resource.Questionnaire
+resource.QuestionnaireResponse=ca.uhn.fhir.model.dstu2.resource.QuestionnaireResponse
+resource.ReferralRequest=ca.uhn.fhir.model.dstu2.resource.ReferralRequest
+resource.RelatedPerson=ca.uhn.fhir.model.dstu2.resource.RelatedPerson
+resource.Remittance=ca.uhn.fhir.model.dstu2.resource.Remittance
+resource.RiskAssessment=ca.uhn.fhir.model.dstu2.resource.RiskAssessment
+resource.Schedule=ca.uhn.fhir.model.dstu2.resource.Schedule
+resource.SearchParameter=ca.uhn.fhir.model.dstu2.resource.SearchParameter
+resource.Slot=ca.uhn.fhir.model.dstu2.resource.Slot
+resource.Specimen=ca.uhn.fhir.model.dstu2.resource.Specimen
+resource.StructureDefinition=ca.uhn.fhir.model.dstu2.resource.StructureDefinition
+resource.Subscription=ca.uhn.fhir.model.dstu2.resource.Subscription
+resource.Substance=ca.uhn.fhir.model.dstu2.resource.Substance
+resource.SupplyDelivery=ca.uhn.fhir.model.dstu2.resource.SupplyDelivery
+resource.SupplyRequest=ca.uhn.fhir.model.dstu2.resource.SupplyRequest
+resource.SupportingDocumentation=ca.uhn.fhir.model.dstu2.resource.SupportingDocumentation
+resource.Test=ca.uhn.fhir.model.dstu2.resource.Test
+resource.TestScript=ca.uhn.fhir.model.dstu2.resource.TestScript
+resource.User=ca.uhn.fhir.model.dstu2.resource.User
+resource.ValueSet=ca.uhn.fhir.model.dstu2.resource.ValueSet
+resource.VisionPrescription=ca.uhn.fhir.model.dstu2.resource.VisionPrescription
+
+datatype.Address=ca.uhn.fhir.model.dstu2.composite.AddressDt
+datatype.AddressDt=ca.uhn.fhir.model.dstu2.composite.AddressDt
+datatype.AgeDt=ca.uhn.fhir.model.dstu2.composite.AgeDt
+datatype.Annotation=ca.uhn.fhir.model.dstu2.composite.AnnotationDt
+datatype.AnnotationDt=ca.uhn.fhir.model.dstu2.composite.AnnotationDt
+datatype.Attachment=ca.uhn.fhir.model.dstu2.composite.AttachmentDt
+datatype.AttachmentDt=ca.uhn.fhir.model.dstu2.composite.AttachmentDt
+datatype.CodeableConcept=ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt
+datatype.CodeableConceptDt=ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt
+datatype.Coding=ca.uhn.fhir.model.dstu2.composite.CodingDt
+datatype.CodingDt=ca.uhn.fhir.model.dstu2.composite.CodingDt
+datatype.ContactPoint=ca.uhn.fhir.model.dstu2.composite.ContactPointDt
+datatype.ContactPointDt=ca.uhn.fhir.model.dstu2.composite.ContactPointDt
+datatype.CountDt=ca.uhn.fhir.model.dstu2.composite.CountDt
+datatype.DistanceDt=ca.uhn.fhir.model.dstu2.composite.DistanceDt
+datatype.DurationDt=ca.uhn.fhir.model.dstu2.composite.DurationDt
+datatype.ElementDefinition=ca.uhn.fhir.model.dstu2.composite.ElementDefinitionDt
+datatype.ElementDefinitionDt=ca.uhn.fhir.model.dstu2.composite.ElementDefinitionDt
+datatype.Extension=ca.uhn.fhir.model.api.ExtensionDt
+datatype.HumanName=ca.uhn.fhir.model.dstu2.composite.HumanNameDt
+datatype.HumanNameDt=ca.uhn.fhir.model.dstu2.composite.HumanNameDt
+datatype.Identifier=ca.uhn.fhir.model.dstu2.composite.IdentifierDt
+datatype.IdentifierDt=ca.uhn.fhir.model.dstu2.composite.IdentifierDt
+datatype.Meta=ca.uhn.fhir.model.dstu2.composite.MetaDt
+datatype.MetaDt=ca.uhn.fhir.model.dstu2.composite.MetaDt
+datatype.Money=ca.uhn.fhir.model.dstu2.composite.MoneyDt
+datatype.Narrative=ca.uhn.fhir.model.dstu2.composite.NarrativeDt
+datatype.Period=ca.uhn.fhir.model.dstu2.composite.PeriodDt
+datatype.PeriodDt=ca.uhn.fhir.model.dstu2.composite.PeriodDt
+datatype.Quantity=ca.uhn.fhir.model.dstu2.composite.QuantityDt
+datatype.QuantityDt=ca.uhn.fhir.model.dstu2.composite.QuantityDt
+datatype.Range=ca.uhn.fhir.model.dstu2.composite.RangeDt
+datatype.RangeDt=ca.uhn.fhir.model.dstu2.composite.RangeDt
+datatype.Ratio=ca.uhn.fhir.model.dstu2.composite.RatioDt
+datatype.RatioDt=ca.uhn.fhir.model.dstu2.composite.RatioDt
+datatype.ResourceReferenceDt=ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt
+datatype.SampledData=ca.uhn.fhir.model.dstu2.composite.SampledDataDt
+datatype.SampledDataDt=ca.uhn.fhir.model.dstu2.composite.SampledDataDt
+datatype.Signature=ca.uhn.fhir.model.dstu2.composite.SignatureDt
+datatype.SignatureDt=ca.uhn.fhir.model.dstu2.composite.SignatureDt
+datatype.SimpleQuantity=ca.uhn.fhir.model.dstu2.composite.SimpleQuantityDt
+datatype.Timing=ca.uhn.fhir.model.dstu2.composite.TimingDt
+datatype.TimingDt=ca.uhn.fhir.model.dstu2.composite.TimingDt
+datatype.base64Binary=ca.uhn.fhir.model.primitive.Base64BinaryDt
+datatype.boolean=ca.uhn.fhir.model.primitive.BooleanDt
+datatype.code=ca.uhn.fhir.model.primitive.CodeDt
+datatype.contained=ca.uhn.fhir.model.dstu2.composite.ContainedDt
+datatype.date=ca.uhn.fhir.model.primitive.DateDt
+datatype.dateTime=ca.uhn.fhir.model.primitive.DateTimeDt
+datatype.decimal=ca.uhn.fhir.model.primitive.DecimalDt
+datatype.id=ca.uhn.fhir.model.primitive.IdDt
+datatype.idref=ca.uhn.fhir.model.primitive.IdrefDt
+datatype.instant=ca.uhn.fhir.model.primitive.InstantDt
+datatype.integer=ca.uhn.fhir.model.primitive.IntegerDt
+datatype.markdown=ca.uhn.fhir.model.primitive.MarkdownDt
+datatype.oid=ca.uhn.fhir.model.primitive.OidDt
+datatype.positiveInt=ca.uhn.fhir.model.primitive.PositiveIntDt
+datatype.string=ca.uhn.fhir.model.primitive.StringDt
+datatype.time=ca.uhn.fhir.model.primitive.TimeDt
+datatype.unsignedInt=ca.uhn.fhir.model.primitive.UnsignedIntDt
+datatype.uri=ca.uhn.fhir.model.primitive.UriDt
+datatype.xhtml=ca.uhn.fhir.model.primitive.XhtmlDt
diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/parser/BaseStructureParser.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/parser/BaseStructureParser.java
index bbacb56b7e7..62cb3440eb5 100644
--- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/parser/BaseStructureParser.java
+++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/parser/BaseStructureParser.java
@@ -560,6 +560,7 @@ public abstract class BaseStructureParser {
// Binary is manually generated but should still go in the list
myNameToResourceClass.put("Binary", thePackageBase + ".resource.Binary");
+ myNameToDatatypeClass.put("Extension", ExtensionDt.class.getName());
try {
File versionFile = new File(theResourceOutputDirectory, "fhirversion.properties");
diff --git a/hapi-tinder-plugin/src/main/resources/ca/uhn/fhir/model/dstu/fhirversion.properties b/hapi-tinder-plugin/src/main/resources/ca/uhn/fhir/model/dstu/fhirversion.properties
index f40f346b576..a38fb447505 100644
--- a/hapi-tinder-plugin/src/main/resources/ca/uhn/fhir/model/dstu/fhirversion.properties
+++ b/hapi-tinder-plugin/src/main/resources/ca/uhn/fhir/model/dstu/fhirversion.properties
@@ -65,21 +65,40 @@ resource.User=ca.uhn.fhir.model.dstu.resource.User
resource.ValueSet=ca.uhn.fhir.model.dstu.resource.ValueSet
datatype.Address=ca.uhn.fhir.model.dstu.composite.AddressDt
+datatype.AddressDt=ca.uhn.fhir.model.dstu.composite.AddressDt
+datatype.AgeDt=ca.uhn.fhir.model.dstu.composite.AgeDt
datatype.Attachment=ca.uhn.fhir.model.dstu.composite.AttachmentDt
+datatype.AttachmentDt=ca.uhn.fhir.model.dstu.composite.AttachmentDt
datatype.CodeableConcept=ca.uhn.fhir.model.dstu.composite.CodeableConceptDt
+datatype.CodeableConceptDt=ca.uhn.fhir.model.dstu.composite.CodeableConceptDt
datatype.Coding=ca.uhn.fhir.model.dstu.composite.CodingDt
+datatype.CodingDt=ca.uhn.fhir.model.dstu.composite.CodingDt
datatype.Contact=ca.uhn.fhir.model.dstu.composite.ContactDt
+datatype.ContactDt=ca.uhn.fhir.model.dstu.composite.ContactDt
+datatype.Duration=ca.uhn.fhir.model.dstu.composite.DurationDt
+datatype.Extension=ca.uhn.fhir.model.api.ExtensionDt
datatype.HumanName=ca.uhn.fhir.model.dstu.composite.HumanNameDt
+datatype.HumanNameDt=ca.uhn.fhir.model.dstu.composite.HumanNameDt
datatype.Identifier=ca.uhn.fhir.model.dstu.composite.IdentifierDt
+datatype.IdentifierDt=ca.uhn.fhir.model.dstu.composite.IdentifierDt
+datatype.Narrative=ca.uhn.fhir.model.dstu.composite.NarrativeDt
datatype.Period=ca.uhn.fhir.model.dstu.composite.PeriodDt
+datatype.PeriodDt=ca.uhn.fhir.model.dstu.composite.PeriodDt
datatype.Quantity=ca.uhn.fhir.model.dstu.composite.QuantityDt
+datatype.QuantityDt=ca.uhn.fhir.model.dstu.composite.QuantityDt
datatype.Range=ca.uhn.fhir.model.dstu.composite.RangeDt
+datatype.RangeDt=ca.uhn.fhir.model.dstu.composite.RangeDt
datatype.Ratio=ca.uhn.fhir.model.dstu.composite.RatioDt
+datatype.RatioDt=ca.uhn.fhir.model.dstu.composite.RatioDt
+datatype.ResourceReferenceDt=ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt
datatype.SampledData=ca.uhn.fhir.model.dstu.composite.SampledDataDt
+datatype.SampledDataDt=ca.uhn.fhir.model.dstu.composite.SampledDataDt
datatype.Schedule=ca.uhn.fhir.model.dstu.composite.ScheduleDt
+datatype.ScheduleDt=ca.uhn.fhir.model.dstu.composite.ScheduleDt
datatype.base64Binary=ca.uhn.fhir.model.primitive.Base64BinaryDt
datatype.boolean=ca.uhn.fhir.model.primitive.BooleanDt
datatype.code=ca.uhn.fhir.model.primitive.CodeDt
+datatype.contained=ca.uhn.fhir.model.dstu.composite.ContainedDt
datatype.date=ca.uhn.fhir.model.primitive.DateDt
datatype.dateTime=ca.uhn.fhir.model.primitive.DateTimeDt
datatype.decimal=ca.uhn.fhir.model.primitive.DecimalDt
@@ -87,8 +106,11 @@ datatype.id=ca.uhn.fhir.model.primitive.IdDt
datatype.idref=ca.uhn.fhir.model.primitive.IdrefDt
datatype.instant=ca.uhn.fhir.model.primitive.InstantDt
datatype.integer=ca.uhn.fhir.model.primitive.IntegerDt
+datatype.markdown=ca.uhn.fhir.model.primitive.MarkdownDt
datatype.oid=ca.uhn.fhir.model.primitive.OidDt
+datatype.positiveInt=ca.uhn.fhir.model.primitive.PositiveIntDt
datatype.string=ca.uhn.fhir.model.primitive.StringDt
datatype.time=ca.uhn.fhir.model.primitive.TimeDt
+datatype.unsignedInt=ca.uhn.fhir.model.primitive.UnsignedIntDt
datatype.uri=ca.uhn.fhir.model.primitive.UriDt
datatype.xhtml=ca.uhn.fhir.model.primitive.XhtmlDt
diff --git a/hapi-tinder-plugin/src/main/resources/ca/uhn/fhir/model/dstu2/fhirversion.properties b/hapi-tinder-plugin/src/main/resources/ca/uhn/fhir/model/dstu2/fhirversion.properties
new file mode 100644
index 00000000000..f9c235c15b4
--- /dev/null
+++ b/hapi-tinder-plugin/src/main/resources/ca/uhn/fhir/model/dstu2/fhirversion.properties
@@ -0,0 +1,164 @@
+# This file contains version definitions
+
+resource.Account=ca.uhn.fhir.model.dstu2.resource.Account
+resource.AllergyIntolerance=ca.uhn.fhir.model.dstu2.resource.AllergyIntolerance
+resource.Appointment=ca.uhn.fhir.model.dstu2.resource.Appointment
+resource.AppointmentResponse=ca.uhn.fhir.model.dstu2.resource.AppointmentResponse
+resource.AuditEvent=ca.uhn.fhir.model.dstu2.resource.AuditEvent
+resource.Basic=ca.uhn.fhir.model.dstu2.resource.Basic
+resource.Binary=ca.uhn.fhir.model.dstu2.resource.Binary
+resource.BodySite=ca.uhn.fhir.model.dstu2.resource.BodySite
+resource.Bundle=ca.uhn.fhir.model.dstu2.resource.Bundle
+resource.CarePlan=ca.uhn.fhir.model.dstu2.resource.CarePlan
+resource.Claim=ca.uhn.fhir.model.dstu2.resource.Claim
+resource.ClaimResponse=ca.uhn.fhir.model.dstu2.resource.ClaimResponse
+resource.ClinicalImpression=ca.uhn.fhir.model.dstu2.resource.ClinicalImpression
+resource.Communication=ca.uhn.fhir.model.dstu2.resource.Communication
+resource.CommunicationRequest=ca.uhn.fhir.model.dstu2.resource.CommunicationRequest
+resource.Composition=ca.uhn.fhir.model.dstu2.resource.Composition
+resource.ConceptMap=ca.uhn.fhir.model.dstu2.resource.ConceptMap
+resource.Condition=ca.uhn.fhir.model.dstu2.resource.Condition
+resource.Conformance=ca.uhn.fhir.model.dstu2.resource.Conformance
+resource.Contract=ca.uhn.fhir.model.dstu2.resource.Contract
+resource.Coverage=ca.uhn.fhir.model.dstu2.resource.Coverage
+resource.DataElement=ca.uhn.fhir.model.dstu2.resource.DataElement
+resource.DetectedIssue=ca.uhn.fhir.model.dstu2.resource.DetectedIssue
+resource.Device=ca.uhn.fhir.model.dstu2.resource.Device
+resource.DeviceComponent=ca.uhn.fhir.model.dstu2.resource.DeviceComponent
+resource.DeviceMetric=ca.uhn.fhir.model.dstu2.resource.DeviceMetric
+resource.DeviceUseRequest=ca.uhn.fhir.model.dstu2.resource.DeviceUseRequest
+resource.DeviceUseStatement=ca.uhn.fhir.model.dstu2.resource.DeviceUseStatement
+resource.DiagnosticOrder=ca.uhn.fhir.model.dstu2.resource.DiagnosticOrder
+resource.DiagnosticReport=ca.uhn.fhir.model.dstu2.resource.DiagnosticReport
+resource.DocumentManifest=ca.uhn.fhir.model.dstu2.resource.DocumentManifest
+resource.DocumentReference=ca.uhn.fhir.model.dstu2.resource.DocumentReference
+resource.Documentation=ca.uhn.fhir.model.dstu2.resource.Documentation
+resource.EligibilityRequest=ca.uhn.fhir.model.dstu2.resource.EligibilityRequest
+resource.EligibilityResponse=ca.uhn.fhir.model.dstu2.resource.EligibilityResponse
+resource.Encounter=ca.uhn.fhir.model.dstu2.resource.Encounter
+resource.EnrollmentRequest=ca.uhn.fhir.model.dstu2.resource.EnrollmentRequest
+resource.EnrollmentResponse=ca.uhn.fhir.model.dstu2.resource.EnrollmentResponse
+resource.EpisodeOfCare=ca.uhn.fhir.model.dstu2.resource.EpisodeOfCare
+resource.ExplanationOfBenefit=ca.uhn.fhir.model.dstu2.resource.ExplanationOfBenefit
+resource.FamilyMemberHistory=ca.uhn.fhir.model.dstu2.resource.FamilyMemberHistory
+resource.Flag=ca.uhn.fhir.model.dstu2.resource.Flag
+resource.Goal=ca.uhn.fhir.model.dstu2.resource.Goal
+resource.Group=ca.uhn.fhir.model.dstu2.resource.Group
+resource.HealthcareService=ca.uhn.fhir.model.dstu2.resource.HealthcareService
+resource.ImagingObjectSelection=ca.uhn.fhir.model.dstu2.resource.ImagingObjectSelection
+resource.ImagingStudy=ca.uhn.fhir.model.dstu2.resource.ImagingStudy
+resource.Immunization=ca.uhn.fhir.model.dstu2.resource.Immunization
+resource.ImmunizationRecommendation=ca.uhn.fhir.model.dstu2.resource.ImmunizationRecommendation
+resource.ImplementationGuide=ca.uhn.fhir.model.dstu2.resource.ImplementationGuide
+resource.List=ca.uhn.fhir.model.dstu2.resource.ListResource
+resource.Location=ca.uhn.fhir.model.dstu2.resource.Location
+resource.Media=ca.uhn.fhir.model.dstu2.resource.Media
+resource.Medication=ca.uhn.fhir.model.dstu2.resource.Medication
+resource.MedicationAdministration=ca.uhn.fhir.model.dstu2.resource.MedicationAdministration
+resource.MedicationDispense=ca.uhn.fhir.model.dstu2.resource.MedicationDispense
+resource.MedicationOrder=ca.uhn.fhir.model.dstu2.resource.MedicationOrder
+resource.MedicationStatement=ca.uhn.fhir.model.dstu2.resource.MedicationStatement
+resource.MessageHeader=ca.uhn.fhir.model.dstu2.resource.MessageHeader
+resource.NamingSystem=ca.uhn.fhir.model.dstu2.resource.NamingSystem
+resource.NutritionOrder=ca.uhn.fhir.model.dstu2.resource.NutritionOrder
+resource.Observation=ca.uhn.fhir.model.dstu2.resource.Observation
+resource.OperationDefinition=ca.uhn.fhir.model.dstu2.resource.OperationDefinition
+resource.OperationOutcome=ca.uhn.fhir.model.dstu2.resource.OperationOutcome
+resource.Order=ca.uhn.fhir.model.dstu2.resource.Order
+resource.OrderResponse=ca.uhn.fhir.model.dstu2.resource.OrderResponse
+resource.Organization=ca.uhn.fhir.model.dstu2.resource.Organization
+resource.Parameters=ca.uhn.fhir.model.dstu2.resource.Parameters
+resource.Patient=ca.uhn.fhir.model.dstu2.resource.Patient
+resource.PaymentNotice=ca.uhn.fhir.model.dstu2.resource.PaymentNotice
+resource.PaymentReconciliation=ca.uhn.fhir.model.dstu2.resource.PaymentReconciliation
+resource.Person=ca.uhn.fhir.model.dstu2.resource.Person
+resource.Practitioner=ca.uhn.fhir.model.dstu2.resource.Practitioner
+resource.Procedure=ca.uhn.fhir.model.dstu2.resource.Procedure
+resource.ProcedureRequest=ca.uhn.fhir.model.dstu2.resource.ProcedureRequest
+resource.ProcessRequest=ca.uhn.fhir.model.dstu2.resource.ProcessRequest
+resource.ProcessResponse=ca.uhn.fhir.model.dstu2.resource.ProcessResponse
+resource.Provenance=ca.uhn.fhir.model.dstu2.resource.Provenance
+resource.Questionnaire=ca.uhn.fhir.model.dstu2.resource.Questionnaire
+resource.QuestionnaireResponse=ca.uhn.fhir.model.dstu2.resource.QuestionnaireResponse
+resource.ReferralRequest=ca.uhn.fhir.model.dstu2.resource.ReferralRequest
+resource.RelatedPerson=ca.uhn.fhir.model.dstu2.resource.RelatedPerson
+resource.Remittance=ca.uhn.fhir.model.dstu2.resource.Remittance
+resource.RiskAssessment=ca.uhn.fhir.model.dstu2.resource.RiskAssessment
+resource.Schedule=ca.uhn.fhir.model.dstu2.resource.Schedule
+resource.SearchParameter=ca.uhn.fhir.model.dstu2.resource.SearchParameter
+resource.Slot=ca.uhn.fhir.model.dstu2.resource.Slot
+resource.Specimen=ca.uhn.fhir.model.dstu2.resource.Specimen
+resource.StructureDefinition=ca.uhn.fhir.model.dstu2.resource.StructureDefinition
+resource.Subscription=ca.uhn.fhir.model.dstu2.resource.Subscription
+resource.Substance=ca.uhn.fhir.model.dstu2.resource.Substance
+resource.SupplyDelivery=ca.uhn.fhir.model.dstu2.resource.SupplyDelivery
+resource.SupplyRequest=ca.uhn.fhir.model.dstu2.resource.SupplyRequest
+resource.SupportingDocumentation=ca.uhn.fhir.model.dstu2.resource.SupportingDocumentation
+resource.Test=ca.uhn.fhir.model.dstu2.resource.Test
+resource.TestScript=ca.uhn.fhir.model.dstu2.resource.TestScript
+resource.User=ca.uhn.fhir.model.dstu2.resource.User
+resource.ValueSet=ca.uhn.fhir.model.dstu2.resource.ValueSet
+resource.VisionPrescription=ca.uhn.fhir.model.dstu2.resource.VisionPrescription
+
+datatype.Address=ca.uhn.fhir.model.dstu2.composite.AddressDt
+datatype.AddressDt=ca.uhn.fhir.model.dstu2.composite.AddressDt
+datatype.AgeDt=ca.uhn.fhir.model.dstu2.composite.AgeDt
+datatype.Annotation=ca.uhn.fhir.model.dstu2.composite.AnnotationDt
+datatype.AnnotationDt=ca.uhn.fhir.model.dstu2.composite.AnnotationDt
+datatype.Attachment=ca.uhn.fhir.model.dstu2.composite.AttachmentDt
+datatype.AttachmentDt=ca.uhn.fhir.model.dstu2.composite.AttachmentDt
+datatype.CodeableConcept=ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt
+datatype.CodeableConceptDt=ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt
+datatype.Coding=ca.uhn.fhir.model.dstu2.composite.CodingDt
+datatype.CodingDt=ca.uhn.fhir.model.dstu2.composite.CodingDt
+datatype.ContactPoint=ca.uhn.fhir.model.dstu2.composite.ContactPointDt
+datatype.ContactPointDt=ca.uhn.fhir.model.dstu2.composite.ContactPointDt
+datatype.CountDt=ca.uhn.fhir.model.dstu2.composite.CountDt
+datatype.DistanceDt=ca.uhn.fhir.model.dstu2.composite.DistanceDt
+datatype.DurationDt=ca.uhn.fhir.model.dstu2.composite.DurationDt
+datatype.ElementDefinition=ca.uhn.fhir.model.dstu2.composite.ElementDefinitionDt
+datatype.ElementDefinitionDt=ca.uhn.fhir.model.dstu2.composite.ElementDefinitionDt
+datatype.Extension=ca.uhn.fhir.model.api.ExtensionDt
+datatype.HumanName=ca.uhn.fhir.model.dstu2.composite.HumanNameDt
+datatype.HumanNameDt=ca.uhn.fhir.model.dstu2.composite.HumanNameDt
+datatype.Identifier=ca.uhn.fhir.model.dstu2.composite.IdentifierDt
+datatype.IdentifierDt=ca.uhn.fhir.model.dstu2.composite.IdentifierDt
+datatype.Meta=ca.uhn.fhir.model.dstu2.composite.MetaDt
+datatype.MetaDt=ca.uhn.fhir.model.dstu2.composite.MetaDt
+datatype.Money=ca.uhn.fhir.model.dstu2.composite.MoneyDt
+datatype.Narrative=ca.uhn.fhir.model.dstu2.composite.NarrativeDt
+datatype.Period=ca.uhn.fhir.model.dstu2.composite.PeriodDt
+datatype.PeriodDt=ca.uhn.fhir.model.dstu2.composite.PeriodDt
+datatype.Quantity=ca.uhn.fhir.model.dstu2.composite.QuantityDt
+datatype.QuantityDt=ca.uhn.fhir.model.dstu2.composite.QuantityDt
+datatype.Range=ca.uhn.fhir.model.dstu2.composite.RangeDt
+datatype.RangeDt=ca.uhn.fhir.model.dstu2.composite.RangeDt
+datatype.Ratio=ca.uhn.fhir.model.dstu2.composite.RatioDt
+datatype.RatioDt=ca.uhn.fhir.model.dstu2.composite.RatioDt
+datatype.ResourceReferenceDt=ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt
+datatype.SampledData=ca.uhn.fhir.model.dstu2.composite.SampledDataDt
+datatype.SampledDataDt=ca.uhn.fhir.model.dstu2.composite.SampledDataDt
+datatype.Signature=ca.uhn.fhir.model.dstu2.composite.SignatureDt
+datatype.SignatureDt=ca.uhn.fhir.model.dstu2.composite.SignatureDt
+datatype.SimpleQuantity=ca.uhn.fhir.model.dstu2.composite.SimpleQuantityDt
+datatype.Timing=ca.uhn.fhir.model.dstu2.composite.TimingDt
+datatype.TimingDt=ca.uhn.fhir.model.dstu2.composite.TimingDt
+datatype.base64Binary=ca.uhn.fhir.model.primitive.Base64BinaryDt
+datatype.boolean=ca.uhn.fhir.model.primitive.BooleanDt
+datatype.code=ca.uhn.fhir.model.primitive.CodeDt
+datatype.contained=ca.uhn.fhir.model.dstu2.composite.ContainedDt
+datatype.date=ca.uhn.fhir.model.primitive.DateDt
+datatype.dateTime=ca.uhn.fhir.model.primitive.DateTimeDt
+datatype.decimal=ca.uhn.fhir.model.primitive.DecimalDt
+datatype.id=ca.uhn.fhir.model.primitive.IdDt
+datatype.idref=ca.uhn.fhir.model.primitive.IdrefDt
+datatype.instant=ca.uhn.fhir.model.primitive.InstantDt
+datatype.integer=ca.uhn.fhir.model.primitive.IntegerDt
+datatype.markdown=ca.uhn.fhir.model.primitive.MarkdownDt
+datatype.oid=ca.uhn.fhir.model.primitive.OidDt
+datatype.positiveInt=ca.uhn.fhir.model.primitive.PositiveIntDt
+datatype.string=ca.uhn.fhir.model.primitive.StringDt
+datatype.time=ca.uhn.fhir.model.primitive.TimeDt
+datatype.unsignedInt=ca.uhn.fhir.model.primitive.UnsignedIntDt
+datatype.uri=ca.uhn.fhir.model.primitive.UriDt
+datatype.xhtml=ca.uhn.fhir.model.primitive.XhtmlDt
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 13a35d81460..514e525297b 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -403,6 +403,15 @@
which enables finding resources that to not have a given tag/profile/security tag.
Thanks to Lars Kristian Roland for the suggestion!
+
+ Extensions containing resource references did not get encoded correctly
+ some of the time. Thanks to Poseidon for reporting!
+
+
+ Parsers (both XML and JSON) encoded the first few elements of DSTU3 structures in the wrong order:
+ Extensions were placed before any other content, which is incorrect (several
+ elements come first: meta, text, etc.)
+