Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
GeneralHeaderConstraintsTest400269.5062013-01-31T13:33:46JKMSoftware-desktop

Failures

NameStatusResultTime(s)
testValidateGeneralHeaderConstraintsRolesShouldHaveAddrAndTelecom

Constraint

OCL

-- implemented in Java using XPath selector

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

ERROR EXPECT FAIL validateGeneralHeaderConstraintsRolesShouldHaveAddrAndTelecom" passed when it was expected to fail.<?xml version="1.0" encoding="UTF-8"?> <ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

junit.framework.AssertionFailedError: ERROR EXPECT FAIL validateGeneralHeaderConstraintsRolesShouldHaveAddrAndTelecom" passed when it was expected to fail.

at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectFail(CDAValidationTest.java:286)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:751)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsRolesShouldHaveAddrAndTelecom(GeneralHeaderConstraintsTest.java:204)
0.005
testValidateGeneralHeaderConstraintsOrganizationsHaveContactInfo

Constraint

OCL

-- implemented in Java using XPath selector

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

ERROR EXPECT FAIL validateGeneralHeaderConstraintsOrganizationsHaveContactInfo" passed when it was expected to fail.<?xml version="1.0" encoding="UTF-8"?> <ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

junit.framework.AssertionFailedError: ERROR EXPECT FAIL validateGeneralHeaderConstraintsOrganizationsHaveContactInfo" passed when it was expected to fail.

at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectFail(CDAValidationTest.java:286)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:751)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsOrganizationsHaveContactInfo(GeneralHeaderConstraintsTest.java:238)
0.006
testValidateGeneralHeaderConstraintsTimePreciseToDay

Constraint

OCL

-- implemented in Java using XPath selector

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

ERROR EXPECT FAIL validateGeneralHeaderConstraintsTimePreciseToDay" passed when it was expected to fail.<?xml version="1.0" encoding="UTF-8"?> <ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

junit.framework.AssertionFailedError: ERROR EXPECT FAIL validateGeneralHeaderConstraintsTimePreciseToDay" passed when it was expected to fail.

at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectFail(CDAValidationTest.java:286)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:751)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsTimePreciseToDay(GeneralHeaderConstraintsTest.java:272)
0.005
testValidateGeneralHeaderConstraintsTimePreciseToYear

Constraint

OCL

cda::OrganizationPartOf.allInstances()->select( effectiveTime.oclIsUndefined()).oclAsType( ecore::EObject)-> union( cda::MaintainedEntity.allInstances()->select( effectiveTime.oclIsUndefined()).oclAsType( ecore::EObject) )->union( cda::RelatedEntity.allInstances()->select( effectiveTime.oclIsUndefined()).oclAsType( ecore::EObject) )->union(cda::RelatedEntity.allInstances()->select( effectiveTime.oclIsUndefined()).oclAsType( ecore::EObject) )->union(cda::RelatedEntity.allInstances()->select( effectiveTime.oclIsUndefined()).oclAsType( ecore::EObject) )->union(cda::ServiceEvent.allInstances()->select( effectiveTime.oclIsUndefined()).oclAsType( ecore::EObject) )->union(cda::EncounterParticipant.allInstances()->select( time.oclIsUndefined()).oclAsType( ecore::EObject))->union(self.participant->select( time.oclIsUndefined()).oclAsType( ecore::EObject))->union(cda::OrganizationPartOf.allInstances().effectiveTime->union(cda::MaintainedEntity.allInstances().effectiveTime)->union( cda::RelatedEntity.allInstances().effectiveTime)->union(cda::RelatedEntity.allInstances().effectiveTime)->union(cda::RelatedEntity.allInstances().effectiveTime)->union(cda::ServiceEvent.allInstances().effectiveTime)->union(cda::EncounterParticipant.allInstances().time)->union(self.participant.time)->select(current : datatypes::IVL_TS | ((not current.low.oclIsUndefined()) and (current.low.value.oclIsUndefined() or current.low.value.size() < 4)) or ((not current.center.oclIsUndefined()) and (current.center.value.oclIsUndefined() or current.center.value.size() < 4)) or ((not current.high.oclIsUndefined()) and (current.high.value.oclIsUndefined() or current.high.value.size() < 4)) or (current.low.oclIsUndefined() and current.center.oclIsUndefined() and current.high.oclIsUndefined()) ).oclAsType( ecore::EObject))

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="1.3.6.1.4.1.19376.1.5.3.1.1.1"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
</ClinicalDocument>

