Skip to content

Commit

Permalink
Changes to test files and schematron for STU 5 in order to create a full
Browse files Browse the repository at this point in the history
sample file.
  • Loading branch information
dand9959 committed Jan 11, 2018
1 parent ecc490c commit 4d9bc64
Show file tree
Hide file tree
Showing 9 changed files with 5,834 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<version>1.0</version>

<generatedFilename>
/Users/mholck/Development/qrda/Schematrons/HL7 QRDA Category I/STU 5/Published/HL7 QRDA Category I STU 5.sch
c:/Development/QRDA-git/qrda/Schematrons/HL7 QRDA Category I/STU 5/Published/HL7 QRDA Category I STU 5 Dec2017.sch
</generatedFilename>
<finalTestFilename>
/Users/mholck/Development/qrda/Schematrons/HL7 QRDA Category I/STU 5/TestFiles/GOOD_CDAR2_QRDA_I_STU5.xml
c:/Development/QRDA-git/qrda/Schematrons/HL7 QRDA Category I/STU 5/TestFiles/CDAR2_IG_QRDA_I_R1_STU5_2017DEC_Sample.xml
</finalTestFilename>

<fileHeader>
Expand All @@ -25,11 +25,11 @@
<errorsHeader>ERROR Patterns and Assertions</errorsHeader>
<warningsHeader>WARNING Patterns and Assertions</warningsHeader>

<mergeReportFilename>/Users/mholck/Development/qrda/Schematrons/HL7 QRDA Category I/STU 5/mergeReport.txt</mergeReportFilename>
<mergeReportFilename>c:/Development/QRDA-git/qrda/Schematrons/HL7 QRDA Category I/STU 5/mergeReport.txt</mergeReportFilename>

<!-- All schematrons expected to be under a single main directory -->
<sourceMainDirectory>
/Users/mholck/Development/qrda/Schematrons/
c:/Development/QRDA-git/qrda/Schematrons/
</sourceMainDirectory>

<!-- Specify the schematrons to use in the merge below, separated by the templates found in each fo the source directories listed. -->
Expand Down Expand Up @@ -169,7 +169,7 @@
<include>Target Outcome V2</include>
<!-- Subentry templates -->
<include>Facility Location V2</include>
<include>Fulfills V2</include>
<!-- <include>Fulfills V2</include> Fulfills is no longer an attribute. Remove -->
<!-- Other templates -->
<include>Author Participation</include>
<include>US Realm Address</include>
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@
<sch:ns prefix="cda" uri="urn:hl7-org:v3" />

<sch:phase id="errors">
<sch:active pattern="Fulfills_V2-pattern-errors" />
<sch:active pattern="Fulfills-pattern-errors" />
</sch:phase>

<sch:pattern id="Fulfills_V2-pattern-errors">
<sch:rule id="Fulfills_V2-errors" context="sdtc:inFulfillmentOf1[sdtc:templateId[@root='2.16.840.1.113883.10.20.24.3.126'][@extension='2016-08-01']]">
<sch:pattern id="Fulfills-pattern-errors">
<sch:rule id="Fulfills-errors" context="sdtc:inFulfillmentOf1[sdtc:templateId[@root='2.16.840.1.113883.10.20.24.3.126'][@extension='2016-08-01']]">
<sch:assert id="a-3265-28381-error" test="@typeCode='FLFS'">SHALL contain exactly one [1..1] @typeCode="FLFS" Fulfills (CodeSystem: HL7ActRelationshipType urn:oid:2.16.840.1.113883.5.1002) (CONF:3265-28381). </sch:assert>
<sch:assert id="a-3265-28379-error" test="count(sdtc:templateId[@root='2.16.840.1.113883.10.20.24.3.126'][@extension='2016-08-01'])=1">SHALL contain exactly one [1..1] sdtc:templateId (CONF:3265-28379) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.24.3.126" (CONF:3265-28382). SHALL contain exactly one [1..1] @extension="2014-12-01" (CONF:3265-28383). </sch:assert>
<sch:assert id="a-3265-28380-error" test="count(sdtc:actReference)=1">SHALL contain exactly one [1..1] sdtc:actReference (CONF:3265-28380).</sch:assert>
</sch:rule>

<sch:rule id="Fulfills_V2-actReference-errors" context="sdtc:inFulfillmentOf1[sdtc:templateId[@root='2.16.840.1.113883.10.20.24.3.126'][@extension='2016-08-01']]/sdtc:actReference">
<sch:rule id="Fulfills-actReference-errors" context="sdtc:inFulfillmentOf1[sdtc:templateId[@root='2.16.840.1.113883.10.20.24.3.126'][@extension='2016-08-01']]/sdtc:actReference">
<sch:assert id="a-3265-28384-error" test="@classCode">This sdtc:actReference SHALL contain exactly one [1..1] @classCode (CONF:3265-28384).</sch:assert>
<sch:assert id="a-3265-28385-error" test="@moodCode">This sdtc:actReference SHALL contain exactly one [1..1] @moodCode (CONF:3265-28385).</sch:assert>
<sch:assert id="a-3265-28386-error" test="count(sdtc:id)&gt;=1">This sdtc:actReference SHALL contain at least one [1..*] sdtc:id (CONF:3265-28386).</sch:assert>
</sch:rule>

