Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.ihe.tests.MedicationFullfillmentInstructionsTest

NameTestsErrorsFailuresTime(s)Time StampHost
MedicationFullfillmentInstructionsTest6000.0802013-01-31T13:34:24JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateMedicationFullfillmentInstructionsTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( ) such that it SHALL contain exactly one [1..1] @root="1.3.6.1.4.1.19376.1.5.3.1.4.3.1"

OCL

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

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" moodCode="INT">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.3.1"/>
<templateId root="2.16.840.1.113883.10.20.1.43"/>
<code code="FINSTRUCT" codeSystem="1.3.6.1.4.1.19376.1.5.3.2" codeSystemName="IHEActCode"/>
</act>

0.007
testValidateMedicationFullfillmentInstructionsCodeP

Constraint

IHE Medication Fullfillment Instructions SHALL contain exactly one [1..1] code/@code="FINSTRUCT" (CodeSystem: 1.3.6.1.4.1.19376.1.5.3.2 IHEActCode)

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" moodCode="INT">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.3.1"/>
<templateId root="2.16.840.1.113883.10.20.1.43"/>
<code code="FINSTRUCT" codeSystem="1.3.6.1.4.1.19376.1.5.3.2" codeSystemName="IHEActCode"/>
</act>

0.014
testValidateMedicationFullfillmentInstructionsCode

Constraint

IHE Medication Fullfillment Instructions SHALL contain exactly one [1..1] code/@code="FINSTRUCT" (CodeSystem: 1.3.6.1.4.1.19376.1.5.3.2 IHEActCode)

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 value.code = 'FINSTRUCT' and value.codeSystem = '1.3.6.1.4.1.19376.1.5.3.2')

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" moodCode="INT">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.3.1"/>
<templateId root="2.16.840.1.113883.10.20.1.43"/>
<code code="FINSTRUCT" codeSystem="1.3.6.1.4.1.19376.1.5.3.2" codeSystemName="IHEActCode"/>
</act>

0.027
testValidateMedicationFullfillmentInstructionsStatusCode

Constraint

IHE Medication Fullfillment Instructions SHALL contain zero or one [0..1] statusCode

OCL

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

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" moodCode="INT">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.3.1"/>
<templateId root="2.16.840.1.113883.10.20.1.43"/>
<code code="FINSTRUCT" codeSystem="1.3.6.1.4.1.19376.1.5.3.2" codeSystemName="IHEActCode"/>
<statusCode code="completed"/>
</act>

0.016
testValidateMedicationFullfillmentInstructionsText

Constraint

IHE Medication Fullfillment Instructions SHALL contain zero or one [0..1] text

OCL

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

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" moodCode="INT">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.3.1"/>
<templateId root="2.16.840.1.113883.10.20.1.43"/>
<code code="FINSTRUCT" codeSystem="1.3.6.1.4.1.19376.1.5.3.2" codeSystemName="IHEActCode"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" moodCode="INT">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.3.1"/>
<templateId root="2.16.840.1.113883.10.20.1.43"/>
<code code="FINSTRUCT" codeSystem="1.3.6.1.4.1.19376.1.5.3.2" codeSystemName="IHEActCode"/>
<text>instruction</text>
</act>

0.014
Properties »