Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
EncounterTest4000.0602013-01-31T13:34:32JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateHITSPEncounterAdmissionSourceValueSet

Constraint

HITSP Encounter participant/@typeCode ='ORG'/code SHALL be coded with ValueSet 2.16.840.1.113883.3.88.12.80.33, Admission Source Value Set, STATIC

OCL

self.participant->select( par : cda::Participant2 | par.typeCode = vocab::ParticipationType::ORG )->forAll( par : cda::Participant2 | par.participantRole->one(pr : cda::ParticipantRole | pr.code.codeSystem = '2.16.840.1.113883.3.88.12.80.33') )

SuccessInvalid XML


<encounter xmlns="urn:hl7-org:v3" classCode="ENC">
<templateId root="2.16.840.1.113883.3.88.11.83.16"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.14"/>
<code codeSystem="2.16.840.1.113883.5.4" codeSystemName="ActEncounterCode"/>
<participant typeCode="ORG">
<participantRole/>
</participant>
</encounter>

Valid XML


<encounter xmlns="urn:hl7-org:v3" classCode="ENC">
<templateId root="2.16.840.1.113883.3.88.11.83.16"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.14"/>
<code codeSystem="2.16.840.1.113883.5.4" codeSystemName="ActEncounterCode"/>
<participant typeCode="ORG">
<participantRole>
<code codeSystem="2.16.840.1.113883.3.88.12.80.33"/>
</participantRole>
</participant>
</encounter>

0.012
testValidateHITSPEncounterTemplateId

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


<encounter xmlns="urn:hl7-org:v3" classCode="ENC">
<templateId root="2.16.840.1.113883.3.88.11.83.16"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.14"/>
<code codeSystem="2.16.840.1.113883.5.4" codeSystemName="ActEncounterCode"/>
</encounter>

0.006
testValidateHITSPEncounterCode

Constraint

HITSP Encounter SHOULD contain exactly one [1..1] code, where the @code SHOULD be selected from ValueSet EncounterType 2.16.840.1.113883.3.88.12.80.32 DYNAMIC (C83-[DE-16.02-1])

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.codeSystem = '2.16.840.1.113883.6.12' and not value.code.oclIsUndefined())

SuccessInvalid XML


<encounter xmlns="urn:hl7-org:v3" classCode="ENC">
<templateId root="2.16.840.1.113883.3.88.11.83.16"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.14"/>
<code codeSystem="2.16.840.1.113883.5.4" codeSystemName="ActEncounterCode"/>
</encounter>

Valid XML


<encounter xmlns="urn:hl7-org:v3" classCode="ENC">
<templateId root="2.16.840.1.113883.3.88.11.83.16"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.14"/>
<code code="8310-5" codeSystem="2.16.840.1.113883.6.12"/>
</encounter>

0.038
Properties »