Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.cdt.tests.HistoryAndPhysicalTest

NameTestsErrorsFailuresTime(s)Time StampHost
HistoryAndPhysicalTest36000.2862013-01-31T13:33:55JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testGetHistoryOfPresentIllness

Constraint

OCL

SuccessInvalid XML

Valid XML

0.005
testGetProblemSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.003
testGetProceduresSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.003
testGetPastMedicalHistorySection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.004
testGetImmunizationsSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.004
testGetMedicationsSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.003
testGetAlertsSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.003
testGetSocialHistorySection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.003
testGetFamilyHistorySection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.003
testGetReviewOfSystemsSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.003
testGetVitalSignsSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.003
testGetGeneralStatusSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.004
testGetDiagnosticFindings

Constraint

OCL

SuccessInvalid XML

Valid XML

0.003
testValidateGeneralHeaderConstraintsTemplateId

Constraint

The 'GeneralHeaderConstraintsTemplateId' invariant is violated on 'org.openhealthtools.mdht.uml.cda.mu2consol.impl.GeneralHeaderConstraintsImpl@effc3e2{#//}'

OCL

self.templateId->exists(id : datatypes::II | id.root = '2.16.840.1.113883.10.20.22.1.1')

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
</ClinicalDocument>

0.005
testValidateGeneralHeaderConstraintsCode

Constraint

Consol General Header Constraints SHALL contain exactly one [1..1] code (CONF:5253)

OCL

NO OCL FOUND FOR PROPERTY VALIDATE_GENERAL_HEADER_CONSTRAINTS_CODE__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.22.1.9"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code code="code" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
</ClinicalDocument>

0.003
testValidateHistoryAndPhysicalAssessmentAndPlan

Constraint

CDT History And Physical SHALL satisfy: Either combined Assessment + Plan section is included, or separate Assessment section and Plan section included, but not both combined and separate sections. (CONF-HP-92)

OCL

self.getSections()->exists(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(cdt::AssessmentAndPlanSection)) xor (self.getSections()->exists(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(cdt::AssessmentSection)) and self.getSections()->exists(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(cdt::PlanSection)))

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.2.7"/>
<code code="51847-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Assessment + Plan"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.011
testValidateHistoryAndPhysicalBothAssessmentAndPlan

Constraint

CDT History And Physical When Assessment section or Plan section is included, then both sections SHALL be included. (CONF-HP-91)

OCL

let assessmentExists : Boolean = self.getSections()->exists(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(cdt::AssessmentSection)) in let planExists : Boolean = self.getSections()->exists(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(cdt::PlanSection)) in (assessmentExists or planExists) implies (assessmentExists and planExists)

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.2.7"/>
<code code="51848-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Assessment"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.2.7"/>
<code code="51848-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Assessment"/>
</section>
</component>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.2.7"/>
<code code="18776-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Plan"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.016
testValidateHistoryAndPhysicalReasonForVisitAndChiefComplaint

Constraint

CDT History And Physical SHALL satisfy: Either combined Reason for Visit and Chief Complaint section is included, or separate Reason for Visit section and Chief Complaint section included, but not both combined and separate sections. (CONF-HP-75)

OCL

(self.getSections()->exists(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(cdt::ReasonForVisitAndChiefComplaintSection)) and not self.getSections()->exists(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(cdt::ReasonForVisitSection)) and not self.getSections()->exists(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(cdt::ChiefComplaintSection))) or ( self.getSections()->exists(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(cdt::ReasonForVisitSection)) and self.getSections()->exists(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(cdt::ChiefComplaintSection)) and not self.getSections()->exists(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(cdt::ReasonForVisitAndChiefComplaintSection)))

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.2.8"/>
<code code="46239-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Reason for visit + Chief complaint"/>
</section>
</component>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.2.8"/>
<code code="29299-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Reason for visit"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.2.8"/>
<code code="46239-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Reason for visit + Chief complaint"/>
</section>
</component>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.2.8"/>
<code code="10154-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Chief complaint"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.2.8"/>
<code code="46239-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Reason for visit + Chief complaint"/>
</section>
</component>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.2.8"/>
<code code="29299-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Reason for visit"/>
</section>
</component>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.2.8"/>
<code code="10154-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Chief complaint"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.2.8"/>
<code code="46239-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Reason for visit + Chief complaint"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.2.8"/>
<code code="29299-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Reason for visit"/>
</section>
</component>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.2.8"/>
<code code="10154-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Chief complaint"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.037
testValidateHistoryAndPhysicalBothReasonForVisitAndChiefComplaint

