Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
AdmissionMedicationTest8000.4492013-01-31T13:34:36JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testGetMedicationActivity

Constraint

OCL

SuccessInvalid XML

Valid XML

0.309
testValidateAdmissionMedicationTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:16758, CONF:16759 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.36"

OCL

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

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" 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>

0.038
testValidateAdmissionMedicationClassCode

Constraint

Consol Admission Medication SHALL contain exactly one [1..1] @classCode="ACT" Act (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:7698)

OCL

self.classCode=vocab::x_ActClassDocumentEntryAct::ACT

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" 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>

0.005
testValidateAdmissionMedicationCodeP

Constraint

Consol Admission Medication SHALL contain exactly one [1..1] code (CONF:15518)/@code="42346-7" Medications on Admission (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15519)

OCL

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

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" 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>

0.018
testValidateAdmissionMedicationCode

Constraint

Consol Admission Medication SHALL contain exactly one [1..1] code (CONF:15518)/@code="42346-7" Medications on Admission (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15519)

OCL

(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined() and self.code.oclIsKindOf(datatypes::CD) and let value : datatypes::CD = self.code.oclAsType(datatypes::CD) in not value.codeSystem.oclIsUndefined() or not value.codeSystemName.oclIsUndefined())

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" 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>

0.044
testValidateAdmissionMedicationMoodCode

Constraint

Consol Admission Medication SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood) (CONF:7699)

OCL

self.moodCode=vocab::x_DocumentActMood::EVN

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" 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>

0.004
testValidateAdmissionMedicationMedicationActivity

Constraint

Consol Admission Medication SHALL contain exactly one [1..1] entryRelationship (CONF:7701, CONF:7702, CONF:15520) Contains @typeCode="SUBJ" SUBJ, and Contains exactly one [1..1] Medication Activity (templateId: 2.16.840.1.113883.10.20.22.4.16)

OCL

self.entryRelationship->one(entryRelationship : cda::EntryRelationship | not entryRelationship.substanceAdministration.oclIsUndefined() and entryRelationship.substanceAdministration.oclIsKindOf(consol::MedicationActivity) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::SUBJ)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" 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>

Valid XML


<act xmlns="urn:hl7-org:v3" 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"/>
<entryRelationship typeCode="SUBJ">
<substanceAdministration classCode="SBADM">
<templateId root="2.16.840.1.113883.10.20.22.4.16"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</substanceAdministration>
</entryRelationship>
</act>

0.023
Properties »