ERROR EXPECT PASS validateGeneralHeaderConstraintsTimePreciseToYear:

junit.framework.AssertionFailedError: ERROR EXPECT PASS validateGeneralHeaderConstraintsTimePreciseToYear:
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.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsTimePreciseToYear(GeneralHeaderConstraintsTest.java:306)
0.108
testValidateGeneralHeaderConstraintsTelephoneMatchesRegex

Constraint

OCL

-- implemented in Java using XPath selector

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

ERROR EXPECT FAIL validateGeneralHeaderConstraintsTelephoneMatchesRegex" passed when it was expected to fail.<?xml version="1.0" encoding="UTF-8"?> <ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

junit.framework.AssertionFailedError: ERROR EXPECT FAIL validateGeneralHeaderConstraintsTelephoneMatchesRegex" passed when it was expected to fail.

at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectFail(CDAValidationTest.java:286)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:751)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsTelephoneMatchesRegex(GeneralHeaderConstraintsTest.java:340)
0.779
testValidateGeneralHeaderConstraintsHasTelephoneDialingDigits

Constraint

OCL

-- implemented in Java using XPath selector

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

ERROR EXPECT FAIL validateGeneralHeaderConstraintsHasTelephoneDialingDigits" passed when it was expected to fail.<?xml version="1.0" encoding="UTF-8"?> <ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

junit.framework.AssertionFailedError: ERROR EXPECT FAIL validateGeneralHeaderConstraintsHasTelephoneDialingDigits" passed when it was expected to fail.

at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectFail(CDAValidationTest.java:286)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:751)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsHasTelephoneDialingDigits(GeneralHeaderConstraintsTest.java:374)
0.159
testValidateGeneralHeaderConstraintsUnknownTelephoneUsesNullFlavor

Constraint

OCL

-- implemented in Java using XPath selector

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

ERROR EXPECT FAIL validateGeneralHeaderConstraintsUnknownTelephoneUsesNullFlavor" passed when it was expected to fail.<?xml version="1.0" encoding="UTF-8"?> <ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

junit.framework.AssertionFailedError: ERROR EXPECT FAIL validateGeneralHeaderConstraintsUnknownTelephoneUsesNullFlavor" passed when it was expected to fail.

at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectFail(CDAValidationTest.java:286)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:751)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsUnknownTelephoneUsesNullFlavor(GeneralHeaderConstraintsTest.java:408)
0.004
testValidateGeneralHeaderConstraintsIdRootFormat

Constraint

CDT General Header Constraints SHALL satisfy: The id/@root attribute is a syntactically correct UUID or OID. (CONF-HP-17)

OCL

self.id.matches('root','([0-2])(.([1-9][0-9]*|0))+') or self.id.matches('root','([A-Fa-f0-9]{8})(-[A-Fa-f0-9]{4}){3}(-[A-Fa-f0-9]{12})')

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="1.3.6.1.4.1.19376.1.5.3.1.1.1"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
</ClinicalDocument>

ERROR EXPECT PASS validateGeneralHeaderConstraintsIdRootFormat: CDT General Header Constraints SHALL satisfy: The id/@root attribute is a syntactically correct UUID or OID. (CONF-HP-17) CDT General Header Constraints SHALL satisfy: The id/@root attribute is a syntactically correct UUID or OID. (CONF-HP-17)

