Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.ccd.tests.EncounterLocationTest

NameTestsErrorsFailuresTime(s)Time StampHost
EncounterLocationTest9000.0312013-01-31T13:34:13JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateEncounterLocationHasParticipantRole

Constraint

CCD Encounter Location SHALL satisfy: contains exactly one participant / participantRole (CONF-474)

OCL

self.participantRole->size() = 1

SuccessInvalid XML


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

Valid XML


<participant2 xmlns="urn:hl7-org:v3" typeCode="LOC">
<templateId root="2.16.840.1.113883.10.20.1.45"/>
<participantRole/>
</participant2>

0.003
testValidateEncounterLocationHasParticipantRoleLocation

Constraint

CCD Encounter Location The value for participant/participantRole/@classCode in a location participation SHALL be "SDLOC" "Service delivery location" 2.16.840.1.113883.5.110 RoleClass. (CONF-475)

OCL

self.participantRole.classCode = vocab::RoleClassRoot::SDLOC

SuccessInvalid XML


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

Valid XML


<participant2 xmlns="urn:hl7-org:v3" typeCode="LOC">
<templateId root="2.16.840.1.113883.10.20.1.45"/>
<participantRole classCode="SDLOC"/>
</participant2>

0.003
testValidateEncounterLocationHasParticipantRoleCode

Constraint

CCD Encounter Location Participant / participantRole in a location participation MAY contain exactly one participant / participantRole / code. (CONF-476)

OCL

self.participantRole.code->size() = 1

SuccessInvalid XML


<participant2 xmlns="urn:hl7-org:v3" typeCode="LOC">
<templateId root="2.16.840.1.113883.10.20.1.45"/>
<participantRole/>
</participant2>

Valid XML


<participant2 xmlns="urn:hl7-org:v3" typeCode="LOC">
<templateId root="2.16.840.1.113883.10.20.1.45"/>
<templateId root="2.16.840.1.113883.10.20.1.45"/>
<participantRole>
<code/>
</participantRole>
</participant2>

0.004
testValidateEncounterLocationHasParticipantRoleCodeVocab

Constraint

CCD Encounter Location The value for participant/participantRole/code in a location participation SHOULD be selected from ValueSet 2.16.840.1.113883.1.11.17660 ServiceDeliveryLocationRoleType 2.16.840.1.113883.5.111 RoleCode DYNAMIC. (CONF-477)

OCL

self.participantRole.code.codeSystem = '2.16.840.1.113883.5.111'

SuccessInvalid XML


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

Valid XML


<participant2 xmlns="urn:hl7-org:v3" typeCode="LOC">
<templateId root="2.16.840.1.113883.10.20.1.45"/>
<participantRole>
<code codeSystem="2.16.840.1.113883.5.111"/>
</participantRole>
</participant2>

0.003
testValidateEncounterLocationHasPlayingEntity

Constraint

CCD Encounter Location Participant / participantRole in a location participation MAY contain exactly one participant / participantRole / playingEntity (CONF-478)

OCL

self.participantRole.playingEntity->size()>0

SuccessInvalid XML


<participant2 xmlns="urn:hl7-org:v3" typeCode="LOC">
<templateId root="2.16.840.1.113883.10.20.1.45"/>
<participantRole/>
</participant2>

Valid XML


<participant2 xmlns="urn:hl7-org:v3" typeCode="LOC">
<templateId root="2.16.840.1.113883.10.20.1.45"/>
<templateId root="2.16.840.1.113883.10.20.1.45"/>
<participantRole>
<playingEntity/>
</participantRole>
</participant2>

0.004
testValidateEncounterLocationHasPlayingEntityPlace

Constraint

CCD Encounter Location The value for participant/participantRole/playingEntity/@classCode in a location participation SHALL be "PLC" "Place" 2.16.840.1.113883.5.41 EntityClass. (CONF-479)

OCL

self.participantRole.playingEntity.classCode = vocab::EntityClassRoot::PLC

SuccessInvalid XML


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

Valid XML


<participant2 xmlns="urn:hl7-org:v3" typeCode="LOC">
<templateId root="2.16.840.1.113883.10.20.1.45"/>
<participantRole>
<playingEntity classCode="PLC"/>
</participantRole>
</participant2>

0.004
testValidateEncounterLocationTemplateId

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


<participant2 xmlns="urn:hl7-org:v3" typeCode="LOC">
<templateId root="2.16.840.1.113883.10.20.1.45"/>
</participant2>

0.003
testValidateEncounterLocationTypeCode

Constraint

CCD Encounter Location SHALL contain exactly one [1..1] @typeCode="LOC" (CONF-473)

OCL

self.typeCode=vocab::ParticipationType::LOC

SuccessInvalid XML


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

Valid XML


<participant2 xmlns="urn:hl7-org:v3" typeCode="LOC">
<templateId root="2.16.840.1.113883.10.20.1.45"/>
</participant2>

0.002
Properties »