Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
HospitalDischargeMedicationsSectionTest5000.0592013-01-31T13:34:24JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testValidateHospitalDischargeMedicationsSectionTemplateId

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

OCL

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

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.22"/>
<code code="10183-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="HOSPITAL DISCHARGE MEDICATIONS"/>
</section>

0.006
testValidateHospitalDischargeMedicationsSectionCode

Constraint

Consol Hospital Discharge Medications Section SHALL contain exactly one [1..1] code (CONF:15361)/@code="10183-2" HOSPITAL DISCHARGE MEDICATIONS (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15362)

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 = '10183-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="2.16.840.1.113883.10.20.22.2.11.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.11"/>
<code code="10183-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="HOSPITAL DISCHARGE MEDICATIONS"/>
</section>

0.027
testValidateHospitalDischargeMedicationsSectionMedication

Constraint

IHE Hospital Discharge Medications Section SHALL contain exactly one [1..1] entry Contains exactly one [1..1] Medication (templateId: 1.3.6.1.4.1.19376.1.5.3.1.4.7)

OCL

self.entry->one(entry : cda::Entry | not entry.substanceAdministration.oclIsUndefined() and entry.substanceAdministration.oclIsKindOf(ihe::Medication))

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.22"/>
<code code="10183-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="HOSPITAL DISCHARGE MEDICATIONS"/>
<entry>
<substanceAdministration/>
</entry>
</section>

0.011
testGetMedication

Constraint

OCL

SuccessInvalid XML

Valid XML

0.012
Properties »