Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
UnstructuredDocumentTest150110.1512013-01-31T13:33:56JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateGeneralHeaderConstraintsTemplateId

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


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

0.005
testValidateUnstructuredDocumentPatientRoleHasId

Constraint

CDT Unstructured Document SHALL satisfy: A patientRole element contains an id element. (CONF-UD-17)

OCL

not recordTarget.patientRole.id->isEmpty()

FailureInvalid XML


<?xml version="1.0" encoding="UTF-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.19.1"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
</ClinicalDocument>

ERROR EXPECT PASS validateUnstructuredDocumentPatientRoleHasId: CDT Unstructured Document SHALL satisfy: A patientRole element contains an id element. (CONF-UD-17) CDT Unstructured Document SHALL satisfy: A patientRole element contains an id element. (CONF-UD-17)

junit.framework.AssertionFailedError: ERROR EXPECT PASS validateUnstructuredDocumentPatientRoleHasId: CDT Unstructured Document SHALL satisfy: A patientRole element contains an id element. (CONF-UD-17) CDT Unstructured Document SHALL satisfy: A patientRole element contains an id element. (CONF-UD-17)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectPass(CDAValidationTest.java:265)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:798)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.UnstructuredDocumentTest.testValidateUnstructuredDocumentPatientRoleHasId(UnstructuredDocumentTest.java:90)
0.005
testValidateUnstructuredDocumentAssignedAuthorHasAddr

Constraint

CDT Unstructured Document An assignedAuthor element contains an addr element. If addr is unknown it SHALL be represented using the appropriate flavor of null. (CONF-UD-25)

OCL

not author.assignedAuthor.addr->isEmpty()

FailureInvalid XML


<?xml version="1.0" encoding="UTF-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.19.1"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
</ClinicalDocument>

ERROR EXPECT PASS validateUnstructuredDocumentAssignedAuthorHasAddr: CDT Unstructured Document An assignedAuthor element contains an addr element. If addr is unknown it SHALL be represented using the appropriate flavor of null. (CONF-UD-25) CDT Unstructured Document An assignedAuthor element contains an addr element. If addr is unknown it SHALL be represented using the appropriate flavor of null. (CONF-UD-25)

junit.framework.AssertionFailedError: ERROR EXPECT PASS validateUnstructuredDocumentAssignedAuthorHasAddr: CDT Unstructured Document An assignedAuthor element contains an addr element. If addr is unknown it SHALL be represented using the appropriate flavor of null. (CONF-UD-25) CDT Unstructured Document An assignedAuthor element contains an addr element. If addr is unknown it SHALL be represented using the appropriate flavor of null. (CONF-UD-25)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectPass(CDAValidationTest.java:265)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:798)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.UnstructuredDocumentTest.testValidateUnstructuredDocumentAssignedAuthorHasAddr(UnstructuredDocumentTest.java:124)
0.006
testValidateUnstructuredDocumentAssignedAuthorHasTelecom

Constraint

CDT Unstructured Document An assignedAuthor element contains a telecom element. If telecom is unknown it SHALL be represented using the appropriate flavor of null. (CONF-UD-26)

OCL

not author.assignedAuthor.telecom->isEmpty()

FailureInvalid XML


<?xml version="1.0" encoding="UTF-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.19.1"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
</ClinicalDocument>

ERROR EXPECT PASS validateUnstructuredDocumentAssignedAuthorHasTelecom: CDT Unstructured Document An assignedAuthor element contains a telecom element. If telecom is unknown it SHALL be represented using the appropriate flavor of null. (CONF-UD-26) CDT Unstructured Document An assignedAuthor element contains a telecom element. If telecom is unknown it SHALL be represented using the appropriate flavor of null. (CONF-UD-26)

junit.framework.AssertionFailedError: ERROR EXPECT PASS validateUnstructuredDocumentAssignedAuthorHasTelecom: CDT Unstructured Document An assignedAuthor element contains a telecom element. If telecom is unknown it SHALL be represented using the appropriate flavor of null. (CONF-UD-26) CDT Unstructured Document An assignedAuthor element contains a telecom element. If telecom is unknown it SHALL be represented using the appropriate flavor of null. (CONF-UD-26)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectPass(CDAValidationTest.java:265)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:798)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.UnstructuredDocumentTest.testValidateUnstructuredDocumentAssignedAuthorHasTelecom(UnstructuredDocumentTest.java:158)
0.005
testValidateUnstructuredDocumentHasRepresentedCustodianOrganization

