Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
PurposeofReferenceObservationTest7000.2392013-01-31T13:36:16JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidatePurposeofReferenceObservationCodeCodeSystem

Constraint

Consol Purposeof Reference Observation code SHOULD contain zero or one [0..1] code="ASSERTION" (CodeSystem: ActCode 2.16.840.1.113883.5.4) (CONF:9268)

OCL

self.code.isNullFlavorDefined() or (self.code.code = 'ASSERTION' and self.code.codeSystem = '2.16.840.1.113883.5.4')

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.9"/>
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
</observation>

0.045
testValidatePurposeofReferenceObservationTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:9266, CONF:10531 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.6.2.9"

OCL

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

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.9"/>
</observation>

0.014
testValidatePurposeofReferenceObservationClassCode

Constraint

Consol Purposeof Reference Observation SHALL contain exactly one [1..1] @classCode="OBS" Observation (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:9264)

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.9"/>
</observation>

0.009
testValidatePurposeofReferenceObservationCode

Constraint

Consol Purposeof Reference Observation SHALL contain exactly one [1..1] code (CONF:9267)

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="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.6.2.9"/>
<code/>
</observation>

0.042
testValidatePurposeofReferenceObservationMoodCode

Constraint

Consol Purposeof Reference Observation SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood) (CONF:9265)

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.9"/>
</observation>

0.009
testValidatePurposeofReferenceObservationValue

Constraint

OCL

(self.value->isEmpty() or self.value->exists(element | element.isNullFlavorUndefined())) implies (self.value->forAll(element | not element.oclIsUndefined() and element.oclIsKindOf(datatypes::CD) and let value : datatypes::CD = element.oclAsType(datatypes::CD) in value.codeSystem = '1.2.840.10008.2.16.4' and (value.code = '121079' or value.code = '121080' or value.code = '121112')))

SuccessInvalid XML


Skip Fail Test

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.9"/>
<value xsi:type="CD" code="121079" codeSystem="1.2.840.10008.2.16.4" codeSystemName="" displayName=""/>
</observation>

0.118
Properties »