Unit Test Results.

Designed for use with JUnit and Ant.

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

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

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testGetSOPInstanceObservations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.041
testValidateQuantityMeasurementObservationCodeCodeSystemDIR

Constraint

Consol Quantity Measurement Observation code SHOULD contain zero or one [0..1] code, which SHALL be selected from ValueSet DIRQuantityMeasurementTypeCodes 2.16.840.1.113883.11.20.9.29 DYNAMIC (CONF:9322)

OCL

self.code.isNullFlavorDefined() or self.code.codeSystem = '2.16.840.1.113883.6.96'

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.14"/>
<code code="" codeSystem="2.16.840.1.113883.6.96" codeSystemName="" displayName=""/>
</observation>

0.027
testValidateQuantityMeasurementObservationCodeCodeSystemDICOM

Constraint

Consol Quantity Measurement Observation code SHOULD contain zero or one [0..1] code, which SHALL be selected from ValueSet DICOMQuantityMeasurementTypeCodes 2.16.840.1.113883.11.20.9.30 DYNAMIC (CONF:9323)

OCL

self.code.isNullFlavorDefined() or self.code.codeSystem='1.2.840.10008.2.16.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.14"/>
<code code="" codeSystem="1.2.840.10008.2.16.4" codeSystemName="" displayName=""/>
</observation>

0.026
testValidateQuantityMeasurementObservationTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:9319, CONF:10532 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.6.2.14"

OCL

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

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

0.014
testValidateQuantityMeasurementObservationClassCode

Constraint

Consol Quantity Measurement Observation SHALL contain exactly one [1..1] @classCode="OBS" Observation (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:9317)

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

0.009
testValidateQuantityMeasurementObservationMoodCode

Constraint

Consol Quantity Measurement Observation SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood) (CONF:9318)

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

0.009
testValidateQuantityMeasurementObservationCode

Constraint

Consol Quantity Measurement Observation SHALL contain exactly one [1..1] code (CONF:9320)

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

0.042
testValidateQuantityMeasurementObservationEffectiveTime

Constraint

Consol Quantity Measurement Observation SHOULD contain zero or one [0..1] effectiveTime (CONF:9326)

OCL

(self.effectiveTime.oclIsUndefined() or self.effectiveTime.isNullFlavorUndefined()) implies (not self.effectiveTime.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.14"/>
<effectiveTime/>
</observation>

0.053
testValidateQuantityMeasurementObservationValue

Constraint

Consol Quantity Measurement Observation SHALL contain exactly one [1..1] value with data type PQ (CONF:9324, CONF:932)

OCL

(self.value->isEmpty() or self.value->exists(element | element.isNullFlavorUndefined())) implies (self.value->size() = 1 and self.value->forAll(element | element.oclIsTypeOf(datatypes::PQ)))

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.6.2.14"/>
<value xsi:type="PQ"/>
</observation>

0.063
testValidateQuantityMeasurementObservationSOPInstanceObservation

Constraint

Consol Quantity Measurement Observation MAY contain zero or more [0..*] entryRelationship (CONF:9327, CONF:9328, CONF:9329) Contains @typeCode="SPRT" SPRT, and Contains exactly one [1..1] SOP Instance Observation (templateId: 2.16.840.1.113883.10.20.6.2.8)

OCL

self.entryRelationship->exists(entryRelationship : cda::EntryRelationship | not entryRelationship.observation.oclIsUndefined() and entryRelationship.observation.oclIsKindOf(consol::SOPInstanceObservation) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::SPRT)

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.14"/>
<entryRelationship typeCode="SPRT">
<observation/>
</entryRelationship>
</observation>

0.048
Properties »