Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
MedicationsAdministeredSectionTest8000.2382013-01-31T13:35:33JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testGetMedicationActivities

Constraint

OCL

SuccessInvalid XML

Valid XML

0.032
testValidateMedicationsAdministeredSectionTemplateId

Constraint

The 'MedicationsAdministeredSectionTemplateId' invariant is violated on 'org.openhealthtools.mdht.uml.cda.mu2consol.impl.MedicationsAdministeredSectionImpl@20f96c40{#//}'

OCL

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

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.38"/>
<templateId root="2.16.840.1.113883.10.20.22.2.38"/>
<code code="29549-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Medications Administered"/>
</section>

0.011
testValidateMedicationsAdministeredSectionCode

Constraint

Consol Medications Administered Section SHALL contain exactly one [1..1] code (CONF:15383)/@code="29549-3" Medications Administered (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15384)

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 = '29549-3' 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.38"/>
<code code="29549-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Medications Administered"/>
</section>

0.079
testValidateMedicationsAdministeredSectionCodeP

Constraint

Consol Medications Administered Section SHALL contain exactly one [1..1] code (CONF:15383)/@code="29549-3" Medications Administered (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15384)

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.38"/>
<code code="29549-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Medications Administered"/>
</section>

0.035
testValidateMedicationsAdministeredSectionText

Constraint

Consol Medications Administered Section SHALL contain exactly one [1..1] text (CONF:8155)

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.38"/>
<code code="29549-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Medications Administered"/>
<text/>
</section>

0.012
testValidateMedicationsAdministeredSectionTitle

Constraint

Consol Medications Administered Section SHALL contain exactly one [1..1] title (CONF:8154)

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.38"/>
<code code="29549-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Medications Administered"/>
<title>title</title>
</section>

0.038
testValidateMedicationsAdministeredSectionMedicationActivity

Constraint

Consol Medications Administered Section MAY contain zero or more [0..*] entry (CONF:8156) Contains exactly one [1..1] Medication Activity (templateId: 2.16.840.1.113883.10.20.22.4.16)

OCL

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

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.38"/>
<code code="29549-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Medications Administered"/>
<entry>
<substanceAdministration/>
</entry>
</section>

0.028
Properties »