Constraint

CDT Unstructured Document The custodian element SHALL contain an assignedCustodian/representedCustodianOrganization element. (CONF-UD-28)

OCL

not custodian.assignedCustodian.representedCustodianOrganization.oclIsUndefined()

FailureInvalid XML


<?xml version="1.0" encoding="UTF-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.19.1"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
</ClinicalDocument>

ERROR EXPECT PASS validateUnstructuredDocumentHasRepresentedCustodianOrganization: CDT Unstructured Document The custodian element SHALL contain an assignedCustodian/representedCustodianOrganization element. (CONF-UD-28) CDT Unstructured Document The custodian element SHALL contain an assignedCustodian/representedCustodianOrganization element. (CONF-UD-28)

junit.framework.AssertionFailedError: ERROR EXPECT PASS validateUnstructuredDocumentHasRepresentedCustodianOrganization: CDT Unstructured Document The custodian element SHALL contain an assignedCustodian/representedCustodianOrganization element. (CONF-UD-28) CDT Unstructured Document The custodian element SHALL contain an assignedCustodian/representedCustodianOrganization element. (CONF-UD-28)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectPass(CDAValidationTest.java:265)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:798)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.UnstructuredDocumentTest.testValidateUnstructuredDocumentHasRepresentedCustodianOrganization(UnstructuredDocumentTest.java:192)
0.005
testValidateUnstructuredDocumentHasRepresentedCustodianOrganizationId

Constraint

CDT Unstructured Document A representedCustodianOrganization element SHALL contain an id element. (CONF-UD-29)

OCL

not custodian.assignedCustodian.representedCustodianOrganization.id->isEmpty()

FailureInvalid XML


<?xml version="1.0" encoding="UTF-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.19.1"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
</ClinicalDocument>

ERROR EXPECT PASS validateUnstructuredDocumentHasRepresentedCustodianOrganizationId: CDT Unstructured Document A representedCustodianOrganization element SHALL contain an id element. (CONF-UD-29) CDT Unstructured Document A representedCustodianOrganization element SHALL contain an id element. (CONF-UD-29)

junit.framework.AssertionFailedError: ERROR EXPECT PASS validateUnstructuredDocumentHasRepresentedCustodianOrganizationId: CDT Unstructured Document A representedCustodianOrganization element SHALL contain an id element. (CONF-UD-29) CDT Unstructured Document A representedCustodianOrganization element SHALL contain an id element. (CONF-UD-29)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectPass(CDAValidationTest.java:265)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:798)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.UnstructuredDocumentTest.testValidateUnstructuredDocumentHasRepresentedCustodianOrganizationId(UnstructuredDocumentTest.java:226)
0.005
testValidateUnstructuredDocumentHasRepresentedCustodianOrganizationName

Constraint

CDT Unstructured Document A representedCustodianOrganization element SHALL contain a name element. (CONF-UD-30)

OCL

not custodian.assignedCustodian.representedCustodianOrganization.name.oclIsUndefined()

FailureInvalid XML


<?xml version="1.0" encoding="UTF-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.19.1"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
</ClinicalDocument>

ERROR EXPECT PASS validateUnstructuredDocumentHasRepresentedCustodianOrganizationName: CDT Unstructured Document A representedCustodianOrganization element SHALL contain a name element. (CONF-UD-30) CDT Unstructured Document A representedCustodianOrganization element SHALL contain a name element. (CONF-UD-30)

junit.framework.AssertionFailedError: ERROR EXPECT PASS validateUnstructuredDocumentHasRepresentedCustodianOrganizationName: CDT Unstructured Document A representedCustodianOrganization element SHALL contain a name element. (CONF-UD-30) CDT Unstructured Document A representedCustodianOrganization element SHALL contain a name element. (CONF-UD-30)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectPass(CDAValidationTest.java:265)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:798)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.UnstructuredDocumentTest.testValidateUnstructuredDocumentHasRepresentedCustodianOrganizationName(UnstructuredDocumentTest.java:260)
0.005
testValidateUnstructuredDocumentHasRepresentedCustodianOrganizationTelecom

Constraint

CDT Unstructured Document A representedCustodianOrganization element SHALL contain a telecom element. (CONF-UD-31)

OCL

not custodian.assignedCustodian.representedCustodianOrganization.telecom.oclIsUndefined()

FailureInvalid XML


