Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.ihe.tests.ConcernEntryTest

NameTestsErrorsFailuresTime(s)Time StampHost
ConcernEntryTest7000.0952013-01-31T13:34:22JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testValidateConcernEntryEffectiveTimeLowHigh

Constraint

IHE Concern Entry The effectiveTime 'low' element SHALL be present. The 'high' element SHALL be present for concerns in the completed or aborted state, and SHALL NOT be present otherwise.

OCL

not self.effectiveTime.low.oclIsUndefined() and ((self.statusCode.code = 'completed' or self.statusCode.code = 'aborted') implies not self.effectiveTime.high.oclIsUndefined()) and ((self.statusCode.code <> 'completed' and self.statusCode.code <> 'aborted') implies self.effectiveTime.high.oclIsUndefined())

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<code nullFlavor="NA"/>
<effectiveTime>
<low value="lowvalue"/>
<high value="highvalue"/>
</effectiveTime>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<code nullFlavor="NA"/>
<statusCode code="completed"/>
<effectiveTime>
<low value="lowvalue"/>
<high value="highvalue"/>
</effectiveTime>
</act>

0.036
testValidateConcernEntryHasRelatedObservations

Constraint

IHE Concern Entry This entry SHALL contain one or more problem or allergy entries that conform to the specification in section Problem Entry or Allergies and Intolerances.

OCL

self.entryRelationship.observation.templateId->exists(id : datatypes::II | id.root = '1.3.6.1.4.1.19376.1.5.3.1.4.5') or self.entryRelationship.observation.templateId->exists(id : datatypes::II | id.root = '1.3.6.1.4.1.19376.1.5.3.1.4.6')

SuccessInvalid XML


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

Valid XML


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

0.015
testValidateConcernEntryRelatedObservationsTypeCode

Constraint

IHE Concern Entry This SHALL be represented using entryRelationship with typeCode = 'SUBJ'

OCL

self.entryRelationship->select(er|er.typeCode <> vocab::x_ActRelationshipEntryRelationship::SUBJ)->isEmpty()

SuccessInvalid XML


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

Valid XML


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

0.009
testValidateConcernEntryHasRelatedReferencesTypeCode

Constraint

IHE Concern Entry Related References SHALL be represented using entryRelationship with typeCode = 'REFR'.

OCL

self.reference->forAll(r | r.typeCode = vocab::x_ActRelationshipExternalReference::REFR)

SuccessInvalid XML


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

Valid XML


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

0.007
testValidateConcernEntryTemplateId

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


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

0.006
testValidateConcernEntryEffectiveTime

Constraint

IHE Concern Entry SHALL contain exactly one [1..1] effectiveTime

OCL

(self.effectiveTime.oclIsUndefined() or self.effectiveTime.isNullFlavorUndefined()) implies (not self.effectiveTime.oclIsUndefined())

SuccessInvalid XML


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

Valid XML


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

0.017
Properties »