Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
AuthorizationActivityTest9000.1292013-01-31T13:34:12JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateAuthorizationActivityEntryRelationshipTypeCode

Constraint

OCL

self.entryRelationship->excluding(null)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::SUBJ)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::SUBJ)->reject(typeCode=vocab::x_ActRelationshipEntryRelationship::SUBJ)

SuccessInvalid XML


Skip Fail Test

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.19"/>
<entryRelationship typeCode="SUBJ"/>
</act>

0.006
testValidateAuthorizationActivityEntryRelationshipTarget

Constraint

CCD Authorization Activity The target of an authorization activity with Act / entryRelationship / @typeCode="SUBJ" SHALL be a clinical statement with moodCode = "PRMS" (Promise) (CONF-75)

OCL

self.entryRelationship->forAll(act.moodCode = vocab::x_DocumentActMood::PRMS) or self.entryRelationship->forAll(encounter.moodCode = vocab::x_DocumentEncounterMood::PRMS) or self.entryRelationship->forAll(observation.moodCode = vocab::x_ActMoodDocumentObservation::PRMS) or self.entryRelationship->forAll(observationMedia.moodCode = vocab::ActMood::PRMS) or self.entryRelationship->forAll(organizer.moodCode = vocab::ActMood::PRMS) or self.entryRelationship->forAll(procedure.moodCode = vocab::x_DocumentProcedureMood::PRMS) or self.entryRelationship->forAll(regionOfInterest.moodCode = vocab::ActMood::PRMS) or self.entryRelationship->forAll(substanceAdministration.moodCode = vocab::x_DocumentSubstanceMood::PRMS) or self.entryRelationship->forAll(supply.moodCode = vocab::x_DocumentSubstanceMood::PRMS)

SuccessInvalid XML


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

<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.19"/>
<entryRelationship>
<encounter/>
</entryRelationship>
</act>

<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.19"/>
<entryRelationship>
<observation/>
</entryRelationship>
</act>

<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.19"/>
<entryRelationship>
<observationMedia/>
</entryRelationship>
</act>

<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.19"/>
<entryRelationship>
<organizer/>
</entryRelationship>
</act>

<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.19"/>
<entryRelationship>
<procedure/>
</entryRelationship>
</act>

<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.19"/>
<entryRelationship>
<regionOfInterest/>
</entryRelationship>
</act>

<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.19"/>
<entryRelationship>
<substanceAdministration/>
</entryRelationship>
</act>

<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.19"/>
<entryRelationship>
<supply/>
</entryRelationship>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.19"/>
<entryRelationship>
<act moodCode="PRMS"/>
</entryRelationship>
</act>

<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.19"/>
<entryRelationship>
<encounter moodCode="PRMS"/>
</entryRelationship>
</act>

<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.19"/>
<entryRelationship>
<observation moodCode="PRMS"/>
</entryRelationship>
</act>

<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.19"/>
<entryRelationship>
<observationMedia moodCode="PRMS"/>
</entryRelationship>
</act>

<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.19"/>
<entryRelationship>
<organizer moodCode="PRMS"/>
</entryRelationship>
</act>

<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.19"/>
<entryRelationship>
<procedure moodCode="PRMS"/>
</entryRelationship>
</act>

<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.19"/>
<entryRelationship>
<regionOfInterest moodCode="PRMS"/>
</entryRelationship>
</act>

<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.19"/>
<entryRelationship>
<substanceAdministration moodCode="PRMS"/>
</entryRelationship>
</act>

<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.19"/>
<entryRelationship>
<supply moodCode="PRMS"/>
</entryRelationship>
</act>

0.055
testValidateAuthorizationActivityHasPerformers

Constraint

CCD Authorization Activity The target of an authorization activity MAY contain one or more performer, to indicate the providers that have been authorized to provide treatment (CONF-76)

OCL

self.entryRelationship->forAll(not act.performer->isEmpty() ) or self.entryRelationship->forAll(not encounter.performer->isEmpty()) or self.entryRelationship->forAll(not observation.performer->isEmpty()) or self.entryRelationship->forAll(not observationMedia.performer->isEmpty()) or self.entryRelationship->forAll(not organizer.performer->isEmpty()) or self.entryRelationship->forAll(not procedure.performer->isEmpty()) or self.entryRelationship->forAll(not regionOfInterest.performer->isEmpty()) or self.entryRelationship->forAll(not substanceAdministration.performer->isEmpty()) or self.entryRelationship->forAll(not supply.performer->isEmpty())

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.19"/>
<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.19"/>
<entryRelationship>
<act>
<performer/>
</act>
</entryRelationship>
</act>

0.033
testValidateAuthorizationActivityTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:8946, CONF:10529 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.1.19"

OCL

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

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.19"/>
</act>

0.005
testValidateAuthorizationActivityClassCode

Constraint

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

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.1.19"/>
</act>

0.004
testValidateAuthorizationActivityMoodCode

Constraint

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

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.1.19"/>
</act>

0.003
testValidateAuthorizationActivityId

Constraint

Consol Authorization Activity SHALL contain exactly one [1..1] id (CONF:8947)

OCL

(self.id->isEmpty() or self.id->exists(element | element.isNullFlavorUndefined())) implies (self.id->size() = 1)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.19"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.19"/>
<id/>
</act>

0.006
testValidateAuthorizationActivityEntryRelationship

Constraint

Consol Authorization Activity SHALL contain exactly one [1..1] entryRelationship (CONF:8948)

OCL

self.entryRelationship->select(entryRelationship : cda::EntryRelationship | not entryRelationship.oclIsUndefined() and entryRelationship.oclIsKindOf(cda::EntryRelationship))->select(typeCode=vocab::x_ActRelationshipEntryRelationship::SUBJ)->size() = 1

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.19"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.19"/>
<entryRelationship typeCode="SUBJ"/>
</act>

0.011
Properties »