junit.framework.AssertionFailedError: ERROR EXPECT PASS validateGeneralHeaderConstraintsIdRootFormat: CDT General Header Constraints SHALL satisfy: The id/@root attribute is a syntactically correct UUID or OID. (CONF-HP-17) CDT General Header Constraints SHALL satisfy: The id/@root attribute is a syntactically correct UUID or OID. (CONF-HP-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.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsIdRootFormat(GeneralHeaderConstraintsTest.java:478)
0.433
testValidateGeneralHeaderConstraintsOidLength

Constraint

OCL

self.id->select((not id.root.oclIsUndefined()) and id.root.size() > 64 )

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="1.3.6.1.4.1.19376.1.5.3.1.1.1"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
</ClinicalDocument>

ERROR EXPECT PASS validateGeneralHeaderConstraintsOidLength:

junit.framework.AssertionFailedError: ERROR EXPECT PASS validateGeneralHeaderConstraintsOidLength:
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.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsOidLength(GeneralHeaderConstraintsTest.java:512)
0.008
testValidateGeneralHeaderConstraintsSetIdAndVersionNumber

Constraint

OCL

(self.setId.oclIsUndefined() and self.versionNumber.oclIsUndefined()) xor (not self.setId.oclIsUndefined() and not self.versionNumber.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

ERROR EXPECT FAIL validateGeneralHeaderConstraintsSetIdAndVersionNumber" passed when it was expected to fail.<?xml version="1.0" encoding="UTF-8"?> <ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

junit.framework.AssertionFailedError: ERROR EXPECT FAIL validateGeneralHeaderConstraintsSetIdAndVersionNumber" passed when it was expected to fail.

at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectFail(CDAValidationTest.java:286)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:751)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsSetIdAndVersionNumber(GeneralHeaderConstraintsTest.java:669)
0.006
testValidateGeneralHeaderConstraintsSetIdAndIdAreUnique

Constraint

OCL

(not self.setId.oclIsUndefined() and not self.id.oclIsUndefined()) implies (self.setId.root <> self.id.root or self.setId.extension <> self.id.extension)

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

ERROR EXPECT FAIL validateGeneralHeaderConstraintsSetIdAndIdAreUnique" passed when it was expected to fail.<?xml version="1.0" encoding="UTF-8"?> <ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

junit.framework.AssertionFailedError: ERROR EXPECT FAIL validateGeneralHeaderConstraintsSetIdAndIdAreUnique" passed when it was expected to fail.

at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectFail(CDAValidationTest.java:286)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:751)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsSetIdAndIdAreUnique(GeneralHeaderConstraintsTest.java:703)
0.007
testValidateGeneralHeaderConstraintsCopyTimeNotPresent

Constraint

OCL

self.copyTime.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

ERROR EXPECT FAIL validateGeneralHeaderConstraintsCopyTimeNotPresent" passed when it was expected to fail.<?xml version="1.0" encoding="UTF-8"?> <ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

junit.framework.AssertionFailedError: ERROR EXPECT FAIL validateGeneralHeaderConstraintsCopyTimeNotPresent" passed when it was expected to fail.

at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectFail(CDAValidationTest.java:286)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:751)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsCopyTimeNotPresent(GeneralHeaderConstraintsTest.java:737)
0.017
testValidateGeneralHeaderConstraintsHasRecordTargetPatientRole

Constraint

CDT General Header Constraints SHALL satisfy: At least one recordTarget/patientRole element is present. (CONF-HP-31)

OCL

