Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
DischargeSummaryTest68001.7432013-01-31T13:34:51JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testGetSocialHistorySection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.026
testGetFamilyHistorySection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.024
testGetReviewOfSystemsSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.023
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.009
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.001
testGetChiefComplaintSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.024
testGetPlanOfCareSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.024
testGetFunctionalStatusSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.023
testValidateDischargeSummaryCode

Constraint

Consol Discharge Summary SHALL contain exactly one [1..1] code (CONF:17178), where the @code SHALL be selected from ValueSet DischargeSummaryDocumentTypeCode 2.16.840.1.113883.11.20.4.1 DYNAMIC (CONF:17179)

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 = '18842-5' or value.code = '11490-0' or value.code = '28655-9' or value.code = '29761-4' or value.code = '34745-0' or value.code = '34105-7' or value.code = '34106-5'))

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

0.111
testValidateDischargeSummaryHospitalAdmissionDiagnosisSection

Constraint

Consol Discharge Summary SHALL contain exactly one [1..1] component (CONF:9928) Contains exactly one [1..1] Hospital Admission Diagnosis Section (templateId: 2.16.840.1.113883.10.20.22.2.43)

OCL

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

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.8"/>
<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.43"/>
<code code="46241-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="HOSPITAL ADMISSION DX"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.020
testValidateDischargeSummaryFunctionalStatusSection

Constraint

Consol Discharge Summary MAY contain zero or one [0..1] component (CONF:9562) Contains exactly one [1..1] Functional Status Section (templateId: 2.16.840.1.113883.10.20.22.2.14)

OCL

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

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.8"/>
<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.14"/>
<code code="47420-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Functional status assessment"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.019
testValidateDischargeSummaryHospitalCourseSection

Constraint

Consol Discharge Summary SHALL contain exactly one [1..1] component (CONF:9544) Contains exactly one [1..1] Hospital Course Section (templateId: 1.3.6.1.4.1.19376.1.5.3.1.3.5)

OCL

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

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.8"/>
<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.5"/>
<code code="8648-8" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Hospital Course"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.021
testValidateDischargeSummaryPlanOfCareSection

Constraint

Consol Discharge Summary SHALL contain exactly one [1..1] component (CONF:9550) 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.8"/>
<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.019
testValidateDischargeSummaryHistoryOfPastIllnessSection

Constraint

Consol Discharge Summary MAY contain exactly one [1..1] component (CONF:9564) 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.8"/>
<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.019
testValidateDischargeSummaryReviewOfSystemsSection

Constraint

Consol Discharge Summary MAY contain zero or one [0..1] component (CONF:9580) 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.8"/>
<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.020
testGetHospitalAdmissionDiagnosisSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.024
testGetHospitalCourseSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.024
testGetHistoryOfPastIllnessSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.024
testGetReasonForVisitSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.023
testGetChiefComplaintAndReasonForVisitSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.024
testGetProblemSectionEntriesOptional

Constraint

OCL

SuccessInvalid XML

Valid XML

0.024
testGetProceduresSectionEntriesOptional

Constraint

OCL

SuccessInvalid XML

Valid XML

0.024
testGetVitalSignsSectionEntriesOptional

Constraint

OCL

SuccessInvalid XML

Valid XML

0.024
testGetImmunizationsSectionEntriesOptional

Constraint

OCL

SuccessInvalid XML

Valid XML

0.024
testValidateDischargeSummaryDoesNotHaveChiefComplaintAndReasonForVisitWithChiefComplaintSectionOrReasonSection

Constraint

Consol Discharge Summary SHALL NOT include a Chief Complaint and Reason for Visit Section with either a Chief Complaint Section or a Reason for Visit Section. (CONF:10055)

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.8"/>
<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.8"/>
<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.8"/>
<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.8"/>
<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.8"/>
<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.066
testValidateDischargeSummaryCodeP

Constraint

Consol Discharge Summary SHALL contain exactly one [1..1] code (CONF:17178), where the @code SHALL be selected from ValueSet DischargeSummaryDocumentTypeCode 2.16.840.1.113883.11.20.4.1 DYNAMIC (CONF:17179)

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.8"/>
<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.026
testValidateDischargeSummaryHospitalAdmissionMedicationsSectionEntriesOptional

