Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.ihe.tests.ScannedDocumentTest

NameTestsErrorsFailuresTime(s)Time StampHost
ScannedDocumentTest32000.4402013-01-31T13:34:28JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testValidateScannedDocumentTypeIdFixed

Constraint

IHE Scanned Document SHALL satisfy: The typeId root is 2.16.840.1.113883.1.3 and extension is POCD_HD000040.

OCL

self.typeId.root = '2.16.840.1.113883.1.3' and self.typeId.extension = 'POCD_HD000040'

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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
</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">
<typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040"/>
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
</ClinicalDocument>

0.012
testValidateScannedDocumentHasOneRecordTarget

Constraint

IHE Scanned Document SHALL satisfy: Contains exactly one recordTarget.

OCL

self.recordTarget->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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
</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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<recordTarget/>
</ClinicalDocument>

0.008
testValidateScannedDocumentHasAssignedAuthor

Constraint

IHE Scanned Document SHALL satisfy: Contains one or more author / assignedAuthor / assignedPerson and/or author / assignedAuthor / representedOrganization

OCL

self.author->exists(author : cda::Author | not author.assignedAuthor.assignedPerson.oclIsUndefined() or not author.assignedAuthor.representedOrganization.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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
</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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<author>
<assignedAuthor>
<assignedPerson/>
</assignedAuthor>
</author>
</ClinicalDocument>

0.015
testValidateScannedDocumentPatientRoleId

Constraint

IHE Scanned Document SHALL satisfy: recordTarget/patientRole/id element includes both the root and the extension attributes.

OCL

self.recordTarget->forAll(target : cda::RecordTarget | not target.patientRole.oclIsUndefined() and target.patientRole.id->forAll(roleId : datatypes::II | not roleId.root.oclIsUndefined() and not roleId.extension.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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<recordTarget/>
</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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<recordTarget>
<patientRole/>
</recordTarget>
</ClinicalDocument>

0.021
testValidateScannedDocumentHasPatientRoleAddress

Constraint

IHE Scanned Document SHALL satisfy: At least one recordTarget/patientRole/addr element includes at least the country subelement.

OCL

self.recordTarget->exists(target : cda::RecordTarget | not target.patientRole.oclIsUndefined() and target.patientRole.addr->exists(address : datatypes::AD | address.country->exists(c : datatypes::ADXP | not c.oclIsUndefined() and c.getText().size() > 0)))

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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<recordTarget>
<patientRole/>
</recordTarget>
</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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<recordTarget>
<patientRole>
<addr><country>country</country></addr>
</patientRole>
</recordTarget>
</ClinicalDocument>

0.025
testValidateScannedDocumentHasPatientName

Constraint

IHE Scanned Document SHALL satisfy: At least one recordTarget/patientRole/patient/name element has at least one given subelement and one family subelement.

OCL

self.recordTarget->exists(target : cda::RecordTarget | not target.patientRole.patient.oclIsUndefined() and target.patientRole.patient.name->exists(name: datatypes::PN | not name.given->isEmpty() and not name.family->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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<recordTarget>
<patientRole>
<patient/>
</patientRole>
</recordTarget>
</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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<recordTarget>
<patientRole>
<patient>
<name><family>family</family><given>given</given></name>
</patient>
</patientRole>
</recordTarget>
</ClinicalDocument>

0.026
testValidateScannedDocumentHasPatientGenderCode

Constraint

IHE Scanned Document SHALL satisfy: The recordTarget/patientRole/patient/ administrativeGenderCode element is present.

OCL

self.recordTarget->one(target : cda::RecordTarget | not target.patientRole.patient.administrativeGenderCode.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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<recordTarget>
<patientRole>
<patient/>
</patientRole>
</recordTarget>
</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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<recordTarget>
<patientRole>
<patient>
<administrativeGenderCode/>
</patient>
</patientRole>
</recordTarget>
</ClinicalDocument>

0.009
testValidateScannedDocumentHasPatientBirthYear

Constraint

IHE Scanned Document SHALL satisfy: The recordTarget/patientRole/patient/ birthTime element is present with precision to the year.

OCL

self.recordTarget->one(target : cda::RecordTarget | not target.patientRole.patient.birthTime.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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<recordTarget>
<patientRole>
<patient/>
</patientRole>
</recordTarget>
</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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<recordTarget>
<patientRole>
<patient>
<birthTime value="birth"/>
</patient>
</patientRole>
</recordTarget>
</ClinicalDocument>

0.009
testValidateScannedDocumentHasOriginalAuthor

Constraint

IHE Scanned Document SHOULD satisfy: Contains author of type ScanOriginalAuthor to represent original author of this scanned document.

OCL

self.author->exists(author : cda::Author | not author.oclIsUndefined() and author.oclIsKindOf(ihe::ScanOriginalAuthor))

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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
</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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<author>
<templateId root="1.3.6.1.4.1.19376.1.2.20.1"/>
</author>
</ClinicalDocument>

0.011
testValidateScannedDocumentHasScanningDevice

Constraint

IHE Scanned Document SHALL satisfy: Contains author element of type ScanningDevice to represent the scanning device and software used to produce the scanned content.

OCL

self.author->exists(author : cda::Author | not author.oclIsUndefined() and author.oclIsKindOf(ihe::ScanningDevice))

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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
</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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<author>
<templateId root="1.3.6.1.4.1.19376.1.2.20.2"/>
</author>
</ClinicalDocument>

0.011
testValidateScannedDocumentHasScanDataEnterer

Constraint

IHE Scanned Document SHALL satisfy: Contains ScanDataEnterer element to represent the scanner operator who produced the scanned content.

OCL

not self.dataEnterer.oclIsUndefined() and self.dataEnterer.oclIsKindOf(ihe::ScanDataEnterer)

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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
</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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<dataEnterer>
<templateId root="1.3.6.1.4.1.19376.1.2.20.3"/>
</dataEnterer>
</ClinicalDocument>

0.011
testValidateScannedDocumentHasRepresentedCustodianOrganizationName

Constraint

IHE Scanned Document SHALL satisfy: custodian/assignedCustodian/representedCustodianOrganization/name is present.

OCL

not self.custodian.assignedCustodian.representedCustodianOrganization.name.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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<custodian>
<assignedCustodian>
<representedCustodianOrganization/>
</assignedCustodian>
</custodian>
</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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<custodian>
<assignedCustodian>
<representedCustodianOrganization>
<name/>
</representedCustodianOrganization>
</assignedCustodian>
</custodian>
</ClinicalDocument>

0.025
testValidateScannedDocumentHasRepresentedCustodianOrganizationAddr

Constraint

IHE Scanned Document SHALL satisfy: custodian/assignedCustodian/representedCustodianOrganization/addr is present and includes at least the country sub element.

OCL

not self.custodian.assignedCustodian.representedCustodianOrganization.addr.oclIsUndefined() and self.custodian.assignedCustodian.representedCustodianOrganization.addr.country->exists(c : datatypes::ADXP | not c.oclIsUndefined() and c.getText().size() > 0)

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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<custodian>
<assignedCustodian>
<representedCustodianOrganization/>
</assignedCustodian>
</custodian>
</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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<custodian>
<assignedCustodian>
<representedCustodianOrganization>
<addr><country>country</country></addr>
</representedCustodianOrganization>
</assignedCustodian>
</custodian>
</ClinicalDocument>

0.027
testValidateScannedDocumentLegalAuthenticatorAssignedEntityId

Constraint

IHE Scanned Document SHALL satisfy: The legalAuthenticator/assignedEntity/id element if known shall include both the root and the extension attributes.

OCL

self.legalAuthenticator.assignedEntity.id->size() > 0 implies ( self.legalAuthenticator.assignedEntity.id->forAll(ident : datatypes::II | not ident.root.oclIsUndefined() and not ident.extension.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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<legalAuthenticator>
<assignedEntity>
<id/>
</assignedEntity>
</legalAuthenticator>
</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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<legalAuthenticator>
<assignedEntity>
<id root="root" extension="extension"/>
</assignedEntity>
</legalAuthenticator>
</ClinicalDocument>

0.026
testValidateScannedDocumentHasNonXMLBody

Constraint

IHE Scanned Document SHALL satisfy: The component/nonXMLBody is present.

OCL

not self.component.nonXMLBody.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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<component>
<nonXMLBody/>
</component>
</ClinicalDocument>

0.007
testValidateScannedDocumentHasNonXMLBodyBinaryText

Constraint

IHE Scanned Document SHALL satisfy: The component/nonXMLBody/text element is present and encoded using xs:base64Binary encoding. Its #CDATA will contain the scanned content.

OCL

not self.component.nonXMLBody.text.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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<component>
<nonXMLBody/>
</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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<component>
<nonXMLBody>
<text>text</text>
</nonXMLBody>
</component>
</ClinicalDocument>

0.008
testValidateScannedDocumentHasNonXMLBodyTextMediaType

Constraint

IHE Scanned Document SHALL satisfy: The component/nonXMLBody/text@mediaType is 'application/pdf' for PDF, or 'text/plain' for plaintext.

OCL

self.component.nonXMLBody.text.mediaType = 'application/pdf' or self.component.nonXMLBody.text.mediaType = 'text/plain'

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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<component>
<nonXMLBody>
<text mediaType="text/html">text</text>
</nonXMLBody>
</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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<component>
<nonXMLBody>
<text mediaType="application/pdf">text</text>
</nonXMLBody>
</component>
</ClinicalDocument>

0.014
testValidateScannedDocumentHasNonXMLBodyTextRepresentation

Constraint

IHE Scanned Document SHALL satisfy: The component/nonXMLBody/text@representation is B64.

OCL

self.component.nonXMLBody.text.representation = datatypes::BinaryDataEncoding::B64

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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<component>
<nonXMLBody>
<text representation="TXT">text</text>
</nonXMLBody>
</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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<component>
<nonXMLBody>
<text representation="B64">text</text>
</nonXMLBody>
</component>
</ClinicalDocument>

0.006
testValidateScannedDocumentTemplateId

Constraint

The 'ScannedDocumentTemplateId' invariant is violated on 'org.openhealthtools.mdht.uml.cda.hitsp.impl.UnstructuredDocumentImpl@18a7c039{#//}'

OCL

self.templateId->exists(id : datatypes::II | id.root = '2.16.840.1.113883.3.88.11.62.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.3.88.11.62.1"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.1"/>
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
</ClinicalDocument>

0.005
testValidateScannedDocumentCode

Constraint

IHE Scanned Document SHALL contain exactly one [1..1] code

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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
</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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<code/>
</ClinicalDocument>

0.015
testValidateScannedDocumentConfidentialityCode

Constraint

IHE Scanned Document SHALL contain exactly one [1..1] confidentialityCode

OCL

(self.confidentialityCode.oclIsUndefined() or self.confidentialityCode.isNullFlavorUndefined()) implies (not self.confidentialityCode.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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
</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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<confidentialityCode/>
</ClinicalDocument>

0.015
testValidateScannedDocumentEffectiveTime

Constraint

IHE Scanned Document SHALL contain exactly one [1..1] effectiveTime

OCL

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

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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<effectiveTime xsi:type="IVL_TS"/>
</ClinicalDocument>

0.015
testValidateScannedDocumentId

Constraint

IHE Scanned Document SHALL contain exactly one [1..1] id

OCL

(self.id.oclIsUndefined() or self.id.isNullFlavorUndefined()) implies (not self.id.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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
</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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<id/>
</ClinicalDocument>

0.013
testValidateScannedDocumentLanguageCode

Constraint

IHE Scanned Document SHALL contain exactly one [1..1] languageCode

OCL

(self.languageCode.oclIsUndefined() or self.languageCode.isNullFlavorUndefined()) implies (not self.languageCode.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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
</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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<languageCode/>
</ClinicalDocument>

0.016
testValidateScannedDocumentTitle

Constraint

IHE Scanned Document SHOULD contain exactly one [1..1] title

OCL

(self.title.oclIsUndefined() or self.title.isNullFlavorUndefined()) implies (not self.title.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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
</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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<title/>
</ClinicalDocument>

0.016
testValidateScannedDocumentTypeId

Constraint

IHE Scanned Document SHALL contain exactly one [1..1] typeId

OCL

(self.typeId.oclIsUndefined() or self.typeId.isNullFlavorUndefined()) implies (not self.typeId.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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
</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">
<typeId root="2.16.840.1.113883.1.3"/>
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
</ClinicalDocument>

0.015
testValidateScannedDocumentScanOriginalAuthor

Constraint

IHE Scanned Document SHOULD contain at least one [1..*] author Contains exactly one [1..1] Scan Original Author (templateId: 1.3.6.1.4.1.19376.1.2.20.1)

OCL

self.author->exists(author : cda::Author | not author.oclIsUndefined() and author.oclIsKindOf(ihe::ScanOriginalAuthor))

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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
</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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<author>
<templateId root="1.3.6.1.4.1.19376.1.2.20.1"/>
</author>
</ClinicalDocument>

0.011
testValidateScannedDocumentScanningDevice

Constraint

IHE Scanned Document SHALL contain at least one [1..*] author Contains exactly one [1..1] Scanning Device (templateId: 1.3.6.1.4.1.19376.1.2.20.2)

OCL

self.author->exists(author : cda::Author | not author.oclIsUndefined() and author.oclIsKindOf(ihe::ScanningDevice))

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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
</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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<author>
<templateId root="1.3.6.1.4.1.19376.1.2.20.2"/>
</author>
</ClinicalDocument>

0.010
testValidateScannedDocumentScanDataEnterer

Constraint

IHE Scanned Document SHALL contain exactly one [1..1] dataEnterer Contains exactly one [1..1] Scan Data Enterer (templateId: 1.3.6.1.4.1.19376.1.2.20.3)

OCL

self.dataEnterer->one(dataEnterer : cda::DataEnterer | not dataEnterer.oclIsUndefined() and dataEnterer.oclIsKindOf(ihe::ScanDataEnterer))

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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
</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">
<templateId root="1.3.6.1.4.1.19376.1.2.20"/>
<dataEnterer>
<templateId root="1.3.6.1.4.1.19376.1.2.20.3"/>
</dataEnterer>
</ClinicalDocument>

0.011
testValidateScannedDocumentLegalAuthenticator

Constraint

IHE Scanned Document MAY contain zero or one [0..1] legalAuthenticator Contains exactly one [1..1] CDA Legal Authenticator

OCL

self.legalAuthenticator->one(legalAuthenticator : cda::LegalAuthenticator | not legalAuthenticator.oclIsUndefined() and legalAuthenticator.oclIsKindOf(rim::Participation))

SuccessInvalid XML


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

0.011
testValidateScannedDocumentDocumentationOf

Constraint

IHE Scanned Document MAY contain zero or one [0..1] documentationOf Contains exactly one [1..1] CDA Documentation Of

OCL

self.documentationOf->one(documentationOf : cda::DocumentationOf | not documentationOf.oclIsUndefined() and documentationOf.oclIsKindOf(rim::ActRelationship))

SuccessInvalid XML


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

0.010
Properties »