Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
ProductInstanceTest8000.0472013-01-31T13:36:13JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testValidateProductInstanceTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:7901, CONF:10522 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.37"

OCL

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

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.37"/>
</participantrole>

0.003
testValidateProductInstanceClassCode

Constraint

Consol Product Instance SHALL contain exactly one [1..1] @classCode="MANU" (CONF:7900)

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.37"/>
</participantrole>

0.003
testValidateProductInstanceId

Constraint

Consol Product Instance SHALL contain at least one [1..*] id (CONF:7902)

OCL

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

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.37"/>
<id/>
</participantrole>

0.003
testValidateProductInstanceScopingEntity

Constraint

Consol Product Instance SHALL contain exactly one [1..1] scopingEntity (CONF:7905)

OCL

self.scopingEntity->one(scopingEntity : cda::Entity | not scopingEntity.oclIsUndefined() and scopingEntity.oclIsKindOf(cda::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.37"/>
<scopingEntity/>
</participantrole>

0.002
testValidateProductInstancePlayingDevice

Constraint

Consol Product Instance SHALL contain exactly one [1..1] playingDevice (CONF:7903)

OCL

self.playingDevice->one(playingDevice : cda::Device | not playingDevice.oclIsUndefined() and playingDevice.oclIsKindOf(cda::Device))

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.37"/>
<playingDevice/>
</participantrole>

0.025
testValidateProductInstanceScopingEntityId

Constraint

Consol Product Instance SHALL contain exactly one [1..1] scopingEntity (CONF:7905) scopingEntity SHALL contain at least one [1..*] id (CONF:7908)

OCL

self.scopingEntity->excluding(null)->reject((id->isEmpty() or id->exists(element | element.isNullFlavorUndefined())) implies (not id->isEmpty()))

SuccessInvalid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.37"/>
<scopingEntity/>
</participantrole>

Valid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.37"/>
<scopingEntity>
<id/>
</scopingEntity>
</participantrole>

0.005
testValidateProductInstancePlayingDeviceCode

Constraint

Consol Product Instance SHALL contain exactly one [1..1] playingDevice (CONF:7903) playingDevice SHOULD contain zero or one [0..1] code (CONF:7904)

OCL

self.playingDevice->excluding(null)->reject((code.oclIsUndefined() or code.isNullFlavorUndefined()) implies (not code.oclIsUndefined()))

SuccessInvalid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.37"/>
<playingDevice/>
</participantrole>

Valid XML


<participantrole xmlns="urn:hl7-org:v3" classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.37"/>
<playingDevice>
<code/>
</playingDevice>
</participantrole>

0.004
Properties »