Skip to content

Commit

Permalink
Add CDA and FHIR test cases for validating attribute cardinality
Browse files Browse the repository at this point in the history
  • Loading branch information
Grahame Grieve committed Feb 25, 2024
1 parent d91649e commit 42e5378
Show file tree
Hide file tree
Showing 3 changed files with 736 additions and 4 deletions.
86 changes: 86 additions & 0 deletions validator/cda-validation-issues.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:sdtc="urn:hl7-org:sdtc">
<realmCode /> <!-- code="US" -->
<typeId /> <!-- extension="POCD_HD000040" root="2.16.840.1.113883.1.3" -->
<templateId root="2.16.840.1.113883.10.20.22.1.1" extension="2024-05-01" />
<templateId root="2.16.840.1.113883.10.20.22.1.15" extension="2024-05-01" />
<id root="1.2.3" />
<code codeSystem="2.16.840.1.113883.6.1" /> <!-- @code is 1..1 with required binding-->
<title>Patient Chart Summary</title>
<effectiveTime value="20240112" />
<confidentialityCode /> <!-- @code is 1..1 -->
<languageCode code="en-US" />
<recordTarget>
<patientRole>
<id root="1.9.8.7" />
<addr nullFlavor="NA" />
<telecom nullFlavor="NA" />
<patient>
<name><given>Eve</given> <family>Betterhalf</family></name>
<administrativeGenderCode nullFlavor="UNK" />
<birthTime nullFlavor="UNK"/>
<raceCode nullFlavor="UNK"/>
<ethnicGroupCode nullFlavor="UNK"/>
</patient>
</patientRole>
</recordTarget>
<author>
<time value="201308151030-0800"/>
<assignedAuthor>
<id extension="5555555555" root="2.16.840.1.113883.4.6"/>
<addr nullFlavor="UNK" />
<telecom nullFlavor="UNK" />
<assignedPerson><name>Bob</name></assignedPerson>
</assignedAuthor>
</author>
<custodian>
<assignedCustodian>
<representedCustodianOrganization>
<id nullFlavor="UNK" />
<name>Good Health HIE</name>
<telecom nullFlavor="UNK" />
<addr nullFlavor="UNK" />
</representedCustodianOrganization>
</assignedCustodian>
</custodian>
<documentationOf>
<serviceEvent classCode="PCPR"> <!-- @classCode is 1..1 but only actually enforced because we have a slice that requires it -->
<effectiveTime>
<low value="20240108" />
</effectiveTime>
<performer> <!-- @typeCode is 1..1 -->
<assignedEntity>
<id nullFlavor="UNK" />
<assignedPerson><name>Bob</name></assignedPerson>
</assignedEntity>
</performer>
</serviceEvent>
</documentationOf>
<component>
<structuredBody>
<component>
<section nullFlavor="NI">
<templateId root="2.16.840.1.113883.10.20.22.2.58" extension="2015-08-01" />
<code /> <!-- code="75310-3" codeSystem="2.16.840.1.113883.6.1" -->
<title>Health Concerns</title>
<text>Empty</text>
</section>
</component>
<component>
<section nullFlavor="NI">
<templateId root="2.16.840.1.113883.10.20.22.2.60" />
<code /> <!-- code="61146-7" codeSystem="2.16.840.1.113883.6.1" -->
<title>Goals</title>
<text>Empty</text>
</section>
</component>
<component>
<section nullFlavor="NI">
<templateId root="2.16.840.1.113883.10.20.21.2.3" extension="2015-08-01" />
<code /> <!-- code="62387-6" codeSystem="2.16.840.1.113883.6.1" -->
<title>Activities</title>
<text>Empty</text>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>
Loading

0 comments on commit 42e5378

Please sign in to comment.