Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
ProcedureEntryTest13000.1602013-01-31T13:34:27JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateProcedureEntryMoodCode

Constraint

IHE Procedure Entry SHALL satisfy: Value for moodCode is 'INT' to indicate a planned procedure or 'EVN' to describe a procedure that has already occured.

OCL

self.moodCode = vocab::x_DocumentProcedureMood::EVN or self.moodCode = vocab::x_DocumentProcedureMood::INT

SuccessInvalid XML


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
</procedure>

0.008
testValidateProcedureEntryHasTextReference

Constraint

IHE Procedure Entry SHALL satisfy: The &lt;text> element shall contain a reference to the narrative text describing the procedure.

OCL

not self.text.reference.oclIsUndefined()

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
<text><reference/></text>
</procedure>

0.007
testValidateProcedureEntryPriorityCode

Constraint

IHE Procedure Entry &lt;priorityCode> SHALL be present in INT mood when effectiveTime is not provided, it MAY be present in other moods

OCL

self.moodCode = vocab::x_DocumentProcedureMood::INT and self.effectiveTime.oclIsUndefined() implies not self.priorityCode.oclIsUndefined()

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="INT">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="INT">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
<priorityCode code="CODE" codeSystem="SYSTEM"/>
</procedure>

0.024
testValidateProcedureEntryHasInversionIndForEncounter

Constraint

IHE Procedure Entry SHALL satisfy: The entryRelationship/@inversionInd attribute is 'true' for the reference to encounter (typecode=COMP)

OCL

self.entryRelationship->select(er | er.typeCode = vocab::x_ActRelationshipEntryRelationship::COMP and er.inversionInd <> true)->isEmpty()

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
<entryRelationship typeCode="COMP" inversionInd="false"/>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
<entryRelationship typeCode="COMP" inversionInd="true"/>
</procedure>

0.012
testValidateProcedureEntryTemplateId

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.19"

OCL

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

SuccessInvalid XML


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
</procedure>

0.006
testValidateProcedureEntryClassCode

Constraint

IHE Procedure Entry SHALL contain exactly one [1..1] @classCode="PROC" (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass)

OCL

isDefined('classCode')

SuccessInvalid XML


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
</procedure>

0.005
testValidateProcedureEntryText

Constraint

IHE Procedure Entry SHALL contain exactly one [1..1] text

OCL

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

SuccessInvalid XML


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
<text/>
</procedure>

0.015
testValidateProcedureEntryApproachSiteCode

Constraint

IHE Procedure Entry MAY contain zero or more [0..*] approachSiteCode

OCL

(self.approachSiteCode->isEmpty() or self.approachSiteCode->exists(element | element.isNullFlavorUndefined())) implies (not self.approachSiteCode->isEmpty())

SuccessInvalid XML


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
<approachSiteCode/>
</procedure>

0.017
testValidateProcedureEntryInternalReference

Constraint

IHE Procedure Entry MAY contain zero or one [0..1] entryRelationship Contains @typeCode="COMP" COMP, and Contains exactly one [1..1] Internal Reference (templateId: 1.3.6.1.4.1.19376.1.5.3.1.4.4.1)

OCL

self.entryRelationship->one(entryRelationship : cda::EntryRelationship | not entryRelationship.act.oclIsUndefined() and entryRelationship.act.oclIsKindOf(ihe::InternalReference) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::COMP)

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
<entryRelationship typeCode="COMP">
<act>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.4.1"/>
</act>
</entryRelationship>
</procedure>

0.016
testValidateProcedureEntryInternalReferenceReason

Constraint

IHE Procedure Entry MAY contain at least one [1..*] entryRelationship Contains @typeCode="RSON" RSON, and Contains exactly one [1..1] Internal Reference (templateId: 1.3.6.1.4.1.19376.1.5.3.1.4.4.1)

OCL

self.entryRelationship->exists(entryRelationship : cda::EntryRelationship | not entryRelationship.act.oclIsUndefined() and entryRelationship.act.oclIsKindOf(ihe::InternalReference) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::RSON)

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
<entryRelationship typeCode="RSON">
<act>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.4.1"/>
</act>
</entryRelationship>
</procedure>

0.016
testGetInternalReference

Constraint

OCL

SuccessInvalid XML

Valid XML

0.015
testGetInternalReferenceReasons

Constraint

OCL

SuccessInvalid XML

Valid XML

0.012
Properties »