Constraint

Consol Discharge Summary MAY contain exactly one [1..1] component (CONF:10111) Contains exactly one [1..1] Hospital Admission Medications Section Entries Optional (templateId: 2.16.840.1.113883.10.20.22.2.44)

OCL

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

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.8"/>
<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.44"/>
<code code="42346-7" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="MEDICATIONS ON ADMISSION"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.023
testValidateDischargeSummaryHospitalDischargeDiagnosisSection

Constraint

Consol Discharge Summary SHALL contain exactly one [1..1] component (CONF:9546) Contains exactly one [1..1] Hospital Discharge Diagnosis Section (templateId: 2.16.840.1.113883.10.20.22.2.24)

OCL

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

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.8"/>
<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.24"/>
<code code="11535-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Hospital Discharge Diagnosis"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.020
testValidateDischargeSummaryDischargeDietSection

Constraint

Consol Discharge Summary MAY contain zero or one [0..1] component (CONF:9558) Contains exactly one [1..1] Discharge Diet Section (templateId: 1.3.6.1.4.1.19376.1.5.3.1.3.33)

OCL

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

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.8"/>
<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.33"/>
<code code="42344-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Discharge Diet"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.019
testValidateDischargeSummaryHospitalDischargeMedicationsSectionEntriesOptional

Constraint

Consol Discharge Summary SHALL contain exactly one [1..1] component (CONF:9548) Contains exactly one [1..1] Hospital Discharge Medications Section Entries Optional (templateId: 2.16.840.1.113883.10.20.22.2.11)

OCL

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

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.8"/>
<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.11"/>
<code code="10183-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="HOSPITAL DISCHARGE MEDICATIONS"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.020
testValidateDischargeSummaryHistoryOfPresentIllnessSection

Constraint

Consol Discharge Summary MAY contain exactly one [1..1] component (CONF:9566) 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.8"/>
<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.019
testValidateDischargeSummaryComponentOf

Constraint

Consol Discharge Summary SHALL contain exactly one [1..1] componentOf (CONF:9539)

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.8"/>
<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.8"/>
<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.017
testValidateDischargeSummaryChiefComplaintAndReasonForVisitSection

Constraint

Consol Discharge Summary MAY contain zero or one [0..1] component (CONF:9556) 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.8"/>
<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.020
testValidateDischargeSummaryChiefComplaintSection

Constraint

Consol Discharge Summary MAY contain zero or one [0..1] component (CONF:9554) 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.8"/>
<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.019
testValidateDischargeSummaryFamilyHistorySection

Constraint

Consol Discharge Summary MAY contain zero or one [0..1] component (CONF:9560) 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.8"/>
<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.020
testValidateDischargeSummaryHospitalConsultationsSection

Constraint

Consol Discharge Summary MAY contain zero or one [0..1] component (CONF:9924) Contains exactly one [1..1] Hospital Consultations Section (templateId: 2.16.840.1.113883.10.20.22.2.42)

OCL

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

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.8"/>
<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.42"/>
<code code="18841-7" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.020
testValidateDischargeSummaryHospitalDischargeInstructionsSection

Constraint

Consol Discharge Summary MAY contain zero or one [0..1] component (CONF:9926) Contains exactly one [1..1] Hospital Discharge Instructions Section (templateId: 2.16.840.1.113883.10.20.22.2.41)

OCL

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

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.8"/>
<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.41"/>
<code code="8653-8" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Hospital Discharge Instructions"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.020
testValidateDischargeSummaryHospitalDischargePhysicalSection

Constraint

Consol Discharge Summary MAY contain zero or one [0..1] component (CONF:9568) Contains exactly one [1..1] Hospital Discharge Physical Section (templateId: 1.3.6.1.4.1.19376.1.5.3.1.3.26)

OCL

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

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.8"/>
<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.26"/>
<code code="10184-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Hospital Discharge Physical"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.021
testValidateDischargeSummaryHospitalDischargeStudiesSummarySection

