Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.hitsp.tests.ProcedureTest

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

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateHITSPProcedureHasCodeOriginalText

Constraint

HITSP Procedure SHALL satisfy: The code/originalText/reference/@value is present.

OCL

not self.code.originalText.reference.value.oclIsUndefined()

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="INT">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
<templateId root="2.16.840.1.113883.3.88.11.83.17"/>
<templateId root="2.16.840.1.113883.10.20.1.25"/>
<code code="code">
<originalText/>
</code>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="INT">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
<templateId root="2.16.840.1.113883.3.88.11.83.17"/>
<templateId root="2.16.840.1.113883.10.20.1.25"/>
<code code="code">
<originalText><reference value="reference"/></originalText>
</code>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

0.013
testValidateHITSPProcedurePerformerAssignedEntity

Constraint

HITSP Procedure SHOULD satisfy: Contains the procedure provider in performer / assignedEntity.

OCL

self.performer->forAll(perf : cda::Performer2 | not perf.oclIsUndefined() and perf.assignedEntity->size() > 0)

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="INT">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
<templateId root="2.16.840.1.113883.3.88.11.83.17"/>
<templateId root="2.16.840.1.113883.10.20.1.25"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<performer/>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="INT">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
<templateId root="2.16.840.1.113883.3.88.11.83.17"/>
<templateId root="2.16.840.1.113883.10.20.1.25"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<performer>
<assignedEntity/>
</performer>
</procedure>

0.019
testValidateHITSPProcedureTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( C83-[DE-17-CDA-1] ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.3.88.11.83.17"

OCL

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

SuccessInvalid XML


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="INT">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
<templateId root="2.16.840.1.113883.3.88.11.83.17"/>
<templateId root="2.16.840.1.113883.10.20.1.25"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

0.007
testValidateHITSPProcedureTargetSiteCode

Constraint

HITSP Procedure SHOULD contain exactly one [1..1] targetSiteCode, where the @code SHOULD be selected from ValueSet Body Site 2.16.840.1.113883.3.88.12.3221.8.9 STATIC 2 (C83-[DE-17-CDA-3])

OCL

(self.targetSiteCode->isEmpty() or self.targetSiteCode->exists(element | element.isNullFlavorUndefined())) implies (self.targetSiteCode->size() = 1 and self.targetSiteCode->forAll(element | not element.oclIsUndefined() and element.oclIsKindOf(datatypes::CD) and let value : datatypes::CD = element.oclAsType(datatypes::CD) in value.codeSystem = '2.16.840.1.113883.6.96' and not value.code.oclIsUndefined()))

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="INT">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
<templateId root="2.16.840.1.113883.3.88.11.83.17"/>
<templateId root="2.16.840.1.113883.10.20.1.25"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="INT">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
<templateId root="2.16.840.1.113883.3.88.11.83.17"/>
<templateId root="2.16.840.1.113883.10.20.1.25"/>
<targetSiteCode code="code" codeSystem="2.16.840.1.113883.6.96" codeSystemName="" displayName=""/>
</procedure>

0.051
testValidateHITSPProcedureCode

Constraint

HITSP Procedure SHOULD contain exactly one [1..1] code (CONF-433)

OCL

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

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="INT">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
<templateId root="2.16.840.1.113883.3.88.11.83.17"/>
<templateId root="2.16.840.1.113883.10.20.1.25"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="INT">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
<templateId root="2.16.840.1.113883.3.88.11.83.17"/>
<templateId root="2.16.840.1.113883.10.20.1.25"/>
<code/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

0.021
Properties »