Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.consol.tests.CodeObservationsTest

NameTestsErrorsFailuresTime(s)Time StampHost
CodeObservationsTest11000.1882013-01-31T13:34:42JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateCodeObservationsTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:15523, CONF:15524 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.6.2.13"

OCL

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

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.6.2.13"/>
</observation>

0.009
testValidateCodeObservationsClassCode

Constraint

Consol Code Observations SHALL contain exactly one [1..1] @classCode="OBS" Observation (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:9304)

OCL

self.classCode=vocab::ActClassObservation::OBS

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.6.2.13"/>
</observation>

0.005
testValidateCodeObservationsMoodCode

Constraint

Consol Code Observations SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood) (CONF:9305)

OCL

self.moodCode=vocab::x_ActMoodDocumentObservation::EVN

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.6.2.13"/>
</observation>

0.005
testValidateCodeObservationsCode

Constraint

Consol Code Observations SHALL contain exactly one [1..1] code (CONF:9307)

OCL

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

SuccessInvalid XML


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

Valid XML


<observation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.6.2.13"/>
<code xsi:type="CE"/>
</observation>

0.020
testValidateCodeObservationsEffectiveTime

Constraint

Consol Code Observations SHOULD contain zero or one [0..1] effectiveTime (CONF:9309)

OCL

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

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.6.2.13"/>
<effectiveTime/>
</observation>

0.024
testValidateCodeObservationsValue

Constraint

Consol Code Observations SHALL contain exactly one [1..1] value (CONF:9308)

OCL

(self.value->isEmpty() or self.value->exists(element | element.isNullFlavorUndefined())) implies (self.value->size() = 1)

SuccessInvalid XML


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

Valid XML


<observation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.6.2.13"/>
<value xsi:type="CD"/>
</observation>

0.024
testValidateCodeObservationsSOPInstanceObservation

Constraint

Consol Code Observations MAY contain zero or more [0..*] entryRelationship (CONF:9311, CONF:9312, CONF:9313) Contains @typeCode="SPRT" SPRT, and Contains exactly one [1..1] SOP Instance Observation (templateId: 2.16.840.1.113883.10.20.6.2.8)

OCL

self.entryRelationship->exists(entryRelationship : cda::EntryRelationship | not entryRelationship.observation.oclIsUndefined() and entryRelationship.observation.oclIsKindOf(consol::SOPInstanceObservation) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::SPRT)

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.6.2.13"/>
<entryRelationship typeCode="SPRT">
<observation/>
</entryRelationship>
</observation>

0.024
testValidateCodeObservationsQuantityMeasurementObservation

Constraint

Consol Code Observations MAY contain zero or more [0..*] entryRelationship (CONF:9314, CONF:9315, CONF:9316) Contains @typeCode="SPRT" SPRT, and Contains exactly one [1..1] Quantity Measurement Observation (templateId: 2.16.840.1.113883.10.20.6.2.14)

OCL

self.entryRelationship->exists(entryRelationship : cda::EntryRelationship | not entryRelationship.observation.oclIsUndefined() and entryRelationship.observation.oclIsKindOf(consol::QuantityMeasurementObservation) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::SPRT)

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.6.2.13"/>
<entryRelationship typeCode="SPRT">
<observation/>
</entryRelationship>
</observation>

0.024
testGetSOPInstanceObservations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.019
testGetQuantityMeasurementObservations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.019
Properties »