<sch:rule id="Fulfills_V2-actReference-id-errors" context="sdtc:inFulfillmentOf1[sdtc:templateId[@root='2.16.840.1.113883.10.20.24.3.126'][@extension='2016-08-01']]/sdtc:actReference/sdtc:id">
<sch:rule id="Fulfills-actReference-id-errors" context="sdtc:inFulfillmentOf1[sdtc:templateId[@root='2.16.840.1.113883.10.20.24.3.126'][@extension='2016-08-01']]/sdtc:actReference/sdtc:id">
<sch:assert id="a-3265-28690-error" test="@root">Such sdtc:ids SHALL contain exactly one [1..1] @root (CONF:3265-28690).</sch:assert>
<sch:assert id="a-3265-28691-error" test="@extension">Such sdtc:ids SHALL contain exactly one [1..1] @extension (CONF:3265-28691).</sch:assert>
</sch:rule>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<sch:assert id="a-1098-32332-error" test="count(cda:id) &gt; 0">SHALL contain at least one [1..*] id (CONF:1098-32332).</sch:assert>
<sch:assert id="a-1098-30784-error" test="count(cda:code) = 1">SHALL contain exactly one [1..1] code, which SHOULD be selected from CodeSystem LOINC (urn:oid:2.16.840.1.113883.6.1) (CONF:1098-30784).</sch:assert>
<sch:assert id="a-1098-32333-error" test="count(cda:statusCode) = 1">SHALL contain exactly one [1..1] statusCode (CONF:1098-32333).</sch:assert>
<sch:assert id="a-1098-30995-error" test="count(cda:author[cda:templateId[@root='2.16.840.1.113883.10.20.22.4.119']]) = 1">SHALL contain at least one [1..*] author (identifier: urn:oid:2.16.840.1.113883.10.20.22.4.119) (CONF:1098-30995).</sch:assert>
</sch:rule>
<sch:rule id="Goal_Observation-statusCode-errors" context="cda:observation[cda:templateId[@root='2.16.840.1.113883.10.20.22.4.121']]/cda:statusCode">
<sch:assert id="a-1098-32334-error" test="@code='active'">This statusCode SHALL contain exactly one [1..1] @code="active" (CodeSystem: ActStatus urn:oid:2.16.840.1.113883.5.14) (CONF:1098-32334).</sch:assert>
Expand All @@ -35,6 +34,7 @@

