cda-schematron-validator 1.0.10 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/package.json +1 -1
- package/test/CDAR2_IG_CCDA_CLINNOTES_R1_DSTU2.1_2015AUG_Vol2_2019JUNwith_errata.sch +71 -0
- package/test/VitalSigns.xml +856 -0
- package/test/{testsAsync.js → async.test.js} +0 -0
- package/test/vitalSigns.test.js +128 -0
- package/test/voc.xml +44 -0
- package/validator.js +6 -28
package/README.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
# [cda-schematron-validator](https://github.com/priyaranjan-tokachichu/cda-schematron-validator)
|
|
2
2
|
## Release History
|
|
3
3
|
Starting release history with 1.0.7
|
|
4
|
+
### 1.1.1
|
|
5
|
+
- Only keeping the necessary data in the test files taken from HL7 C-CDA schematron repository to avoid bloating the module
|
|
6
|
+
### 1.1.0
|
|
7
|
+
- Fix the issue with the rule check which was working in the original repository, but not in the fork
|
|
8
|
+
- Added HL7 C-CDA schematron file and resource file from https://github.com/HL7/CDA-ccda-2.1/releases/tag/2019JUN
|
|
9
|
+
- Added a test case vitalSigns.test.js that tests the resource file and sub assertions
|
|
10
|
+
- Used resources https://github.com/jddamore/ccda-samples and https://github.com/HL7/C-CDA-Examples/tree/master/Vital%20Signs to create the test file vitalSigns.xml
|
|
4
11
|
### 1.0.10
|
|
5
12
|
- Fix null context issue associated with assertions within assertions
|
|
6
13
|
- Skip abstract rules associated with assertions within assertions
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cda-schematron-validator",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Fork of Eric Wadkins' javascript implementation of schematron testing for C-CDA XML documents. This includes bug fixes and some house keeping.",
|
|
5
5
|
"main": "validator.js",
|
|
6
6
|
"scripts": {
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
|
2
|
+
<!--
|
|
3
|
+
|
|
4
|
+
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED 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 LANTANA CONSULTING GROUP LLC, OR ANY OF THEIR 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.
|
|
5
|
+
Schematron generated from Trifolia on 7/3/2019
|
|
6
|
+
-->
|
|
7
|
+
<sch:schema xmlns:voc="http://www.lantanagroup.com/voc" xmlns:svs="urn:ihe:iti:svs:2008" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sdtc="urn:hl7-org:sdtc" xmlns="urn:hl7-org:v3" xmlns:cda="urn:hl7-org:v3" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
|
|
8
|
+
<sch:ns prefix="voc" uri="http://www.lantanagroup.com/voc" />
|
|
9
|
+
<sch:ns prefix="svs" uri="urn:ihe:iti:svs:2008" />
|
|
10
|
+
<sch:ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance" />
|
|
11
|
+
<sch:ns prefix="sdtc" uri="urn:hl7-org:sdtc" />
|
|
12
|
+
<sch:ns prefix="cda" uri="urn:hl7-org:v3" />
|
|
13
|
+
<sch:phase id="errors">
|
|
14
|
+
<sch:active pattern="p-urn-hl7ii-2.16.840.1.113883.10.20.22.4.27-2014-06-09-errors" />
|
|
15
|
+
<sch:active pattern="p-urn-hl7ii-2.16.840.1.113883.10.20.22.4.70-2014-06-09-errors" />
|
|
16
|
+
</sch:phase>
|
|
17
|
+
<sch:phase id="warnings">
|
|
18
|
+
<sch:active pattern="p-urn-oid-2.16.840.1.113883.10.20.22.5.2-warnings" />
|
|
19
|
+
</sch:phase>
|
|
20
|
+
<sch:pattern id="p-urn-hl7ii-2.16.840.1.113883.10.20.22.4.27-2014-06-09-errors">
|
|
21
|
+
<sch:rule id="r-urn-hl7ii-2.16.840.1.113883.10.20.22.4.27-2014-06-09-errors-abstract" abstract="true">
|
|
22
|
+
<sch:assert id="a-1098-7297" test="@classCode='OBS'">SHALL contain exactly one [1..1] @classCode="OBS" Observation (CodeSystem: HL7ActClass urn:oid:2.16.840.1.113883.5.6 STATIC) (CONF:1098-7297).</sch:assert>
|
|
23
|
+
<sch:assert id="a-1098-7298" test="@moodCode='EVN'">SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: HL7ActMood urn:oid:2.16.840.1.113883.5.1001 STATIC) (CONF:1098-7298).</sch:assert>
|
|
24
|
+
<sch:assert id="a-1098-7300" test="count(cda:id) > 0">SHALL contain at least one [1..*] id (CONF:1098-7300).</sch:assert>
|
|
25
|
+
<sch:assert id="a-1098-7301" test="count(cda:code)=1">SHALL contain exactly one [1..1] code (CONF:1098-7301).</sch:assert>
|
|
26
|
+
<sch:assert id="a-1098-7303" test="count(cda:statusCode)=1">SHALL contain exactly one [1..1] statusCode (CONF:1098-7303).</sch:assert>
|
|
27
|
+
<sch:assert id="a-1098-19119" test="cda:statusCode[@code='completed']">This statusCode SHALL contain exactly one [1..1] @code="completed" Completed (CodeSystem: HL7ActStatus urn:oid:2.16.840.1.113883.5.14 STATIC) (CONF:1098-19119).</sch:assert>
|
|
28
|
+
<sch:assert id="a-1098-7304" test="count(cda:effectiveTime)=1">SHALL contain exactly one [1..1] effectiveTime (CONF:1098-7304).</sch:assert>
|
|
29
|
+
<sch:assert id="a-1098-7305" test="count(cda:value[@xsi:type='PQ'])=1">SHALL contain exactly one [1..1] value with @xsi:type="PQ" (CONF:1098-7305).</sch:assert>
|
|
30
|
+
<sch:assert id="a-1098-31579" test="cda:value[@xsi:type='PQ'][@unit]">This value SHALL contain exactly one [1..1] @unit, which SHALL be selected from ValueSet UnitsOfMeasureCaseSensitive urn:oid:2.16.840.1.113883.1.11.12839 DYNAMIC (CONF:1098-31579).</sch:assert>
|
|
31
|
+
<sch:assert id="a-1098-32886" test="not(cda:interpretationCode) or cda:interpretationCode[@code]">The interpretationCode, if present, SHALL contain exactly one [1..1] @code, which SHALL be selected from ValueSet Observation Interpretation (HL7) urn:oid:2.16.840.1.113883.1.11.78 DYNAMIC (CONF:1098-32886).</sch:assert>
|
|
32
|
+
</sch:rule>
|
|
33
|
+
<sch:rule id="r-urn-hl7ii-2.16.840.1.113883.10.20.22.4.27-2014-06-09-errors" context="cda:observation[cda:templateId[@root='2.16.840.1.113883.10.20.22.4.27' and @extension='2014-06-09']]">
|
|
34
|
+
<sch:extends rule="r-urn-hl7ii-2.16.840.1.113883.10.20.22.4.27-2014-06-09-errors-abstract" />
|
|
35
|
+
<sch:assert id="a-1098-7299" test="count(cda:templateId[@root='2.16.840.1.113883.10.20.22.4.27'][@extension='2014-06-09'])=1">SHALL contain exactly one [1..1] templateId (CONF:1098-7299) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.27" (CONF:1098-10527). SHALL contain exactly one [1..1] @extension="2014-06-09" (CONF:1098-32574).</sch:assert>
|
|
36
|
+
</sch:rule>
|
|
37
|
+
</sch:pattern>
|
|
38
|
+
<sch:pattern id="p-urn-hl7ii-2.16.840.1.113883.10.20.22.4.70-2014-06-09-errors">
|
|
39
|
+
<sch:rule id="r-urn-hl7ii-2.16.840.1.113883.10.20.22.4.70-2014-06-09-errors-abstract" abstract="true">
|
|
40
|
+
<sch:assert id="a-1098-14383" test="@classCode='OBS'">SHALL contain exactly one [1..1] @classCode="OBS" (CodeSystem: HL7ActClass urn:oid:2.16.840.1.113883.5.6 STATIC) (CONF:1098-14383).</sch:assert>
|
|
41
|
+
<sch:assert id="a-1098-14384" test="@moodCode='EVN'">SHALL contain exactly one [1..1] @moodCode="EVN" (CodeSystem: HL7ActMood urn:oid:2.16.840.1.113883.5.1001 STATIC) (CONF:1098-14384).</sch:assert>
|
|
42
|
+
<sch:assert id="a-1098-14389" test="count(cda:id) > 0">SHALL contain at least one [1..*] id (CONF:1098-14389).</sch:assert>
|
|
43
|
+
<sch:assert id="a-1098-14759" test="count(cda:code)=1">SHALL contain exactly one [1..1] code (CONF:1098-14759).</sch:assert>
|
|
44
|
+
<sch:assert id="a-1098-14760" test="cda:code[@code='ASSERTION' and @codeSystem='2.16.840.1.113883.5.4']">This code SHALL contain exactly one [1..1] @code="ASSERTION" Assertion (CodeSystem: HL7ActCode urn:oid:2.16.840.1.113883.5.4 STATIC) (CONF:1098-14760).</sch:assert>
|
|
45
|
+
<sch:assert id="a-1098-15585" test="not(cda:text/cda:reference) or cda:text/cda:reference[@value]">The reference, if present, SHALL contain exactly one [1..1] @value (CONF:1098-15585).</sch:assert>
|
|
46
|
+
<sch:assert id="a-1098-15586-c" test="count(cda:text/cda:reference[@value])=0 or starts-with(cda:text/cda:reference/@value, '#')">This reference/@value SHALL begin with a '#' and SHALL point to its corresponding narrative (using the approach defined in CDA Release 2, section 4.3.5.1) (CONF:1098-15586).</sch:assert>
|
|
47
|
+
<sch:assert id="a-1098-14394" test="count(cda:statusCode)=1">SHALL contain exactly one [1..1] statusCode (CONF:1098-14394).</sch:assert>
|
|
48
|
+
<sch:assert id="a-1098-19111" test="cda:statusCode[@code='completed']">This statusCode SHALL contain exactly one [1..1] @code="completed" Completed (CodeSystem: HL7ActStatus urn:oid:2.16.840.1.113883.5.14 STATIC) (CONF:1098-19111).</sch:assert>
|
|
49
|
+
<sch:assert id="a-1098-14395" test="count(cda:effectiveTime)=1">SHALL contain exactly one [1..1] effectiveTime (CONF:1098-14395).</sch:assert>
|
|
50
|
+
<sch:assert id="a-1098-14396" test="count(cda:value[@xsi:type='CD'])=1">SHALL contain exactly one [1..1] value with @xsi:type="CD", where the code SHOULD be selected from ValueSet Pressure Ulcer Stage urn:oid:2.16.840.1.113883.11.20.9.35 STATIC 2014-09-01 (CONF:1098-14396).</sch:assert>
|
|
51
|
+
<sch:assert id="a-1098-14798-c" test="not(cda:targetSiteCode) or cda:targetSiteCode[@code and @code=document('voc.xml')/voc:systems/voc:system[@valueSetOid='2.16.840.1.113883.11.20.9.36']/voc:code/@value]">The targetSiteCode, if present, SHALL contain exactly one [1..1] @code, which SHOULD be selected from ValueSet Pressure Point urn:oid:2.16.840.1.113883.11.20.9.36 STATIC (CONF:1098-14798).</sch:assert>
|
|
52
|
+
<sch:assert id="a-1098-14800-c" test="not(cda:targetSiteCode/cda:qualifier) or cda:targetSiteCode/cda:qualifier[count(cda:name)=1]">The qualifier, if present, SHALL contain exactly one [1..1] name (CONF:1098-14800).</sch:assert>
|
|
53
|
+
<sch:assert id="a-1098-14802-c" test="not(cda:targetSiteCode/cda:qualifier) or cda:targetSiteCode/cda:qualifier[count(cda:value)=1]">The qualifier, if present, SHALL contain exactly one [1..1] value (CONF:1098-14802).</sch:assert>
|
|
54
|
+
</sch:rule>
|
|
55
|
+
<sch:rule id="r-urn-hl7ii-2.16.840.1.113883.10.20.22.4.70-2014-06-09-errors" context="cda:observation[cda:templateId[@root='2.16.840.1.113883.10.20.22.4.70' and @extension='2014-06-09']]">
|
|
56
|
+
<sch:extends rule="r-urn-hl7ii-2.16.840.1.113883.10.20.22.4.70-2014-06-09-errors-abstract" />
|
|
57
|
+
<sch:assert id="a-1098-14387" test="count(cda:templateId[@root='2.16.840.1.113883.10.20.22.4.70'][@extension='2014-06-09'])=1">SHALL contain exactly one [1..1] templateId (CONF:1098-14387) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.70" (CONF:1098-14388). SHALL contain exactly one [1..1] @extension="2014-06-09" (CONF:1098-32594).</sch:assert>
|
|
58
|
+
</sch:rule>
|
|
59
|
+
</sch:pattern>
|
|
60
|
+
<sch:pattern id="p-urn-oid-2.16.840.1.113883.10.20.22.5.2-warnings">
|
|
61
|
+
<sch:rule id="r-urn-oid-2.16.840.1.113883.10.20.22.5.2-warnings-abstract" abstract="true">
|
|
62
|
+
<sch:assert id="a-81-7290" test="@use">SHOULD contain zero or one [0..1] @use, which SHALL be selected from ValueSet PostalAddressUse urn:oid:2.16.840.1.113883.1.11.10637 STATIC 2005-05-01 (CONF:81-7290).</sch:assert>
|
|
63
|
+
<sch:assert id="a-81-7293" test="count(cda:state)=1">SHOULD contain zero or one [0..1] state (ValueSet: StateValueSet urn:oid:2.16.840.1.113883.3.88.12.80.1 DYNAMIC) (CONF:81-7293).</sch:assert>
|
|
64
|
+
<sch:assert id="a-81-7294-c" test="not(tested_here)">SHOULD contain zero or one [0..1] postalCode, which SHOULD be selected from ValueSet PostalCode urn:oid:2.16.840.1.113883.3.88.12.80.2 DYNAMIC (CONF:81-7294).</sch:assert>
|
|
65
|
+
<sch:assert id="a-81-7295" test="count(cda:country)=1">SHOULD contain zero or one [0..1] country, which SHALL be selected from ValueSet Country urn:oid:2.16.840.1.113883.3.88.12.80.63 DYNAMIC (CONF:81-7295).</sch:assert>
|
|
66
|
+
</sch:rule>
|
|
67
|
+
<sch:rule id="r-urn-oid-2.16.840.1.113883.10.20.22.5.2-warnings" context="cda:observation[cda:templateId[@root='2.16.840.1.113883.10.20.22.4.48' and @extension='2014-06-09']]/cda:participant/cda:participantRole/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2014-06-09']]/cda:recordTarget/cda:patientRole/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2014-06-09']]/cda:recordTarget/cda:patientRole/cda:patient/cda:guardian/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2014-06-09']]/cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2014-06-09']]/cda:author/cda:assignedAuthor/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2014-06-09']]/cda:dataEnterer/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2014-06-09']]/cda:informant/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2014-06-09']]/cda:custodian/cda:assignedCustodian/cda:representedCustodianOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2014-06-09']]/cda:legalAuthenticator/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2014-06-09']]/cda:authenticator/cda:assignedEntity/cda:addr | cda:supply[cda:templateId[@root='2.16.840.1.113883.10.20.22.4.18' and @extension='2014-06-09']]/cda:performer/cda:assignedEntity/cda:addr | cda:act[cda:templateId[@root='2.16.840.1.113883.10.20.22.4.61' and @extension='2014-06-09']]/cda:performer/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.13.1' and @extension='2014-08-08']]/cda:custodian/cda:assignedCustodian/cda:representedCustodianOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='1.2.3.4']]/cda:recordTarget/cda:patientRole/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.13.1' and @extension='2014-08-08']]/cda:author/cda:assignedAuthor/cda:addr | cda:participant[cda:templateId[@root='2.16.840.1.113883.10.14.34' and @extension='2014-27-10']]/cda:associatedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.13.1' and @extension='2014-08-08']]/cda:componentOf/cda:encompassingEncounter/cda:location/cda:healthCareFacility/cda:serviceProviderOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.13.1' and @extension='2014-08-08']]/cda:documentationOf/cda:serviceEvent/cda:performer/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.13.1' and @extension='2014-08-08']]/cda:componentOf/cda:encompassingEncounter/cda:encounterParticipant/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.13.1' and @extension='2014-08-08']]/cda:componentOf/cda:encompassingEncounter/cda:encounterParticipant/cda:assignedEntity/cda:representedOrganization/cda:addr | cda:procedure[cda:templateId[@root='2.16.840.1.113883.10.13.15' and @extension='2014-08-08']]/cda:performer/cda:assignedEntity/cda:addr | cda:encounter[cda:templateId[@root='2.16.840.1.113883.10.13.20' and @extension='2014-08-08']]/cda:performer/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.13.1' and @extension='2015-01-29']]/cda:componentOf/cda:encompassingEncounter/cda:encounterParticipant/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.13.1' and @extension='2015-01-29']]/cda:componentOf/cda:encompassingEncounter/cda:encounterParticipant/cda:assignedEntity/cda:representedOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.13.1' and @extension='2015-01-29']]/cda:componentOf/cda:encompassingEncounter/cda:location/cda:healthCareFacility/cda:serviceProviderOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.13.1' and @extension='2015-01-29']]/cda:custodian/cda:assignedCustodian/cda:representedCustodianOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.13.1' and @extension='2015-01-29']]/cda:author/cda:assignedAuthor/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.13.1' and @extension='2015-01-29']]/cda:documentationOf/cda:serviceEvent/cda:performer/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.19.1.1' and @extension='2014-11-03']]/cda:recordTarget/cda:patientRole/cda:addr | cda:ClinicalDocument[cda:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.19.1.1' and @extension='2014-11-03']]/cda:recordTarget/cda:patientRole/cda:patient/cda:guardian/cda:addr | cda:ClinicalDocument[cda:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.19.1.1' and @extension='2014-11-03']]/cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.19.1.1' and @extension='2014-11-03']]/cda:author/cda:assignedAuthor/cda:addr | cda:ClinicalDocument[cda:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.19.1.1' and @extension='2014-11-03']]/cda:dataEnterer/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.19.1.1' and @extension='2014-11-03']]/cda:informant/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.19.1.1' and @extension='2014-11-03']]/cda:custodian/cda:assignedCustodian/cda:representedCustodianOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.19.1.1' and @extension='2014-11-03']]/cda:legalAuthenticator/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.19.1.1' and @extension='2014-11-03']]/cda:authenticator/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.24.1.3' and @extension='2015-07-01']]/cda:recordTarget/cda:patientRole/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.3.5416.1.8981.1.1']]/cda:recordTarget/cda:patientRole/cda:addr | cda:observation[cda:templateId[@root='2.16.840.1.113883.10.20.22.4.48' and @extension='2015-08-01']]/cda:participant/cda:participantRole/cda:addr | cda:act[cda:templateId[@root='2.16.840.1.113883.10.20.22.4.61' and @extension='2015-08-01']]/cda:performer/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2015-08-01']]/cda:recordTarget/cda:patientRole/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2015-08-01']]/cda:recordTarget/cda:patientRole/cda:patient/cda:guardian/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2015-08-01']]/cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2015-08-01']]/cda:author/cda:assignedAuthor/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2015-08-01']]/cda:dataEnterer/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2015-08-01']]/cda:informant/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2015-08-01']]/cda:custodian/cda:assignedCustodian/cda:representedCustodianOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2015-08-01']]/cda:legalAuthenticator/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2015-08-01']]/cda:authenticator/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2015-11-02']]/cda:recordTarget/cda:patientRole/cda:patient/cda:guardian/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2015-11-02']]/cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2015-11-02']]/cda:recordTarget/cda:patientRole/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2015-11-02']]/cda:author/cda:assignedAuthor/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2015-11-02']]/cda:dataEnterer/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2015-11-02']]/cda:informant/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2015-11-02']]/cda:custodian/cda:assignedCustodian/cda:representedCustodianOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2015-11-02']]/cda:legalAuthenticator/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.1' and @extension='2015-11-02']]/cda:authenticator/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='20160422']]/cda:recordTarget/cda:patientRole/cda:patient/cda:guardian/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='2016-01-22']]/cda:componentOf/cda:encompassingEncounter/cda:responsibleParty/cda:assignedEntity/cda:representedOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='2016-01-22']]/cda:componentOf/cda:encompassingEncounter/cda:responsibleParty/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='2016-01-22']]/cda:componentOf/cda:encompassingEncounter/cda:location/cda:healthCareFacility/cda:location/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='2016-01-22']]/cda:componentOf/cda:encompassingEncounter/cda:location/cda:healthCareFacility/cda:serviceProviderOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='2016-01-22']]/cda:recordTarget/cda:patientRole/cda:patient/cda:guardian/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='2016-02-08']]/cda:componentOf/cda:encompassingEncounter/cda:responsibleParty/cda:assignedEntity/cda:representedOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='2016-02-08']]/cda:componentOf/cda:encompassingEncounter/cda:responsibleParty/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='2016-02-08']]/cda:componentOf/cda:encompassingEncounter/cda:location/cda:healthCareFacility/cda:location/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='2016-02-08']]/cda:componentOf/cda:encompassingEncounter/cda:location/cda:healthCareFacility/cda:serviceProviderOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='2016-02-08']]/cda:recordTarget/cda:patientRole/cda:patient/cda:guardian/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.24.1.3' and @extension='2016-03-01']]/cda:recordTarget/cda:patientRole/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.9999' and @extension='2016-03-23']]/cda:recordTarget/cda:patientRole/cda:patient/cda:guardian/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.9999' and @extension='2016-03-23']]/cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.9999' and @extension='2016-03-23']]/cda:recordTarget/cda:patientRole/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.9999' and @extension='2016-03-23']]/cda:author/cda:assignedAuthor/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.9999' and @extension='2016-03-23']]/cda:dataEnterer/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.9999' and @extension='2016-03-23']]/cda:informant/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.9999' and @extension='2016-03-23']]/cda:custodian/cda:assignedCustodian/cda:representedCustodianOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.9999' and @extension='2016-03-23']]/cda:legalAuthenticator/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.22.1.9999' and @extension='2016-03-23']]/cda:authenticator/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='20160422']]/cda:recordTarget/cda:patientRole/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='20160422']]/cda:componentOf/cda:encompassingEncounter/cda:responsibleParty/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='20160422']]/cda:componentOf/cda:encompassingEncounter/cda:responsibleParty/cda:assignedEntity/cda:representedOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='20160422']]/cda:componentOf/cda:encompassingEncounter/cda:location/cda:healthCareFacility/cda:location/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='20160422']]/cda:componentOf/cda:encompassingEncounter/cda:location/cda:healthCareFacility/cda:serviceProviderOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='2016-12-01']]/cda:componentOf/cda:encompassingEncounter/cda:responsibleParty/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='2016-12-01']]/cda:componentOf/cda:encompassingEncounter/cda:responsibleParty/cda:assignedEntity/cda:representedOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='2016-12-01']]/cda:componentOf/cda:encompassingEncounter/cda:location/cda:healthCareFacility/cda:location/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='2016-12-01']]/cda:componentOf/cda:encompassingEncounter/cda:location/cda:healthCareFacility/cda:serviceProviderOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='2016-12-01']]/cda:recordTarget/cda:patientRole/cda:patient/cda:guardian/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='2016-12-01']]/cda:recordTarget/cda:patientRole/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2.1.2' and @extension='2017-04-01']]/cda:componentOf/cda:encompassingEncounter/cda:responsibleParty/cda:assignedEntity/cda:representedOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2.1.2' and @extension='2017-04-01']]/cda:componentOf/cda:encompassingEncounter/cda:responsibleParty/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2.1.2' and @extension='2017-04-01']]/cda:componentOf/cda:encompassingEncounter/cda:location/cda:healthCareFacility/cda:location/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2.1.2' and @extension='2017-04-01']]/cda:componentOf/cda:encompassingEncounter/cda:location/cda:healthCareFacility/cda:serviceProviderOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2.1.2' and @extension='2017-04-01']]/cda:recordTarget/cda:patientRole/cda:patient/cda:guardian/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2.1.2' and @extension='2017-04-01']]/cda:recordTarget/cda:patientRole/cda:addr | cda:performer[cda:templateId[@root='2.16.840.1.113883.10.20.37.4.1' and @extension='2017-08-01']]/cda:assignedEntity/cda:representedOrganization/cda:addr | cda:author[cda:templateId[@root='2.16.840.1.113883.10.20.37.4.2' and @extension='2017-08-01']]/cda:assignedAuthor/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.24.1.3' and @extension='2017-07-01']]/cda:recordTarget/cda:patientRole/cda:addr | cda:observation[cda:templateId[@root='2.16.840.1.113883.10.20.22.4.48' and @extension='2017-05-01']]/cda:participant/cda:participantRole/cda:addr | cda:ClinicalDocument[cda:templateId[@root='https://mytest.Header123']]/cda:recordTarget/cda:patientRole/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2.1.2' and @extension='2017-04-01']]/cda:informationRecipient/cda:intendedRecipient/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2.1.2' and @extension='2017-04-01']]/cda:informationRecipient/cda:intendedRecipient/cda:receivedOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.24.1.3' and @extension='2018-02-01']]/cda:recordTarget/cda:patientRole/cda:addr | cda:ClinicalDocument[cda:templateId[@root='https://icHeader.abc-orig']]/cda:recordTarget/cda:patientRole/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.3.5416.1.8981.1.1']]/cda:authenticator/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='2019-04-01']]/cda:componentOf/cda:encompassingEncounter/cda:responsibleParty/cda:assignedEntity/cda:representedOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='2019-04-01']]/cda:componentOf/cda:encompassingEncounter/cda:responsibleParty/cda:assignedEntity/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='2019-04-01']]/cda:componentOf/cda:encompassingEncounter/cda:location/cda:healthCareFacility/cda:location/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='2019-04-01']]/cda:componentOf/cda:encompassingEncounter/cda:location/cda:healthCareFacility/cda:serviceProviderOrganization/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='2019-04-01']]/cda:recordTarget/cda:patientRole/cda:patient/cda:guardian/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.15.2' and @extension='2019-04-01']]/cda:recordTarget/cda:patientRole/cda:addr | cda:ClinicalDocument[cda:templateId[@root='2.16.840.1.113883.10.20.24.1.3' and @extension='2019-02-01']]/cda:recordTarget/cda:patientRole/cda:addr">
|
|
68
|
+
<sch:extends rule="r-urn-oid-2.16.840.1.113883.10.20.22.5.2-warnings-abstract" />
|
|
69
|
+
</sch:rule>
|
|
70
|
+
</sch:pattern>
|
|
71
|
+
</sch:schema>
|
|
@@ -0,0 +1,856 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!-- This XML document was retrieved from a public repository of certified EHR samples for Meaningful Use
|
|
3
|
+
That repository states "The public will be able to view-download the submitted files from this repository."
|
|
4
|
+
The original files have been edited to make them human-readable and easier to download. Please refer to source repository for original versions
|
|
5
|
+
The copy date of original repository was February 1, 2018. Here is original repository: https://github.com/siteadmin/2015-C-CDA-Certification-Samples
|
|
6
|
+
All of these samples were supposed be C-CDA 2.1 clinical documents. The following disclaimer applies to ALL INFORMATION contained herein:
|
|
7
|
+
THIS INFORMATION IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
8
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
9
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE INFORMATION OR THE USE OR OTHER DEALINGS IN THE INFORMATION.
|
|
10
|
+
Beyond that, I hope they are useful and "hooray" for government transparency! John D'Amore, Diameter Health, Inc. -->
|
|
11
|
+
<ClinicalDocument
|
|
12
|
+
xmlns="urn:hl7-org:v3"
|
|
13
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
14
|
+
|
|
15
|
+
xmlns:voc="urn:hl7-org:v3/voc"
|
|
16
|
+
xmlns:sdtc="urn:hl7-org:sdtc">
|
|
17
|
+
<realmCode code="US"/>
|
|
18
|
+
<typeId extension="POCD_HD000040" root="2.16.840.1.113883.1.3"/>
|
|
19
|
+
<templateId root="2.16.840.1.113883.10.20.22.1.1" extension="2015-08-01"/>
|
|
20
|
+
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
|
|
21
|
+
<templateId root="2.16.840.1.113883.10.20.22.1.2" extension="2015-08-01"/>
|
|
22
|
+
<templateId root="2.16.840.1.113883.10.20.22.1.2"/>
|
|
23
|
+
<id extension="TT104" root="2.16.840.1.113883.19.5.99999.1"/>
|
|
24
|
+
<code code="34133-9" displayName="Summary of Episode" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
|
|
25
|
+
<title>EMR Direct Test EHR Referral Note</title>
|
|
26
|
+
<effectiveTime value="20150722"/>
|
|
27
|
+
<confidentialityCode code="N" displayName="normal" codeSystem="2.16.840.1.113883.5.25" codeSystemName="Confidentiality"/>
|
|
28
|
+
<languageCode code="en-US"/>
|
|
29
|
+
<setId extension="sTT104" root="2.16.840.1.113883.19.5.99999.19"/>
|
|
30
|
+
<versionNumber value="1"/>
|
|
31
|
+
<recordTarget>
|
|
32
|
+
<patientRole>
|
|
33
|
+
<id extension="115253336" root="2.16.840.1.113883.4.1"/>
|
|
34
|
+
<addr use="HP">
|
|
35
|
+
<streetAddressLine>1357 Amber Dr</streetAddressLine>
|
|
36
|
+
<city>Beaverton</city>
|
|
37
|
+
<state>OR</state>
|
|
38
|
+
<postalCode>97006</postalCode>
|
|
39
|
+
<country>US</country>
|
|
40
|
+
</addr>
|
|
41
|
+
<telecom value="tel:+1(555)-777-1234" use="MC"/>
|
|
42
|
+
<telecom value="tel:+1(555)-723-1544" use="HP"/>
|
|
43
|
+
<patient>
|
|
44
|
+
<name use="L">
|
|
45
|
+
<given>Jeremy</given>
|
|
46
|
+
<given qualifier="BR">V</given>
|
|
47
|
+
<family>Bates</family>
|
|
48
|
+
<suffix>Jr</suffix>
|
|
49
|
+
</name>
|
|
50
|
+
<administrativeGenderCode code="M" displayName="Male" codeSystem="2.16.840.1.113883.5.1" codeSystemName="AdministrativeGender"/>
|
|
51
|
+
<birthTime value="19800801"/>
|
|
52
|
+
<maritalStatusCode nullFlavor="UNK"/>
|
|
53
|
+
<religiousAffiliationCode code="1013" displayName="Christian (non-Catholic, non-specific)" codeSystem="2.16.840.1.113883.5.1076" codeSystemName="HL7 Religious Affiliation"/>
|
|
54
|
+
<raceCode nullFlavor="UNK"/>
|
|
55
|
+
<sdtc:raceCode nullFlavor="UNK"/>
|
|
56
|
+
<ethnicGroupCode nullFlavor="UNK"/>
|
|
57
|
+
<languageCommunication>
|
|
58
|
+
<languageCode code="en-US"/>
|
|
59
|
+
<modeCode code="ESP" displayName="Expressed spoken"
|
|
60
|
+
codeSystem="2.16.840.1.113883.5.60" codeSystemName="LanguageAbilityMode"/>
|
|
61
|
+
<preferenceInd value="true"/>
|
|
62
|
+
</languageCommunication>
|
|
63
|
+
</patient>
|
|
64
|
+
<providerOrganization>
|
|
65
|
+
<id extension="99999999" root="2.16.840.1.113883.4.6"/>
|
|
66
|
+
<name>Neighborhood Physicians Practice</name>
|
|
67
|
+
<telecom use="WP" value="tel:+1(555)-555-1002"/>
|
|
68
|
+
<addr>
|
|
69
|
+
<streetAddressLine>2472 Rocky Place</streetAddressLine>
|
|
70
|
+
<city>Beaverton</city>
|
|
71
|
+
<state>OR</state>
|
|
72
|
+
<postalCode>97006</postalCode>
|
|
73
|
+
<country>US</country>
|
|
74
|
+
</addr>
|
|
75
|
+
</providerOrganization>
|
|
76
|
+
</patientRole>
|
|
77
|
+
</recordTarget>
|
|
78
|
+
<author>
|
|
79
|
+
<time value="20150722"/>
|
|
80
|
+
<assignedAuthor>
|
|
81
|
+
<id extension="111111" root="2.16.840.1.113883.4.6"/>
|
|
82
|
+
<code code="200000000X" codeSystem="2.16.840.1.113883.6.101"
|
|
83
|
+
displayName="Allopathic & Osteopathic Physicians"/>
|
|
84
|
+
<addr>
|
|
85
|
+
<streetAddressLine>2472 Rocky Place</streetAddressLine>
|
|
86
|
+
<city>Beaverton</city>
|
|
87
|
+
<state>OR</state>
|
|
88
|
+
<postalCode>97006</postalCode>
|
|
89
|
+
<country>US</country>
|
|
90
|
+
</addr>
|
|
91
|
+
<telecom use="WP" value="tel:+1(555)-555-1002"/>
|
|
92
|
+
<assignedAuthoringDevice>
|
|
93
|
+
<manufacturerModelName>Neighborhood Physicians Practice EMR</manufacturerModelName>
|
|
94
|
+
<softwareName>EMR Direct Test EMR</softwareName>
|
|
95
|
+
</assignedAuthoringDevice>
|
|
96
|
+
<representedOrganization>
|
|
97
|
+
<id root="2.16.840.1.113883.19.5"/>
|
|
98
|
+
<name>Neighborhood Physicians Practice</name>
|
|
99
|
+
</representedOrganization>
|
|
100
|
+
</assignedAuthor>
|
|
101
|
+
</author>
|
|
102
|
+
<dataEnterer>
|
|
103
|
+
<assignedEntity>
|
|
104
|
+
<id root="2.16.840.1.113883.4.6" extension="999999943252"/>
|
|
105
|
+
<addr>
|
|
106
|
+
<streetAddressLine>2472 Rocky Place</streetAddressLine>
|
|
107
|
+
<city>Beaverton</city>
|
|
108
|
+
<state>OR</state>
|
|
109
|
+
<postalCode>97006</postalCode>
|
|
110
|
+
<country>US</country>
|
|
111
|
+
</addr>
|
|
112
|
+
<telecom use="WP" value="tel:+1(555)-555-1002"/>
|
|
113
|
+
<assignedPerson>
|
|
114
|
+
<name>
|
|
115
|
+
<given>Tracy</given>
|
|
116
|
+
<family>Davis</family>
|
|
117
|
+
</name>
|
|
118
|
+
</assignedPerson>
|
|
119
|
+
</assignedEntity>
|
|
120
|
+
</dataEnterer>
|
|
121
|
+
<informant>
|
|
122
|
+
<assignedEntity>
|
|
123
|
+
<id extension="KP00017" root="2.16.840.1.113883.19.5"/>
|
|
124
|
+
<addr>
|
|
125
|
+
<streetAddressLine>2472 Rocky Place</streetAddressLine>
|
|
126
|
+
<city>Beaverton</city>
|
|
127
|
+
<state>OR</state>
|
|
128
|
+
<postalCode>97006</postalCode>
|
|
129
|
+
<country>US</country>
|
|
130
|
+
</addr>
|
|
131
|
+
<telecom use="WP" value="tel:+1(555)-555-1002"/>
|
|
132
|
+
<assignedPerson>
|
|
133
|
+
<name>
|
|
134
|
+
<given>Albert</given>
|
|
135
|
+
<family>Davis</family>
|
|
136
|
+
</name>
|
|
137
|
+
</assignedPerson>
|
|
138
|
+
</assignedEntity>
|
|
139
|
+
</informant>
|
|
140
|
+
<informant>
|
|
141
|
+
<relatedEntity classCode="PRS">
|
|
142
|
+
<code code="SPS" displayName="SPOUSE" codeSystem="2.16.840.1.113883.1.11.19563"
|
|
143
|
+
codeSystemName="Personal Relationship Role Type Value Set"/>
|
|
144
|
+
<relatedPerson>
|
|
145
|
+
<name>
|
|
146
|
+
<given>Kathy</given>
|
|
147
|
+
<family>Bates</family>
|
|
148
|
+
</name>
|
|
149
|
+
</relatedPerson>
|
|
150
|
+
</relatedEntity>
|
|
151
|
+
</informant>
|
|
152
|
+
<custodian>
|
|
153
|
+
<assignedCustodian>
|
|
154
|
+
<representedCustodianOrganization>
|
|
155
|
+
<id extension="99999999" root="2.16.840.1.113883.4.6"/>
|
|
156
|
+
<name>Neighborhood Physicians Practice</name>
|
|
157
|
+
<telecom value="tel:+1(555)-555-1002" use="WP"/>
|
|
158
|
+
<addr use="WP">
|
|
159
|
+
<streetAddressLine>2472 Rocky Place</streetAddressLine>
|
|
160
|
+
<city>Beaverton</city>
|
|
161
|
+
<state>OR</state>
|
|
162
|
+
<postalCode>97006</postalCode>
|
|
163
|
+
<country>US</country>
|
|
164
|
+
</addr>
|
|
165
|
+
</representedCustodianOrganization>
|
|
166
|
+
</assignedCustodian>
|
|
167
|
+
</custodian>
|
|
168
|
+
<informationRecipient>
|
|
169
|
+
<intendedRecipient>
|
|
170
|
+
<informationRecipient>
|
|
171
|
+
<name>
|
|
172
|
+
<prefix>Dr</prefix>
|
|
173
|
+
<given>Albert</given>
|
|
174
|
+
<family>Davis</family>
|
|
175
|
+
</name>
|
|
176
|
+
</informationRecipient>
|
|
177
|
+
<receivedOrganization>
|
|
178
|
+
<name>Neighborhood Physicians Practice</name>
|
|
179
|
+
</receivedOrganization>
|
|
180
|
+
</intendedRecipient>
|
|
181
|
+
</informationRecipient>
|
|
182
|
+
<legalAuthenticator>
|
|
183
|
+
<time value="20150722"/>
|
|
184
|
+
<signatureCode code="S"/>
|
|
185
|
+
<assignedEntity>
|
|
186
|
+
<id extension="999999999" root="2.16.840.1.113883.4.6"/>
|
|
187
|
+
<addr>
|
|
188
|
+
<streetAddressLine>2472 Rocky Place</streetAddressLine>
|
|
189
|
+
<city>Beaverton</city>
|
|
190
|
+
<state>OR</state>
|
|
191
|
+
<postalCode>97006</postalCode>
|
|
192
|
+
<country>US</country>
|
|
193
|
+
</addr>
|
|
194
|
+
<telecom use="WP" value="tel:+1(555)-555-1002"/>
|
|
195
|
+
<assignedPerson>
|
|
196
|
+
<name>
|
|
197
|
+
<prefix>Dr</prefix>
|
|
198
|
+
<given>Albert</given>
|
|
199
|
+
<family>Davis</family>
|
|
200
|
+
</name>
|
|
201
|
+
</assignedPerson>
|
|
202
|
+
</assignedEntity>
|
|
203
|
+
</legalAuthenticator>
|
|
204
|
+
<authenticator>
|
|
205
|
+
<time value="20150722"/>
|
|
206
|
+
<signatureCode code="S"/>
|
|
207
|
+
<assignedEntity>
|
|
208
|
+
<id extension="999999999" root="2.16.840.1.113883.4.6"/>
|
|
209
|
+
<addr>
|
|
210
|
+
<streetAddressLine>2472 Rocky Place</streetAddressLine>
|
|
211
|
+
<city>Beaverton</city>
|
|
212
|
+
<state>OR</state>
|
|
213
|
+
<postalCode>97006</postalCode>
|
|
214
|
+
<country>US</country>
|
|
215
|
+
</addr>
|
|
216
|
+
<telecom use="WP" value="tel:+1(555)-555-1002"/>
|
|
217
|
+
<assignedPerson>
|
|
218
|
+
<name>
|
|
219
|
+
<prefix>Dr</prefix>
|
|
220
|
+
<given>Albert</given>
|
|
221
|
+
<family>Davis</family>
|
|
222
|
+
</name>
|
|
223
|
+
</assignedPerson>
|
|
224
|
+
</assignedEntity>
|
|
225
|
+
</authenticator>
|
|
226
|
+
<participant typeCode="IND">
|
|
227
|
+
<associatedEntity classCode="PRS">
|
|
228
|
+
<code code="GPARNT" displayName="grandparent" codeSystem="2.16.840.1.113883.1.11.19563"
|
|
229
|
+
codeSystemName="Personal Relationship Role Type Value Set"/>
|
|
230
|
+
<addr use="HP">
|
|
231
|
+
<streetAddressLine>1357 Amber Dr</streetAddressLine>
|
|
232
|
+
<city>Beaverton</city>
|
|
233
|
+
<state>OR</state>
|
|
234
|
+
<postalCode>97006</postalCode>
|
|
235
|
+
<country>US</country>
|
|
236
|
+
</addr>
|
|
237
|
+
<telecom value="tel:+1(555)-723-1544" use="HP"/>
|
|
238
|
+
<associatedPerson>
|
|
239
|
+
<name>
|
|
240
|
+
<prefix>Mr.</prefix>
|
|
241
|
+
<given>Mathew</given>
|
|
242
|
+
<family>Bates</family>
|
|
243
|
+
</name>
|
|
244
|
+
</associatedPerson>
|
|
245
|
+
</associatedEntity>
|
|
246
|
+
</participant>
|
|
247
|
+
<participant typeCode="IND">
|
|
248
|
+
<associatedEntity classCode="PRS">
|
|
249
|
+
<code code="SPS" displayName="SPOUSE" codeSystem="2.16.840.1.113883.1.11.19563"
|
|
250
|
+
codeSystemName="Personal Relationship Role Type Value Set"/>
|
|
251
|
+
<addr use="HP">
|
|
252
|
+
<streetAddressLine>1357 Amber Dr</streetAddressLine>
|
|
253
|
+
<city>Beaverton</city>
|
|
254
|
+
<state>OR</state>
|
|
255
|
+
<postalCode>97006</postalCode>
|
|
256
|
+
<country>US</country>
|
|
257
|
+
</addr>
|
|
258
|
+
<telecom value="tel:+1(555)-723-1544" use="HP"/>
|
|
259
|
+
<associatedPerson>
|
|
260
|
+
<name>
|
|
261
|
+
<prefix>Ms</prefix>
|
|
262
|
+
<given>Kathy</given>
|
|
263
|
+
<family>Bates</family>
|
|
264
|
+
</name>
|
|
265
|
+
</associatedPerson>
|
|
266
|
+
</associatedEntity>
|
|
267
|
+
</participant>
|
|
268
|
+
<documentationOf>
|
|
269
|
+
<serviceEvent classCode="PCPR">
|
|
270
|
+
<code code="78318003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED-CT"
|
|
271
|
+
displayName="Annual Health Maintenance, History and Physical"/>
|
|
272
|
+
<effectiveTime>
|
|
273
|
+
<low value="201507221400-0500"/>
|
|
274
|
+
<high value="201507221430-0500"/>
|
|
275
|
+
</effectiveTime>
|
|
276
|
+
<performer typeCode="PRF">
|
|
277
|
+
<functionCode code="PCP" codeSystem="2.16.840.1.113883.5.88" codeSystemName="ParticipationFunction" displayName="Primary Care Provider">
|
|
278
|
+
<originalText>Primary Care Provider</originalText>
|
|
279
|
+
</functionCode>
|
|
280
|
+
<assignedEntity>
|
|
281
|
+
<id extension="5555555555" root="2.16.840.1.113883.4.6"/>
|
|
282
|
+
<code code="207QA0505X" displayName="Adult Medicine" codeSystem="2.16.840.1.113883.6.101" codeSystemName="Healthcare Provider Taxonomy (HIPAA)"/>
|
|
283
|
+
<addr>
|
|
284
|
+
<streetAddressLine>2472 Rocky Place</streetAddressLine>
|
|
285
|
+
<city>Beaverton</city>
|
|
286
|
+
<state>OR</state>
|
|
287
|
+
<postalCode>97006</postalCode>
|
|
288
|
+
<country>US</country>
|
|
289
|
+
</addr>
|
|
290
|
+
<telecom use="WP" value="tel:+1(555)-555-1002"/>
|
|
291
|
+
<assignedPerson>
|
|
292
|
+
<name>
|
|
293
|
+
<prefix qualifier="TITLE">Dr</prefix>
|
|
294
|
+
<given>Albert</given>
|
|
295
|
+
<family>Davis</family>
|
|
296
|
+
</name>
|
|
297
|
+
</assignedPerson>
|
|
298
|
+
<representedOrganization>
|
|
299
|
+
<id extension="99999999" root="2.16.840.1.113883.4.6"/>
|
|
300
|
+
<name>Neighborhood Physicians Practice</name>
|
|
301
|
+
<telecom value="tel:+1(555)-555-1002" use="WP"/>
|
|
302
|
+
<addr>
|
|
303
|
+
<streetAddressLine>2472 Rocky Place</streetAddressLine>
|
|
304
|
+
<city>Beaverton</city>
|
|
305
|
+
<state>OR</state>
|
|
306
|
+
<postalCode>97006</postalCode>
|
|
307
|
+
<country>US</country>
|
|
308
|
+
</addr>
|
|
309
|
+
</representedOrganization>
|
|
310
|
+
</assignedEntity>
|
|
311
|
+
</performer>
|
|
312
|
+
<performer typeCode="PRF">
|
|
313
|
+
<time>
|
|
314
|
+
<low nullFlavor="UNK"/>
|
|
315
|
+
</time>
|
|
316
|
+
<assignedEntity>
|
|
317
|
+
<id extension="91138" root="1.3.6.1.4.1.22812.4.99930.4"/>
|
|
318
|
+
<code codeSystem="2.16.840.1.113883.6.101" codeSystemName="NUCC Health Care Provider Taxonomy" code="163W00000X" displayName="Registered Nurse"/>
|
|
319
|
+
<addr>
|
|
320
|
+
<streetAddressLine>2472 Rocky Place</streetAddressLine>
|
|
321
|
+
<city>Beaverton</city>
|
|
322
|
+
<state>OR</state>
|
|
323
|
+
<postalCode>97006</postalCode>
|
|
324
|
+
<country>US</country>
|
|
325
|
+
</addr>
|
|
326
|
+
<telecom use="WP" value="tel:+1(555)-555-1002"/>
|
|
327
|
+
<assignedPerson>
|
|
328
|
+
<name>
|
|
329
|
+
<given>Tracy</given>
|
|
330
|
+
<family>Davis</family>
|
|
331
|
+
</name>
|
|
332
|
+
</assignedPerson>
|
|
333
|
+
</assignedEntity>
|
|
334
|
+
</performer>
|
|
335
|
+
</serviceEvent>
|
|
336
|
+
</documentationOf>
|
|
337
|
+
<componentOf>
|
|
338
|
+
<encompassingEncounter>
|
|
339
|
+
<id extension="9937012" root="2.16.840.1.113883.19"/>
|
|
340
|
+
<effectiveTime>
|
|
341
|
+
<low value="201507221400-0500"/>
|
|
342
|
+
<high value="201507221430-0500"/>
|
|
343
|
+
</effectiveTime>
|
|
344
|
+
</encompassingEncounter>
|
|
345
|
+
</componentOf>
|
|
346
|
+
<component>
|
|
347
|
+
<structuredBody>
|
|
348
|
+
<component>
|
|
349
|
+
<section nullFlavor="NI">
|
|
350
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.6.1" extension="2015-08-01"/>
|
|
351
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.6.1"/>
|
|
352
|
+
<code code="48765-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Allergies, adverse reactions, alerts"/>
|
|
353
|
+
<title>Allergies</title>
|
|
354
|
+
<text>No Known Allergy Information</text>
|
|
355
|
+
</section>
|
|
356
|
+
</component>
|
|
357
|
+
<component>
|
|
358
|
+
<section nullFlavor="NI">
|
|
359
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.1" extension="2014-06-09"/>
|
|
360
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.1.1" extension="2014-06-09"/>
|
|
361
|
+
<code code="10160-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of medication use Narrative"/>
|
|
362
|
+
<title>Medications</title>
|
|
363
|
+
<text>No Known Medication Information</text>
|
|
364
|
+
</section>
|
|
365
|
+
</component>
|
|
366
|
+
<component>
|
|
367
|
+
<section>
|
|
368
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.5.1" extension="2015-08-01"/>
|
|
369
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.5.1"/>
|
|
370
|
+
<code code="11450-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="PROBLEM LIST"/>
|
|
371
|
+
<title>PROBLEMS</title>
|
|
372
|
+
<text ID="Concern_1">
|
|
373
|
+
<content ID="problems1">No known
|
|
374
|
+
<content ID="problemType1">problems</content>
|
|
375
|
+
</content>
|
|
376
|
+
</text>
|
|
377
|
+
<entry typeCode="DRIV">
|
|
378
|
+
<act classCode="ACT" moodCode="EVN">
|
|
379
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.3" extension="2015-08-01" />
|
|
380
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.3" />
|
|
381
|
+
<id root="36e3e930-7b14-13db-9fe1-0800200c9a66"/>
|
|
382
|
+
<code code="CONC" codeSystem="2.16.840.1.113883.5.6"/>
|
|
383
|
+
<text>
|
|
384
|
+
<reference value="#Concern_1"></reference>
|
|
385
|
+
</text>
|
|
386
|
+
<statusCode code="active"/>
|
|
387
|
+
<!-- The concern is not active, in terms of there being an active condition to be managed.-->
|
|
388
|
+
<effectiveTime>
|
|
389
|
+
<low value="20150722"/>
|
|
390
|
+
</effectiveTime>
|
|
391
|
+
<entryRelationship typeCode="SUBJ">
|
|
392
|
+
<observation classCode="OBS" moodCode="EVN" negationInd="true">
|
|
393
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.4" extension="2015-08-01"/>
|
|
394
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.4"/>
|
|
395
|
+
<id root="4adc1021-7b15-14db-9fe1-0800200c9a67"/>
|
|
396
|
+
<code code="55607006" displayName="Problem" codeSystemName="SNOMED-CT" codeSystem="2.16.840.1.113883.6.96">
|
|
397
|
+
<translation code="75326-9" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Problem"/>
|
|
398
|
+
</code>
|
|
399
|
+
<text>
|
|
400
|
+
<reference value="#problems1"></reference>
|
|
401
|
+
</text>
|
|
402
|
+
<statusCode code="completed"/>
|
|
403
|
+
<effectiveTime>
|
|
404
|
+
<low value="20150722"/>
|
|
405
|
+
</effectiveTime>
|
|
406
|
+
<value xsi:type="CD" code="55607006"
|
|
407
|
+
displayName="Problem"
|
|
408
|
+
codeSystem="2.16.840.1.113883.6.96"
|
|
409
|
+
codeSystemName="SNOMED-CT">
|
|
410
|
+
<originalText>
|
|
411
|
+
<reference value="#problems1"></reference>
|
|
412
|
+
</originalText>
|
|
413
|
+
</value>
|
|
414
|
+
</observation>
|
|
415
|
+
</entryRelationship>
|
|
416
|
+
</act>
|
|
417
|
+
</entry>
|
|
418
|
+
</section>
|
|
419
|
+
</component>
|
|
420
|
+
<component>
|
|
421
|
+
<section>
|
|
422
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.22.1" extension="2015-08-01"/>
|
|
423
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.22.1"/>
|
|
424
|
+
<code code="46240-8" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of encounters"/>
|
|
425
|
+
<title>ENCOUNTERS</title>
|
|
426
|
+
<text>
|
|
427
|
+
<table border="1" width="100%">
|
|
428
|
+
<thead>
|
|
429
|
+
<tr>
|
|
430
|
+
<th>Encounter</th>
|
|
431
|
+
<th>Location</th>
|
|
432
|
+
<th>Date</th>
|
|
433
|
+
</tr>
|
|
434
|
+
</thead>
|
|
435
|
+
<tbody>
|
|
436
|
+
<tr>
|
|
437
|
+
<td ID="Encounter1">Caregiver Annual Health Check</td>
|
|
438
|
+
<td>Neighborhood Physicians Practice</td>
|
|
439
|
+
<td>July 22, 2015 2pm EST</td>
|
|
440
|
+
</tr>
|
|
441
|
+
</tbody>
|
|
442
|
+
</table>
|
|
443
|
+
</text>
|
|
444
|
+
<entry typeCode="DRIV">
|
|
445
|
+
<encounter classCode="ENC" moodCode="EVN">
|
|
446
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.49" extension="2015-08-01"/>
|
|
447
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.49"/>
|
|
448
|
+
<id root="2a620155-9d11-449e-92b3-5d9815ff4de8"/>
|
|
449
|
+
<code code="699134002" displayName="Caregiver Annual Health Check"
|
|
450
|
+
codeSystemName="SNOMED-CT" codeSystem="2.16.840.1.113883.6.96">
|
|
451
|
+
<originalText>
|
|
452
|
+
<reference value="#Encounter1"/>
|
|
453
|
+
</originalText>
|
|
454
|
+
</code>
|
|
455
|
+
<effectiveTime value="20150722"/>
|
|
456
|
+
<participant typeCode="LOC">
|
|
457
|
+
<participantRole classCode="SDLOC">
|
|
458
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.32"/>
|
|
459
|
+
<code code="1160-1" codeSystem="2.16.840.1.113883.6.259" codeSystemName="HL7 HealthcareServiceLocation" displayName="Urgent Care Center"/>
|
|
460
|
+
<addr>
|
|
461
|
+
<streetAddressLine>2472 Rocky Place</streetAddressLine>
|
|
462
|
+
<city>Beaverton</city>
|
|
463
|
+
<state>OR</state>
|
|
464
|
+
<postalCode>97006</postalCode>
|
|
465
|
+
<country>US</country>
|
|
466
|
+
</addr>
|
|
467
|
+
<telecom value="tel:+1(555)-555-1002" use="WP"/>
|
|
468
|
+
<playingEntity classCode="PLC">
|
|
469
|
+
<name>Neighborhood Physicians Practice</name>
|
|
470
|
+
</playingEntity>
|
|
471
|
+
</participantRole>
|
|
472
|
+
</participant>
|
|
473
|
+
</encounter>
|
|
474
|
+
</entry>
|
|
475
|
+
</section>
|
|
476
|
+
</component>
|
|
477
|
+
<component>
|
|
478
|
+
<section>
|
|
479
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.2.1" extension="2014-06-09"/>
|
|
480
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.2.1"/>
|
|
481
|
+
<code code="11369-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of immunizations"/>
|
|
482
|
+
<title>IMMUNIZATIONS</title>
|
|
483
|
+
<text>No known immunization history</text>
|
|
484
|
+
<entry typeCode="DRIV">
|
|
485
|
+
<substanceAdministration classCode="SBADM" moodCode="EVN" negationInd="true">
|
|
486
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.52" extension="2015-08-01"/>
|
|
487
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
|
|
488
|
+
<id root="de10790f-1496-4729-8fe6-f1b87b6219f7"/>
|
|
489
|
+
<statusCode code="active"/>
|
|
490
|
+
<effectiveTime nullFlavor="NA"/>
|
|
491
|
+
<routeCode nullFlavor="NA"/>
|
|
492
|
+
<consumable>
|
|
493
|
+
<manufacturedProduct classCode="MANU">
|
|
494
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.54" extension="2014-06-09"/>
|
|
495
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.54"/>
|
|
496
|
+
<manufacturedMaterial>
|
|
497
|
+
<code nullFlavor="OTH">
|
|
498
|
+
<originalText>Vaccination</originalText>
|
|
499
|
+
<translation code="71181003" displayName="vaccine"
|
|
500
|
+
codeSystem="2.16.840.1.113883.6.96"
|
|
501
|
+
codeSystemName="SNOMED-CT"/>
|
|
502
|
+
</code>
|
|
503
|
+
<lotNumberText nullFlavor="NA"/>
|
|
504
|
+
</manufacturedMaterial>
|
|
505
|
+
</manufacturedProduct>
|
|
506
|
+
</consumable>
|
|
507
|
+
</substanceAdministration>
|
|
508
|
+
</entry>
|
|
509
|
+
</section>
|
|
510
|
+
</component>
|
|
511
|
+
<component>
|
|
512
|
+
<section>
|
|
513
|
+
<!--
|
|
514
|
+
Vital signs example with oxygen concentration included.
|
|
515
|
+
Note that this is almost identical to the Panel of Vital Signs in Metric Units example[1],
|
|
516
|
+
with the exception that this example contains a demonstration of the Structured Docs
|
|
517
|
+
Workgroup's recommendation for sending oxygen concentration. However, since this
|
|
518
|
+
recommendation generates a schematron warning against CONF:1098-32934, it should be
|
|
519
|
+
considered a weaker recommendation than the example it's based on, and implementers
|
|
520
|
+
who are certain that receivers support some alternate means of structuring O2
|
|
521
|
+
concentration (for instance, by nesting it within an entryRelationship linked to
|
|
522
|
+
SpO2, akin to the approach in FHIR US Core[2]) may choose to send this differently.
|
|
523
|
+
|
|
524
|
+
[1]: http://cdasearch.hl7.org/examples/view/713669406c546a843ed2b78cfd99080f87834191
|
|
525
|
+
[2]: http://hl7.org/fhir/us/core/StructureDefinition/us-core-pulse-oximetry
|
|
526
|
+
-->
|
|
527
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.4.1"/>
|
|
528
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.4.1" extension="2015-08-01"/>
|
|
529
|
+
<code code="8716-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"
|
|
530
|
+
displayName="Vital Signs"/>
|
|
531
|
+
<title>Vital Signs (Last Filed)</title>
|
|
532
|
+
<text>
|
|
533
|
+
<table>
|
|
534
|
+
<thead>
|
|
535
|
+
<tr>
|
|
536
|
+
<th>O2 Concentration</th>
|
|
537
|
+
</tr>
|
|
538
|
+
</thead>
|
|
539
|
+
<tbody>
|
|
540
|
+
<tr>
|
|
541
|
+
<td ID="O2Conc_1">36%</td>
|
|
542
|
+
</tr>
|
|
543
|
+
</tbody>
|
|
544
|
+
</table>
|
|
545
|
+
</text>
|
|
546
|
+
<entry typeCode="DRIV">
|
|
547
|
+
<!-- When a set of vital signs are recorded together, include them in single clustered organizer-->
|
|
548
|
+
<organizer classCode="CLUSTER" moodCode="EVN">
|
|
549
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.26"/>
|
|
550
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.26" extension="2015-08-01"/>
|
|
551
|
+
<id root="e6c800c4-4a71-41bf-80e2-e741dd1168e9"/>
|
|
552
|
+
<code code="46680005" displayName="Vital Signs" codeSystem="2.16.840.1.113883.6.96"
|
|
553
|
+
codeSystemName="SNOMED CT">
|
|
554
|
+
<translation code="74728-7"
|
|
555
|
+
displayName="Vital signs, weight, height, head circumference, oximetry, BMI, and BSA panel "
|
|
556
|
+
codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
|
|
557
|
+
</code>
|
|
558
|
+
<statusCode code="completed"/>
|
|
559
|
+
<effectiveTime value="20140520193605-0500"/>
|
|
560
|
+
<!-- Each vital sign should be its own component. Note that systolic and diastolic BP must be separate components-->
|
|
561
|
+
<!-- O2 concentration may be included as a Vital Sign Observation within a separate component. -->
|
|
562
|
+
<component>
|
|
563
|
+
<observation classCode="OBS" moodCode="EVN">
|
|
564
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.27" />
|
|
565
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.27" extension="2014-06-09" />
|
|
566
|
+
<id root="07b1fa74-eb88-4331-944f-880704ca7467" />
|
|
567
|
+
<!-- Per CONF:1098-32934, the code for a Vital Sign Observation SHOULD be selected
|
|
568
|
+
from ValueSet Vital Sign Result Type (urn:oid:2.16.840.1.113883.3.88.12.80.62),
|
|
569
|
+
which does NOT contain the LOINC code 3150-0 (Inhaled oxygen concentration).
|
|
570
|
+
However, because this template is the most widely supported way to send and
|
|
571
|
+
receive vitals observations, senders may still choose to send O2 concentration
|
|
572
|
+
in this way. -->
|
|
573
|
+
<code code="3150-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"
|
|
574
|
+
displayName="Inhaled oxygen concentration" />
|
|
575
|
+
<text>
|
|
576
|
+
<reference value="#O2Conc_1" />
|
|
577
|
+
</text>
|
|
578
|
+
<statusCode code="completed" />
|
|
579
|
+
<effectiveTime value="20140520193605-0500" />
|
|
580
|
+
<value xsi:type="PQ" value="36" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
|
|
581
|
+
</observation>
|
|
582
|
+
</component>
|
|
583
|
+
<!-- Other components like inhaled oxygen flow rate (3151-8) may also be included similarly to the component above... -->
|
|
584
|
+
</organizer>
|
|
585
|
+
</entry>
|
|
586
|
+
</section>
|
|
587
|
+
</component>
|
|
588
|
+
<component>
|
|
589
|
+
<section>
|
|
590
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.17" extension="2015-08-01"/>
|
|
591
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.17"/>
|
|
592
|
+
<code code="29762-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Social History"/>
|
|
593
|
+
<title>SOCIAL HISTORY</title>
|
|
594
|
+
<text>
|
|
595
|
+
<table border="1" width="100%">
|
|
596
|
+
<thead>
|
|
597
|
+
<tr>
|
|
598
|
+
<th>Social History Observation</th>
|
|
599
|
+
<th>Description</th>
|
|
600
|
+
<th>Dates Observed</th>
|
|
601
|
+
</tr>
|
|
602
|
+
</thead>
|
|
603
|
+
<tbody>
|
|
604
|
+
<tr>
|
|
605
|
+
<td>Sex Assigned At Birth</td>
|
|
606
|
+
<td>Male</td>
|
|
607
|
+
<td>August 1, 1980</td>
|
|
608
|
+
</tr>
|
|
609
|
+
<tr>
|
|
610
|
+
<td>Current Smoking Status</td>
|
|
611
|
+
<td>Current every day</td>
|
|
612
|
+
<td>July 22, 2015</td>
|
|
613
|
+
</tr>
|
|
614
|
+
</tbody>
|
|
615
|
+
</table>
|
|
616
|
+
</text>
|
|
617
|
+
<entry>
|
|
618
|
+
<observation classCode="OBS" moodCode="EVN">
|
|
619
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.200" extension="2016-06-01"/>
|
|
620
|
+
<code code="76689-9" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Sex Assigned At Birth"/>
|
|
621
|
+
<statusCode code="completed"/>
|
|
622
|
+
<effectiveTime value="19800801"/>
|
|
623
|
+
<value code="M" codeSystem="2.16.840.1.113883.5.1" xsi:type="CD" displayName="Male"/>
|
|
624
|
+
</observation>
|
|
625
|
+
</entry>
|
|
626
|
+
<entry typeCode="DRIV">
|
|
627
|
+
<observation classCode="OBS" moodCode="EVN">
|
|
628
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.78" extension="2014-06-09"/>
|
|
629
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.78"/>
|
|
630
|
+
<id extension="123456789" root="2.16.840.1.113883.19"/>
|
|
631
|
+
<code code="72166-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Tobacco smoking status NHIS"/>
|
|
632
|
+
<statusCode code="completed"/>
|
|
633
|
+
<effectiveTime value="20150722"/>
|
|
634
|
+
<value xsi:type="CD" code="449868002" displayName="Current every day smoker" codeSystem="2.16.840.1.113883.6.96"/>
|
|
635
|
+
</observation>
|
|
636
|
+
</entry>
|
|
637
|
+
</section>
|
|
638
|
+
</component>
|
|
639
|
+
<component>
|
|
640
|
+
<section>
|
|
641
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.7.1" extension="2014-06-09"/>
|
|
642
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.7.1"/>
|
|
643
|
+
<code code="47519-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="HISTORY OF PROCEDURES"/>
|
|
644
|
+
<title>PROCEDURES</title>
|
|
645
|
+
<text>
|
|
646
|
+
<paragraph ID="Proc1">No Procedure information</paragraph>
|
|
647
|
+
</text>
|
|
648
|
+
<entry>
|
|
649
|
+
<procedure classCode="PROC" moodCode="EVN" negationInd="true">
|
|
650
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.14" extension="2014-06-09"/>
|
|
651
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
|
|
652
|
+
<id root="d5b614bd-01ce-410d-8727-e1fd01dcc72a" />
|
|
653
|
+
<code code="71388002" codeSystem="2.16.840.1.113883.6.96"
|
|
654
|
+
displayName="Procedure">
|
|
655
|
+
<originalText>
|
|
656
|
+
<reference value="#Proc1" />
|
|
657
|
+
</originalText>
|
|
658
|
+
</code>
|
|
659
|
+
<statusCode code="completed" />
|
|
660
|
+
<effectiveTime nullFlavor="NA" />
|
|
661
|
+
<participant typeCode="DEV">
|
|
662
|
+
<participantRole classCode="MANU">
|
|
663
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.37"/>
|
|
664
|
+
<id nullFlavor="NA" root="2.16.840.1.113883.3.3719"/>
|
|
665
|
+
<playingDevice>
|
|
666
|
+
<code code="40388003" codeSystem="2.16.840.1.113883.6.96"
|
|
667
|
+
displayName="Implant"/>
|
|
668
|
+
</playingDevice>
|
|
669
|
+
<scopingEntity>
|
|
670
|
+
<id root="2.16.840.1.113883.3.3719"/>
|
|
671
|
+
</scopingEntity>
|
|
672
|
+
</participantRole>
|
|
673
|
+
</participant>
|
|
674
|
+
</procedure>
|
|
675
|
+
</entry>
|
|
676
|
+
</section>
|
|
677
|
+
</component>
|
|
678
|
+
<component>
|
|
679
|
+
<section>
|
|
680
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.23" extension="2014-06-09"/>
|
|
681
|
+
<code code="46264-8" codeSystem="2.16.840.1.113883.6.1" />
|
|
682
|
+
<title>MEDICAL EQUIPMENT</title>
|
|
683
|
+
<text>
|
|
684
|
+
<paragraph ID="Proc2">Patient has no history of implantable devices</paragraph>
|
|
685
|
+
</text>
|
|
686
|
+
<entry>
|
|
687
|
+
<procedure classCode="PROC" moodCode="EVN" negationInd="true">
|
|
688
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
|
|
689
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.14" extension="2014-06-09"/>
|
|
690
|
+
<id root="d5b614bd-01ce-410d-8728-e1fd01dcc72a" />
|
|
691
|
+
<code code="71388002" codeSystem="2.16.840.1.113883.6.96"
|
|
692
|
+
displayName="Procedure"/>
|
|
693
|
+
<text>
|
|
694
|
+
<reference value="#Proc2"/>
|
|
695
|
+
</text>
|
|
696
|
+
<statusCode code="completed" />
|
|
697
|
+
<effectiveTime nullFlavor="NA" />
|
|
698
|
+
<participant typeCode="DEV">
|
|
699
|
+
<participantRole classCode="MANU">
|
|
700
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.37"/>
|
|
701
|
+
<id nullFlavor="NA" root="2.16.840.1.113883.3.3719"/>
|
|
702
|
+
<playingDevice>
|
|
703
|
+
<code code="40388003" codeSystem="2.16.840.1.113883.6.96"
|
|
704
|
+
displayName="Implant"/>
|
|
705
|
+
</playingDevice>
|
|
706
|
+
<scopingEntity>
|
|
707
|
+
<id root="2.16.840.1.113883.3.3719"/>
|
|
708
|
+
</scopingEntity>
|
|
709
|
+
</participantRole>
|
|
710
|
+
</participant>
|
|
711
|
+
</procedure>
|
|
712
|
+
</entry>
|
|
713
|
+
</section>
|
|
714
|
+
</component>
|
|
715
|
+
<component>
|
|
716
|
+
<section nullFlavor="NI">
|
|
717
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.3.1" extension="2015-08-01"/>
|
|
718
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.3.1"/>
|
|
719
|
+
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="RESULTS"/>
|
|
720
|
+
<title>RESULTS</title>
|
|
721
|
+
<text>No Lab Test required. No Lab results.</text>
|
|
722
|
+
</section>
|
|
723
|
+
</component>
|
|
724
|
+
<component>
|
|
725
|
+
<section nullFlavor="NI">
|
|
726
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.14" extension="2014-06-09"/>
|
|
727
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.14"/>
|
|
728
|
+
<code code="47420-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Functional Status"/>
|
|
729
|
+
<title>FUNCTIONAL STATUS</title>
|
|
730
|
+
<text>No information</text>
|
|
731
|
+
</section>
|
|
732
|
+
</component>
|
|
733
|
+
<component>
|
|
734
|
+
<section>
|
|
735
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.8"/>
|
|
736
|
+
<code codeSystem="2.16.840.1.113883.6.1"
|
|
737
|
+
codeSystemName="LOINC" code="51848-0"
|
|
738
|
+
displayName="ASSESSMENTS"/>
|
|
739
|
+
<title>ASSESSMENTS</title>
|
|
740
|
+
<text>The patient was found to be healthy and advised to follow his current routine of exercise, work, sleep and quality of life.</text>
|
|
741
|
+
</section>
|
|
742
|
+
</component>
|
|
743
|
+
<component>
|
|
744
|
+
<section>
|
|
745
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.10" extension="2014-06-09"/>
|
|
746
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.10"/>
|
|
747
|
+
<code code="18776-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Treatment plan"/>
|
|
748
|
+
<title>TREATMENT PLAN</title>
|
|
749
|
+
<text>
|
|
750
|
+
<content styleCode="Bold"> Hand-off Communication:</content>
|
|
751
|
+
<br/>
|
|
752
|
+
<br/>
|
|
753
|
+
<table border="1" width="100%">
|
|
754
|
+
<thead>
|
|
755
|
+
<tr>
|
|
756
|
+
<th>Planned Care</th>
|
|
757
|
+
<th>Start Date</th>
|
|
758
|
+
</tr>
|
|
759
|
+
</thead>
|
|
760
|
+
<tbody>
|
|
761
|
+
<tr>
|
|
762
|
+
<td>Schedule a visit for next year.</td>
|
|
763
|
+
<td>July 22, 2016</td>
|
|
764
|
+
</tr>
|
|
765
|
+
</tbody>
|
|
766
|
+
</table>
|
|
767
|
+
</text>
|
|
768
|
+
<entry>
|
|
769
|
+
<encounter classCode="ENC" moodCode="INT">
|
|
770
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.40" extension="2014-06-09" />
|
|
771
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.40"/>
|
|
772
|
+
<id root="1.3.6.1.42424242.4.99930.4.3.4"/>
|
|
773
|
+
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED-CT" code="11429006" displayName="consultation"/>
|
|
774
|
+
<statusCode code="active"/>
|
|
775
|
+
<effectiveTime>
|
|
776
|
+
<low value="20160722"/>
|
|
777
|
+
</effectiveTime>
|
|
778
|
+
<performer>
|
|
779
|
+
<assignedEntity>
|
|
780
|
+
<id root="2.16.840.1.113883.19.5.9999.456" extension="2981823"/>
|
|
781
|
+
<addr use="WP">
|
|
782
|
+
<streetAddressLine>2472 Rocky Place</streetAddressLine>
|
|
783
|
+
<city>Beaverton</city>
|
|
784
|
+
<state>OR</state>
|
|
785
|
+
<postalCode>97006</postalCode>
|
|
786
|
+
<country>US</country>
|
|
787
|
+
</addr>
|
|
788
|
+
<telecom value="tel:+1(555)-555-1002" use="WP"/>
|
|
789
|
+
<representedOrganization>
|
|
790
|
+
<id extension="99999999" root="2.16.840.1.113883.4.6"/>
|
|
791
|
+
<name>Neighborhood Physicians Practice</name>
|
|
792
|
+
<telecom value="tel:+1(555)-555-1002" use="WP"/>
|
|
793
|
+
<addr use="WP">
|
|
794
|
+
<streetAddressLine>2472 Rocky Place</streetAddressLine>
|
|
795
|
+
<city>Beaverton</city>
|
|
796
|
+
<state>OR</state>
|
|
797
|
+
<postalCode>97006</postalCode>
|
|
798
|
+
<country>US</country>
|
|
799
|
+
</addr>
|
|
800
|
+
</representedOrganization>
|
|
801
|
+
</assignedEntity>
|
|
802
|
+
</performer>
|
|
803
|
+
<entryRelationship typeCode="RSON">
|
|
804
|
+
<observation classCode="OBS" moodCode="EVN">
|
|
805
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.19" extension="2014-06-09"/>
|
|
806
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.19"/>
|
|
807
|
+
<id root="1.3.6.1.4.1.42424242.4.12354.4.4.4.5.4"/>
|
|
808
|
+
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED-CT" code="185349003" displayName="encounter for 'check-up' (procedure)"/>
|
|
809
|
+
<text>Schedule a visit for next year.</text>
|
|
810
|
+
<statusCode code="completed"/>
|
|
811
|
+
<effectiveTime>
|
|
812
|
+
<low value="20160722"/>
|
|
813
|
+
</effectiveTime>
|
|
814
|
+
</observation>
|
|
815
|
+
</entryRelationship>
|
|
816
|
+
</encounter>
|
|
817
|
+
</entry>
|
|
818
|
+
</section>
|
|
819
|
+
</component>
|
|
820
|
+
<component>
|
|
821
|
+
<section nullFlavor="NI">
|
|
822
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.60"/>
|
|
823
|
+
<code code="61146-7" displayName="Goals" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
|
|
824
|
+
<title>Goals Section</title>
|
|
825
|
+
<text>No Goals</text>
|
|
826
|
+
</section>
|
|
827
|
+
</component>
|
|
828
|
+
<component>
|
|
829
|
+
<section nullFlavor="NI">
|
|
830
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.58" extension="2015-08-01"/>
|
|
831
|
+
<code code="75310-3" displayName="Health Concerns Document"
|
|
832
|
+
codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
|
|
833
|
+
<title>Health Concerns</title>
|
|
834
|
+
<text>No Information</text>
|
|
835
|
+
</section>
|
|
836
|
+
</component>
|
|
837
|
+
<component>
|
|
838
|
+
<section nullFlavor="NI">
|
|
839
|
+
<templateId root="2.16.840.1.113883.10.20.22.2.56" extension="2015-08-01" />
|
|
840
|
+
<code code="10190-7" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="MENTAL STATUS" />
|
|
841
|
+
<title>MENTAL STATUS</title>
|
|
842
|
+
<text>No information</text>
|
|
843
|
+
</section>
|
|
844
|
+
</component>
|
|
845
|
+
<component>
|
|
846
|
+
<section nullFlavor="NI">
|
|
847
|
+
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.1" extension="2014-06-09"/>
|
|
848
|
+
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.1"/>
|
|
849
|
+
<code code="42349-1" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Reason for Referral"/>
|
|
850
|
+
<title>REASON FOR REFERRAL</title>
|
|
851
|
+
<text>No Reason for Referral data</text>
|
|
852
|
+
</section>
|
|
853
|
+
</component>
|
|
854
|
+
</structuredBody>
|
|
855
|
+
</component>
|
|
856
|
+
</ClinicalDocument>
|
|
File without changes
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const expect = require('chai').expect;
|
|
3
|
+
|
|
4
|
+
const validator = require('../validator');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
|
|
7
|
+
// Which xml file to test
|
|
8
|
+
const xmlPath = path.resolve(__dirname, './vitalSigns.xml');
|
|
9
|
+
// Which schematron to test against
|
|
10
|
+
const schematronPath = path.resolve(__dirname, './CDAR2_IG_CCDA_CLINNOTES_R1_DSTU2.1_2015AUG_Vol2_2019JUNwith_errata.sch');
|
|
11
|
+
|
|
12
|
+
const xml = fs.readFileSync(xmlPath, 'utf-8').toString();
|
|
13
|
+
const schematron = fs.readFileSync(schematronPath, 'utf-8').toString();
|
|
14
|
+
const options = {
|
|
15
|
+
resourceDir: path.resolve(__dirname, './')
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
describe('Validator should', function() {
|
|
19
|
+
let results;
|
|
20
|
+
it('return results', async function() {
|
|
21
|
+
results = await validator.validateAsync(xml, schematron, options);
|
|
22
|
+
expect(results).to.be.an('object');
|
|
23
|
+
});
|
|
24
|
+
it('return errorCount', function() {
|
|
25
|
+
expect(results.errorCount).to.be.a('number');
|
|
26
|
+
});
|
|
27
|
+
it('return warningCount', function() {
|
|
28
|
+
expect(results.warningCount).to.be.a('number');
|
|
29
|
+
});
|
|
30
|
+
it('return ignoredCount', function() {
|
|
31
|
+
expect(results.ignoredCount).to.be.a('number');
|
|
32
|
+
});
|
|
33
|
+
it('return errors array', function() {
|
|
34
|
+
expect(results.errors).to.be.a('array');
|
|
35
|
+
});
|
|
36
|
+
it('return warnings array', function() {
|
|
37
|
+
expect(results.warnings).to.be.a('array');
|
|
38
|
+
});
|
|
39
|
+
it('return ignored array', function() {
|
|
40
|
+
expect(results.ignored).to.be.a('array');
|
|
41
|
+
});
|
|
42
|
+
it('return matching errorCount', function() {
|
|
43
|
+
expect(results.errorCount).to.be.equal(results.errors.length);
|
|
44
|
+
});
|
|
45
|
+
it('return matching warningCount', function() {
|
|
46
|
+
expect(results.warningCount).to.be.equal(results.warnings.length);
|
|
47
|
+
});
|
|
48
|
+
it('return matching ignoredCount', function() {
|
|
49
|
+
expect(results.ignoredCount).to.be.equal(results.ignored.length);
|
|
50
|
+
});
|
|
51
|
+
it('return correct number of errors', function() {
|
|
52
|
+
expect(results.errorCount).to.be.equal(1);
|
|
53
|
+
});
|
|
54
|
+
it('return correct number of warnings', function() {
|
|
55
|
+
expect(results.warningCount).to.be.equal(6);
|
|
56
|
+
});
|
|
57
|
+
it('return correct number of ignored', function() {
|
|
58
|
+
expect(results.ignoredCount).to.be.equal(0);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it('return similar results without warnings', async function() {
|
|
62
|
+
results = await validator.validateAsync(xml, schematron, { includeWarnings: false, resourceDir: options.resourceDir });
|
|
63
|
+
expect(results).to.be.an('object');
|
|
64
|
+
expect(results.errorCount).to.be.a('number');
|
|
65
|
+
expect(results.warningCount).to.be.a('number');
|
|
66
|
+
expect(results.ignoredCount).to.be.a('number');
|
|
67
|
+
expect(results.errors).to.be.a('array');
|
|
68
|
+
expect(results.warnings).to.be.a('array');
|
|
69
|
+
expect(results.ignored).to.be.a('array');
|
|
70
|
+
expect(results.errorCount).to.be.equal(results.errors.length);
|
|
71
|
+
expect(results.warningCount).to.be.equal(results.warnings.length);
|
|
72
|
+
expect(results.ignoredCount).to.be.equal(results.ignored.length);
|
|
73
|
+
expect(results.errorCount).to.be.equal(1);
|
|
74
|
+
expect(results.warningCount).to.be.equal(0);
|
|
75
|
+
expect(results.ignoredCount).to.be.equal(0);
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
it('return similar results given xml filepath', async function() {
|
|
79
|
+
results = await validator.validateAsync(xmlPath, schematron, options);
|
|
80
|
+
expect(results).to.be.an('object');
|
|
81
|
+
expect(results.errorCount).to.be.a('number');
|
|
82
|
+
expect(results.warningCount).to.be.a('number');
|
|
83
|
+
expect(results.ignoredCount).to.be.a('number');
|
|
84
|
+
expect(results.errors).to.be.a('array');
|
|
85
|
+
expect(results.warnings).to.be.a('array');
|
|
86
|
+
expect(results.ignored).to.be.a('array');
|
|
87
|
+
expect(results.errorCount).to.be.equal(results.errors.length);
|
|
88
|
+
expect(results.warningCount).to.be.equal(results.warnings.length);
|
|
89
|
+
expect(results.ignoredCount).to.be.equal(results.ignored.length);
|
|
90
|
+
expect(results.errorCount).to.be.equal(1);
|
|
91
|
+
expect(results.warningCount).to.be.equal(6);
|
|
92
|
+
expect(results.ignoredCount).to.be.equal(0);
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
it('return similar results given schematron filepath', async function() {
|
|
96
|
+
results = await validator.validateAsync(xml, schematronPath, options);
|
|
97
|
+
expect(results).to.be.an('object');
|
|
98
|
+
expect(results.errorCount).to.be.a('number');
|
|
99
|
+
expect(results.warningCount).to.be.a('number');
|
|
100
|
+
expect(results.ignoredCount).to.be.a('number');
|
|
101
|
+
expect(results.errors).to.be.a('array');
|
|
102
|
+
expect(results.warnings).to.be.a('array');
|
|
103
|
+
expect(results.ignored).to.be.a('array');
|
|
104
|
+
expect(results.errorCount).to.be.equal(results.errors.length);
|
|
105
|
+
expect(results.warningCount).to.be.equal(results.warnings.length);
|
|
106
|
+
expect(results.ignoredCount).to.be.equal(results.ignored.length);
|
|
107
|
+
expect(results.errorCount).to.be.equal(1);
|
|
108
|
+
expect(results.warningCount).to.be.equal(6);
|
|
109
|
+
expect(results.ignoredCount).to.be.equal(0);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
it('return similar results given xml filepath and schematron filepath', async function() {
|
|
113
|
+
results = await validator.validateAsync(xmlPath, schematronPath, options);
|
|
114
|
+
expect(results).to.be.an('object');
|
|
115
|
+
expect(results.errorCount).to.be.a('number');
|
|
116
|
+
expect(results.warningCount).to.be.a('number');
|
|
117
|
+
expect(results.ignoredCount).to.be.a('number');
|
|
118
|
+
expect(results.errors).to.be.a('array');
|
|
119
|
+
expect(results.warnings).to.be.a('array');
|
|
120
|
+
expect(results.ignored).to.be.a('array');
|
|
121
|
+
expect(results.errorCount).to.be.equal(results.errors.length);
|
|
122
|
+
expect(results.warningCount).to.be.equal(results.warnings.length);
|
|
123
|
+
expect(results.ignoredCount).to.be.equal(results.ignored.length);
|
|
124
|
+
expect(results.errorCount).to.be.equal(1);
|
|
125
|
+
expect(results.warningCount).to.be.equal(6);
|
|
126
|
+
expect(results.ignoredCount).to.be.equal(0);
|
|
127
|
+
});
|
|
128
|
+
});
|
package/test/voc.xml
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<systems xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.lantanagroup.com/voc">
|
|
3
|
+
<system valueSetOid="2.16.840.1.113883.11.20.9.36" valueSetName="Pressure Point ">
|
|
4
|
+
<code value="43631005" displayName="occipital region structure" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
5
|
+
<code value="23747009" displayName="skin structure of chin" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
6
|
+
<code value="91774008" displayName="structure of right shoulder" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
7
|
+
<code value="7874003" displayName="structure of scapular region of back; 272741003 = laterality; 24028007 = right (qualifier value)" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
8
|
+
<code value="368149001" displayName="right elbow region structure" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
9
|
+
<code value="368148009" displayName=" left elbow region structure" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
10
|
+
<code value="87141009" displayName="sacral vertebra structure" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
11
|
+
<code value="122495006" displayName="thoracic spine structure" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
12
|
+
<code value="122496007" displayName=" lumbar spine structure" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
13
|
+
<code value="287579007" displayName="right hip region structure" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
14
|
+
<code value="387679003" displayName="left hip region structure" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
15
|
+
<code value="396993003" displayName="right posterior iliac crest" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
16
|
+
<code value="396994009" displayName="left posterior iliac crest" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
17
|
+
<code value="46862004" displayName="buttock structure;272741003 = laterality;7771000 = left" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
18
|
+
<code value="6757004" displayName="structure of right knee" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
19
|
+
<code value="82169009" displayName="structure of left knee" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
20
|
+
<code value="76853006" displayName="heel structure; 272741003 = laterality; 24028007 = right " codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
21
|
+
<code value="182304008" displayName="medial aspect of ankle; 272741003 = laterality; 24028007 = right" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
22
|
+
<code value="182305009" displayName="lateral aspect of ankle; 272741003 = laterality; 24028007 = right" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
23
|
+
<code value="43631005" displayName="occipital region structure" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
24
|
+
<code value="23747009" displayName="skin structure of chin" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
25
|
+
<code value="91774008" displayName="structure of right shoulder" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
26
|
+
<code value="7874003" displayName="structure of scapular region of back; 272741003 = laterality; 24028007 = right (qualifier value)" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
27
|
+
<code value="368149001" displayName="right elbow region structure" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
28
|
+
<code value="368148009" displayName=" left elbow region structure" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
29
|
+
<code value="87141009" displayName="sacral vertebra structure" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
30
|
+
<code value="122495006" displayName="thoracic spine structure" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
31
|
+
<code value="122496007" displayName=" lumbar spine structure" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
32
|
+
<code value="287579007" displayName="right hip region structure" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
33
|
+
<code value="387679003" displayName="left hip region structure" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
34
|
+
<code value="396993003" displayName="right posterior iliac crest" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
35
|
+
<code value="396994009" displayName="left posterior iliac crest" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
36
|
+
<code value="46862004" displayName="buttock structure;272741003 = laterality;7771000 = left" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
37
|
+
<code value="6757004" displayName="structure of right knee" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
38
|
+
<code value="82169009" displayName="structure of left knee" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
39
|
+
<code value="76853006" displayName="heel structure; 272741003 = laterality; 24028007 = right " codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
40
|
+
<code value="182304008" displayName="medial aspect of ankle; 272741003 = laterality; 7771000 = left" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
41
|
+
<code value="182305009" displayName="lateral aspect of ankle; 272741003 = laterality;7771000 = left" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
42
|
+
<code value="6685009" displayName="structure of right ankle" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96" />
|
|
43
|
+
</system>
|
|
44
|
+
</systems>
|
package/validator.js
CHANGED
|
@@ -191,7 +191,6 @@ function checkRule(xmlDoc, originalContext, assertionsAndExtensions, options) {
|
|
|
191
191
|
const assertionAndExtensionObject = assertionsAndExtensions[i];
|
|
192
192
|
if (assertionAndExtensionObject.type === 'assertion') {
|
|
193
193
|
let { level, test, id, description } = assertionAndExtensionObject;
|
|
194
|
-
|
|
195
194
|
// Extract values from external document and modify test if a document call is made
|
|
196
195
|
let originalTest = test;
|
|
197
196
|
let simplifiedTest = null;
|
|
@@ -232,15 +231,8 @@ function checkRule(xmlDoc, originalContext, assertionsAndExtensions, options) {
|
|
|
232
231
|
if (!subAssertionsAndExtensions) {
|
|
233
232
|
continue;
|
|
234
233
|
}
|
|
235
|
-
const newRuleObject = ruleAssertionMap[extensionRule];
|
|
236
|
-
|
|
237
|
-
continue;
|
|
238
|
-
}
|
|
239
|
-
const newContext = newRuleObject.context;
|
|
240
|
-
if (!newContext) {
|
|
241
|
-
continue;
|
|
242
|
-
}
|
|
243
|
-
const failedSubAssertions = checkRule(xmlDoc, newContext, subAssertionsAndExtensions, options);
|
|
234
|
+
const newRuleObject = ruleAssertionMap[extensionRule];
|
|
235
|
+
const failedSubAssertions = checkRule(xmlDoc, context, subAssertionsAndExtensions, options);
|
|
244
236
|
failedAssertions.push(...failedSubAssertions);
|
|
245
237
|
}
|
|
246
238
|
}
|
|
@@ -321,16 +313,10 @@ async function validateAsync(xml, schematron, options = {}) {
|
|
|
321
313
|
const ruleObject = ruleAssertionMap[ruleId];
|
|
322
314
|
if (_get(ruleObject, 'abstract')) {
|
|
323
315
|
continue;
|
|
324
|
-
}
|
|
316
|
+
}
|
|
325
317
|
const context = _get(ruleObject, 'context');
|
|
326
318
|
const assertionsAndExtensions = _get(ruleObject, 'assertionsAndExtensions') || [];
|
|
327
|
-
|
|
328
|
-
failedAssertions = await checkRulePromise(xmlDoc, context, assertionsAndExtensions, options);
|
|
329
|
-
}
|
|
330
|
-
catch (errorInRuleCheck) {
|
|
331
|
-
console.log(errorInRuleCheck);
|
|
332
|
-
continue;
|
|
333
|
-
}
|
|
319
|
+
let failedAssertions = await checkRulePromise(xmlDoc, context, assertionsAndExtensions, options);
|
|
334
320
|
for (let j = 0; j < failedAssertions.length; j++) {
|
|
335
321
|
const assertionObject = failedAssertions[j];
|
|
336
322
|
const { type, assertionId, test, simplifiedTest, description, errorMessage, results } = assertionObject;
|
|
@@ -420,7 +406,6 @@ function checkRulePromise(xmlDoc, originalContext, assertionsAndExtensions, opti
|
|
|
420
406
|
const assertionAndExtensionObject = assertionsAndExtensions[i];
|
|
421
407
|
if (assertionAndExtensionObject.type === 'assertion') {
|
|
422
408
|
let { level, test, id, description } = assertionAndExtensionObject;
|
|
423
|
-
|
|
424
409
|
// Extract values from external document and modify test if a document call is made
|
|
425
410
|
let originalTest = test;
|
|
426
411
|
let simplifiedTest = null;
|
|
@@ -461,15 +446,8 @@ function checkRulePromise(xmlDoc, originalContext, assertionsAndExtensions, opti
|
|
|
461
446
|
if (!subAssertionsAndExtensions) {
|
|
462
447
|
continue;
|
|
463
448
|
}
|
|
464
|
-
const newRuleObject = ruleAssertionMap[extensionRule];
|
|
465
|
-
|
|
466
|
-
continue;
|
|
467
|
-
}
|
|
468
|
-
const newContext = newRuleObject.context;
|
|
469
|
-
if (!newContext) {
|
|
470
|
-
continue;
|
|
471
|
-
}
|
|
472
|
-
const failedSubAssertions = checkRule(xmlDoc, newContext, subAssertionsAndExtensions, options);
|
|
449
|
+
const newRuleObject = ruleAssertionMap[extensionRule];
|
|
450
|
+
const failedSubAssertions = checkRule(xmlDoc, context, subAssertionsAndExtensions, options);
|
|
473
451
|
failedAssertions.push(...failedSubAssertions);
|
|
474
452
|
}
|
|
475
453
|
}
|