Unit Test Results.

Designed for use with JUnit and Ant.

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

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

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateStatusObservationValue

Constraint

CCD Status Observation SHALL contain exactly one [1..1] value with data type CE (CONF-516)

OCL

NO OCL FOUND FOR PROPERTY VALIDATE_STATUS_OBSERVATION_VALUE__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP

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="1.3.6.1.4.1.19376.1.5.3.1.4.1.1"/>
<templateId root="2.16.840.1.113883.10.20.1.57"/>
<templateId root="2.16.840.1.113883.10.20.1.50"/>
<code code="33999-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Status"/>
<statusCode code="completed"/>
<value xsi:type="CE" code="55561003" codeSystem="2.16.840.1.113883.6.96"/>
</observation>

0.004
testValidateHealthStatusObservationHasTextReference

Constraint

Consol Health Status Observation text, if present, SHOULD contain zero or one [0..1] reference (CONF:9271)

OCL

not self.text.oclIsUndefined() implies self.text->forAll(reference->size() = 1)

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.5"/>
<code code="11323-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Health status"/>
<text/>
<statusCode code="completed"/>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.5"/>
<templateId root="2.16.840.1.113883.10.20.22.4.5"/>
<code code="11323-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Health status"/>
<text><reference value="test"/></text>
<statusCode code="completed"/>
</observation>

0.009
testValidateHealthStatusObservationTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:16756, CONF:16757 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.5"

OCL

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

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.22.4.5"/>
<code code="11323-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Health status"/>
<statusCode code="completed"/>
</observation>

0.009
testValidateHealthStatusObservationText

Constraint

Consol Health Status Observation SHOULD contain zero or one [0..1] text (CONF:9270)

OCL

(self.text.oclIsUndefined() or self.text.isNullFlavorUndefined()) implies (not self.text.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.22.4.5"/>
<code code="11323-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Health status"/>
<text/>
<statusCode code="completed"/>
</observation>

0.015
testValidateHealthStatusObservationValue

Constraint

Consol Health Status Observation SHALL contain exactly one [1..1] value with data type CD, where the @code SHALL be selected from ValueSet HealthStatus 2.16.840.1.113883.1.11.20.12 DYNAMIC (CONF:9075)

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.codeSystem = '2.16.840.1.113883.6.96' and (value.code = '81323004' or value.code = '313386006' or value.code = '162467007' or value.code = '161901003' or value.code = '271593001' or value.code = '21134002' or value.code = '161045001')))

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.22.4.5"/>
<code code="11323-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Health status"/>
<statusCode code="completed"/>
<value xsi:type="CD" code="81323004" codeSystem="2.16.840.1.113883.6.96"/>
</observation>

0.062
Properties »