<sch:rule id="Goal_Observation-warnings" context="cda:observation[cda:templateId[@root='2.16.840.1.113883.10.20.22.4.121']]">
<sch:assert id="a-1098-32335-warning" test="count(cda:effectiveTime) = 1">SHOULD contain zero or one [0..1] effectiveTime (CONF:1098-32335).</sch:assert>
<sch:assert id="a-1098-30995-warning" test="count(cda:author[cda:templateId[@root='2.16.840.1.113883.10.20.22.4.119']]) &gt;= 1">SHOULD contain zero or more [0..*] Author Participation (identifier: urn:oid:2.16.840.1.113883.10.20.22.4.119) (CONF:1098-30995).</sch:assert>
<sch:assert id="a-1098-30785-warning" test="count(cda:entryRelationship[@typeCode='REFR'][cda:observation[cda:templateId[@root='2.16.840.1.113883.10.20.22.4.143']]]) = 1">SHOULD contain zero or one [0..1] entryRelationship (CONF:1098-30785) such that it SHALL contain exactly one [1..1] @typeCode="REFR" Refers to (CodeSystem: HL7ActRelationshipType urn:oid:2.16.840.1.113883.5.1002) (CONF:1098-30786). SHALL contain exactly one [1..1] Priority Preference (identifier: urn:oid:2.16.840.1.113883.10.20.22.4.143) (CONF:1098-30787).</sch:assert>
</sch:rule>
</sch:pattern>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
Author: Dan Donahue
Date: 03-08-2017
Total Errors Expected: 10
Total Errors Expected: 9
Failure a-1098-30418-error SHALL contain exactly one [1..1] @classCode="OBS" Observation (CodeSystem: HL7ActClass urn:oid:2.16.840.1.113883.5.6) (CONF:1098-30418).
Failure a-1098-30419-error SHALL contain exactly one [1..1] @moodCode="GOL" Goal (CodeSystem: ActMood urn:oid:2.16.840.1.113883.5.1001) (CONF:1098-30419).
Failure a-1098-8583-error SHALL contain exactly one [1..1] templateId (CONF:1098-8583) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.121" (CONF:1098-10512).
Failure a-1098-32332-error SHALL contain at least one [1..*] id (CONF:1098-32332).
Failure a-1098-30784-error SHALL contain exactly one [1..1] code, which SHOULD be selected from CodeSystem LOINC (urn:oid:2.16.840.1.113883.6.1) (CONF:1098-30784).
Failure a-1098-32333-error SHALL contain exactly one [1..1] statusCode (CONF:1098-32333).
Failure a-1098-30995-error SHALL contain at least one [1..*] author (identifier: urn:oid:2.16.840.1.113883.10.20.22.4.119) (CONF:1098-30995).
Failure a-1098-32334-error statusCode statusCode SHALL contain exactly one [1..1] @code="active" (CodeSystem: ActStatus urn:oid:2.16.840.1.113883.5.14) (CONF:1098-32334)
Failure a-1098-32755-error reference, if present, SHALL contain exactly one [1..1] @typeCode="REFR" Refers to (CodeSystem: HL7ActRelationshipType urn:oid:2.16.840.1.113883.5.1002) (CONF:1098-32755)
Failure a-1098-32756-error reference, if present, SHALL contain exactly one [1..1] External Document Reference (identifier: urn:hl7ii:2.16.840.1.113883.10.20.22.4.115:2014-06-09) (CONF:1098-32756)
Total Warnings Expected: 3
Total Warnings Expected: 4
Failure a-1098-30784-c-warning code SHALL contain exactly one [1..1] codeSystem, which SHOULD be selected from CodeSystem LOINC (urn:oid:2.16.840.1.113883.6.1) (CONF:1098-30784)
Failure a-1098-32335-warning SHOULD contain zero or one [0..1] effectiveTime (CONF:1098-32335).
Failure a-1098-30995-warnign SHOULD contain zero or more [0..*] Author Participation (identifier: urn:oid:2.16.840.1.113883.10.20.22.4.119) (CONF:1098-30995).
Failure a-1098-30785-warning SHOULD contain zero or one [0..1] entryRelationship (CONF:1098-30785) such that it
SHALL contain exactly one [1..1] @typeCode="REFR" Refers to (CodeSystem: HL7ActRelationshipType urn:oid:2.16.840.1.113883.5.1002) (CONF:1098-30786).
SHALL contain exactly one [1..1] Priority Preference (identifier: urn:oid:2.16.840.1.113883.10.20.22.4.143) (CONF:1098-30787).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<sch:assert id="a-67-11879-error" test="@classCode='OBS'">SHALL contain exactly one [1..1] @classCode="OBS" (CodeSystem: HL7ActClass urn:oid:2.16.840.1.113883.5.6 STATIC) (CONF:67-11879).</sch:assert>
<sch:assert id="a-67-11880-error" test="@moodCode='EVN'">SHALL contain exactly one [1..1] @moodCode="EVN" (CodeSystem: ActMood urn:oid:2.16.840.1.113883.5.1001 STATIC) (CONF:67-11880).</sch:assert>
<sch:assert id="a-67-11881-error" test="count(cda:templateId[@root='2.16.840.1.113883.10.20.24.3.93'][not(@extension)])=1">SHALL contain exactly one [1..1] templateId (CONF:67-11881) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.24.3.93" (CONF:67-11882).</sch:assert>
<sch:assert id="a-67-11884-error" test="count(cda:id) &gt;= 1">SHALL contain at least one [1..*] id (CONF:67-11884).</sch:assert>
<sch:assert id="a-67-11885-error" test="count(cda:code)=1">SHALL contain exactly one [1..1] code (CONF:67-11885).</sch:assert>
<sch:assert id="a-67-11887-error" test="count(cda:value)=1">SHALL contain exactly one [1..1] value (CONF:67-11887).</sch:assert>
</sch:rule>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
Title: Status minimal sample file with errors
Author: Dan Donahue
Date: 10-12-2017
Update: 01-10-2018 Removed assertion test for <id> a-67-11884
Total Errors Expected: 8
Total Errors Expected: 7
Failure a-67-11879-error Bad Class Code
Failure a-67-11880-error Bad Mood Code
Failure a-67-11881-error Multiple main templateId
Failure a-67-11884-error Missing id
Failure a-67-11885-error Missing or multiple code
Failure a-67-11886-error Missing or bad code @code="33999-4"
Failure a-67-27011-error Missing or bad code @codeSystem="2.16.840.1.113883.6.1"
Expand All @@ -28,10 +28,6 @@
<templateId root="2.16.840.1.113883.10.20.24.3.93"/>
<!-- a-67-11881-error Multiple main templateId -->
<templateId root="2.16.840.1.113883.10.20.24.3.93"/>
<!-- a-67-11884-error Missing id -->
<!--
<id root="29b776d3-089b-4a7f-b6e9-e45080091922"/>
-->
<code code="33999-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"
displayName="Status"/>
<!-- a-67-11885-error Missing or multiple code -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Title: Status minimal sample file
Author: Dan Donahue
Date: 10-12-2017
Update: 01-10-2018 Removed <id>
Total Errors Expected: 0
Expand All @@ -15,7 +16,6 @@
xmlns:voc="urn:hl7-org:v3/voc" xmlns:sdtc="urn:hl7-org:sdtc">\
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.24.3.93" />
<id root="29b776d3-089b-4a7f-b6e9-e45080091922" />
<code code="33999-4"
codeSystem="2.16.840.1.113883.6.1"
codeSystemName="LOINC"
Expand Down

0 comments on commit 4d9bc64

Please sign in to comment.