Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.hitsp.tests.SocialHistoryTest

NameTestsErrorsFailuresTime(s)Time StampHost
SocialHistoryTest6000.1662013-01-31T13:34:36JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testValidateSocialHistoryTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.3.88.11.83.19"

OCL

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

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.3.88.11.83.19"/>
<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"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.4"/>
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<statusCode code="completed"/>
</observation>

0.008
testValidateSocialHistoryCodeP

Constraint

HITSP Social History SHOULD contain zero or more [0..*] code, where the @code SHALL be selected from ValueSet Social History Type 2.16.840.1.113883.3.88.12.80.60 STATIC 1

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.3.88.11.83.19"/>
<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"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.4"/>
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<statusCode code="completed"/>
</observation>

0.021
testValidateSocialHistoryCode

Constraint

HITSP Social History SHOULD contain zero or more [0..*] code, where the @code SHALL be selected from ValueSet Social History Type 2.16.840.1.113883.3.88.12.80.60 STATIC 1

OCL

(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined() and self.code.oclIsKindOf(datatypes::CD) and let value : datatypes::CD = self.code.oclAsType(datatypes::CD) in value.codeSystem = '2.16.840.1.113883.6.96' and (value.code = '160573003' or value.code = '363908000' or value.code = '364703007' or value.code = '256235009' or value.code = '228272008' or value.code = '364393001' or value.code = '229819007' or value.code = '425400000'))

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.3.88.11.83.19"/>
<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"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.4"/>
<code code="160573003" codeSystem="2.16.840.1.113883.6.96"/>
<statusCode code="completed"/>
</observation>

0.087
testValidateSocialHistoryEffectiveTime

Constraint

HITSP Social History SHOULD contain zero or one [0..1] effectiveTime

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.3.88.11.83.19"/>
<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"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.4"/>
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<statusCode code="completed"/>
<effectiveTime/>
</observation>

0.025
testValidateSocialHistoryText

Constraint

HITSP Social History SHALL contain exactly one [1..1] text

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.3.88.11.83.19"/>
<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"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.4"/>
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<text/>
<statusCode code="completed"/>
</observation>

0.021
Properties »