Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
SocialHistoryObservationTest7000.0632013-01-31T13:34:28JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateIHESocialHistoryObservationNoRepeatNumber

Constraint

IHE Social History Observation SHOULD satisfy: The <repeatNumber> element should not be used in a social history observation

OCL

self.repeatNumber->size() = 0

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.4"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13"/>
<templateId root="2.16.840.1.113883.10.20.1.33"/>
<statusCode code="completed"/>
<repeatNumber/>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.4"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13"/>
<templateId root="2.16.840.1.113883.10.20.1.33"/>
<statusCode code="completed"/>
</observation>

0.009
testValidateIHESocialHistoryObservationNoInterpretationCode

Constraint

IHE Social History Observation SHOULD satisfy: The <interpretationCode> element should not be used in a social history observation

OCL

self.interpretationCode->size() = 0

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.4"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13"/>
<templateId root="2.16.840.1.113883.10.20.1.33"/>
<statusCode code="completed"/>
<interpretationCode/>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.4"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13"/>
<templateId root="2.16.840.1.113883.10.20.1.33"/>
<statusCode code="completed"/>
</observation>

0.009
testValidateIHESocialHistoryObservationNoMethodCode

Constraint

IHE Social History Observation SHOULD satisfy: The <methodCode> element should not be used in a social history observation

OCL

self.methodCode->size() = 0

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.4"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13"/>
<templateId root="2.16.840.1.113883.10.20.1.33"/>
<statusCode code="completed"/>
<methodCode/>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.4"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13"/>
<templateId root="2.16.840.1.113883.10.20.1.33"/>
<statusCode code="completed"/>
</observation>

0.009
testValidateIHESocialHistoryObservationNoTargetSiteCode

Constraint

IHE Social History Observation SHOULD satisfy: The targetSiteCode element should not be used in a social history observation

OCL

self.targetSiteCode->size() = 0

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.4"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13"/>
<templateId root="2.16.840.1.113883.10.20.1.33"/>
<statusCode code="completed"/>
<targetSiteCode/>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.4"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13"/>
<templateId root="2.16.840.1.113883.10.20.1.33"/>
<statusCode code="completed"/>
</observation>

0.009
testValidateIHESocialHistoryObservationTemplateId

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.4"

OCL

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

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.4"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13"/>
<templateId root="2.16.840.1.113883.10.20.1.33"/>
<statusCode code="completed"/>
</observation>

0.007
testValidateIHESocialHistoryObservationValue

Constraint

IHE Social History Observation MAY contain zero or more [0..*] value

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="1.3.6.1.4.1.19376.1.5.3.1.4.13.4"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13"/>
<templateId root="2.16.840.1.113883.10.20.1.33"/>
<statusCode code="completed"/>
<value xsi:type="CD"/>
</observation>

0.017
Properties »