Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
FamilyHistoryObservationTest4000.0942013-01-31T13:34:23JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
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.008
testValidateIHEFamilyHistoryObservationCode

Constraint

IHE Family History Observation SHALL contain exactly one [1..1] code, where the @code SHALL be selected from ValueSet Problem Type 2.16.840.1.113883.3.88.12.3221.7.2 STATIC 1

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.codeSystem = '2.16.840.1.113883.6.96' and (value.code = '404684003' or value.code = '409586006' or value.code = '282291009' or value.code = '64572001' or value.code = '248536006' or value.code = '418799008' or value.code = '55607006'))

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.3"/>
<templateId root="2.16.840.1.113883.10.20.1.22"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13"/>
<code code="404684003" codeSystem="2.16.840.1.113883.6.96"/>
<statusCode code="completed"/>
</observation>

0.066
testValidateIHEFamilyHistoryObservationValue

Constraint

IHE Family History Observation SHALL contain at least one [1..*] value with data type CD

OCL

(self.value->isEmpty() or self.value->exists(element | element.isNullFlavorUndefined())) implies (not self.value->isEmpty() and self.value->forAll(element | element.oclIsTypeOf(datatypes::CD)))

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" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.3"/>
<templateId root="2.16.840.1.113883.10.20.1.22"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13"/>
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<statusCode code="completed"/>
<value xsi:type="CD"/>
</observation>

0.018
Properties »