-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #246 from FirelyTeam/feature/demo-validation-tests…
…-stu3 Add unit tests for the STU3 version of the ValidationDemo
- Loading branch information
Showing
16 changed files
with
1,078 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...ompilation.Tests.STU3/TestData/DocumentComposition/DocumentBundle.structuredefinition.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<StructureDefinition xmlns="http://hl7.org/fhir"> | ||
<url value="http://example.org/StructureDefinition/DocumentBundle" /> | ||
<name value="DocumentBundle" /> | ||
<status value="draft" /> | ||
<fhirVersion value="3.0.1" /> | ||
<kind value="resource" /> | ||
<type value="Bundle" /> | ||
<abstract value="false" /> | ||
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Bundle" /> | ||
<derivation value="constraint" /> | ||
<differential> | ||
<element> | ||
<path value="Bundle" /> | ||
<type> | ||
<code value="Bundle" /> | ||
</type> | ||
</element> | ||
<element> | ||
<path value="Bundle.type" /> | ||
<fixedCode value="document" /> | ||
</element> | ||
<element> | ||
<path value="Bundle.total" /> | ||
<max value="0" /> | ||
</element> | ||
<element> | ||
<path value="Bundle.link" /> | ||
<max value="0" /> | ||
</element> | ||
<element> | ||
<path value="Bundle.entry" /> | ||
<min value="1" /> | ||
</element> | ||
</differential> | ||
</StructureDefinition> |
134 changes: 134 additions & 0 deletions
134
...ation.Tests.STU3/TestData/DocumentComposition/DocumentComposition.structuredefinition.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<StructureDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir ../../../Svn/fhir/trunk/build/schema/fhir-all.xsd" xmlns="http://hl7.org/fhir"> | ||
<meta> | ||
<lastUpdated value="2016-10-06T11:07:20.873+02:00" /> | ||
</meta> | ||
<url value="http://example.org/StructureDefinition/DocumentComposition" /> | ||
<name value="DocumentComposition" /> | ||
<status value="draft" /> | ||
<fhirVersion value="3.0.1" /> | ||
<kind value="resource" /> | ||
<type value="Composition" /> | ||
<abstract value="false" /> | ||
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Composition" /> | ||
<derivation value="constraint" /> | ||
<differential> | ||
<element> | ||
<path value="Composition" /> | ||
<type> | ||
<code value="Composition" /> | ||
</type> | ||
</element> | ||
<element> | ||
<path value="Composition.type" /> | ||
<patternCodeableConcept> | ||
<coding> | ||
<system value="http://loinc.org" /> | ||
<code value="18842-5" /> | ||
</coding> | ||
</patternCodeableConcept> | ||
</element> | ||
<element> | ||
<path value="Composition.subject" /> | ||
<type> | ||
<code value="Reference" /> | ||
<targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" /> | ||
<aggregation value="referenced" /> | ||
</type> | ||
</element> | ||
<element> | ||
<path value="Composition.author" /> | ||
<max value="1" /> | ||
<type> | ||
<code value="Reference" /> | ||
<targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" /> | ||
<aggregation value="bundled" /> | ||
</type> | ||
</element> | ||
|
||
<!-- Slice intro on Composition.section with some child constraints --> | ||
<element> | ||
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name"> | ||
<valueString value="Section" /> | ||
</extension> | ||
<path value="Composition.section" /> | ||
<slicing> | ||
<discriminator> | ||
<type value="value" /> | ||
<path value="code" /> | ||
</discriminator> | ||
<ordered value="false" /> | ||
<rules value="open" /> | ||
</slicing> | ||
<min value="1" /> | ||
</element> | ||
<element> | ||
<path value="Composition.section.title" /> | ||
<min value="1" /> | ||
<maxLength value="20" /> | ||
</element> | ||
<element> | ||
<path value="Composition.section.code" /> | ||
<min value="1" /> | ||
<binding> | ||
<strength value="required" /> | ||
<valueSetReference> | ||
<reference value="http://example.org/ValueSet/SectionTitles" /> | ||
</valueSetReference> | ||
</binding> | ||
</element> | ||
<element> | ||
<path value="Composition.section.entry" /> | ||
<type> | ||
<code value="Reference" /> | ||
<targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation" /> | ||
<aggregation value="referenced" /> | ||
<aggregation value="bundled" /> | ||
</type> | ||
</element> | ||
<element> | ||
<path value="Composition.section.emptyReason" /> | ||
<max value="0" /> | ||
</element> | ||
<element> | ||
<path value="Composition.section.section" /> | ||
<max value="0" /> | ||
</element> | ||
|
||
<!-- slice on Composition.section: vital signs, EXACTLY 1 --> | ||
<element> | ||
<path value="Composition.section" /> | ||
<sliceName value="vitalSigns" /> | ||
<min value="1" /> | ||
<max value="1" /> | ||
</element> | ||
<element> | ||
<path value="Composition.section.code" /> | ||
<min value="1" /> | ||
<patternCodeableConcept> | ||
<coding> | ||
<system value="http://loinc.org" /> | ||
<code value="8716-3" /> | ||
</coding> | ||
</patternCodeableConcept> | ||
</element> | ||
|
||
<!-- slice on Composition.section: chief complaint, MAX 1 --> | ||
<element> | ||
<path value="Composition.section" /> | ||
<sliceName value="chiefComplaint" /> | ||
<min value="0" /> | ||
<max value="1" /> | ||
</element> | ||
<element> | ||
<path value="Composition.section.code" /> | ||
<min value="1" /> | ||
<patternCodeableConcept> | ||
<coding> | ||
<system value="http://loinc.org" /> | ||
<code value="10154-3" /> | ||
</coding> | ||
</patternCodeableConcept> | ||
</element> | ||
</differential> | ||
</StructureDefinition> |
45 changes: 45 additions & 0 deletions
45
...ompilation.Tests.STU3/TestData/DocumentComposition/HeightQuantity.structuredefinition.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<StructureDefinition xmlns="http://hl7.org/fhir"> | ||
<meta> | ||
<lastUpdated value="2016-10-05T18:16:38.432+02:00" /> | ||
</meta> | ||
<text> | ||
<status value="empty" /><div xmlns="http://www.w3.org/1999/xhtml" /></text> | ||
<url value="http://example.org/StructureDefinition/HeightQuantity" /> | ||
<name value="HeightQuantity" /> | ||
<status value="draft" /> | ||
<fhirVersion value="3.0.1" /> | ||
<kind value="primitive-type" /> | ||
<type value="Quantity" /> | ||
<abstract value="false" /> | ||
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Quantity" /> | ||
<derivation value="constraint" /> | ||
<differential> | ||
<element> | ||
<path value="Quantity" /> | ||
<type> | ||
<code value="Quantity" /> | ||
</type> | ||
</element> | ||
<element> | ||
<path value="Quantity.value" /> | ||
<min value="1" /> | ||
<minValueDecimal value="0" /> | ||
<maxValueDecimal value="350" /> | ||
</element> | ||
<element> | ||
<path value="Quantity.comparator" /> | ||
<max value="0" /> | ||
</element> | ||
<element> | ||
<path value="Quantity.system" /> | ||
<min value="1" /> | ||
<fixedUri value="http://unitsofmeasure.org" /> | ||
</element> | ||
<element> | ||
<path value="Quantity.code" /> | ||
<min value="1" /> | ||
<fixedCode value="cm" /> | ||
</element> | ||
</differential> | ||
</StructureDefinition> |
37 changes: 37 additions & 0 deletions
37
...lidation.Compilation.Tests.STU3/TestData/DocumentComposition/Hippocrates.practitioner.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Practitioner xmlns="http://hl7.org/fhir"> | ||
<id value="Hippocrates"/> | ||
<meta> | ||
<lastUpdated value="2012-05-29T23:45:32Z"/> | ||
</meta> | ||
<text> | ||
<status value="generated"/> | ||
<div xmlns="http://www.w3.org/1999/xhtml">Hippocrates, Harold. SSN: | ||
444444444</div> | ||
</text> | ||
<identifier> | ||
<type> | ||
<coding> | ||
<system value="http://hl7.org/fhir/v2/0203"/> | ||
<code value="TAX"/> | ||
</coding> | ||
</type> | ||
<system value="http://hl7.org/fhir/sid/us-ssn"/> | ||
<value value="444444444"/> | ||
</identifier> | ||
<name> | ||
<use value="official"/> | ||
<family value="Hippocrates"/> | ||
<given value="Harold"/> | ||
</name> | ||
<telecom> | ||
<system value="phone"/> | ||
<value value="555-555-1003"/> | ||
<use value="work"/> | ||
</telecom> | ||
<address> | ||
<use value="home"/> | ||
<line value="1003 Healthcare Drive"/> | ||
</address> | ||
<gender value="male"/> | ||
</Practitioner> |
64 changes: 64 additions & 0 deletions
64
...ely.Fhir.Validation.Compilation.Tests.STU3/TestData/DocumentComposition/Levin.patient.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Patient xmlns="http://hl7.org/fhir"> | ||
<id value="Levin"/> | ||
<meta> | ||
<lastUpdated value="2014-11-13T11:41:00+11:00"/> | ||
</meta> | ||
<text> | ||
<status value="generated"/> | ||
<div xmlns="http://www.w3.org/1999/xhtml"> | ||
<p>Henry Levin the 7th</p> | ||
<p>MRN: 123456. Male, 24-Sept 1932</p> | ||
</div> | ||
</text> | ||
<extension url="http://hl7.org/fhir/StructureDefinition/birthPlace"> | ||
<valueAddress> | ||
<text value="1 Back Lane Holmfirth HUDDERSFIELD HD7 1HQ"/> | ||
<line value="1 Back Lane"/> | ||
<city value="Holmfirth"/> | ||
<district value="HUDDERSFIELD"/> | ||
<postalCode value="HD7 1HQ"/> | ||
</valueAddress> | ||
</extension> | ||
<extension url="http://hl7.org/fhir/StructureDefinition/patient-clinicalTrial" > | ||
<extension url="NCT" > | ||
<valueString value="123456789" /> | ||
</extension> | ||
<extension url="period" > | ||
<valuePeriod> | ||
<start value="2009-03-14" /> | ||
</valuePeriod> | ||
</extension> | ||
<extension url="reason" > | ||
<valueCodeableConcept> | ||
<coding> | ||
<system value="http://acme.org/codes/general" /> | ||
<code value="tt14j" /> | ||
</coding> | ||
</valueCodeableConcept> | ||
</extension> | ||
</extension> | ||
<identifier> | ||
<use value="usual"/> | ||
<type> | ||
<coding> | ||
<system value="http://hl7.org/fhir/v2/0203"/> | ||
<code value="MR"/> | ||
</coding> | ||
</type> | ||
<system value="http://www.goodhealth.org/identifiers/mrn"/> | ||
<value value="123456"/> | ||
</identifier> | ||
<active value="true"/> | ||
<name> | ||
<family value="Levin"/> | ||
<given value="Henry"/> | ||
<suffix value="The 7th"/> | ||
</name> | ||
<gender value="male"/> | ||
<birthDate value="1932-09-24"> | ||
<extension url="http://hl7.org/fhir/StructureDefinition/patient-birthTime"> | ||
<valueDateTime value="1932-09-24T15:15:50+02:00" /> | ||
</extension> | ||
</birthDate> | ||
</Patient> |
Oops, something went wrong.