Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
OperativeNoteTest50002.1052013-01-31T13:35:36JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
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.004
testGetPlanOfCareSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.035
testValidateOperativeNoteTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:8483, CONF:10048 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.1.7"

OCL

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

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.7"/>
<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.012
testValidateOperativeNoteCodeP

Constraint

Consol Operative Note SHALL contain exactly one [1..1] code (CONF:17187), where the @code SHALL be selected from ValueSet SurgicalOperationNoteDocumentTypeCode 2.16.840.1.113883.11.20.1.1 DYNAMIC (CONF:17188)

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.7"/>
<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.037
testValidateOperativeNoteCode

Constraint

Consol Operative Note SHALL contain exactly one [1..1] code (CONF:17187), where the @code SHALL be selected from ValueSet SurgicalOperationNoteDocumentTypeCode 2.16.840.1.113883.11.20.1.1 DYNAMIC (CONF:17188)

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 = '11504-8' or value.code = '34137-0' or value.code = '28583-3' or value.code = '28624-5' or value.code = '28573-4' or value.code = '34877-1' or value.code = '34874-8' or value.code = '34870-6' or value.code = '34868-0' or value.code = '34818-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.7"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<code code="34868-0" codeSystem="2.16.840.1.113883.6.1"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
</ClinicalDocument>

0.208
testValidateOperativeNoteDocumentationOf

Constraint

Consol Operative Note SHALL contain at least one [1..*] documentationOf (CONF:8486)

OCL

self.documentationOf->exists(documentationOf : cda::DocumentationOf | not documentationOf.oclIsUndefined() and documentationOf.oclIsKindOf(cda::DocumentationOf))

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.7"/>
<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.7"/>
<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"/>
<documentationOf/>
</ClinicalDocument>

0.024
testValidateOperativeNoteAnesthesiaSection

Constraint

Consol Operative Note SHALL contain exactly one [1..1] component (CONF:9883) Contains exactly one [1..1] Anesthesia Section (templateId: 2.16.840.1.113883.10.20.22.2.25)

OCL

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

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.7"/>
<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.25"/>
<code code="59774-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.028
testValidateOperativeNoteComplicationsSection

Constraint

Consol Operative Note SHALL contain exactly one [1..1] component (CONF:9885) Contains exactly one [1..1] Complications Section (templateId: 2.16.840.1.113883.10.20.22.2.37)

OCL

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

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.7"/>
<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.37"/>
<code code="55109-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Complications"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.027
testValidateOperativeNotePostoperativeDiagnosisSection

Constraint

Consol Operative Note SHALL contain exactly one [1..1] component (CONF:9913) Contains exactly one [1..1] Postoperative Diagnosis Section (templateId: 2.16.840.1.113883.10.20.22.2.35)

OCL

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

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.7"/>
<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.35"/>
<code code="10218-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Postoperative Diagnosis"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.029
testValidateOperativeNotePreoperativeDiagnosisSection

Constraint

Consol Operative Note SHALL contain exactly one [1..1] component (CONF:9888) Contains exactly one [1..1] Preoperative Diagnosis Section (templateId: 2.16.840.1.113883.10.20.22.2.34)

OCL

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

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.7"/>
<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.34"/>
<code code="10219-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Preoperative Diagnosis"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.029
testValidateOperativeNoteProcedureEstimatedBloodLossSection

Constraint

Consol Operative Note SHALL contain exactly one [1..1] component (CONF:9890) Contains exactly one [1..1] Procedure Estimated Blood Loss Section (templateId: 2.16.840.1.113883.10.20.18.2.9)

OCL

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

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.7"/>
<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.18.2.9"/>
<code code="59770-8" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Procedure Estimated Blood Loss"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.028
testValidateOperativeNoteProcedureFindingsSection

Constraint

Consol Operative Note SHALL contain exactly one [1..1] component (CONF:9892) Contains exactly one [1..1] Procedure Findings Section (templateId: 2.16.840.1.113883.10.20.22.2.28)

OCL

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

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.7"/>
<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.28"/>
<code code="59776-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Procedure Findings"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.029
testValidateOperativeNoteProcedureSpecimensTakenSection

Constraint

Consol Operative Note SHALL contain exactly one [1..1] component (CONF:9894) Contains exactly one [1..1] Procedure Specimens Taken Section (templateId: 2.16.840.1.113883.10.20.22.2.31)

