Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
CodedSocialHistorySectionTest4000.0332013-01-31T13:34:22JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateSocialHistorySectionTemplateId

Constraint

The 'SocialHistorySectionTemplateId' invariant is violated on 'org.openhealthtools.mdht.uml.cda.mu2consol.impl.SocialHistorySectionImpl@143d9e05{#//}'

OCL

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

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.17"/>
<templateId root="2.16.840.1.113883.10.20.22.2.17"/>
<code code="29762-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Social history"/>
</section>

0.007
testValidateCodedSocialHistorySectionSocialHistoryObservation

Constraint

IHE Coded Social History Section SHALL contain at least one [1..*] entry Contains exactly one [1..1] CCD Social History Observation (templateId: 2.16.840.1.113883.10.20.1.33)

OCL

self.entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(ccd::SocialHistoryObservation))

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.16.1"/>
<templateId root="2.16.840.1.113883.10.20.1.15"/>
<code code="29762-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Social history"/>
</section>

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.16.1"/>
<templateId root="2.16.840.1.113883.10.20.1.15"/>
<code code="29762-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Social history"/>
<entry>
<observation 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>
</entry>
</section>

0.014
testGetIHESocialHistoryObservations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.010
Properties »