Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.ccd.tests.AdvanceDirectiveReferenceTest

NameTestsErrorsFailuresTime(s)Time StampHost
AdvanceDirectiveReferenceTest70013.8912013-01-31T13:33:57JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateAdvanceDirectiveReferenceHasURL

Constraint

CCD Advance Directive Reference The URL of a referenced advance directive document MAY be present, and SHALL be represented in Observation / reference / ExternalDocument / text / reference. A <linkHTML> element containing the same URL SHOULD be present in the associated CDA Narrative Block (CONF-106)

OCL

self.externalDocument.text.reference.hasContent()

SuccessInvalid XML


<reference xmlns="urn:hl7-org:v3"/>

Valid XML


<reference xmlns="urn:hl7-org:v3" typeCode="REFR">
<templateId root="2.16.840.1.113883.10.20.1.36"/>
<externalDocument>
<id/>
<text mediaType="mediatype">sometext<reference value="value"/></text>
</externalDocument>
</reference>

0.007
testValidateAdvanceDirectiveReferenceHasMIMEType

Constraint

CCD Advance Directive Reference The MIME type of a referenced advance directive document MAY be present, and SHALL be represented in Observation / reference / ExternalDocument / text / @mediaType (CONF-107)

OCL

self.externalDocument.text.isDefined('mediaType')

SuccessInvalid XML


<reference xmlns="urn:hl7-org:v3"/>

Valid XML


<reference xmlns="urn:hl7-org:v3" typeCode="REFR">
<templateId root="2.16.840.1.113883.10.20.1.36"/>
<externalDocument>
<id/>
<text mediaType="mediatype">sometext</text>
</externalDocument>
</reference>

0.052
testValidateAdvanceDirectiveReferenceExternalDocumentHasId

Constraint

CCD Advance Directive Reference CONF-105: ExternalDocument SHALL contain at least one ExternalDocument / id. (CONF-105)

OCL

not self.externalDocument.id->isEmpty()

SuccessInvalid XML


<reference xmlns="urn:hl7-org:v3"/>

Valid XML


<reference xmlns="urn:hl7-org:v3" typeCode="REFR">
<templateId root="2.16.840.1.113883.10.20.1.36"/>
<externalDocument>
<id/>
</externalDocument>
</reference>

0.007
testValidateAdvanceDirectiveReferenceTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF-101 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.1.36"

OCL

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

SuccessInvalid XML


<reference xmlns="urn:hl7-org:v3"/>

Valid XML


<reference xmlns="urn:hl7-org:v3" typeCode="REFR">
<templateId root="2.16.840.1.113883.10.20.1.36"/>
</reference>

0.013
testValidateAdvanceDirectiveReferenceTypeCode

Constraint

CCD Advance Directive Reference The value for Observation / reference / @typeCode in an advance directive reference SHALL be 'REFR' 2.16.840.1.113883.5.1002 ActRelationshipType STATIC.

OCL

isDefined('typeCode')

SuccessInvalid XML


<reference xmlns="urn:hl7-org:v3"/>

Valid XML


<reference xmlns="urn:hl7-org:v3" typeCode="REFR">
<templateId root="2.16.840.1.113883.10.20.1.36"/>
</reference>

0.002
testValidateAdvanceDirectiveReferenceExternalDocument

Constraint

CCD Advance Directive Reference SHALL contain exactly one [1..1] externalDocument (CONF-102) Contains exactly one [1..1] CDA External Document

OCL

self.externalDocument->one(externalDocument : cda::ExternalDocument | not externalDocument.oclIsUndefined() and externalDocument.oclIsKindOf(rim::Act))

SuccessInvalid XML


<reference xmlns="urn:hl7-org:v3" typeCode="REFR">
<templateId root="2.16.840.1.113883.10.20.1.36"/>
</reference>

Valid XML


<reference xmlns="urn:hl7-org:v3" typeCode="REFR">
<templateId root="2.16.840.1.113883.10.20.1.36"/>
<externalDocument/>
</reference>

0.004
Properties »