Unit Test Results.

Designed for use with JUnit and Ant.

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

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

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testGetSimpleObservations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.011
testValidateCodedResultsSectionTemplateId

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

OCL

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

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.28"/>
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="STUDIES SUMMARY"/>
</section>

0.005
testValidateCodedResultsSectionCode

Constraint

IHE Coded Results Section SHALL contain exactly one [1..1] code/@code="30954-2" STUDIES SUMMARY (CodeSystem: 2.16.840.1.113883.6.1 LOINC)

OCL

(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined() and self.code.oclIsKindOf(datatypes::CE) and let value : datatypes::CE = self.code.oclAsType(datatypes::CE) in value.code = '30954-2' and value.codeSystem = '2.16.840.1.113883.6.1')

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.28"/>
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="STUDIES SUMMARY"/>
</section>

0.025
testValidateCodedResultsSectionProcedureEntry

Constraint

IHE Coded Results Section SHALL contain at least one [1..*] entry Contains exactly one [1..1] Procedure Entry (templateId: 1.3.6.1.4.1.19376.1.5.3.1.4.19)

OCL

self.entry->exists(entry : cda::Entry | not entry.procedure.oclIsUndefined() and entry.procedure.oclIsKindOf(ihe::ProcedureEntry))

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.28"/>
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="STUDIES SUMMARY"/>
<entry>
<procedure/>
</entry>
</section>

0.011
testValidateCodedResultsSectionExternalReference

Constraint

IHE Coded Results Section SHOULD contain at least one [1..*] entry Contains exactly one [1..1] External Reference (templateId: 1.3.6.1.4.1.19376.1.5.3.1.4.4)

OCL

self.entry->exists(entry : cda::Entry | not entry.act.oclIsUndefined() and entry.act.oclIsKindOf(ihe::ExternalReference))

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.28"/>
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="STUDIES SUMMARY"/>
</section>

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.28"/>
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="STUDIES SUMMARY"/>
<entry>
<act classCode="ACT" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.4"/>
</act>
</entry>
</section>

0.011
testValidateCodedResultsSectionSimpleObservation

Constraint

IHE Coded Results Section MAY contain zero or more [0..*] entry Contains exactly one [1..1] Simple Observation (templateId: 1.3.6.1.4.1.19376.1.5.3.1.4.13)

OCL

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

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.28"/>
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="STUDIES SUMMARY"/>
</section>

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.28"/>
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="STUDIES SUMMARY"/>
<entry>
<observation classCode="OBS" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.2"/>
<templateId root="2.16.840.1.113883.10.20.1.31"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<statusCode code="completed"/>
</observation>
</entry>
</section>

0.011
testGetProcedureEntries

Constraint

OCL

SuccessInvalid XML

Valid XML

0.010
testGetExternalReferences

Constraint

OCL

SuccessInvalid XML

Valid XML

0.010
Properties »