Constraint

CDT History And Physical When Reason for Visit section or Chief Complaint section is included, then both sections SHALL be included. (CONF-HP-74)

OCL

let reasonExists : Boolean = self.getSections()->exists(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(cdt::ReasonForVisitSection)) in let complaintExists : Boolean = self.getSections()->exists(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(cdt::ChiefComplaintSection)) in (reasonExists or complaintExists) implies (reasonExists and complaintExists)

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.2.8"/>
<code code="10154-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Chief complaint"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.2.8"/>
<code code="10154-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Chief complaint"/>
</section>
</component>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.2.8"/>
<code code="29299-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Reason for visit"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.014
testValidateHistoryAndPhysicalCode

Constraint

CDT History And Physical SHALL contain exactly one [1..1] code, where the @code SHALL be selected from ValueSet HPDocumentType 2.16.840.1.113883.1.11.20.22 DYNAMIC (CONF-HP-54)

OCL

(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined() and self.code.oclIsKindOf(datatypes::CE) and let value : datatypes::CE = self.code.oclAsType(datatypes::CE) in value.codeSystem = '2.16.840.1.113883.6.1' and not value.code.oclIsUndefined())

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
</ClinicalDocument>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<code code="aaaa" codeSystem="2.16.840.1.113883.6.1"/>
</ClinicalDocument>

0.041
testValidateHistoryAndPhysicalHistoryOfPresentIllness

Constraint

CDT History And Physical SHALL contain exactly one [1..1] component (CONF-HP-76) Contains exactly one [1..1] History Of Present Illness (templateId: 1.3.6.1.4.1.19376.1.5.3.1.3.4)

OCL

self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(cdt::HistoryOfPresentIllness))

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.4"/>
<code code="10164-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="HISTORY OF PRESENT ILLNESS"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.007
testValidateHistoryAndPhysicalPastMedicalHistorySection

Constraint

CDT History And Physical SHALL contain exactly one [1..1] component (CONF-HP-77) Contains exactly one [1..1] Past Medical History Section (templateId: 2.16.840.1.113883.10.20.2.9)

OCL

self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(cdt::PastMedicalHistorySection))

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.2.9"/>
<code code="11348-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="HISTORY OF PAST ILLNESS"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.008
testValidateHistoryAndPhysicalMedicationsSection

Constraint

CDT History And Physical SHALL contain exactly one [1..1] component (CONF-HP-79) Contains exactly one [1..1] CCD Medications Section (templateId: 2.16.840.1.113883.10.20.1.8)

OCL

self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(ccd::MedicationsSection))

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.1.8"/>
<code code="10160-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of medication use"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.006
testValidateHistoryAndPhysicalAlertsSection

Constraint

CDT History And Physical SHALL contain exactly one [1..1] component (CONF-HP-80) Contains exactly one [1..1] CCD Alerts Section (templateId: 2.16.840.1.113883.10.20.1.2)

OCL

self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(ccd::AlertsSection))

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.1.2"/>
<code code="48765-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Allergies, adverse reactions, alerts"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.006
testValidateHistoryAndPhysicalSocialHistorySection

Constraint

CDT History And Physical SHALL contain exactly one [1..1] component (CONF-HP-81) Contains exactly one [1..1] CCD Social History Section (templateId: 2.16.840.1.113883.10.20.1.15)