OCL

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

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.7"/>
<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.31"/>
<code code="59773-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Procedure Specimens Taken"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.028
testValidateOperativeNoteProcedureDescriptionSection

Constraint

Consol Operative Note SHALL contain exactly one [1..1] component (CONF:9896) Contains exactly one [1..1] Procedure Description Section (templateId: 2.16.840.1.113883.10.20.22.2.27)

OCL

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

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.7"/>
<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.27"/>
<code code="29554-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Procedure Description"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.031
testValidateOperativeNoteProcedureImplantsSection

Constraint

Consol Operative Note MAY contain zero or one [0..1] component (CONF:9898) Contains exactly one [1..1] Procedure Implants Section (templateId: 2.16.840.1.113883.10.20.22.2.40)

OCL

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

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.7"/>
<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.40"/>
<code code="59771-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Procedure Implants"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.029
testValidateOperativeNoteOperativeNoteFluidSection

Constraint

Consol Operative Note MAY contain zero or one [0..1] component (CONF:9900) Contains exactly one [1..1] Operative Note Fluid Section (templateId: 2.16.840.1.113883.10.20.7.12)

OCL

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

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.7"/>
<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.7.12"/>
<code code="10216-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Operative Note Fluids"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.027
testValidateOperativeNoteOperativeNoteSurgicalProcedureSection

Constraint

Consol Operative Note MAY contain zero or one [0..1] component (CONF:9902) Contains exactly one [1..1] Operative Note Surgical Procedure Section (templateId: 2.16.840.1.113883.10.20.7.14)

OCL

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

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.7"/>
<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.7.14"/>
<code code="10223-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Operative Note Surgical"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.027
testValidateOperativeNotePlanOfCareSection

Constraint

Consol Operative Note MAY contain zero or one [0..1] component (CONF:9904) 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.7"/>
<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.027
testValidateOperativeNotePlannedProcedureSection

Constraint

Consol Operative Note MAY contain zero or one [0..1] component (CONF:9906) Contains exactly one [1..1] Planned Procedure Section (templateId: 2.16.840.1.113883.10.20.22.2.30)

OCL

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

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.7"/>
<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.30"/>
<code code="59772-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Planned Procedure"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.029
testValidateOperativeNoteProcedureDispositionSection

Constraint

Consol Operative Note MAY contain zero or one [0..1] component (CONF:9908) Contains exactly one [1..1] Procedure Disposition Section (templateId: 2.16.840.1.113883.10.20.18.2.12)

OCL

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

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.7"/>
<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.18.2.12"/>
<code code="59775-7" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Procedure Disposition"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.028
testValidateOperativeNoteProcedureIndicationsSection

Constraint

Consol Operative Note MAY contain zero or one [0..1] component (CONF:9910) Contains exactly one [1..1] Procedure Indications Section (templateId: 2.16.840.1.113883.10.20.22.2.29)

OCL

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

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.7"/>
<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.29"/>
<code code="59768-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Procedure Indications"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.028
testValidateOperativeNoteSurgicalDrainsSection

Constraint

Consol Operative Note MAY contain zero or one [0..1] component (CONF:9912) Contains exactly one [1..1] Surgical Drains Section (templateId: 2.16.840.1.113883.10.20.7.13)

OCL

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

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.7"/>
<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.7.13"/>
<code code="11537-8" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Surgical Drains"/>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.029
testValidateOperativeNoteDocumentationOfServiceEventPrimaryPerformerAssignedEntityCode

Constraint

Consol Operative Note SHALL contain at least one [1..*] documentationOf (CONF:8486) each SHALL contain exactly one [1..1] serviceEvent, where (CONF:8493) each SHALL contain exactly one [1..1] performer, where (CONF:8489) each SHALL contain exactly one [1..1] assignedEntity, where (CONF:10917) assignedEntity SHALL contain exactly one [1..1] code (CONF:8888)

OCL