<?xml version="1.0" encoding="UTF-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.19.1"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
</ClinicalDocument>

ERROR EXPECT PASS validateUnstructuredDocumentHasRepresentedCustodianOrganizationTelecom: CDT Unstructured Document A representedCustodianOrganization element SHALL contain a telecom element. (CONF-UD-31) CDT Unstructured Document A representedCustodianOrganization element SHALL contain a telecom element. (CONF-UD-31)

junit.framework.AssertionFailedError: ERROR EXPECT PASS validateUnstructuredDocumentHasRepresentedCustodianOrganizationTelecom: CDT Unstructured Document A representedCustodianOrganization element SHALL contain a telecom element. (CONF-UD-31) CDT Unstructured Document A representedCustodianOrganization element SHALL contain a telecom element. (CONF-UD-31)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectPass(CDAValidationTest.java:265)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:798)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.UnstructuredDocumentTest.testValidateUnstructuredDocumentHasRepresentedCustodianOrganizationTelecom(UnstructuredDocumentTest.java:294)
0.005
testValidateUnstructuredDocumentHasRepresentedCustodianOrganizationAddr

Constraint

CDT Unstructured Document A representedCustodianOrganization element SHALL contain an addr element. (CONF-UD-32)

OCL

not custodian.assignedCustodian.representedCustodianOrganization.addr.oclIsUndefined()

FailureInvalid XML


<?xml version="1.0" encoding="UTF-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.19.1"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
</ClinicalDocument>

ERROR EXPECT PASS validateUnstructuredDocumentHasRepresentedCustodianOrganizationAddr: CDT Unstructured Document A representedCustodianOrganization element SHALL contain an addr element. (CONF-UD-32) CDT Unstructured Document A representedCustodianOrganization element SHALL contain an addr element. (CONF-UD-32)

junit.framework.AssertionFailedError: ERROR EXPECT PASS validateUnstructuredDocumentHasRepresentedCustodianOrganizationAddr: CDT Unstructured Document A representedCustodianOrganization element SHALL contain an addr element. (CONF-UD-32) CDT Unstructured Document A representedCustodianOrganization element SHALL contain an addr element. (CONF-UD-32)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectPass(CDAValidationTest.java:265)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:798)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.UnstructuredDocumentTest.testValidateUnstructuredDocumentHasRepresentedCustodianOrganizationAddr(UnstructuredDocumentTest.java:328)
0.005
testValidateUnstructuredDocumentHasNonXMLBodyText

Constraint

CDT Unstructured Document SHALL satisfy: Contains component/nonXMLBody/text element. (CONF-UD-34)

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"/>

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.19.1"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<component>
<nonXMLBody>
<text/>
</nonXMLBody>
</component>
</ClinicalDocument>

0.060
testValidateUnstructuredDocumentHasTextReferenceOrRepresentation

Constraint

CDT Unstructured Document The text element SHALL either contain a reference element with a value attribute, or have a representation attribute with the value of B64, a mediaType attribute, and contain the media content (CONF-UD-35)

OCL

(not self.component.nonXMLBody.text.reference.oclIsUndefined() and self.component.nonXMLBody.text.reference.isDefined('value')) or (self.component.nonXMLBody.text.representation = datatypes::BinaryDataEncoding::B64 and self.component.nonXMLBody.text.isDefined('mediaType') and self.component.nonXMLBody.text.getText().size() > 0)

FailureInvalid XML


<?xml version="1.0" encoding="UTF-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.19.1"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
</ClinicalDocument>

ERROR EXPECT PASS validateUnstructuredDocumentHasTextReferenceOrRepresentation: CDT Unstructured Document The text element SHALL either contain a reference element with a value attribute, or have a representation attribute with the value of B64, a mediaType attribute, and contain the media content (CONF-UD-35) CDT Unstructured Document The text element SHALL either contain a reference element with a value attribute, or have a representation attribute with the value of B64, a mediaType attribute, and contain the media content (CONF-UD-35)

junit.framework.AssertionFailedError: ERROR EXPECT PASS validateUnstructuredDocumentHasTextReferenceOrRepresentation: CDT Unstructured Document The text element SHALL either contain a reference element with a value attribute, or have a representation attribute with the value of B64, a mediaType attribute, and contain the media content (CONF-UD-35) CDT Unstructured Document The text element SHALL either contain a reference element with a value attribute, or have a representation attribute with the value of B64, a mediaType attribute, and contain the media content (CONF-UD-35)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectPass(CDAValidationTest.java:265)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:798)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.UnstructuredDocumentTest.testValidateUnstructuredDocumentHasTextReferenceOrRepresentation(UnstructuredDocumentTest.java:404)
0.011
testValidateUnstructuredDocumentHasTextMediaTypeValueSet

