move test resource so they end up in built jar (for downstream access to test reosurces for publishing FHIR)

This commit is contained in:
Grahame Grieve 2019-01-23 09:01:50 +11:00
parent 707685a5cd
commit aaa9827cad
468 changed files with 114 additions and 9 deletions

2
.gitignore vendored
View File

@ -153,3 +153,5 @@ local.properties
.texlipse
/org.hl7.fhir.r4/src/test/resources/gen
/org.hl7.fhir.r4/src/test/resources/graphql/*.out
/org.hl7.fhir.r4/src/main/resources/graphql/*.out
/org.hl7.fhir.r4/src/main/resources/gen

View File

@ -441,12 +441,12 @@ public class TestingUtilities {
public static String resourceNameToFile(String name) throws IOException {
return Utilities.path(System.getProperty("user.dir"), "src", "test", "resources", name);
return Utilities.path(System.getProperty("user.dir"), "src", "main", "resources", name);
}
public static String resourceNameToFile(String subFolder, String name) throws IOException {
return Utilities.path(System.getProperty("user.dir"), "src", "test", "resources", subFolder, name);
return Utilities.path(System.getProperty("user.dir"), "src", "main", "resources", subFolder, name);
}
}

View File

@ -612,7 +612,10 @@
<test inputfile="patient-example.xml"><expression>0.0 = 0</expression><output type="boolean">true</output></test>
<test inputfile="patient-example.xml"><expression>@2012-04-15 = @2012-04-15</expression><output type="boolean">true</output></test>
<test inputfile="patient-example.xml"><expression>@2012-04-15 = @2012-04-16</expression><output type="boolean">false</output></test>
<test inputfile="patient-example.xml"><expression>@2012-04-15 = @2012-04-15T10:00:00</expression><output type="boolean">false</output></test>
<test inputfile="patient-example.xml"><expression>@2012-04-15 = @2012-04-15T10:00:00</expression></test>
<test inputfile="patient-example.xml"><expression>@2012-04-15T15:00:00 = @2012-04-15T10:00:00</expression><output type="boolean">false</output></test>
<test inputfile="patient-example.xml"><expression>@2012-04-15T15:00:00Z = @2012-04-15T10:00:00</expression></test>
<test inputfile="patient-example.xml"><expression>@2012-04-15T15:00:00+02:00 = @2012-04-15T14:00:00+03:00</expression><output type="boolean">true</output></test>
<test inputfile="patient-example.xml"><expression>name = name</expression><output type="boolean">true</output></test>
<test inputfile="patient-example.xml"><expression>name.take(2) = name.take(2).first() | name.take(2).last()</expression><output type="boolean">true</output></test>
<test inputfile="patient-example.xml"><expression>name.take(2) = name.take(2).last() | name.take(2).first()</expression><output type="boolean">false</output></test>
@ -632,7 +635,10 @@
<test inputfile="patient-example.xml"><expression>0.0 != 0</expression><output type="boolean">false</output></test>
<test inputfile="patient-example.xml"><expression>@2012-04-15 != @2012-04-15</expression><output type="boolean">false</output></test>
<test inputfile="patient-example.xml"><expression>@2012-04-15 != @2012-04-16</expression><output type="boolean">true</output></test>
<test inputfile="patient-example.xml"><expression>@2012-04-15 != @2012-04-15T10:00:00</expression><output type="boolean">true</output></test>
<test inputfile="patient-example.xml"><expression>@2012-04-15 != @2012-04-15T10:00:00</expression></test>
<test inputfile="patient-example.xml"><expression>@2012-04-15T15:00:00 != @2012-04-15T10:00:00</expression><output type="boolean">true</output></test>
<test inputfile="patient-example.xml"><expression>@2012-04-15T15:00:00Z != @2012-04-15T10:00:00</expression></test>
<test inputfile="patient-example.xml"><expression>@2012-04-15T15:00:00+02:00 != @2012-04-15T14:00:00+03:00</expression><output type="boolean">false</output></test>
<test inputfile="patient-example.xml"><expression>name != name</expression><output type="boolean">false</output></test>
<test inputfile="patient-example.xml"><expression>name.take(2) != name.take(2).first() | name.take(2).last()</expression><output type="boolean">false</output></test>
<test inputfile="patient-example.xml"><expression>name.take(2) != name.take(2).last() | name.take(2).first()</expression><output type="boolean">true</output></test>
@ -641,7 +647,8 @@
<group name="testEquivalent">
<test inputfile="patient-example.xml"><expression>1 ~ 1</expression><output type="boolean">true</output></test>
<test inputfile="patient-example.xml"><expression>{} ~ {}</expression></test>
<test inputfile="patient-example.xml"><expression>{} ~ {}</expression><output type="boolean">true</output></test>
<test inputfile="patient-example.xml"><expression>1 ~ {}</expression><output type="boolean">false</output></test>
<test inputfile="patient-example.xml"><expression>1 ~ 2</expression><output type="boolean">false</output></test>
<test inputfile="patient-example.xml"><expression>'a' ~ 'a'</expression><output type="boolean">true</output></test>
<test inputfile="patient-example.xml"><expression>'a' ~ 'A'</expression><output type="boolean">true</output></test>
@ -662,7 +669,8 @@
<group name="testNotEquivalent">
<test inputfile="patient-example.xml"><expression>1 !~ 1</expression><output type="boolean">false</output></test>
<test inputfile="patient-example.xml"><expression>{} !~ {}</expression></test>
<test inputfile="patient-example.xml"><expression>{} !~ {}</expression><output type="boolean">false</output></test>
<test inputfile="patient-example.xml"><expression>{} !~ 1</expression><output type="boolean">true</output></test>
<test inputfile="patient-example.xml"><expression>1 !~ 2</expression><output type="boolean">true</output></test>
<test inputfile="patient-example.xml"><expression>'a' !~ 'a'</expression><output type="boolean">false</output></test>
<test inputfile="patient-example.xml"><expression>'a' !~ 'A'</expression><output type="boolean">false</output></test>

View File

@ -6,7 +6,7 @@
<test name="reference" source="reference.gql" output="reference.json" context="Observation/example/$graphql"/>
<test name="reference-type-in" source="reference-type-in.gql" output="reference-type-in.json" context="Observation/example/$graphql"/>
<test name="reference-type-out" source="reference-type-out.gql" output="reference-type-out.json" context="Observation/example/$graphql"/>
<test name="reference-broken" source="reference-broken.gql" output="$error" context="MedicationDispense/meddisp008/$graphql" resource="medicationdispenseexample8"/>
<test name="reference-broken" source="reference-broken.gql" output="$error" context="MedicationDispense/meddisp008/$graphql" resource="medicationdispenseexample8"/>
<test name="reference-optional" source="reference-optional.gql" output="reference-optional.json" context="MedicationDispense/meddisp008/$graphql" resource="medicationdispenseexample8"/>
<test name="reference-fragment-type" source="reference-fragment-type.gql" output="reference-fragment-type.json" context="Observation/example/$graphql"/>
<test name="extension-complex" source="extension-complex.gql" output="extension-complex.json" context="Patient/glossy/$graphql" resource="patient-glossy-example"/>

View File

@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8"?><MedicationDispense xmlns="http://hl7.org/fhir">
<id value="meddisp0308"/>
<text><status value="generated"/><div xmlns="http://www.w3.org/1999/xhtml"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: meddisp0308</p><p><b>contained</b>: </p><p><b>status</b>: completed</p><p><b>medication</b>: Timoptic 5mg/ml solution. Generated Summary: id: med0305; Timoptic 5mg/ml solution <span>(Details : {http://hl7.org/fhir/sid/ndc code &#39;2501-813-16&#39; = &#39;2501-813-16&#39;, given as &#39;Timoptic 5mg/ml solution&#39;})</span></p><p><b>subject</b>: <a>Donald Duck </a></p><h3>Performers</h3><table><tr><td>-</td><td><b>Actor</b></td></tr><tr><td>*</td><td><a>Practitioner/f006</a></td></tr></table><p><b>authorizingPrescription</b>: <a>MedicationRequest/medrx0330</a></p><p><b>type</b>: Refill - Part Fill <span>(Details : {http://terminology.hl7.org/CodeSystem/v3-ActCode code &#39;RFP&#39; = &#39;Refill - Part Fill&#39;, given as &#39;Refill - Part Fill&#39;})</span></p><p><b>quantity</b>: 10 mL<span> (Details: UCUM code mL = &#39;mL&#39;)</span></p><p><b>daysSupply</b>: 30 Day<span> (Details: UCUM code d = &#39;d&#39;)</span></p><p><b>whenPrepared</b>: 25/06/2015 7:13:00 AM</p><p><b>whenHandedOver</b>: 26/06/2015 7:13:00 AM</p><p><b>dosageInstruction</b>: </p></div></text><contained>
<Medication>
<id value="med0305"/>
<code>
<coding>
<system value="http://hl7.org/fhir/sid/ndc"/>
<code value="2501-813-16"/>
<display value="Timoptic 5mg/ml solution"/>
</coding>
</code>
</Medication>
</contained>
<status value="completed"/>
<medicationReference>
<!-- Linked to a RESOURCE Medication -->
<reference value="#med0305"/>
<display value="Timoptic 5mg/ml solution"/>
</medicationReference>
<subject>
<reference value="Patient/pat1"/>
<display value="Donald Duck "/>
</subject>
<performer>
<actor>
<reference value="Practitioner/f006"/>
</actor>
</performer>
<authorizingPrescription>
<reference value="MedicationRequest/medrx0330"/>
</authorizingPrescription>
<type>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
<code value="RFP"/>
<display value="Refill - Part Fill"/>
</coding>
</type>
<quantity>
<value value="10"/>
<unit value="mL"/>
<system value="http://unitsofmeasure.org"/>
<code value="mL"/>
</quantity>
<daysSupply>
<value value="30"/>
<unit value="Day"/>
<system value="http://unitsofmeasure.org"/>
<code value="d"/>
</daysSupply>
<whenPrepared value="2015-06-25T07:13:00+05:00"/>
<whenHandedOver value="2015-06-26T07:13:00+05:00"/>
<dosageInstruction>
<sequence value="1"/>
<text value="Instil one drop in each eye twice daily"/>
<timing>
<repeat>
<frequency value="2"/>
<period value="1"/>
<periodUnit value="d"/>
</repeat>
</timing>
<route>
<coding>
<system value="http://snomed.info/sct"/>
<code value="54485002"/>
<display value="Ophthalmic route (qualifier value)"/>
</coding>
</route>
<method>
<coding>
<system value="http://snomed.info/sct"/>
<code value="421538008"/>
<display value="Instill - dosing instruction imperative (qualifier value)"/>
</coding>
</method>
<doseAndRate>
<type>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/dose-rate-type"/>
<code value="ordered"/>
<display value="Ordered"/>
</coding>
</type>
<doseQuantity>
<value value="1"/>
<unit value="OPDROP"/>
<system value="http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm"/>
<code value="OPDROP"/>
</doseQuantity>
</doseAndRate>
</dosageInstruction>
</MedicationDispense>

View File

@ -1926,7 +1926,7 @@
<label value="test1-5"/>
<description value="The snapshot elements must be the same - check binding"/>
<direction value="response"/>
<expression value="fixture('t1o').snapshot.element.all(aliasAs('A').binding.valueSet = fixture('patient').snapshot.element.where(path = alias('A').path).binding.valueSet)"/>
<expression value="fixture('t1o').snapshot.element.where(binding.valueSet.exists()).all(aliasAs('A').binding.valueSet.trace('A') = fixture('patient').snapshot.element.where(path = alias('A').path).binding.valueSet.trace('B'))"/>
<warningOnly value="false"/>
</assert>
</action>
@ -2028,7 +2028,7 @@
<label value="test4-1"/>
<description value="The patient.identifier documentation must be right"/>
<direction value="response"/>
<expression value="fixture('t4o').snapshot.element.where(path = 'Patient.identifier').doco != '... some more doco'"/>
<expression value="fixture('t4o').snapshot.element.where(path = 'Patient.identifier').doco.trace('doco') != '... some more doco'"/>
<warningOnly value="false"/>
</assert>
</action>

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