self.documentationOf->excluding(null).serviceEvent->excluding(null).performer->excluding(null)->select(typeCode = vocab::x_ServiceEventPerformer::PPRF).assignedEntity->excluding(null)->reject((code.oclIsUndefined() or code.isNullFlavorUndefined()) implies (not code.oclIsUndefined() and code.oclIsKindOf(datatypes::CE) and let value : datatypes::CE = code.oclAsType(datatypes::CE) in value.codeSystem = '2.16.840.1.113883.6.101' and not value.code.oclIsUndefined()))

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.22.1.7"/>
<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"/>
<documentationOf>
<serviceEvent>
<performer typeCode="PPRF">
<assignedEntity/>
</performer>
</serviceEvent>
</documentationOf>
</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.7"/>
<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"/>
<documentationOf>
<serviceEvent>
<performer typeCode="PPRF">
<assignedEntity>
<code code="test" codeSystem="2.16.840.1.113883.6.101"/>
</assignedEntity>
</performer>
</serviceEvent>
</documentationOf>
</ClinicalDocument>

0.139
testValidateOperativeNoteDocumentationOfServiceEventPrimaryPerformerAssignedEntityCodeP

Constraint

Consol Operative Note SHALL contain at least one [1..*] documentationOf (CONF:8486) each SHALL contain exactly one [1..1] serviceEvent, where (CONF:8493) each SHALL contain exactly one [1..1] performer, where (CONF:8489) each SHALL contain exactly one [1..1] assignedEntity, where (CONF:10917) assignedEntity SHOULD contain zero or one [0..1] code (CONF:14912), where the @code SHALL be selected from ValueSet Healthcare Provider Taxonomy (NUCC - HIPAA) 2.16.840.1.114222.4.11.1066 DYNAMIC (CONF:14913)

OCL

self.documentationOf->excluding(null).serviceEvent->excluding(null).performer->excluding(null)->select(typeCode = vocab::x_ServiceEventPerformer::PPRF).assignedEntity->excluding(null)->reject((code.oclIsUndefined() or code.isNullFlavorUndefined()) implies (not code.oclIsUndefined()))

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.22.1.7"/>
<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"/>
<documentationOf>
<serviceEvent>
<performer typeCode="PPRF">
<assignedEntity/>
</performer>
</serviceEvent>
</documentationOf>
</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.7"/>
<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"/>
<documentationOf>
<serviceEvent>
<performer typeCode="PPRF">
<assignedEntity>
<code code="test" codeSystem="2.16.840.1.113883.6.101"/>
</assignedEntity>
</performer>
</serviceEvent>
</documentationOf>
</ClinicalDocument>

0.082
testValidateOperativeNoteDocumentationOfServiceEventPrimaryPerformerTypeCode

Constraint

OCL

self.documentationOf->excluding(null).serviceEvent->excluding(null).performer->excluding(null)->select(typeCode = vocab::x_ServiceEventPerformer::PPRF)->select(typeCode = vocab::x_ServiceEventPerformer::PPRF)->reject(typeCode=vocab::x_ServiceEventPerformer::PPRF)

SuccessInvalid XML


Skip Fail Test

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">
<documentationOf>
<serviceEvent>
<performer typeCode="PPRF"/>
</serviceEvent>
</documentationOf>
</ClinicalDocument>

0.048
testValidateOperativeNoteDocumentationOfServiceEventPrimaryPerformerAssignedEntity

Constraint

Consol Operative Note SHALL contain at least one [1..*] documentationOf (CONF:8486) each SHALL contain exactly one [1..1] serviceEvent, where (CONF:8493) each SHALL contain exactly one [1..1] performer, where (CONF:8489) primaryPerformer SHALL contain exactly one [1..1] assignedEntity, where its type is Assigned Entity (CONF:14911)

OCL

self.documentationOf->excluding(null).serviceEvent->excluding(null).performer->excluding(null)->select(typeCode = vocab::x_ServiceEventPerformer::PPRF)->select(typeCode = vocab::x_ServiceEventPerformer::PPRF)->reject(assignedEntity->one(assignedEntity : cda::AssignedEntity | not assignedEntity.oclIsUndefined() and assignedEntity.oclIsKindOf(cda::AssignedEntity)))

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.7"/>
<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"/>
<documentationOf>
<serviceEvent>
<performer typeCode="PPRF"/>
</serviceEvent>
</documentationOf>
</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.7"/>
<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"/>
<documentationOf>
<serviceEvent>
<performer typeCode="PPRF">
<assignedEntity/>
</performer>
</serviceEvent>
</documentationOf>
</ClinicalDocument>

