Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.ccd.tests.PolicyActivityTest

NameTestsErrorsFailuresTime(s)Time StampHost
PolicyActivityTest19000.1752013-01-31T13:34:17JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidatePolicyActivityPayerEntityIsRequired

Constraint

CCD Policy Activity SHALL satisfy: A policy activity contains exactly one performer [@typeCode='PRF'], representing the payer. (CONF-56)

OCL

self.performer->one(perf : cda::Performer2 | perf.typeCode = vocab::ParticipationPhysicalPerformer::PRF)

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.26"/>
<statusCode code="completed"/>
<performer typeCode="PRF"/>
</act>

0.005
testValidatePolicyActivityCoveredPartyIsRequired

Constraint

CCD Policy Activity SHALL satisfy: A policy activity contains exactly one participant [@typeCode='COV'], representing the covered party. (CONF-58)

OCL

self.participant->one(part : cda::Participant2 | part.typeCode = vocab::ParticipationType::COV)

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.26"/>
<statusCode code="completed"/>
<participant typeCode="COV"/>
</act>

0.004
testValidatePolicyActivityCoveredPartyTime

Constraint

CCD Policy Activity A covered party in a policy activity MAY contain exactly one participant / time, to represent the time period over which the patient is covered. (CONF-62)

OCL

self.participant->one(part : cda::Participant2 | part.typeCode = vocab::ParticipationType::COV implies not part.time.oclIsUndefined())

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.26"/>
<statusCode code="completed"/>
<participant typeCode="COV">
<time/>
</participant>
</act>

0.007
testValidatePolicyActivitySubscriberIsAllowed

Constraint

CCD Policy Activity A policy activity MAY contain exactly one participant [@typeCode='HLD'], representing the subscriber. (CONF-63)

OCL

self.participant->one(part : cda::Participant2 | part.typeCode = vocab::ParticipationType::HLD)

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.26"/>
<statusCode code="completed"/>
<participant typeCode="HLD"/>
</act>

0.005
testValidatePolicyActivitySubscriberTime

Constraint

CCD Policy Activity A subscriber in a policy activity MAY contain exactly one participant / time, to represent the time period for which the subscriber is enrolled. (CONF-65)

OCL

self.participant->one(part : cda::Participant2 | part.typeCode = vocab::ParticipationType::HLD implies not part.time.oclIsUndefined())

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.26"/>
<statusCode code="completed"/>
<participant typeCode="HLD">
<time/>
</participant>
</act>

0.008
testValidatePolicyActivityEntryRelationshipREFR

Constraint

CCD Policy Activity The value for entryRelationship / @typeCode in a policy activity SHALL be 'REFR' 2.16.840.1.113883.5.1002 ActRelationshipType STATIC. (CONF-66)

OCL

self.entryRelationship->forAll(rel : cda::EntryRelationship | rel.typeCode = vocab::x_ActRelationshipEntryRelationship::REFR)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3">
<entryRelationship typeCode="COMP"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.26"/>
<statusCode code="completed"/>
<entryRelationship typeCode="REFR"/>
</act>

0.005
testValidatePolicyActivityEntryRelationshipTarget

Constraint

CCD Policy Activity The target of a policy activity with entryRelationship / @typeCode='REFR' SHALL be an Authorization Activity or an Act, with Act [@classCode = 'ACT'] and Act [@moodCode = 'DEF'], representing a description of the coverage plan. (CONF-67)

OCL

self.entryRelationship->forAll(rel : cda::EntryRelationship | rel.act.oclIsKindOf(ccd::AuthorizationActivity) or rel.act.oclIsKindOf(ccd::CoveragePlanDescription))

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.26"/>
<statusCode code="completed"/>
<entryRelationship>
<act/>
</entryRelationship>
</act>

0.008
testValidatePolicyActivityTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:8900, CONF:10516 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.61"

OCL

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

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
</act>

0.004
testValidatePolicyActivityClassCode

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] @classCode="ACT" Act (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:8898)

OCL

self.classCode=vocab::x_ActClassDocumentEntryAct::ACT

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
</act>

0.004
testValidatePolicyActivityMoodCode

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood) (CONF:8899)

OCL

self.moodCode=vocab::x_DocumentActMood::EVN

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
</act>

0.039
testValidatePolicyActivityId

Constraint

Consol Policy Activity SHALL contain at least one [1..*] id (CONF:8901, CONF:10119)

OCL

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

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<id root="12345678-0"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
</act>

0.010
testValidatePolicyActivityStatusCode

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] statusCode/@code="completed" Completed (CodeSystem: 2.16.840.1.113883.5.14 ActStatus) (CONF:8902)

OCL

(self.statusCode.oclIsUndefined() or self.statusCode.isNullFlavorUndefined()) implies (not self.statusCode.oclIsUndefined() and self.statusCode.oclIsKindOf(datatypes::CS) and let value : datatypes::CS = self.statusCode.oclAsType(datatypes::CS) in value.code = 'completed')

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
</act>

0.017
testValidatePolicyActivityPayerEntity

Constraint

CCD Policy Activity SHALL contain exactly one [1..1] performer (CONF-56) Contains exactly one [1..1] Payer Entity

OCL

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

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.26"/>
<statusCode code="completed"/>
<performer>
<assignedEntity/>
</performer>
</act>

0.009
testValidatePolicyActivityCoveredParty

Constraint

CCD Policy Activity SHALL contain exactly one [1..1] participant (CONF-58) Contains exactly one [1..1] Covered Party

OCL

self.participant->one(participant : cda::Participant2 | not participant.participantRole.oclIsUndefined() and participant.participantRole.oclIsKindOf(cda::ParticipantRole))

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.26"/>
<statusCode code="completed"/>
<participant>
<participantRole/>
</participant>
</act>

0.008
testValidatePolicyActivitySubscriber

Constraint

CCD Policy Activity MAY contain exactly one [1..1] participant (CONF-63) Contains exactly one [1..1] Policy Subscriber

OCL

self.participant->one(participant : cda::Participant2 | not participant.participantRole.oclIsUndefined() and participant.participantRole.oclIsKindOf(cda::ParticipantRole))

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.26"/>
<statusCode code="completed"/>
<participant>
<participantRole/>
</participant>
</act>

0.008
testGetPayerEntity

Constraint

OCL

SuccessInvalid XML

Valid XML

0.010
testGetCoveredParty

Constraint

OCL

SuccessInvalid XML

Valid XML

0.009
testGetSubscriber

Constraint

OCL

SuccessInvalid XML

Valid XML

0.009
Properties »