self.recordTarget->size() > 0 and self.recordTarget->exists(target : cda::RecordTarget | not target.patientRole.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="1.3.6.1.4.1.19376.1.5.3.1.1.1"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
</ClinicalDocument>

ERROR EXPECT PASS validateGeneralHeaderConstraintsHasRecordTargetPatientRole: CDT General Header Constraints SHALL satisfy: At least one recordTarget/patientRole element is present. (CONF-HP-31) CDT General Header Constraints SHALL satisfy: At least one recordTarget/patientRole element is present. (CONF-HP-31)

junit.framework.AssertionFailedError: ERROR EXPECT PASS validateGeneralHeaderConstraintsHasRecordTargetPatientRole: CDT General Header Constraints SHALL satisfy: At least one recordTarget/patientRole element is present. (CONF-HP-31) CDT General Header Constraints SHALL satisfy: At least one recordTarget/patientRole element is present. (CONF-HP-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.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsHasRecordTargetPatientRole(GeneralHeaderConstraintsTest.java:771)
0.007
testValidateGeneralHeaderConstraintsHasPatientBirthTime

Constraint

OCL

self.recordTarget->forAll(target : cda::RecordTarget | not target.patientRole.oclIsUndefined() implies (not target.patientRole.patient.birthTime.value.oclIsUndefined() or not target.patientRole.patient.birthTime.nullFlavor.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

ERROR EXPECT FAIL validateGeneralHeaderConstraintsHasPatientBirthTime" passed when it was expected to fail.<?xml version="1.0" encoding="UTF-8"?> <ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

junit.framework.AssertionFailedError: ERROR EXPECT FAIL validateGeneralHeaderConstraintsHasPatientBirthTime" passed when it was expected to fail.

at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectFail(CDAValidationTest.java:286)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:751)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsHasPatientBirthTime(GeneralHeaderConstraintsTest.java:805)
0.007
testValidateGeneralHeaderConstraintsHasAdministrativeGenderCode

Constraint

OCL

self.recordTarget->forAll(target : cda::RecordTarget | not target.patientRole.oclIsUndefined() implies (not target.patientRole.patient.administrativeGenderCode.code.oclIsUndefined() or not target.patientRole.patient.administrativeGenderCode.nullFlavor.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

ERROR EXPECT FAIL validateGeneralHeaderConstraintsHasAdministrativeGenderCode" passed when it was expected to fail.<?xml version="1.0" encoding="UTF-8"?> <ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

junit.framework.AssertionFailedError: ERROR EXPECT FAIL validateGeneralHeaderConstraintsHasAdministrativeGenderCode" passed when it was expected to fail.

at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectFail(CDAValidationTest.java:286)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:751)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsHasAdministrativeGenderCode(GeneralHeaderConstraintsTest.java:839)
0.007
testValidateGeneralHeaderConstraintsHasProviderOrganization

Constraint

CDT General Header Constraints MAY satisfy: The providerOrganization element is present. (CONF-HP-36)

OCL

self.recordTarget->exists(target : cda::RecordTarget | not target.patientRole.providerOrganization.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="1.3.6.1.4.1.19376.1.5.3.1.1.1"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
</ClinicalDocument>

ERROR EXPECT PASS validateGeneralHeaderConstraintsHasProviderOrganization: CDT General Header Constraints MAY satisfy: The providerOrganization element is present. (CONF-HP-36) CDT General Header Constraints MAY satisfy: The providerOrganization element is present. (CONF-HP-36)

junit.framework.AssertionFailedError: ERROR EXPECT PASS validateGeneralHeaderConstraintsHasProviderOrganization: CDT General Header Constraints MAY satisfy: The providerOrganization element is present. (CONF-HP-36) CDT General Header Constraints MAY satisfy: The providerOrganization element is present. (CONF-HP-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.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsHasProviderOrganization(GeneralHeaderConstraintsTest.java:873)
0.006
testValidateGeneralHeaderConstraintsHasAuthorTime

Constraint

OCL

self.author->forAll(author : cda::Author | not author.time.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

ERROR EXPECT FAIL validateGeneralHeaderConstraintsHasAuthorTime" passed when it was expected to fail.<?xml version="1.0" encoding="UTF-8"?> <ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

junit.framework.AssertionFailedError: ERROR EXPECT FAIL validateGeneralHeaderConstraintsHasAuthorTime" passed when it was expected to fail.

at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectFail(CDAValidationTest.java:286)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:751)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsHasAuthorTime(GeneralHeaderConstraintsTest.java:907)
0.004
testValidateGeneralHeaderConstraintsHasAssignedAuthorId

Constraint

OCL

self.author->forAll(author : cda::Author | author.assignedAuthor.id->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

ERROR EXPECT FAIL validateGeneralHeaderConstraintsHasAssignedAuthorId" passed when it was expected to fail.<?xml version="1.0" encoding="UTF-8"?> <ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

junit.framework.AssertionFailedError: ERROR EXPECT FAIL validateGeneralHeaderConstraintsHasAssignedAuthorId" passed when it was expected to fail.

at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectFail(CDAValidationTest.java:286)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:751)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsHasAssignedAuthorId(GeneralHeaderConstraintsTest.java:941)
0.005
testValidateGeneralHeaderConstraintsHasAssignedAuthorPersonOrDevice

Constraint

OCL

self.author->forAll(author : cda::Author | not author.assignedAuthor.assignedPerson.oclIsUndefined() or not author.assignedAuthor.assignedAuthoringDevice.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

ERROR EXPECT FAIL validateGeneralHeaderConstraintsHasAssignedAuthorPersonOrDevice" passed when it was expected to fail.<?xml version="1.0" encoding="UTF-8"?> <ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

junit.framework.AssertionFailedError: ERROR EXPECT FAIL validateGeneralHeaderConstraintsHasAssignedAuthorPersonOrDevice" passed when it was expected to fail.

at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectFail(CDAValidationTest.java:286)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:751)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsHasAssignedAuthorPersonOrDevice(GeneralHeaderConstraintsTest.java:975)
0.005
testValidateGeneralHeaderConstraintsHasDataEntererAssignedPerson

Constraint

OCL

not self.dataEnterer.oclIsUndefined() implies not self.dataEnterer.assignedEntity.assignedPerson.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

ERROR EXPECT FAIL validateGeneralHeaderConstraintsHasDataEntererAssignedPerson" passed when it was expected to fail.<?xml version="1.0" encoding="UTF-8"?> <ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

junit.framework.AssertionFailedError: ERROR EXPECT FAIL validateGeneralHeaderConstraintsHasDataEntererAssignedPerson" passed when it was expected to fail.

at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectFail(CDAValidationTest.java:286)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:751)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsHasDataEntererAssignedPerson(GeneralHeaderConstraintsTest.java:1009)
0.004
testValidateGeneralHeaderConstraintsHasDataEntererTime

Constraint

OCL

not self.dataEnterer.oclIsUndefined() implies not self.dataEnterer.time.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

ERROR EXPECT FAIL validateGeneralHeaderConstraintsHasDataEntererTime" passed when it was expected to fail.<?xml version="1.0" encoding="UTF-8"?> <ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

junit.framework.AssertionFailedError: ERROR EXPECT FAIL validateGeneralHeaderConstraintsHasDataEntererTime" passed when it was expected to fail.

at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectFail(CDAValidationTest.java:286)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:751)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsHasDataEntererTime(GeneralHeaderConstraintsTest.java:1043)
0.005
testValidateGeneralHeaderConstraintsHasInformant

Constraint

CDT General Header Constraints MAY satisfy: The informant element is present. (CONF-HP-42)

OCL

self.informant->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="1.3.6.1.4.1.19376.1.5.3.1.1.1"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
</ClinicalDocument>

ERROR EXPECT PASS validateGeneralHeaderConstraintsHasInformant: CDT General Header Constraints MAY satisfy: The informant element is present. (CONF-HP-42) CDT General Header Constraints MAY satisfy: The informant element is present. (CONF-HP-42)

junit.framework.AssertionFailedError: ERROR EXPECT PASS validateGeneralHeaderConstraintsHasInformant: CDT General Header Constraints MAY satisfy: The informant element is present. (CONF-HP-42) CDT General Header Constraints MAY satisfy: The informant element is present. (CONF-HP-42)
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.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsHasInformant(GeneralHeaderConstraintsTest.java:1077)
0.005
testValidateGeneralHeaderConstraintsHasInformantAssignedPersonOrRelatedPerson

Constraint

OCL

self.informant->forAll(i : cda::Informant12 | not i.assignedEntity.assignedPerson.oclIsUndefined() or not i.relatedEntity.relatedPerson.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

ERROR EXPECT FAIL validateGeneralHeaderConstraintsHasInformantAssignedPersonOrRelatedPerson" passed when it was expected to fail.<?xml version="1.0" encoding="UTF-8"?> <ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

junit.framework.AssertionFailedError: ERROR EXPECT FAIL validateGeneralHeaderConstraintsHasInformantAssignedPersonOrRelatedPerson" passed when it was expected to fail.

at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectFail(CDAValidationTest.java:286)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:751)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsHasInformantAssignedPersonOrRelatedPerson(GeneralHeaderConstraintsTest.java:1111)
0.006
testValidateGeneralHeaderConstraintsLegalAuthenticatorHasAssignedPerson

Constraint

OCL

not self.legalAuthenticator.oclIsUndefined() implies not self.legalAuthenticator.assignedEntity.assignedPerson.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

ERROR EXPECT FAIL validateGeneralHeaderConstraintsLegalAuthenticatorHasAssignedPerson" passed when it was expected to fail.<?xml version="1.0" encoding="UTF-8"?> <ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

junit.framework.AssertionFailedError: ERROR EXPECT FAIL validateGeneralHeaderConstraintsLegalAuthenticatorHasAssignedPerson" passed when it was expected to fail.

at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectFail(CDAValidationTest.java:286)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:751)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsLegalAuthenticatorHasAssignedPerson(GeneralHeaderConstraintsTest.java:1145)
0.005
testValidateGeneralHeaderConstraintsTimePreciseToSecond

Constraint

OCL

-- implemented in Java using XPath selector

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

ERROR EXPECT FAIL validateGeneralHeaderConstraintsTimePreciseToSecond" passed when it was expected to fail.<?xml version="1.0" encoding="UTF-8"?> <ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

junit.framework.AssertionFailedError: ERROR EXPECT FAIL validateGeneralHeaderConstraintsTimePreciseToSecond" passed when it was expected to fail.

at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectFail(CDAValidationTest.java:286)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:751)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.cdt.tests.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsTimePreciseToSecond(GeneralHeaderConstraintsTest.java:1227)
0.006
testValidateGeneralHeaderConstraintsTimePreciseToYearAndDay

Constraint

OCL

cda::OrganizationPartOf.allInstances()->select( effectiveTime.oclIsUndefined()).oclAsType( ecore::EObject)-> union( cda::MaintainedEntity.allInstances()->select( effectiveTime.oclIsUndefined()).oclAsType( ecore::EObject) )->union( cda::RelatedEntity.allInstances()->select( effectiveTime.oclIsUndefined()).oclAsType( ecore::EObject) )->union(cda::RelatedEntity.allInstances()->select( effectiveTime.oclIsUndefined()).oclAsType( ecore::EObject) )->union(cda::RelatedEntity.allInstances()->select( effectiveTime.oclIsUndefined()).oclAsType( ecore::EObject) )->union(cda::ServiceEvent.allInstances()->select( effectiveTime.oclIsUndefined()).oclAsType( ecore::EObject) )->union(cda::EncounterParticipant.allInstances()->select( time.oclIsUndefined()).oclAsType( ecore::EObject))->union(self.participant->select( time.oclIsUndefined()).oclAsType( ecore::EObject))->union(cda::OrganizationPartOf.allInstances().effectiveTime->union(cda::MaintainedEntity.allInstances().effectiveTime)->union( cda::RelatedEntity.allInstances().effectiveTime)->union(cda::RelatedEntity.allInstances().effectiveTime)->union(cda::RelatedEntity.allInstances().effectiveTime)->union(cda::ServiceEvent.allInstances().effectiveTime)->union(cda::EncounterParticipant.allInstances().time)->union(self.participant.time)->select(current : datatypes::IVL_TS | ((not current.low.oclIsUndefined()) and (current.low.value.oclIsUndefined() or current.low.value.size() < 8)) or ((not current.center.oclIsUndefined()) and (current.center.value.oclIsUndefined() or current.center.value.size() < 8)) or ((not current.high.oclIsUndefined()) and (current.high.value.oclIsUndefined() or current.high.value.size() < 8)) or (current.low.oclIsUndefined() and current.center.oclIsUndefined() and current.high.oclIsUndefined()) ).oclAsType( ecore::EObject))

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="1.3.6.1.4.1.19376.1.5.3.1.1.1"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
</ClinicalDocument>

ERROR EXPECT PASS validateGeneralHeaderConstraintsTimePreciseToYearAndDay:

junit.framework.AssertionFailedError: ERROR EXPECT PASS validateGeneralHeaderConstraintsTimePreciseToYearAndDay:
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.GeneralHeaderConstraintsTest.testValidateGeneralHeaderConstraintsTimePreciseToYearAndDay(GeneralHeaderConstraintsTest.java:1261)
5.151
Properties »