Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.consol.tests.HistoryAndPhysicalNoteTest

NameTestsErrorsFailuresTime(s)Time StampHost
HistoryAndPhysicalNoteTest63002.2942013-01-31T13:35:15JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testGetSocialHistorySection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.033
testGetFamilyHistorySection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.031
testGetReviewOfSystemsSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.031
testGetGeneralStatusSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.031
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
testGetAssessmentAndPlanSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.031
testGetAssessmentSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.031
testGetChiefComplaintSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.030
testGetPlanOfCareSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.030
testGetPhysicalExamSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.033
testGetHistoryOfPastIllnessSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.031
testGetReasonForVisitSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.031
testGetChiefComplaintAndReasonForVisitSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.031
testGetMedicationsSectionEntriesOptional

Constraint

OCL

SuccessInvalid XML

Valid XML

0.030
testGetProblemSectionEntriesOptional

Constraint

OCL

SuccessInvalid XML

Valid XML

0.032
testGetProceduresSectionEntriesOptional

Constraint

OCL

SuccessInvalid XML

Valid XML

0.031
testGetResultsSectionEntriesOptional

Constraint

OCL

SuccessInvalid XML

Valid XML

0.031
testGetVitalSignsSectionEntriesOptional

Constraint

OCL

SuccessInvalid XML

Valid XML

0.031
testGetImmunizationsSectionEntriesOptional

Constraint

OCL

SuccessInvalid XML

Valid XML

0.031
testGetHistoryOfPresentIllnessSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.031
testGetAllergiesSectionEntriesOptional

Constraint

OCL

SuccessInvalid XML

Valid XML

0.031
testValidateHistoryAndPhysicalNoteHasAnAssementAndPlanSectionOrIndividualAssementAndPlanSections

Constraint

Consol History And Physical Note SHALL include an Assessment and Plan Section, or an Assessment Section and a Plan Section (CONF:9986)

OCL

(self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(consol::PlanOfCareSection)) and self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(consol::AssessmentSection))) xor self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(consol::AssessmentAndPlanSection))

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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
</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">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.8"/>
<code code="51848-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Assessments"/>
</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">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.10"/>
<code code="18776-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Treatment plan"/>
</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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.9"/>
<code code="51847-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="ASSESSMENT AND PLAN"/>
</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">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.8"/>
<code code="51848-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Assessments"/>
</section>
</component>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.10"/>
<code code="18776-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Treatment plan"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.082
testValidateHistoryAndPhysicalNoteDoesNotHaveIndividualAssementAndPlanSectionsWhenAssementAndPlanSectionPresent

Constraint

Consol History And Physical Note SHALL NOT include an Assessment/Plan Section when an Assessment Section and a Plan of Care Section are present

OCL

(self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(consol::PlanOfCareSection)) or self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(consol::AssessmentSection))) xor self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(consol::AssessmentAndPlanSection))

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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.9"/>
<code code="51847-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="ASSESSMENT AND PLAN"/>
</section>
</component>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.10"/>
<code code="18776-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Treatment plan"/>
</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">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.9"/>
<code code="51847-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="ASSESSMENT AND PLAN"/>
</section>
</component>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.8"/>
<code code="51848-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Assessments"/>
</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">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.9"/>
<code code="51847-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="ASSESSMENT AND PLAN"/>
</section>
</component>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.8"/>
<code code="51848-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Assessments"/>
</section>
</component>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.10"/>
<code code="18776-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Treatment plan"/>
</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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.9"/>
<code code="51847-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="ASSESSMENT AND PLAN"/>
</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">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.8"/>
<code code="51848-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Assessments"/>
</section>
</component>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.10"/>
<code code="18776-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Treatment plan"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.083
testValidateHistoryAndPhysicalNoteHasChiefComplaintAndReasonForVisitChiefComplaintOrReasonForVisit

Constraint

Consol History And Physical Note SHALL include a Chief Complaint and Reason for Visit Section, Chief Complaint Section, or a Reason for Visit Section (CONF:9642)

OCL

