Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
MedicalEquipmentSectionTest8000.2332013-01-31T13:35:28JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateMedicalEquipmentSectionTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:7944.CONF:10404 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.2.23"

OCL

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

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.23"/>
<code code="46264-8" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Medical Equipment"/>
</section>

0.012
testValidateMedicalEquipmentSectionCode

Constraint

Consol Medical Equipment Section SHALL contain exactly one [1..1] code (CONF:15381)/@code="46264-8" Medical Equipment (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15382)

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 = '46264-8' 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.23"/>
<code code="46264-8" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Medical Equipment"/>
</section>

0.077
testValidateMedicalEquipmentSectionTitle

Constraint

Consol Medical Equipment Section SHALL contain exactly one [1..1] title (CONF:7946)

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.23"/>
<code code="46264-8" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Medical Equipment"/>
<title>title</title>
</section>

0.036
testValidateMedicalEquipmentSectionText

Constraint

Consol Medical Equipment Section SHALL contain exactly one [1..1] text (CONF:7947)

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.23"/>
<code code="46264-8" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Medical Equipment"/>
<text/>
</section>

0.013
testGetNonMedicinalSupplyActivities

Constraint

OCL

SuccessInvalid XML

Valid XML

0.031
testValidateMedicalEquipmentSectionCodeP

Constraint

Consol Medical Equipment Section SHALL contain exactly one [1..1] code (CONF:15381)/@code="46264-8" Medical Equipment (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15382)

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.23"/>
<code code="46264-8" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Medical Equipment"/>
</section>

0.034
testValidateMedicalEquipmentSectionNonMedicinalSupplyActivity

Constraint

Consol Medical Equipment Section SHOULD contain zero or more [0..*] entry (CONF:7948.CONF:8755) Contains exactly one [1..1] Non Medicinal Supply Activity (templateId: 2.16.840.1.113883.10.20.22.4.50)

OCL

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

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.23"/>
<code code="46264-8" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Medical Equipment"/>
<entry>
<supply/>
</entry>
</section>

0.028
Properties »