Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.mu2consol.tests.SmokingStatusObservationTest

NameTestsErrorsFailuresTime(s)Time StampHost
SmokingStatusObservationTest4000.3152013-01-31T13:36:43JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateSmokingStatusObservationValueP

Constraint

Mu2consol Smoking Status Observation SHALL contain exactly one [1..1] value, where the @code SHALL be selected from ValueSet Smoking Status STATIC

OCL

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

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

0.053
testValidateSmokingStatusObservationValue

Constraint

Mu2consol Smoking Status Observation SHALL contain exactly one [1..1] value, where the @code SHALL be selected from ValueSet Smoking Status STATIC

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 = '449868002' or value.code = '428041000124106' or value.code = '8517006' or value.code = '266919005' or value.code = '77176002' or value.code = '266927001' or value.code = '428071000124103' or value.code = '428061000124105')))

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

0.244
testValidateTobaccoUseTemplateId

Constraint

The 'TobaccoUseTemplateId' invariant is violated on 'org.openhealthtools.mdht.uml.cda.mu2consol.impl.SmokingStatusObservationImpl@30785c4{#//}'

OCL

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

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.78"/>
<templateId root="2.16.840.1.113883.10.20.22.4.85"/>
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7ActCode" displayName="Assertion"/>
<statusCode code="completed"/>
</observation>

0.016
Properties »