Constraint

CDT Unstructured Document The value of @mediaType SHALL be drawn from the value set 2.16.840.1.113883.11.20.7.1 SupportedFileFormats STATIC 20100512 (CONF-UD-36)

OCL

self.component.nonXMLBody.text.isDefined('mediaType') implies (self.component.nonXMLBody.text.mediaType = 'application/msword' or self.component.nonXMLBody.text.mediaType = 'application/pdf' or self.component.nonXMLBody.text.mediaType = 'text/plain' or self.component.nonXMLBody.text.mediaType = 'text/rtf' or self.component.nonXMLBody.text.mediaType = 'text/html' or self.component.nonXMLBody.text.mediaType = 'image/gif' or self.component.nonXMLBody.text.mediaType = 'image/tiff' or self.component.nonXMLBody.text.mediaType = 'image/jpeg' or self.component.nonXMLBody.text.mediaType = 'image/png')

FailureInvalid XML


<?xml version="1.0" encoding="UTF-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.19.1"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
</ClinicalDocument>

ERROR EXPECT PASS validateUnstructuredDocumentHasTextMediaTypeValueSet: CDT Unstructured Document The value of @mediaType SHALL be drawn from the value set 2.16.840.1.113883.11.20.7.1 SupportedFileFormats STATIC 20100512 (CONF-UD-36) CDT Unstructured Document The value of @mediaType SHALL be drawn from the value set 2.16.840.1.113883.11.20.7.1 SupportedFileFormats STATIC 20100512 (CONF-UD-36)

junit.framework.AssertionFailedError: ERROR EXPECT PASS validateUnstructuredDocumentHasTextMediaTypeValueSet: CDT Unstructured Document The value of @mediaType SHALL be drawn from the value set 2.16.840.1.113883.11.20.7.1 SupportedFileFormats STATIC 20100512 (CONF-UD-36) CDT Unstructured Document The value of @mediaType SHALL be drawn from the value set 2.16.840.1.113883.11.20.7.1 SupportedFileFormats STATIC 20100512 (CONF-UD-36)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectPass(CDAValidationTest.java:265)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:798)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.UnstructuredDocumentTest.testValidateUnstructuredDocumentHasTextMediaTypeValueSet(UnstructuredDocumentTest.java:438)
0.019
testValidateUnstructuredDocumentEffectiveTime

Constraint

CDT Unstructured Document SHALL contain exactly one [1..1] effectiveTime (CONF-UD-11)

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">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.10.20.19.1"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<effectiveTime xsi:type="IVL_TS"/>
</ClinicalDocument>

0.005
testValidateUnstructuredDocumentCustodian

Constraint

Consol Unstructured Document SHALL contain exactly one [1..1] custodian (CONF:7645)

OCL

self.custodian->one(custodian : cda::Custodian | not custodian.oclIsUndefined() and custodian.oclIsKindOf(cda::Custodian))

FailureInvalid XML


<?xml version="1.0" encoding="UTF-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.21.1.10"/>
<templateId root="2.16.840.1.113883.10.20.22.1.1"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" codeSystemName="ConfidentialityCode"/>
<custodian/>
</ClinicalDocument>

ERROR EXPECT PASS validateUnstructuredDocumentCustodian: CDT Unstructured Document SHALL contain exactly one [1..1] custodian (CONF-UD-27) Contains exactly one [1..1] CDA Custodian CDT Unstructured Document SHALL contain exactly one [1..1] custodian (CONF-UD-27) Contains exactly one [1..1] CDA Custodian

junit.framework.AssertionFailedError: ERROR EXPECT PASS validateUnstructuredDocumentCustodian: CDT Unstructured Document SHALL contain exactly one [1..1] custodian (CONF-UD-27) Contains exactly one [1..1] CDA Custodian CDT Unstructured Document SHALL contain exactly one [1..1] custodian (CONF-UD-27) Contains exactly one [1..1] CDA Custodian
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectPass(CDAValidationTest.java:265)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:798)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.UnstructuredDocumentTest.testValidateUnstructuredDocumentCustodian(UnstructuredDocumentTest.java:509)
0.005
Properties »