OCL

self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(ccd::SocialHistorySection))

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.1.15"/>
<code code="29762-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Social history"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.006
testValidateHistoryAndPhysicalFamilyHistorySection

Constraint

CDT History And Physical SHALL contain exactly one [1..1] component (CONF-HP-82) Contains exactly one [1..1] CCD Family History Section (templateId: 2.16.840.1.113883.10.20.1.4)

OCL

self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(ccd::FamilyHistorySection))

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.1.4"/>
<code code="10157-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of family member diseases"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.006
testValidateHistoryAndPhysicalReviewOfSystemsSection

Constraint

CDT History And Physical SHALL contain exactly one [1..1] component (CONF-HP-83) Contains exactly one [1..1] Review Of Systems Section IHE (templateId: 1.3.6.1.4.1.19376.1.5.3.1.3.18)

OCL

self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(cdt::ReviewOfSystemsSectionIHE))

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.18"/>
<code code="10187-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="REVIEW OF SYSTEMS"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.007
testValidateHistoryAndPhysicalPhysicalExaminationSection

Constraint

CDT History And Physical SHALL contain exactly one [1..1] component (CONF-HP-84) Contains exactly one [1..1] Physical Examination Section (templateId: 2.16.840.1.113883.10.20.2.10)

OCL

self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(cdt::PhysicalExaminationSection))

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.2.10"/>
<code code="29545-1" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="PHYSICAL FINDINGS"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.007
testValidateHistoryAndPhysicalVitalSignsSection

Constraint

CDT History And Physical SHALL contain exactly one [1..1] component (CONF-HP-86) Contains exactly one [1..1] Vital Signs Section (templateId: 2.16.840.1.113883.10.20.2.4)

OCL

self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(cdt::VitalSignsSection))

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.2.4"/>
<code code="8716-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="VITAL SIGNS"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.007
testValidateHistoryAndPhysicalGeneralStatusSection

Constraint

CDT History And Physical SHALL contain exactly one [1..1] component (CONF-HP-88) Contains exactly one [1..1] General Status Section (templateId: 2.16.840.1.113883.10.20.2.5)

OCL

self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(cdt::GeneralStatusSection))

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.2.5"/>
<code code="10210-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="GENERAL STATUS, PHYSICAL FINDINGS"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.006
testValidateHistoryAndPhysicalDiagnosticFindings

Constraint

CDT History And Physical SHALL contain exactly one [1..1] component (CONF-HP-90) Contains exactly one [1..1] Diagnostic Findings (templateId: 2.16.840.1.113883.10.20.1.14)

OCL

self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(cdt::DiagnosticFindings))

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.1.14"/>
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Relevant diagnostic tests and/or laboratory data"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.007
testValidateHistoryAndPhysicalProblemSection

Constraint

CDT History And Physical MAY contain zero or one [0..1] component (CONF-HP-93) Contains exactly one [1..1] CCD Problem Section (templateId: 2.16.840.1.113883.10.20.1.11)

OCL

self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(ccd::ProblemSection))

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.1.11"/>
<code code="11450-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Problem list"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.006
testValidateHistoryAndPhysicalProceduresSection

Constraint

CDT History And Physical MAY contain zero or one [0..1] component (CONF-HP-94) Contains exactly one [1..1] CCD Procedures Section (templateId: 2.16.840.1.113883.10.20.1.12)

OCL

self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(ccd::ProceduresSection))

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.1.12"/>
<code code="47519-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of procedures"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.006
testValidateHistoryAndPhysicalImmunizationsSection

Constraint

CDT History And Physical MAY contain zero or one [0..1] component (CONF-HP-96) Contains exactly one [1..1] CCD Immunizations Section (templateId: 2.16.840.1.113883.10.20.1.6)

OCL

self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(ccd::ImmunizationsSection))

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.1.6"/>
<code code="11369-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of immunizations"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.006
testGetPhysicalExaminationSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.004
Properties »