Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
DrugVehicleTest7000.0222013-01-31T13:34:52JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateDrugVehiclePlayingEntityCode

Constraint

Consol Drug Vehicle This playingEntity SHALL contain exactly one [1..1] code (CONF:7493, CONF:10086)

OCL

not self.playingEntity.oclIsUndefined() implies (self.playingEntity.code.isNullFlavorDefined() or self.playingEntity.code->size() =1)

SuccessInvalid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.24"/>
<code code="412307009" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<playingEntity/>
</participantrole>

Valid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.24"/>
<code code="412307009" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<playingEntity>
<code/>
</playingEntity>
</participantrole>

0.005
testValidateDrugVehiclePlayingEntityName

Constraint

Consol Drug Vehicle This playingEntity MAY contain zero or one [0..1] name (CONF:7494). This playingEntity/name MAY be used for the vehicle name in text, such as Normal Saline (CONF:10087) (CONF:7494, CONF:10087)

OCL

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

SuccessInvalid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.24"/>
<code code="412307009" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<playingEntity/>
</participantrole>

Valid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.24"/>
<code code="412307009" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<playingEntity>
<name/>
</playingEntity>
</participantrole>

0.003
testValidateDrugVehicleTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:7495 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.24"

OCL

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

SuccessInvalid XML


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

Valid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.24"/>
<code code="412307009" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</participantrole>

0.002
testValidateDrugVehicleClassCode

Constraint

Consol Drug Vehicle SHALL contain exactly one [1..1] @classCode="MANU" (CONF:7490)

OCL

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

SuccessInvalid XML


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

Valid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.24"/>
<code code="412307009" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</participantrole>

0.002
testValidateDrugVehicleCode

Constraint

Consol Drug Vehicle SHALL contain exactly one [1..1] code/@code="412307009" (CodeSystem: 2.16.840.1.113883.6.96 SNOMEDCT) (CONF:7491)

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.code = '412307009' and value.codeSystem = '2.16.840.1.113883.6.96')

SuccessInvalid XML


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

Valid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.24"/>
<code code="412307009" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</participantrole>

0.004
testValidateDrugVehiclePlayingEntity

Constraint

Consol Drug Vehicle SHALL contain exactly one [1..1] playingEntity (CONF:7492) Contains exactly one [1..1] CDA Playing Entity

OCL

self.playingEntity->one(playingEntity : cda::PlayingEntity | not playingEntity.oclIsUndefined() and playingEntity.oclIsKindOf(rim::Entity))

SuccessInvalid XML


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

Valid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.24"/>
<code code="412307009" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<playingEntity/>
</participantrole>

0.004
Properties »