(self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(consol::ChiefComplaintSection)) and self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(consol::ReasonForVisitSection))) xor self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(consol::ChiefComplaintAndReasonForVisitSection))

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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
</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">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.13.2.1"/>
<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">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.12"/>
<code code="29299-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Reason for Visit"/>
</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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.13"/>
<code code="46239-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Chief Complaint and 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">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.13.2.1"/>
<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.22.2.12"/>
<code code="29299-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Reason for Visit"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.082
testValidateHistoryAndPhysicalNoteDoesNotHaveChiefComplaintAndReasonForVisitWithChiefComplaintSectionOrReasonSection

Constraint

Consol History And Physical Note SHALL NOT include a Chief Complaint and Reason for Visit Section with either a Chief Complaint Section or a Reason for Visit Section. (CONF:10057)

OCL

(self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(consol::ChiefComplaintSection)) or self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(consol::ReasonForVisitSection))) xor self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(consol::ChiefComplaintAndReasonForVisitSection))

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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.13"/>
<code code="46239-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Chief Complaint and Reason for Visit"/>
</section>
</component>
<component>
<section>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.13.2.1"/>
<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">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.13"/>
<code code="46239-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Chief Complaint and Reason for Visit"/>
</section>
</component>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.12"/>
<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">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.13"/>
<code code="46239-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Chief Complaint and Reason for Visit"/>
</section>
</component>
<component>
<section>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.13.2.1"/>
<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.22.2.12"/>
<code code="29299-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Reason for Visit"/>
</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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.13"/>
<code code="46239-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Chief Complaint and 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">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.13.2.1"/>
<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.22.2.12"/>
<code code="29299-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Reason for Visit"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.084
testValidateHistoryAndPhysicalNoteTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:8283 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.1.3"

OCL

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

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.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
</ClinicalDocument>

0.011
testValidateHistoryAndPhysicalNoteCodeP

Constraint

Consol History And Physical Note SHALL contain exactly one [1..1] code (CONF:17185), where the @code SHALL be selected from ValueSet HPDocumentType 3. 2.16.840.1.113883.1.11.20.22 DYNAMIC (CONF:17186)

OCL

(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.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"/>

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.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
</ClinicalDocument>

0.033
testValidateHistoryAndPhysicalNoteCode

Constraint

Consol History And Physical Note SHALL contain exactly one [1..1] code (CONF:17185), where the @code SHALL be selected from ValueSet HPDocumentType 3. 2.16.840.1.113883.1.11.20.22 DYNAMIC (CONF:17186)

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 (value.code = '34117-2' or value.code = '11492-6' or value.code = '28626-0' or value.code = '34774-0' or value.code = '34115-6' or value.code = '34116-4' or value.code = '34095-0' or value.code = '34096-8' or value.code = '51849-8' or value.code = '47039-3' or value.code = '34763-3' or value.code = '34094-3' or value.code = '34138-8'))

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.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code code="34117-2" codeSystem="2.16.840.1.113883.6.1"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
</ClinicalDocument>

0.221
testValidateHistoryAndPhysicalNoteInFulfillmentOf

Constraint

Consol History And Physical Note MAY contain zero or more [0..*] inFulfillmentOf (CONF:8336, CONF:8337) Contains exactly one [1..1] CDA In Fulfillment Of

OCL

self.inFulfillmentOf->exists(inFulfillmentOf : cda::InFulfillmentOf | not inFulfillmentOf.oclIsUndefined() and inFulfillmentOf.oclIsKindOf(rim::ActRelationship))

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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
</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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<inFulfillmentOf/>
</ClinicalDocument>

0.022
testValidateHistoryAndPhysicalNoteComponentOf

Constraint

Consol History And Physical Note SHALL contain exactly one [1..1] componentOf (CONF:8338)

OCL

self.componentOf->one(componentOf : cda::Component1 | not componentOf.oclIsUndefined() and componentOf.oclIsKindOf(cda::Component1))

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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
</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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<componentOf/>
</ClinicalDocument>

0.022
testValidateHistoryAndPhysicalNoteAllergiesSectionEntriesOptional

Constraint

Consol History And Physical Note SHALL contain exactly one [1..1] component (CONF:9602) Contains exactly one [1..1] Allergies Section Entries Optional (templateId: 2.16.840.1.113883.10.20.22.2.6)

OCL

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

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.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.6"/>
<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.024
testValidateHistoryAndPhysicalNoteAssessmentSection

Constraint

Consol History And Physical Note MAY contain zero or one [0..1] component (CONF:9605) Contains exactly one [1..1] Assessment Section (templateId: 2.16.840.1.113883.10.20.22.2.8)

