Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
MedicationsSectionEntriesOptionalTest7000.2052013-01-31T13:35:34JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testGetMedicationActivities

Constraint

OCL

SuccessInvalid XML

Valid XML

0.031
testValidateMedicationsSectionEntriesOptionalTemplateId

Constraint

The 'MedicationsSectionEntriesOptionalTemplateId' invariant is violated on 'org.openhealthtools.mdht.uml.cda.consol.impl.MedicationsSectionImpl@3b5708f3{#//}'

OCL

self.templateId->exists(id : datatypes::II | id.root = '2.16.840.1.113883.10.20.22.2.1.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.1.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.1"/>
<code code="10160-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of medication use"/>
</section>

0.011
testValidateMedicationsSectionEntriesOptionalCode

Constraint

Consol Medications Section Entries Optional SHALL contain exactly one [1..1] code/@code="10160-0" History of medication use (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:7792)

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 = '10160-0' 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.1"/>
<code code="10160-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of medication use"/>
</section>

0.082
testValidateMedicationsSectionEntriesOptionalTitle

Constraint

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

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.1"/>
<code code="10160-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of medication use"/>
<title>Medications</title>
</section>

0.037
testValidateMedicationsSectionEntriesOptionalText

Constraint

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

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.1"/>
<code code="10160-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of medication use"/>
<text/>
</section>

0.011
testValidateMedicationsSectionEntriesOptionalMedicationActivity

Constraint

Consol Medications Section Entries Optional SHOULD contain zero or more [0..*] entry (CONF:7795, CONF:7573) 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.1"/>
<code code="10160-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of medication use"/>
<entry>
<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>
</entry>
</section>

0.028
Properties »