Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.consol.tests.ServiceDeliveryLocationTest

NameTestsErrorsFailuresTime(s)Time StampHost
ServiceDeliveryLocationTest9000.0282013-01-31T13:36:22JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateServiceDeliveryLocationHasPlayingEntity

Constraint

Consol Service Delivery Location MAY contain zero or one [0..1] playingEntity (CONF:7762)

OCL

self.playingEntity->size() = 1

SuccessInvalid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="SDLOC">
<templateId root="2.16.840.1.113883.10.20.22.4.32"/>
<code codeSystem="2.16.840.1.113883.6.259" codeSystemName="HealthcareServiceLocation"/>
</participantrole>

Valid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="SDLOC">
<templateId root="2.16.840.1.113883.10.20.22.4.32"/>
<code codeSystem="2.16.840.1.113883.6.259" codeSystemName="HealthcareServiceLocation"/>
<playingEntity/>
</participantrole>

0.003
testValidateServiceDeliveryLocationHasPlayingEntityClassCode

Constraint

Consol Service Delivery Location playingEntity, if present, SHALL contain exactly one [1..1] @classCode="PLC" (CodeSystem: EntityClass 2.16.840.1.113883.5.41) (CONF:7763)

OCL

self.playingEntity->size()>0 implies self.playingEntity.classCode=vocab::EntityClassRoot::PLC

SuccessInvalid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="SDLOC">
<templateId root="2.16.840.1.113883.10.20.22.4.32"/>
<code codeSystem="2.16.840.1.113883.6.259" codeSystemName="HealthcareServiceLocation"/>
<playingEntity/>
</participantrole>

Valid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="SDLOC">
<templateId root="2.16.840.1.113883.10.20.22.4.32"/>
<code codeSystem="2.16.840.1.113883.6.259" codeSystemName="HealthcareServiceLocation"/>
<playingEntity classCode="PLC"/>
</participantrole>

0.003
testValidateServiceDeliveryLocationHasPlayingEntityName

Constraint

Consol Service Delivery Location playingEntity, if present, MAY contain zero or one [0..1] name (CONF:16037)

OCL

self.playingEntity->size()>0 implies self.playingEntity.name->size() = 1

SuccessInvalid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="SDLOC">
<templateId root="2.16.840.1.113883.10.20.22.4.32"/>
<code codeSystem="2.16.840.1.113883.6.259" codeSystemName="HealthcareServiceLocation"/>
<playingEntity/>
</participantrole>

Valid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="SDLOC">
<templateId root="2.16.840.1.113883.10.20.22.4.32"/>
<code codeSystem="2.16.840.1.113883.6.259" codeSystemName="HealthcareServiceLocation"/>
<playingEntity>
<name/>
</playingEntity>
</participantrole>

0.003
testValidateServiceDeliveryLocationTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:7635, CONF:10524 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.32"

OCL

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

SuccessInvalid XML


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

Valid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="SDLOC">
<templateId root="2.16.840.1.113883.10.20.22.4.32"/>
<code codeSystem="2.16.840.1.113883.6.259" codeSystemName="HealthcareServiceLocation"/>
</participantrole>

0.002
testValidateServiceDeliveryLocationClassCode

Constraint

OCL

isDefined('classCode') and self.classCode=vocab::RoleClassRoot::SDLOC

SuccessInvalid XML


Skip Fail Test

Valid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="SDLOC">
<templateId root="2.16.840.1.113883.10.20.22.4.32"/>
<code codeSystem="2.16.840.1.113883.6.259" codeSystemName="HealthcareServiceLocation"/>
</participantrole>

0.003
testValidateServiceDeliveryLocationCode

Constraint

Consol Service Delivery Location SHALL contain exactly one [1..1] code, where the @code SHALL be selected from ValueSet HealthcareServiceLocation 2.16.840.1.113883.1.11.20275 DYNAMIC (CONF:16850)

OCL

(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined() and self.code.oclIsKindOf(datatypes::CE) and let value : datatypes::CE = self.code.oclAsType(datatypes::CE) in value.codeSystem = '2.16.840.1.113883.6.259' and not value.code.oclIsUndefined())

SuccessInvalid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="SDLOC">
<templateId root="2.16.840.1.113883.10.20.22.4.32"/>
<code codeSystem="2.16.840.1.113883.6.259" codeSystemName="HealthcareServiceLocation"/>
</participantrole>

Valid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="SDLOC">
<templateId root="2.16.840.1.113883.10.20.22.4.32"/>
<code code="" codeSystem="2.16.840.1.113883.6.259"/>
</participantrole>

0.005
testValidateServiceDeliveryLocationAddr

Constraint

Consol Service Delivery Location SHOULD contain zero or more [0..*] addr (CONF:7760)

OCL

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

SuccessInvalid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="SDLOC">
<templateId root="2.16.840.1.113883.10.20.22.4.32"/>
<code codeSystem="2.16.840.1.113883.6.259" codeSystemName="HealthcareServiceLocation"/>
</participantrole>

Valid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="SDLOC">
<templateId root="2.16.840.1.113883.10.20.22.4.32"/>
<code codeSystem="2.16.840.1.113883.6.259" codeSystemName="HealthcareServiceLocation"/>
<addr/>
</participantrole>

0.003
testValidateServiceDeliveryLocationTelecom

Constraint

Consol Service Delivery Location SHOULD contain zero or more [0..*] telecom (CONF:7761)

OCL

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

SuccessInvalid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="SDLOC">
<templateId root="2.16.840.1.113883.10.20.22.4.32"/>
<code codeSystem="2.16.840.1.113883.6.259" codeSystemName="HealthcareServiceLocation"/>
</participantrole>

Valid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="SDLOC">
<templateId root="2.16.840.1.113883.10.20.22.4.32"/>
<code codeSystem="2.16.840.1.113883.6.259" codeSystemName="HealthcareServiceLocation"/>
<telecom/>
</participantrole>

0.003
Properties »