OCL

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

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.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.8"/>
<code code="51848-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Assessments"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.024
testValidateHistoryAndPhysicalNotePlanOfCareSection

Constraint

Consol History And Physical Note MAY contain zero or one [0..1] component (CONF:9607) Contains exactly one [1..1] Plan Of Care Section (templateId: 2.16.840.1.113883.10.20.22.2.10)

OCL

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

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.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.10"/>
<code code="18776-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Treatment plan"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.025
testValidateHistoryAndPhysicalNoteAssessmentAndPlanSection

Constraint

Consol History And Physical Note MAY contain zero or one [0..1] component (CONF:9987) Contains exactly one [1..1] Assessment And Plan Section (templateId: 2.16.840.1.113883.10.20.22.2.9)

OCL

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

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.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.9"/>
<code code="51847-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="ASSESSMENT AND PLAN"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.024
testValidateHistoryAndPhysicalNoteChiefComplaintSection

Constraint

Consol History And Physical Note MAY contain zero or one [0..1] component (CONF:9611) Contains exactly one [1..1] Chief Complaint Section (templateId: 1.3.6.1.4.1.19376.1.5.3.1.1.13.2.1)

OCL

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

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.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.13.2.1"/>
<code code="10154-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="CHIEF COMPLAINT"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.025
testValidateHistoryAndPhysicalNoteChiefComplaintAndReasonForVisitSection

Constraint

Consol History And Physical Note MAY contain zero or one [0..1] component (CONF:9613) Contains exactly one [1..1] Chief Complaint And Reason For Visit Section (templateId: 2.16.840.1.113883.10.20.22.2.13)

OCL

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

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.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.13"/>
<code code="46239-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Chief Complaint and Reason for Visit"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.024
testValidateHistoryAndPhysicalNoteFamilyHistorySection

Constraint

Consol History And Physical Note SHALL contain exactly one [1..1] component (CONF:9615) Contains exactly one [1..1] Family History Section (templateId: 2.16.840.1.113883.10.20.22.2.15)

OCL

