Unit Test Results.

Designed for use with JUnit and Ant.

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

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

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
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.020
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.008
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.005
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.005
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.024
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.026
testValidateAuthorizationActivityEntryRelationshipHasClinicalStatement

Constraint

Consol Authorization Activity SHALL contain exactly one [1..1] entryRelationship (CONF:8948) entryRelationship The target of an authorization activity with act/entryRelationship/@typeCode="SUBJ" SHALL be a clinical statement with moodCode="PRMS" Promise (CONF:8951).

OCL

self.entryRelationship->excluding(null)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::SUBJ)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::SUBJ)->reject(act->exists(moodCode = vocab::x_DocumentActMood::PRMS) or encounter->exists(moodCode = vocab::x_DocumentEncounterMood::PRMS) or observation->exists(moodCode = vocab::x_ActMoodDocumentObservation::PRMS) or observationMedia->exists(moodCode = vocab::ActMood::PRMS) or organizer->exists(moodCode = vocab::ActMood::PRMS) or procedure->exists(moodCode = vocab::x_DocumentProcedureMood::PRMS) or regionOfInterest->exists(moodCode = vocab::ActMood::PRMS) or substanceAdministration->exists(moodCode = vocab::x_DocumentSubstanceMood::PRMS) or supply->exists(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 typeCode="SUBJ">
<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 typeCode="SUBJ">
<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 typeCode="SUBJ">
<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 typeCode="SUBJ">
<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 typeCode="SUBJ">
<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 typeCode="SUBJ">
<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 typeCode="SUBJ">
<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 typeCode="SUBJ">
<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 typeCode="SUBJ">
<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 typeCode="SUBJ">
<act moodCode="PRMS">
<performer/>
</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 typeCode="SUBJ">
<encounter moodCode="PRMS">
<performer/>
</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 typeCode="SUBJ">
<observation moodCode="PRMS">
<performer/>
</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 typeCode="SUBJ">
<observationMedia moodCode="PRMS">
<performer/>
</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 typeCode="SUBJ">
<organizer moodCode="PRMS">
<performer/>
</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 typeCode="SUBJ">
<procedure moodCode="PRMS">
<performer/>
</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 typeCode="SUBJ">
<regionOfInterest moodCode="PRMS">
<performer/>
</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 typeCode="SUBJ">
<substanceAdministration moodCode="PRMS">
<performer/>
</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 typeCode="SUBJ">
<supply moodCode="PRMS">
<performer/>
</supply>
</entryRelationship>
</act>

0.132
testValidateAuthorizationActivityEntryRelationshipHasAuthorizedPerformers

Constraint

Consol Authorization Activity SHALL contain exactly one [1..1] entryRelationship (CONF:8948) entryRelationship The target of an authorization activity MAY contain one or more performer, to indicate the providers that have been authorized to provide treatment. (CONF:8952)

OCL

self.entryRelationship->excluding(null)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::SUBJ)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::SUBJ)->reject(act->forAll( (moodCode = vocab::x_DocumentActMood::PRMS and performer->size() > 0) or moodCode <> vocab::x_DocumentActMood::PRMS ) and encounter->forAll((moodCode = vocab::x_DocumentEncounterMood::PRMS and performer->size() > 0) or moodCode <> vocab::x_DocumentEncounterMood::PRMS) and observation->forAll((moodCode = vocab::x_ActMoodDocumentObservation::PRMS and performer->size() > 0) or moodCode <> vocab::x_ActMoodDocumentObservation::PRMS) and observationMedia->forAll((moodCode = vocab::ActMood::PRMS and performer->size() > 0) or moodCode <> vocab::ActMood::PRMS) and organizer->forAll((moodCode = vocab::ActMood::PRMS and performer->size() > 0) or moodCode <> vocab::ActMood::PRMS) and procedure->forAll((moodCode = vocab::x_DocumentProcedureMood::PRMS and performer->size() > 0) or moodCode <> vocab::x_DocumentProcedureMood::PRMS) and regionOfInterest->forAll((moodCode = vocab::ActMood::PRMS and performer->size() > 0) or moodCode <> vocab::ActMood::PRMS) and substanceAdministration->forAll((moodCode = vocab::x_DocumentSubstanceMood::PRMS and performer->size() > 0) or moodCode <> vocab::x_DocumentSubstanceMood::PRMS) and supply->forAll((moodCode = vocab::x_DocumentSubstanceMood::PRMS and performer->size() > 0) or 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 typeCode="SUBJ">
<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 typeCode="SUBJ">
<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 typeCode="SUBJ">
<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 typeCode="SUBJ">
<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 typeCode="SUBJ">
<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 typeCode="SUBJ">
<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 typeCode="SUBJ">
<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 typeCode="SUBJ">
<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 typeCode="SUBJ">
<supply moodCode="PRMS"/>
</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 typeCode="SUBJ">
<act moodCode="PRMS">
<performer/>
</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 typeCode="SUBJ">
<encounter moodCode="PRMS">
<performer/>
</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 typeCode="SUBJ">
<observation moodCode="PRMS">
<performer/>
</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 typeCode="SUBJ">
<observationMedia moodCode="PRMS">
<performer/>
</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 typeCode="SUBJ">
<organizer moodCode="PRMS">
<performer/>
</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 typeCode="SUBJ">
<procedure moodCode="PRMS">
<performer/>
</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 typeCode="SUBJ">
<regionOfInterest moodCode="PRMS">
<performer/>
</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 typeCode="SUBJ">
<substanceAdministration moodCode="PRMS">
<performer/>
</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 typeCode="SUBJ">
<supply moodCode="PRMS">
<performer/>
</supply>
</entryRelationship>
</act>

0.319
Properties »