Constraint

Consol Discharge Summary MAY contain zero or one [0..1] component (CONF:9570) Contains exactly one [1..1] Hospital Discharge Studies Summary Section (templateId: 2.16.840.1.113883.10.20.22.2.16)

OCL

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

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.8"/>
<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.16"/>
<code code="11493-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Hospital Discharge Studies Summary"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.020
testValidateDischargeSummaryImmunizationsSectionEntriesOptional

Constraint

Consol Discharge Summary MAY contain zero or one [0..1] component (CONF:9572) 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.8"/>
<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.019
testValidateDischargeSummaryProblemSectionEntriesOptional

Constraint

Consol Discharge Summary MAY contain zero or one [0..1] component (CONF:9574) 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.8"/>
<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.020
testValidateDischargeSummaryProceduresSectionEntriesOptional

Constraint

Consol Discharge Summary MAY contain zero or one [0..1] component (CONF:9576) 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.8"/>
<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.019
testValidateDischargeSummaryReasonForVisitSection

Constraint

Consol Discharge Summary MAY contain zero or one [0..1] component (CONF:9578) 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.8"/>
<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.020
testValidateDischargeSummarySocialHistorySection

Constraint

Consol Discharge Summary MAY contain zero or one [0..1] component (CONF:9582) 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.8"/>
<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.020
testValidateDischargeSummaryAllergiesSectionEntriesOptional

Constraint

Consol Discharge Summary SHALL contain exactly one [1..1] component (CONF:9542) 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.8"/>
<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.019
testValidateDischargeSummaryVitalSignsSectionEntriesOptional

Constraint

Consol Discharge Summary MAY contain zero or one [0..1] component (CONF:9584) 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.8"/>
<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.019
testValidateDischargeSummaryComponentOfEncompassingEncounter3ResponsiblePartyAssignedEntityHasPersonOrOrganization

Constraint

Consol Discharge Summary SHALL contain exactly one [1..1] componentOf (CONF:9539) each SHALL contain exactly one [1..1] encompassingEncounter, where (CONF:8472) each MAY contain zero or one [0..1] responsibleParty, where (CONF:8479) 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.8"/>
<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.8"/>
<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.045
testValidateDischargeSummaryComponentOfEncompassingEncounter3ResponsiblePartyAssignedEntity

Constraint

