Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
ConditionTest7000.0712013-01-31T13:34:31JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateConditionHasTreatingProvider

Constraint

HITSP Condition The treating provider or providers SHALL be recorded in a <performer> element under the <act> that describes the condition of concern (C83-[DE-7.05-CDA-3])

OCL

not self.performer->isEmpty()

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.7"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.2"/>
<code nullFlavor="NA"/>
<performer/>
</act>

0.009
testValidateConditionHasProviderId

Constraint

HITSP Condition The identifier of the treating provider SHALL be present in the &lt;id> element beneath the &lt;assignedEntity>. This identifier SHALL be the identifier of one of the providers listed in the healthcare providers module. (C83-[DE-7.05-CDA-2])

OCL

self.performer->exists(p : cda::Performer2 | p.assignedEntity.id->size() > 0)

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.7"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.2"/>
<code nullFlavor="NA"/>
<performer>
<assignedEntity>
<id/>
</assignedEntity>
</performer>
</act>

0.011
testValidateConditionHasProviderTreatmentTime

Constraint

HITSP Condition The time over which this provider treated the condition MAY be recorded in the &lt;time> element beneath the &lt;performer> element (C83-[DE-7.05-CDA-1])

OCL

self.performer->exists(p : cda::Performer2 | p.time.oclIsUndefined())

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.7"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.2"/>
<code nullFlavor="NA"/>
<performer/>
</act>

0.007
testValidateConditionTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( C83-[DE-7-CDA-1] ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.3.88.11.83.7"

OCL

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

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.7"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.2"/>
<code nullFlavor="NA"/>
</act>

0.007
testValidateConditionConditionEntry

Constraint

HITSP Condition SHALL contain at least one [1..*] entryRelationship Contains @typeCode="SUBJ" SUBJ, and Contains exactly one [1..1] IHE Problem Entry (templateId: 1.3.6.1.4.1.19376.1.5.3.1.4.5)

OCL

self.entryRelationship->exists(entryRelationship : cda::EntryRelationship | not entryRelationship.observation.oclIsUndefined() and entryRelationship.observation.oclIsKindOf(ihe::ProblemEntry) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::SUBJ)

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.7"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.2"/>
<code nullFlavor="NA"/>
<entryRelationship typeCode="SUBJ" inversionInd="false">
<observation classCode="OBS" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5"/>
<templateId root="2.16.840.1.113883.10.20.1.28"/>
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<statusCode code="completed"/>
</observation>
</entryRelationship>
</act>

0.019
testGetConditionEntries

Constraint

OCL

SuccessInvalid XML

Valid XML

0.015
Properties »