Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
PhysicianReadingStudyPerformerTest10000.0302013-01-31T13:35:39JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidatePhysicianReadingStudyPerformerTemplateId

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


<performer1 xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.6.2.1"/>
</performer1>

0.002
testValidatePhysicianReadingStudyPerformerTime

Constraint

Consol Physician Reading Study Performer MAY contain zero or one [0..1] time (CONF:8425)

OCL

(self.time.oclIsUndefined() or self.time.isNullFlavorUndefined()) implies (not self.time.oclIsUndefined())

SuccessInvalid XML


<performer1 xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.6.2.1"/>
</performer1>

Valid XML


<performer1 xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.6.2.1"/>
<time/>
</performer1>

0.002
testValidatePhysicianReadingStudyPerformerTypeCode

Constraint

Consol Physician Reading Study Performer SHALL contain exactly one [1..1] @typeCode (CONF:8424)

OCL

isDefined('typeCode')

SuccessInvalid XML


<performer1 xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.6.2.1"/>
</performer1>

Valid XML


<performer1 xmlns="urn:hl7-org:v3" typeCode="PPRF">
<templateId root="2.16.840.1.113883.10.20.6.2.1"/>
</performer1>

0.002
testValidatePhysicianReadingStudyPerformerAssignedEntity

Constraint

Consol Physician Reading Study Performer SHALL contain exactly one [1..1] assignedEntity (CONF:8426)

OCL

self.assignedEntity->one(assignedEntity : cda::AssignedEntity | not assignedEntity.oclIsUndefined() and assignedEntity.oclIsKindOf(cda::AssignedEntity))

SuccessInvalid XML


<performer1 xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.6.2.1"/>
</performer1>

Valid XML


<performer1 xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.6.2.1"/>
<assignedEntity/>
</performer1>

0.002
testValidatePhysicianReadingStudyPerformerAssignedEntityHasNationalProviderId

Constraint

Consol Physician Reading Study Performer SHALL contain exactly one [1..1] assignedEntity (CONF:8426) assignedEntity The id SHOULD include zero or one [0..1] id where id/@root ="2.16.840.1.113883.4.6" National Provider Identifier (CONF:10034)

OCL

self.assignedEntity->excluding(null)->reject(id->exists( root='2.16.840.1.113883.4.6' ))

SuccessInvalid XML


<performer1 xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.6.2.1"/>
<assignedEntity>
<id/>
</assignedEntity>
</performer1>

Valid XML


<performer1 xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.6.2.1"/>
<assignedEntity>
<id root="2.16.840.1.113883.4.6"/>
</assignedEntity>
</performer1>

0.004
testValidatePhysicianReadingStudyPerformerAssignedEntityHasDICOM

Constraint

Consol Physician Reading Study Performer SHALL contain exactly one [1..1] assignedEntity (CONF:8426) assignedEntity SHALL contain a valid DICOM personal identification code sequence (@codeSystem is 1.2.840.10008.2.16.4) or an appropriate national health care provider coding system (e.g., NUCC in the U.S., where @code is 2.16.840.1.113883.6.101).

OCL

self.assignedEntity->excluding(null)->reject(code.codeSystem = '1.2.840.10008.2.16.4' or code.codeSystem = '2.16.840.1.113883.6.101')

SuccessInvalid XML


<performer1 xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.6.2.1"/>
<assignedEntity>
<code/>
</assignedEntity>
</performer1>

Valid XML


<performer1 xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.6.2.1"/>
<assignedEntity>
<code code="test" codeSystem="1.2.840.10008.2.16.4"/>
</assignedEntity>
</performer1>

0.003
testValidatePhysicianReadingStudyPerformerAssignedEntityHasAssignedPersonOrRepresentedOrganization

Constraint

Consol Physician Reading Study Performer SHALL contain exactly one [1..1] assignedEntity (CONF:8426) assignedEntity Every assignedEntity element SHALL have at least one assignedPerson or representedOrganization. (CONF:8429)

OCL

self.assignedEntity->excluding(null)->reject(not assignedPerson->isEmpty() or not representedOrganization->isEmpty())

SuccessInvalid XML


<performer1 xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.6.2.1"/>
<assignedEntity/>
</performer1>

Valid XML


<performer1 xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.6.2.1"/>
<assignedEntity>
<assignedPerson/>
</assignedEntity>
</performer1>

0.003
testValidatePhysicianReadingStudyPerformerAssignedEntityCode

Constraint

Consol Physician Reading Study Performer SHALL contain exactly one [1..1] assignedEntity (CONF:8426) assignedEntity SHALL contain exactly one [1..1] code (CONF:8888)

OCL

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

SuccessInvalid XML


<performer1 xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.6.2.1"/>
<assignedEntity/>
</performer1>

Valid XML


<performer1 xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.6.2.1"/>
<assignedEntity>
<code code="test" codeSystem="1.2.840.10008.2.16.4"/>
</assignedEntity>
</performer1>

0.003
testValidatePhysicianReadingStudyPerformerAssignedEntityId

Constraint

Consol Physician Reading Study Performer SHALL contain exactly one [1..1] assignedEntity (CONF:8426) assignedEntity SHALL contain at least one [1..*] id (CONF:8887)

OCL

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

SuccessInvalid XML


<performer1 xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.6.2.1"/>
<assignedEntity/>
</performer1>

Valid XML


<performer1 xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.6.2.1"/>
<assignedEntity>
<id root="2.16.840.1.113883.4.6"/>
</assignedEntity>
</performer1>

0.004
Properties »