Consol Discharge Summary SHALL contain exactly one [1..1] componentOf (CONF:9539) each SHALL contain exactly one [1..1] encompassingEncounter, where (CONF:8472) each MAY contain zero or one [0..1] responsibleParty, where (CONF:8479) 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->exists(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.8"/>
<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.8"/>
<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.038
testValidateDischargeSummaryComponentOfEncompassingEncounter3EncounterParticipantAssignedEntityHasPersonOrOrganization

Constraint

Consol Discharge Summary SHALL contain exactly one [1..1] componentOf (CONF:9539) each SHALL contain exactly one [1..1] encompassingEncounter, where (CONF:8472) each MAY contain zero or one [0..1] encounterParticipant, where (CONF:8478) 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.8"/>
<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.8"/>
<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.045
testValidateDischargeSummaryComponentOfEncompassingEncounter3EncounterParticipantAssignedEntity

Constraint

Consol Discharge Summary SHALL contain exactly one [1..1] componentOf (CONF:9539) each SHALL contain exactly one [1..1] encompassingEncounter, where (CONF:8472) each MAY contain zero or one [0..1] encounterParticipant, where (CONF:8478) 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->exists(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.8"/>
<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.8"/>
<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.036
testValidateDischargeSummaryComponentOfEncompassingEncounter3EncompassingEncounterHasEffectiveTimeLow

Constraint

Consol Discharge Summary SHALL contain exactly one [1..1] componentOf (CONF:9539) each SHALL contain exactly one [1..1] encompassingEncounter, where (CONF:8472) encompassingEncounter This encompassingEncounter SHALL contain exactly one [1..1] effectiveTime/low (CONF:8473)

OCL

self.componentOf->excluding(null).encompassingEncounter->excluding(null)->reject(not effectiveTime.low.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.22.1.8"/>
<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>
<effectiveTime/>
</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.8"/>
<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>
<effectiveTime>
<low/>
</effectiveTime>
</encompassingEncounter>
</componentOf>
</ClinicalDocument>

0.026
testValidateDischargeSummaryComponentOfEncompassingEncounter3EncompassingEncounterHasEffectiveTimeHigh

Constraint

Consol Discharge Summary SHALL contain exactly one [1..1] componentOf (CONF:9539) each SHALL contain exactly one [1..1] encompassingEncounter, where (CONF:8472) encompassingEncounter This encompassingEncounter SHALL contain exactly one [1..1] effectiveTime/high (CONF:8475)

OCL

self.componentOf->excluding(null).encompassingEncounter->excluding(null)->reject(not effectiveTime.high.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.22.1.8"/>
<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>
<effectiveTime/>
</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.8"/>
<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>
<effectiveTime>
<high/>
</effectiveTime>
</encompassingEncounter>
</componentOf>
</ClinicalDocument>

0.026
testValidateDischargeSummaryComponentOfEncompassingEncounter3DischargeDispositionCode

Constraint

Consol Discharge Summary SHALL contain exactly one [1..1] componentOf (CONF:9539) each SHALL contain exactly one [1..1] encompassingEncounter, where (CONF:8472) encompassingEncounter SHALL contain exactly one [1..1] dischargeDispositionCode, where the @code SHOULD be selected from ValueSet NUBC UB-04 FL17-Patient Status 2.16.840.1.113883.3.88.12.80.33 STATIC (CONF:8476)

OCL

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

0.043
testValidateDischargeSummaryComponentOfEncompassingEncounter3EffectiveTime

Constraint

Consol Discharge Summary SHALL contain exactly one [1..1] componentOf (CONF:9539) each SHALL contain exactly one [1..1] encompassingEncounter, where (CONF:8472) encompassingEncounter SHALL contain exactly one [1..1] effectiveTime (CONF:8473, CONF:8475)

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">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.22.1.8"/>
<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.8"/>
<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>
<effectiveTime/>
</encompassingEncounter>
</componentOf>
</ClinicalDocument>

0.046
testValidateDischargeSummaryComponentOfEncompassingEncounter3ResponsibleParty

Constraint

Consol Discharge Summary SHALL contain exactly one [1..1] componentOf (CONF:9539) each SHALL contain exactly one [1..1] encompassingEncounter, where (CONF:8472) encompassingEncounter MAY contain zero or one [0..1] responsibleParty, where its type is Responsible Party (CONF:8479)

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.8"/>
<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.8"/>
<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.031
testValidateDischargeSummaryComponentOfEncompassingEncounter3EncounterParticipant

Constraint

Consol Discharge Summary SHALL contain exactly one [1..1] componentOf (CONF:9539) each SHALL contain exactly one [1..1] encompassingEncounter, where (CONF:8472) encompassingEncounter MAY contain zero or one [0..1] encounterParticipant, where its type is Encounter Participant (CONF:8478)

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.8"/>
<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.8"/>
<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.030
testValidateDischargeSummaryComponentOfEncompassingEncounter

Constraint

Consol Discharge Summary SHALL contain exactly one [1..1] componentOf (CONF:9539) 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.8"/>
<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.8"/>
<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.025
testGetHospitalAdmissionMedicationsSectionEntriesOptional

Constraint

OCL

SuccessInvalid XML

Valid XML

0.025
testGetHospitalDischargeDiagnosisSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.025
testGetDischargeDietSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.024
testGetHospitalDischargeMedicationsSectionEntriesOptional

Constraint

OCL

SuccessInvalid XML

Valid XML

0.024
testGetHistoryOfPresentIllnessSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.025
testGetHospitalConsultationsSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.025
testGetHospitalDischargeInstructionsSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.025
testGetHospitalDischargePhysicalSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.025
testGetHospitalDischargeStudiesSummarySection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.024
testGetAllergiesSectionEntriesOptional

Constraint

OCL

SuccessInvalid XML

Valid XML

0.024
Properties »