Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
PregnancyObservationTest8000.1072013-01-31T13:34:26JKMSoftware-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.007
testValidatePregnancyObservationCode

Constraint

Consol Pregnancy Observation SHALL contain exactly one [1..1] code (CONF:454)/@code="ASSERTION" Assertion (CodeSystem: 2.16.840.1.113883.5.4 HL7ActCode)

OCL

(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined() and self.code.oclIsKindOf(datatypes::CD) and let value : datatypes::CD = self.code.oclAsType(datatypes::CD) in value.code = 'ASSERTION' and value.codeSystem = '2.16.840.1.113883.5.4')

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.15.3.8"/>
<code xsi:type="CE" code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
<statusCode code="completed"/>
</observation>

0.014
testValidatePregnancyObservationInterpretationCode

Constraint

IHE Pregnancy Observation SHALL contain [0..0] interpretationCode

OCL

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

SuccessInvalid 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>

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"/>
<interpretationCode/>
</observation>

0.016
testValidatePregnancyObservationMethodCode

Constraint

IHE Pregnancy Observation SHALL contain [0..0] methodCode

OCL

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

SuccessInvalid 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>

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"/>
<methodCode/>
</observation>

0.017
testValidatePregnancyObservationRepeatNumber

Constraint

IHE Pregnancy Observation SHALL contain [0..0] repeatNumber

OCL

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

SuccessInvalid 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>

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"/>
<repeatNumber/>
</observation>

0.017
testValidatePregnancyObservationTargetSiteCode

Constraint

IHE Pregnancy Observation SHALL contain [0..0] targetSiteCode

OCL

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

SuccessInvalid 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>

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"/>
<targetSiteCode/>
</observation>

0.016
testValidatePregnancyObservationValue

Constraint

Consol Pregnancy Observation SHALL contain exactly one [1..1] value with data type CD/@code="77386006" Pregnant (CodeSystem: 2.16.840.1.113883.6.96 SNOMEDCT) (CONF:457)

OCL

(self.value->isEmpty() or self.value->exists(element | element.isNullFlavorUndefined())) implies (self.value->size() = 1 and self.value->forAll(element | not element.oclIsUndefined() and element.oclIsKindOf(datatypes::CD) and let value : datatypes::CD = element.oclAsType(datatypes::CD) in value.code = '77386006' and value.codeSystem = '2.16.840.1.113883.6.96'))

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.15.3.8"/>
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7ActCode" displayName="Assertion"/>
<statusCode code="completed"/>
<value xsi:type="CD" code="77386006" codeSystem="2.16.840.1.113883.6.96"/>
</observation>

0.015
Properties »