Unit Test Results.

Designed for use with JUnit and Ant.

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

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

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidatePhysicianofRecordParticipantTemplateId

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


<encounterparticipant xmlns="urn:hl7-org:v3" typeCode="ATND">
<templateId root="2.16.840.1.113883.10.20.6.2.2"/>
</encounterparticipant>

0.002
testValidatePhysicianofRecordParticipantTypeCode

Constraint

Consol Physicianof Record Participant SHALL contain exactly one [1..1] @typeCode="ATND" (CONF:8881)

OCL

self.typeCode=vocab::x_EncounterParticipant::ATND

SuccessInvalid XML


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

Valid XML


<encounterparticipant xmlns="urn:hl7-org:v3" typeCode="ATND">
<templateId root="2.16.840.1.113883.10.20.6.2.2"/>
</encounterparticipant>

0.001
testValidatePhysicianofRecordParticipantAssignedEntity

Constraint

Consol Physicianof Record Participant SHALL contain exactly one [1..1] assignedEntity (CONF:8886)

OCL

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

SuccessInvalid XML


<encounterparticipant xmlns="urn:hl7-org:v3" typeCode="ATND">
<templateId root="2.16.840.1.113883.10.20.6.2.2"/>
</encounterparticipant>

Valid XML


<encounterparticipant xmlns="urn:hl7-org:v3" typeCode="ATND">
<templateId root="2.16.840.1.113883.10.20.6.2.2"/>
<assignedEntity/>
</encounterparticipant>

0.002
testValidatePhysicianofRecordParticipantAssignedEntityAssignedPersonName

Constraint

Consol Physicianof Record Participant SHALL contain exactly one [1..1] assignedEntity (CONF:8886) each SHOULD contain zero or one [0..1] assignedPerson, where assignedPerson SHOULD contain zero or one [0..1] name (CONF:8890)

OCL

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

SuccessInvalid XML


<encounterparticipant xmlns="urn:hl7-org:v3" typeCode="ATND">
<templateId root="2.16.840.1.113883.10.20.6.2.2"/>
<assignedEntity>
<assignedPerson/>
</assignedEntity>
</encounterparticipant>

Valid XML


<encounterparticipant xmlns="urn:hl7-org:v3" typeCode="ATND">
<templateId root="2.16.840.1.113883.10.20.6.2.2"/>
<assignedEntity>
<assignedPerson>
<name/>
</assignedPerson>
</assignedEntity>
</encounterparticipant>

0.004
testValidatePhysicianofRecordParticipantAssignedEntityHasDICOMOrNUCCCode

Constraint

Consol Physicianof Record Participant SHALL contain exactly one [1..1] assignedEntity (CONF:8886) assignedEntity SHALL contain a valid DICOM Organizational Role from DICOM CID 7452 (Value Set 1.2.840.10008.6.1.516)(@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 @codeSystem is 2.16.840.1.113883.6.101) (CONF:8889).

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


<encounterparticipant xmlns="urn:hl7-org:v3" typeCode="ATND">
<templateId root="2.16.840.1.113883.10.20.6.2.2"/>
<assignedEntity>
<code/>
</assignedEntity>
</encounterparticipant>

Valid XML


<encounterparticipant xmlns="urn:hl7-org:v3" typeCode="ATND">
<templateId root="2.16.840.1.113883.10.20.6.2.2"/>
<assignedEntity>
<code code="test" codeSystem="1.2.840.10008.2.16.4"/>
</assignedEntity>
</encounterparticipant>

0.003
testValidatePhysicianofRecordParticipantAssignedEntityHasNationalProviderId

Constraint

Consol Physicianof Record Participant SHALL contain exactly one [1..1] assignedEntity (CONF:8886) 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


<encounterparticipant xmlns="urn:hl7-org:v3" typeCode="ATND">
<templateId root="2.16.840.1.113883.10.20.6.2.2"/>
<assignedEntity>
<id/>
</assignedEntity>
</encounterparticipant>

Valid XML


<encounterparticipant xmlns="urn:hl7-org:v3" typeCode="ATND">
<templateId root="2.16.840.1.113883.10.20.6.2.2"/>
<assignedEntity>
<id root="2.16.840.1.113883.4.6"/>
</assignedEntity>
</encounterparticipant>

0.003
testValidatePhysicianofRecordParticipantAssignedEntityCode

Constraint

Consol Physicianof Record Participant SHALL contain exactly one [1..1] assignedEntity (CONF:8886) 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


<encounterparticipant xmlns="urn:hl7-org:v3" typeCode="ATND">
<templateId root="2.16.840.1.113883.10.20.6.2.2"/>
<assignedEntity/>
</encounterparticipant>

Valid XML


<encounterparticipant xmlns="urn:hl7-org:v3" typeCode="ATND">
<templateId root="2.16.840.1.113883.10.20.6.2.2"/>
<assignedEntity>
<code code="test" codeSystem="1.2.840.10008.2.16.4"/>
</assignedEntity>
</encounterparticipant>

0.003
testValidatePhysicianofRecordParticipantAssignedEntityId

Constraint

Consol Physicianof Record Participant SHALL contain exactly one [1..1] assignedEntity (CONF:8886) 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


<encounterparticipant xmlns="urn:hl7-org:v3" typeCode="ATND">
<templateId root="2.16.840.1.113883.10.20.6.2.2"/>
<assignedEntity/>
</encounterparticipant>

Valid XML


<encounterparticipant xmlns="urn:hl7-org:v3" typeCode="ATND">
<templateId root="2.16.840.1.113883.10.20.6.2.2"/>
<assignedEntity>
<id/>
</assignedEntity>
</encounterparticipant>

0.004
testValidatePhysicianofRecordParticipantAssignedEntityAssignedPerson

Constraint

Consol Physicianof Record Participant SHALL contain exactly one [1..1] assignedEntity (CONF:8886) assignedEntity SHALL contain exactly one [1..1] assignedPerson, where its type is Person (CONF:5624)

OCL

self.assignedEntity->excluding(null)->reject(assignedPerson->one(assignedPerson : cda::Person | not assignedPerson.oclIsUndefined() and assignedPerson.oclIsKindOf(cda::Person)))

SuccessInvalid XML


<encounterparticipant xmlns="urn:hl7-org:v3" typeCode="ATND">
<templateId root="2.16.840.1.113883.10.20.6.2.2"/>
<assignedEntity/>
</encounterparticipant>

Valid XML


<encounterparticipant xmlns="urn:hl7-org:v3" typeCode="ATND">
<templateId root="2.16.840.1.113883.10.20.6.2.2"/>
<assignedEntity>
<assignedPerson/>
</assignedEntity>
</encounterparticipant>

0.003
Properties »