0.067
testValidateOperativeNoteDocumentationOfServiceEventProcedureCodes

Constraint

Consol Operative Note SHALL contain at least one [1..*] documentationOf (CONF:8486) each SHALL contain exactly one [1..1] serviceEvent, where (CONF:8493) serviceEvent i. The value of Clinical Document /documentationOf/serviceEvent/code SHALL be from ICD9 CM Procedures (CodeSystem 2.16.840.1.113883.6.104), CPT-4 (CodeSystem 2.16.840.1.113883.6.12), or values descending from 71388002 (Procedure) from the SNOMED CT (CodeSystem 2.16.840.1.113883.6.96) ValueSet Procedure 2.16.840.1.113883.3.88.12.80.28 DYNAMIC. (CONF:8487)

OCL

self.documentationOf->excluding(null).serviceEvent->excluding(null)->reject(code.codeSystem = '2.16.840.1.113883.6.104' or code.codeSystem = '2.16.840.1.113883.6.12' or code.codeSystem = '2.16.840.1.113883.6.96')

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.7"/>
<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"/>
<documentationOf>
<serviceEvent>
<code code="code" codeSystem="NOT2.16.840.1.113883.6.104"/>
</serviceEvent>
</documentationOf>
</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">
<documentationOf>
<serviceEvent>
<code code="code" codeSystem="2.16.840.1.113883.6.104"/>
</serviceEvent>
</documentationOf>
</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">
<documentationOf>
<serviceEvent>
<code code="code" codeSystem="2.16.840.1.113883.6.12"/>
</serviceEvent>
</documentationOf>
</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">
<documentationOf>
<serviceEvent>
<code code="code" codeSystem="2.16.840.1.113883.6.96"/>
</serviceEvent>
</documentationOf>
</ClinicalDocument>

0.066
testValidateOperativeNoteDocumentationOfServiceEventEffectiveTimeHasLow

Constraint

Consol Operative Note SHALL contain at least one [1..*] documentationOf (CONF:8486) each SHALL contain exactly one [1..1] serviceEvent, where (CONF:8493) serviceEvent The serviceEvent/effectiveTime SHALL be present with effectiveTime/low (CONF:8488)

OCL

self.documentationOf->excluding(null).serviceEvent->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.7"/>
<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"/>
<documentationOf>
<serviceEvent>
<effectiveTime/>
</serviceEvent>
</documentationOf>
</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.7"/>
<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"/>
<documentationOf>
<serviceEvent>
<effectiveTime>
<low value="12345"/>
</effectiveTime>
</serviceEvent>
</documentationOf>
</ClinicalDocument>

0.037
testValidateOperativeNoteDocumentationOfServiceEventEffectiveTimeHasHighWhenNoWidth

Constraint

Consol Operative Note SHALL contain at least one [1..*] documentationOf (CONF:8486) each SHALL contain exactly one [1..1] serviceEvent, where (CONF:8493) serviceEvent If a width is not present, the serviceEvent/effectiveTime SHALL include effectiveTime/high. (CONF:10058)

OCL

