Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
HospitalDischargeMedicationsSectionTest8000.2322013-01-31T13:35:20JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
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.077
testValidateHospitalDischargeMedicationsSectionEntriesOptionalTemplateId

Constraint

The 'HospitalDischargeMedicationsSectionEntriesOptionalTemplateId' invariant is violated on 'org.openhealthtools.mdht.uml.cda.consol.impl.HospitalDischargeMedicationsSectionImpl@62243c25{#//}'

OCL

self.templateId->exists(id : datatypes::II | id.root = '2.16.840.1.113883.10.20.22.2.11.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.010
testValidateHospitalDischargeMedicationsSectionCodeP

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())

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.034
testValidateHospitalDischargeMedicationsSectionText

Constraint

Consol Hospital Discharge Medications Section SHALL contain exactly one [1..1] text (CONF:7825)

OCL

not self.text.oclIsUndefined()

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"/>
<text/>
</section>

0.012
testValidateHospitalDischargeMedicationsSectionTitle

Constraint

Consol Hospital Discharge Medications Section SHALL contain exactly one [1..1] title (CONF:7824)

OCL

(self.title.oclIsUndefined() or self.title.isNullFlavorUndefined()) implies (not self.title.oclIsUndefined())

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"/>
<title>title</title>
</section>

0.036
testValidateHospitalDischargeMedicationsSectionDischargeMedication

Constraint

Consol Hospital Discharge Medications Section SHALL contain at least one [1..*] entry (CONF:7827) Contains exactly one [1..1] Discharge Medication (templateId: 2.16.840.1.113883.10.20.22.4.35)

OCL

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

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"/>
<entry>
<act/>
</entry>
</section>

0.027
testGetConsolDischargeMedications

Constraint

OCL

SuccessInvalid XML

Valid XML

0.031
Properties »