Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
HospitalAdmissionMedicationsSectionEntriesOptionalTest8000.2222013-01-31T13:35:18JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateHospitalAdmissionMedicationsSectionEntriesOptionalTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:10098, CONF:10392 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.2.44"

OCL

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

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.44"/>
<code code="42346-7" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="MEDICATIONS ON ADMISSION"/>
</section>

0.012
testValidateHospitalAdmissionMedicationsSectionEntriesOptionalCode

Constraint

Consol Hospital Admission Medications Section Entries Optional SHALL contain exactly one [1..1] code (CONF:15482)/@code="42346-7" MEDICATIONS ON ADMISSION (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15483)

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 = '42346-7' 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.44"/>
<code code="42346-7" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="MEDICATIONS ON ADMISSION"/>
</section>

0.073
testValidateHospitalAdmissionMedicationsSectionEntriesOptionalCodeP

Constraint

Consol Hospital Admission Medications Section Entries Optional SHALL contain exactly one [1..1] code (CONF:15482)/@code="42346-7" MEDICATIONS ON ADMISSION (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15483)

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.44"/>
<code code="42346-7" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="MEDICATIONS ON ADMISSION"/>
</section>

0.032
testValidateHospitalAdmissionMedicationsSectionEntriesOptionalText

Constraint

Consol Hospital Admission Medications Section Entries Optional SHALL contain exactly one [1..1] text (CONF:10101)

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.44"/>
<code code="42346-7" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="MEDICATIONS ON ADMISSION"/>
<text/>
</section>

0.011
testValidateHospitalAdmissionMedicationsSectionEntriesOptionalTitle

Constraint

Consol Hospital Admission Medications Section Entries Optional SHALL contain exactly one [1..1] title (CONF:10100)

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.44"/>
<code code="42346-7" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="MEDICATIONS ON ADMISSION"/>
<title>title</title>
</section>

0.034
testValidateHospitalAdmissionMedicationsSectionEntriesOptionalAdmissionMedication

Constraint

Consol Hospital Admission Medications Section Entries Optional SHOULD contain zero or more [0..*] entry (CONF:10102, CONF:10110) Contains exactly one [1..1] Admission Medication (templateId: 2.16.840.1.113883.10.20.22.4.36)

OCL

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

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.44"/>
<code code="42346-7" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="MEDICATIONS ON ADMISSION"/>
</section>

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.44"/>
<code code="42346-7" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="MEDICATIONS ON ADMISSION"/>
<entry>
<act classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.36"/>
<code code="42346-7" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Medications on Admission"/>
</act>
</entry>
</section>

0.027
testGetAdmissionMedications

Constraint

OCL

SuccessInvalid XML

Valid XML

0.029
Properties »