self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(consol::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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.15"/>
<code code="10157-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Family History"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.025
testValidateHistoryAndPhysicalNoteGeneralStatusSection

Constraint

Consol History And Physical Note SHALL contain exactly one [1..1] component (CONF:9617) 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(consol::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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<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"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.026
testValidateHistoryAndPhysicalNoteHistoryOfPastIllnessSection

Constraint

Consol History And Physical Note SHALL contain exactly one [1..1] component (CONF:9619) Contains exactly one [1..1] History Of Past Illness Section (templateId: 2.16.840.1.113883.10.20.22.2.20)

OCL

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

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.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.20"/>
<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.025
testValidateHistoryAndPhysicalNoteMedicationsSectionEntriesOptional

Constraint

Consol History And Physical Note SHALL contain exactly one [1..1] component (CONF:9623) Contains exactly one [1..1] Medications Section Entries Optional (templateId: 2.16.840.1.113883.10.20.22.2.1)

OCL

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

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.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.1"/>
<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.025
testValidateHistoryAndPhysicalNotePhysicalExamSection

Constraint

Consol History And Physical Note SHALL contain exactly one [1..1] component (CONF:9625) Contains exactly one [1..1] Physical Exam Section (templateId: 2.16.840.1.113883.10.20.2.10)

OCL

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

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.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<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 EXAMINATION"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.024
testValidateHistoryAndPhysicalNoteReasonForVisitSection

Constraint

Consol History And Physical Note MAY contain zero or one [0..1] component (CONF:9627) Contains exactly one [1..1] Reason For Visit Section (templateId: 2.16.840.1.113883.10.20.22.2.12)

OCL

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

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.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.12"/>
<code code="29299-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Reason for Visit"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.025
testValidateHistoryAndPhysicalNoteResultsSectionEntriesOptional

Constraint

Consol History And Physical Note SHALL contain exactly one [1..1] component (CONF:9629) Contains exactly one [1..1] Results Section Entries Optional (templateId: 2.16.840.1.113883.10.20.22.2.3)

OCL

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

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.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.3"/>
<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.024
testValidateHistoryAndPhysicalNoteReviewOfSystemsSection

Constraint

Consol History And Physical Note SHALL contain exactly one [1..1] component (CONF:9631) Contains exactly one [1..1] Review Of Systems Section (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(consol::ReviewOfSystemsSection))

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.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<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.025
testValidateHistoryAndPhysicalNoteSocialHistorySection

Constraint

Consol History And Physical Note SHALL contain exactly one [1..1] component (CONF:9633) Contains exactly one [1..1] Social History Section (templateId: 2.16.840.1.113883.10.20.22.2.17)

OCL

self.getAllSections()->one(section : cda::Section | not section.oclIsUndefined() and section.oclIsKindOf(consol::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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.17"/>
<code code="29762-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Social history"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.025
testValidateHistoryAndPhysicalNoteHistoryOfPresentIllnessSection

Constraint

Consol History And Physical Note SHOULD contain zero or one [0..1] component (CONF:9621) Contains exactly one [1..1] History Of Present Illness Section (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(consol::HistoryOfPresentIllnessSection))

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.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<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.024
testValidateHistoryAndPhysicalNoteImmunizationsSectionEntriesOptional

Constraint

Consol History And Physical Note MAY contain zero or one [0..1] component (CONF:9637) Contains exactly one [1..1] Immunizations Section Entries Optional (templateId: 2.16.840.1.113883.10.20.22.2.2)

OCL

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

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.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.2"/>
<code code="11369-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.025
testValidateHistoryAndPhysicalNoteProblemSectionEntriesOptional

Constraint

Consol History And Physical Note MAY contain zero or one [0..1] component (CONF:9639) Contains exactly one [1..1] Problem Section Entries Optional (templateId: 2.16.840.1.113883.10.20.22.2.5)

OCL

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

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.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.5"/>
<code code="11450-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Problem List"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.024
testValidateHistoryAndPhysicalNoteProceduresSectionEntriesOptional

Constraint

Consol History And Physical Note MAY contain zero or one [0..1] component (CONF:9641) Contains exactly one [1..1] Procedures Section Entries Optional (templateId: 2.16.840.1.113883.10.20.22.2.7)

OCL

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

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.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.7"/>
<code code="47519-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of Procedures"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.024
testValidateHistoryAndPhysicalNoteVitalSignsSectionEntriesOptional

Constraint

Consol History And Physical Note SHALL contain exactly one [1..1] component (CONF:9635) Contains exactly one [1..1] Vital Signs Section Entries Optional (templateId: 2.16.840.1.113883.10.20.22.2.4)

OCL

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

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.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.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.025
testValidateHistoryAndPhysicalNoteInstructionsSection

Constraint

Consol History And Physical Note MAY contain zero or one [0..1] component (CONF:16807) Contains exactly one [1..1] Instructions Section (templateId: 2.16.840.1.113883.10.20.22.2.45)

OCL

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

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.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.45"/>
<code code="69730-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Instructions"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.026
testValidateHistoryAndPhysicalNoteComponentOfEncompassingEncounter4ResponsiblePartyAssignedEntityHasPersonOrOrganization

Constraint

Consol History And Physical Note SHALL contain exactly one [1..1] componentOf (CONF:8338) each SHALL contain zero or one [0..1] encompassingEncounter, where (CONF:8339) each MAY contain zero or one [0..1] responsibleParty, where (iv., CONF:8345) responsibleParty The responsibleParty element, if present, SHALL contain an assignedEntity element which SHALL contain an assignedPerson element, a representedOrganization element, or both. (CONF:8348)

OCL

self.componentOf->excluding(null).encompassingEncounter->excluding(null).responsibleParty->excluding(null)->reject(not assignedEntity.assignedPerson.oclIsUndefined() or not assignedEntity.representedOrganization->isEmpty())

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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<componentOf>
<encompassingEncounter>
<responsibleParty>
<assignedEntity/>
</responsibleParty>
</encompassingEncounter>
</componentOf>
</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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<componentOf>
<encompassingEncounter>
<responsibleParty>
<assignedEntity>
<assignedPerson/>
</assignedEntity>
</responsibleParty>
</encompassingEncounter>
</componentOf>
</ClinicalDocument>

0.057
testValidateHistoryAndPhysicalNoteComponentOfEncompassingEncounter4ResponsiblePartyAssignedEntity

Constraint

Consol History And Physical Note SHALL contain exactly one [1..1] componentOf (CONF:8338) each SHALL contain zero or one [0..1] encompassingEncounter, where (CONF:8339) each MAY contain zero or one [0..1] responsibleParty, where (iv., CONF:8345) responsibleParty SHALL contain exactly one [1..1] assignedEntity, where its type is Assigned Entity (CONF:9407)

OCL

self.componentOf->excluding(null).encompassingEncounter->excluding(null).responsibleParty->excluding(null)->reject(assignedEntity->one(assignedEntity : cda::AssignedEntity | not assignedEntity.oclIsUndefined() and assignedEntity.oclIsKindOf(rim::Role)))

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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<componentOf>
<encompassingEncounter>
<responsibleParty/>
</encompassingEncounter>
</componentOf>
</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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<componentOf>
<encompassingEncounter>
<responsibleParty>
<assignedEntity/>
</responsibleParty>
</encompassingEncounter>
</componentOf>
</ClinicalDocument>

0.047
testValidateHistoryAndPhysicalNoteComponentOfEncompassingEncounter4EncounterParticipantAssignedEntityHasPersonOrOrganization

Constraint

Consol History And Physical Note SHALL contain exactly one [1..1] componentOf (CONF:8338) each SHALL contain zero or one [0..1] encompassingEncounter, where (CONF:8339) each MAY contain zero or one [0..1] encounterParticipant, where (v., CONF:8342) encounterParticipant The responsibleParty element, if present, SHALL contain an assignedEntity element which SHALL contain an assignedPerson element, a representedOrganization element, or both. (CONF:8343)

OCL

self.componentOf->excluding(null).encompassingEncounter->excluding(null).encounterParticipant->excluding(null)->reject(not assignedEntity.assignedPerson.oclIsUndefined() or not assignedEntity.representedOrganization->isEmpty())

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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<componentOf>
<encompassingEncounter>
<encounterParticipant>
<assignedEntity/>
</encounterParticipant>
</encompassingEncounter>
</componentOf>
</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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<componentOf>
<encompassingEncounter>
<encounterParticipant>
<assignedEntity>
<assignedPerson/>
</assignedEntity>
</encounterParticipant>
</encompassingEncounter>
</componentOf>
</ClinicalDocument>

0.057
testValidateHistoryAndPhysicalNoteComponentOfEncompassingEncounter4EncounterParticipantAssignedEntity

Constraint

Consol History And Physical Note SHALL contain exactly one [1..1] componentOf (CONF:8338) each SHALL contain zero or one [0..1] encompassingEncounter, where (CONF:8339) each MAY contain zero or one [0..1] encounterParticipant, where (v., CONF:8342) encounterParticipant SHALL contain exactly one [1..1] assignedEntity, where its type is CDA Assigned Entity (CONF:8343)

OCL

self.componentOf->excluding(null).encompassingEncounter->excluding(null).encounterParticipant->excluding(null)->reject(assignedEntity->one(assignedEntity : cda::AssignedEntity | not assignedEntity.oclIsUndefined() and assignedEntity.oclIsKindOf(rim::Role)))

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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<componentOf>
<encompassingEncounter>
<encounterParticipant/>
</encompassingEncounter>
</componentOf>
</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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<componentOf>
<encompassingEncounter>
<encounterParticipant>
<assignedEntity/>
</encounterParticipant>
</encompassingEncounter>
</componentOf>
</ClinicalDocument>

0.045
testValidateHistoryAndPhysicalNoteComponentOfEncompassingEncounter4EffectiveTime

Constraint

Consol History And Physical Note SHALL contain exactly one [1..1] componentOf (CONF:8338) each SHALL contain zero or one [0..1] encompassingEncounter, where (CONF:8339) encompassingEncounter SHALL contain exactly one [1..1] effectiveTime (ii., CONF:8341)

OCL

self.componentOf->excluding(null).encompassingEncounter->excluding(null)->reject((effectiveTime.oclIsUndefined() or effectiveTime.isNullFlavorUndefined()) implies (not effectiveTime.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">
<componentOf>
<encompassingEncounter/>
</componentOf>
</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">
<componentOf>
<encompassingEncounter>
<effectiveTime/>
</encompassingEncounter>
</componentOf>
</ClinicalDocument>

0.058
testValidateHistoryAndPhysicalNoteComponentOfEncompassingEncounter4Id

Constraint

Consol History And Physical Note SHALL contain exactly one [1..1] componentOf (CONF:8338) each SHALL contain zero or one [0..1] encompassingEncounter, where (CONF:8339) encompassingEncounter SHALL contain exactly one [1..1] id (i., CONF:8340)

OCL

self.componentOf->excluding(null).encompassingEncounter->excluding(null)->reject((id->isEmpty() or id->exists(element | element.isNullFlavorUndefined())) implies (id->size() = 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">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<componentOf>
<encompassingEncounter/>
</componentOf>
</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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<componentOf>
<encompassingEncounter>
<id/>
</encompassingEncounter>
</componentOf>
</ClinicalDocument>

0.058
testValidateHistoryAndPhysicalNoteComponentOfEncompassingEncounter4Location

Constraint

Consol History And Physical Note SHALL contain exactly one [1..1] componentOf (CONF:8338) each SHALL contain zero or one [0..1] encompassingEncounter, where (CONF:8339) encompassingEncounter MAY contain zero or one [0..1] location, where its type is CDA Location (CONF:8344)

OCL

self.componentOf->excluding(null).encompassingEncounter->excluding(null)->reject(location->one(location : cda::Location | not location.oclIsUndefined() and location.oclIsKindOf(rim::Participation)))

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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<componentOf>
<encompassingEncounter/>
</componentOf>
</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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<componentOf>
<encompassingEncounter>
<location/>
</encompassingEncounter>
</componentOf>
</ClinicalDocument>

0.039
testValidateHistoryAndPhysicalNoteComponentOfEncompassingEncounter4ResponsibleParty

Constraint

Consol History And Physical Note SHALL contain exactly one [1..1] componentOf (CONF:8338) each SHALL contain zero or one [0..1] encompassingEncounter, where (CONF:8339) encompassingEncounter MAY contain zero or one [0..1] responsibleParty, where its type is Responsible Party (iv., CONF:8345)

OCL

self.componentOf->excluding(null).encompassingEncounter->excluding(null)->reject(responsibleParty->one(responsibleParty : cda::ResponsibleParty | not responsibleParty.oclIsUndefined() and responsibleParty.oclIsKindOf(cda::ResponsibleParty)))

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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<componentOf>
<encompassingEncounter/>
</componentOf>
</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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<componentOf>
<encompassingEncounter>
<responsibleParty/>
</encompassingEncounter>
</componentOf>
</ClinicalDocument>

0.039
testValidateHistoryAndPhysicalNoteComponentOfEncompassingEncounter4EncounterParticipant

Constraint

Consol History And Physical Note SHALL contain exactly one [1..1] componentOf (CONF:8338) each SHALL contain zero or one [0..1] encompassingEncounter, where (CONF:8339) encompassingEncounter MAY contain zero or one [0..1] encounterParticipant, where its type is Encounter Participant (v., CONF:8342)

OCL

self.componentOf->excluding(null).encompassingEncounter->excluding(null)->reject(encounterParticipant->one(encounterParticipant : cda::EncounterParticipant | not encounterParticipant.oclIsUndefined() and encounterParticipant.oclIsKindOf(cda::EncounterParticipant)))

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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<componentOf>
<encompassingEncounter/>
</componentOf>
</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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<componentOf>
<encompassingEncounter>
<encounterParticipant/>
</encompassingEncounter>
</componentOf>
</ClinicalDocument>

0.038
testValidateHistoryAndPhysicalNoteComponentOfEncompassingEncounter

Constraint

Consol History And Physical Note SHALL contain exactly one [1..1] componentOf (CONF:8338) componentOf SHALL contain exactly one [1..1] encompassingEncounter, where its type is Encompassing Encounter7 (CONF:8449)

OCL

self.componentOf->excluding(null)->reject(encompassingEncounter->one(encompassingEncounter : cda::EncompassingEncounter | not encompassingEncounter.oclIsUndefined() and encompassingEncounter.oclIsKindOf(cda::EncompassingEncounter)))

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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<componentOf/>
</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.22.1.3"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<componentOf>
<encompassingEncounter/>
</componentOf>
</ClinicalDocument>

0.032
testGetInstructionsSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.032
Properties »