Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
SimpleObservationTest4000.0572013-01-31T13:34:28JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateSimpleObservationTemplateId

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.13"

OCL

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

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.5"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13"/>
<statusCode code="completed"/>
</observation>

0.006
testValidateSimpleObservationId

Constraint

IHE Simple Observation SHALL contain at least one [1..*] id

OCL

(self.id->isEmpty() or self.id->exists(element | element.isNullFlavorUndefined())) implies (not self.id->isEmpty())

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.5"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13"/>
<id/>
<statusCode code="completed"/>
</observation>

0.016
testValidateSimpleObservationStatusCode

Constraint

IHE Simple Observation SHALL contain exactly one [1..1] statusCode/@code="completed" (CodeSystem: 2.16.840.1.113883.5.14 ActStatus)

OCL

(self.statusCode.oclIsUndefined() or self.statusCode.isNullFlavorUndefined()) implies (not self.statusCode.oclIsUndefined() and self.statusCode.oclIsKindOf(datatypes::CS) and let value : datatypes::CS = self.statusCode.oclAsType(datatypes::CS) in value.code = 'completed')

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.5"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13"/>
<statusCode code="completed"/>
</observation>

0.032
Properties »