self.documentationOf->excluding(null).serviceEvent->excluding(null)->reject(not effectiveTime.width.oclIsUndefined() xor 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.7"/>
<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"/>
<documentationOf>
<serviceEvent>
<effectiveTime>
<high/>
<width/>
</effectiveTime>
</serviceEvent>
</documentationOf>
</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.7"/>
<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"/>
<documentationOf>
<serviceEvent>
<effectiveTime>
<high/>
</effectiveTime>
</serviceEvent>
</documentationOf>
</ClinicalDocument>

0.058
testValidateOperativeNoteDocumentationOfServiceEventEffectiveTimeNoHighIfWidth

Constraint

Consol Operative Note SHALL contain at least one [1..*] documentationOf (CONF:8486) each SHALL contain exactly one [1..1] serviceEvent, where (CONF:8493) serviceEvent When only the date and the length of the procedure are known a width element SHALL be present and the serviceEvent/effectiveTime/high SHALL not be present. (CONF:10060)

OCL

self.documentationOf->excluding(null).serviceEvent->excluding(null)->reject(not effectiveTime.width.oclIsUndefined() xor 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.7"/>
<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"/>
<documentationOf>
<serviceEvent>
<effectiveTime>
<high/>
<width/>
</effectiveTime>
</serviceEvent>
</documentationOf>
</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.7"/>
<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"/>
<documentationOf>
<serviceEvent>
<effectiveTime>
<width/>
</effectiveTime>
</serviceEvent>
</documentationOf>
</ClinicalDocument>

0.059
testValidateOperativeNoteDocumentationOfServiceEventCode

Constraint

Consol Operative Note SHALL contain at least one [1..*] documentationOf (CONF:8486) each SHALL contain exactly one [1..1] serviceEvent, where (CONF:8493) serviceEvent SHALL contain exactly one [1..1] code (i., CONF:8487)

OCL

self.documentationOf->excluding(null).serviceEvent->excluding(null)->reject((code.oclIsUndefined() or code.isNullFlavorUndefined()) implies (not code.oclIsUndefined()))

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.22.1.7"/>
<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"/>
<documentationOf>
<serviceEvent/>
</documentationOf>
</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.7"/>
<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"/>
<documentationOf>
<serviceEvent>
<code/>
</serviceEvent>
</documentationOf>
</ClinicalDocument>

0.060
testValidateOperativeNoteDocumentationOfServiceEventEffectiveTime

Constraint

Consol Operative Note SHALL contain at least one [1..*] documentationOf (CONF:8486) each SHALL contain exactly one [1..1] serviceEvent, where (CONF:8493) serviceEvent SHALL contain exactly one [1..1] effectiveTime (CONF:8494)

OCL

self.documentationOf->excluding(null).serviceEvent->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.7"/>
<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"/>
<documentationOf>
<serviceEvent/>
</documentationOf>
</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.7"/>
<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"/>
<documentationOf>
<serviceEvent>
<effectiveTime/>
</serviceEvent>
</documentationOf>
</ClinicalDocument>

0.065
testValidateOperativeNoteDocumentationOfServiceEventPrimaryPerformer

Constraint

Consol Operative Note SHALL contain at least one [1..*] documentationOf (CONF:8486) each SHALL contain exactly one [1..1] serviceEvent, where (CONF:8493) serviceEvent SHALL contain exactly one [1..1] performer, where its type is Primary Performer (CONF:8489)

OCL

self.documentationOf->excluding(null).serviceEvent->excluding(null)->reject(performer->select(performer : cda::Performer1 | not performer.oclIsUndefined() and performer.oclIsKindOf(cda::Performer1))->select(typeCode = vocab::x_ServiceEventPerformer::PPRF)->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.7"/>
<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"/>
<documentationOf>
<serviceEvent>
<performer/>
</serviceEvent>
</documentationOf>
</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.7"/>
<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"/>
<documentationOf>
<serviceEvent>
<performer typeCode="PPRF"/>
</serviceEvent>
</documentationOf>
</ClinicalDocument>

0.064
testValidateOperativeNoteDocumentationOfServiceEvent

Constraint

Consol Operative Note SHALL contain at least one [1..*] documentationOf (CONF:8486) documentationOf SHALL contain exactly one [1..1] serviceEvent, where its type is Service Event (CONF:14836)

OCL

self.documentationOf->excluding(null)->reject(serviceEvent->one(serviceEvent : cda::ServiceEvent | not serviceEvent.oclIsUndefined() and serviceEvent.oclIsKindOf(cda::ServiceEvent)))

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.7"/>
<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"/>
<documentationOf/>
</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.7"/>
<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"/>
<documentationOf>
<serviceEvent/>
</documentationOf>
</ClinicalDocument>

0.035
testGetAnesthesiaSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.036
testGetComplicationsSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.036
testGetPostoperativeDiagnosisSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.036
testGetPreoperativeDiagnosisSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.035
testGetProcedureEstimatedBloodLossSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.035
testGetProcedureFindingsSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.038
testGetProcedureSpecimensTakenSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.036
testGetProcedureDescriptionSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.036
testGetProcedureImplantsSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.036
testGetOperativeNoteFluidSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.036
testGetOperativeNoteSurgicalProcedureSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.036
testGetPlannedProcedureSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.036
testGetProcedureDispositionSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.036
testGetProcedureIndicationsSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.036
testGetSurgicalDrainsSection

Constraint

OCL

SuccessInvalid XML

Valid XML

0.036
Properties »