Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
PatientMedicalInstructionsTest7000.0892013-01-31T13:34:25JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testValidatePatientMedicalInstructionsTemplateId

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"

OCL

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

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="INT">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.3"/>
<templateId root="2.16.840.1.113883.10.20.1.49"/>
<code code="PINSTRUCT" codeSystem="1.3.6.1.4.1.19376.1.5.3.2" codeSystemName="IHEActCode"/>
</act>

0.006
testValidatePatientMedicalInstructionsClassCode

Constraint

IHE Patient Medical Instructions SHALL contain exactly one [1..1] @classCode="ACT" Act (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass)

OCL

isDefined('classCode')

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="INT">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.3"/>
<templateId root="2.16.840.1.113883.10.20.1.49"/>
<code code="PINSTRUCT" codeSystem="1.3.6.1.4.1.19376.1.5.3.2" codeSystemName="IHEActCode"/>
</act>

0.005
testValidatePatientMedicalInstructionsCodeP

Constraint

IHE Patient Medical Instructions SHALL contain exactly one [1..1] code/@code="PINSTRUCT" (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" classCode="ACT" moodCode="INT">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.3"/>
<templateId root="2.16.840.1.113883.10.20.1.49"/>
<code code="PINSTRUCT" codeSystem="1.3.6.1.4.1.19376.1.5.3.2" codeSystemName="IHEActCode"/>
</act>

0.013
testValidatePatientMedicalInstructionsCode

Constraint

IHE Patient Medical Instructions SHALL contain exactly one [1..1] code/@code="PINSTRUCT" (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 = 'PINSTRUCT' 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" classCode="ACT" moodCode="INT">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.3"/>
<templateId root="2.16.840.1.113883.10.20.1.49"/>
<code code="PINSTRUCT" codeSystem="1.3.6.1.4.1.19376.1.5.3.2" codeSystemName="IHEActCode"/>
</act>

0.029
testValidatePatientMedicalInstructionsStatusCode

Constraint

IHE Patient Medical 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" classCode="ACT" moodCode="INT">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.3"/>
<templateId root="2.16.840.1.113883.10.20.1.49"/>
<code code="PINSTRUCT" codeSystem="1.3.6.1.4.1.19376.1.5.3.2" codeSystemName="IHEActCode"/>
<statusCode code="completed"/>
</act>

0.016
testValidatePatientMedicalInstructionsText

Constraint

IHE Patient Medical 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" classCode="ACT" moodCode="INT">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.3"/>
<templateId root="2.16.840.1.113883.10.20.1.49"/>
<code code="PINSTRUCT" codeSystem="1.3.6.1.4.1.19376.1.5.3.2" codeSystemName="IHEActCode"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="INT">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.3"/>
<templateId root="2.16.840.1.113883.10.20.1.49"/>
<code code="PINSTRUCT" codeSystem="1.3.6.1.4.1.19376.1.5.3.2" codeSystemName="IHEActCode"/>
<text>text</text>
</act>

0.014
Properties »