Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.hitsp.tests.AdvanceDirectivesSectionTest

NameTestsErrorsFailuresTime(s)Time StampHost
AdvanceDirectivesSectionTest4000.0482013-01-31T13:34:30JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testValidateHITSPAdvanceDirectivesSectionTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.3.88.11.83.116"

OCL

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

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.3.88.11.83.116"/>
<templateId root="2.16.840.1.113883.10.20.1.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.34"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.35"/>
<code code="42348-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Advance directives"/>
</section>

0.014
testValidateHITSPAdvanceDirectivesSectionAdvanceDirective

Constraint

HITSP Advance Directives Section SHALL contain at least one [1..*] entry Contains exactly one [1..1] Advance Directive (templateId: 2.16.840.1.113883.3.88.11.83.12)

OCL

self.entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(hitsp::AdvanceDirective))

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.3.88.11.83.116"/>
<templateId root="2.16.840.1.113883.10.20.1.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.34"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.35"/>
<code code="42348-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Advance directives"/>
<entry>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.12"/>
<templateId root="2.16.840.1.113883.10.20.1.17"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.7"/>
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<statusCode code="completed"/>
</observation>
</entry>
</section>

0.016
testGetAdvanceDirectives

Constraint

OCL

SuccessInvalid XML

Valid XML

0.015
Properties »