Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
ProcedureActivityActTest43002.4912013-01-31T13:35:57JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateProcedureActivityActTemplateId

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
</act>

0.017
testValidateProcedureActivityActMoodCode

Constraint

Consol Procedure Activity Act SHALL contain exactly one [1..1] @moodCode, where the @code SHALL be selected from ValueSet MoodCodeEvnInt 2.16.840.1.113883.11.20.9.18 STATIC 2011-04-03 (CONF:8290)

OCL

not self.moodCode.oclIsUndefined() and self.moodCode.oclIsKindOf(vocab::x_DocumentActMood) and let value : vocab::x_DocumentActMood = self.moodCode.oclAsType(vocab::x_DocumentActMood) in value = vocab::x_DocumentActMood::EVN or value = vocab::x_DocumentActMood::INT

SuccessInvalid XML


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

Valid XML


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

0.053
testValidateProcedureActivityActCode

Constraint

Consol Procedure Activity Act SHALL contain exactly one [1..1] code (CONF:8293)

OCL

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

SuccessInvalid XML


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

Valid XML


<act xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<code xsi:type="CE"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
</act>

0.038
testValidateProcedureActivityActEffectiveTime

Constraint

Consol Procedure Activity Act SHOULD contain zero or one [0..1] effectiveTime (CONF:8299)

OCL

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

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<effectiveTime/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
</act>

0.047
testValidateProcedureActivityActId

Constraint

Consol Procedure Activity Act SHALL contain at least one [1..*] id (CONF:8292)

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">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<id/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
</act>

0.043
testValidateProcedureActivityActMedicationActivity

Constraint

Consol Procedure Activity Act MAY contain zero or one [0..1] entryRelationship (CONF:8329) Contains @typeCode="COMP" COMP, and Contains exactly one [1..1] Medication Activity (templateId: 2.16.840.1.113883.10.20.22.4.16)

OCL

self.entryRelationship->one(entryRelationship : cda::EntryRelationship | not entryRelationship.substanceAdministration.oclIsUndefined() and entryRelationship.substanceAdministration.oclIsKindOf(consol::MedicationActivity) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::COMP)

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<entryRelationship typeCode="COMP">
<substanceAdministration/>
</entryRelationship>
</act>

0.043
testGetMedicationActivity

Constraint

OCL

SuccessInvalid XML

Valid XML

0.042
testGetServiceDeliveryLocations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.038
testGetIndications

Constraint

OCL

SuccessInvalid XML

Valid XML

0.036
testGetInstructions

Constraint

OCL

SuccessInvalid XML

Valid XML

0.043
testValidateProcedureActivityActCodeCodeSystems

Constraint

Consol Procedure Activity Act code in a procedure activity observation SHOULD be selected from LOINC (CodeSystem: 2.16.840.1.113883.6.1) or SNOMED CT (CodeSystem: 2.16.840.1.113883.6.96) (CONF:8294)

OCL

self.code.isNullFlavorDefined() or self.code.codeSystem = '2.16.840.1.113883.6.1' xor self.code.codeSystem = '2.16.840.1.113883.6.96'

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<code codeSystem="2.16.840.1.113883.6.96"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
</act>

0.039
testValidateProcedureActivityActCodeOriginalText

Constraint

Consol Procedure Activity Act code SHOULD contain zero or one [0..1] originalText (CONF:15596)

OCL

not code.oclIsUndefined() implies not code.originalText.oclIsUndefined()

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<code/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<code>
<originalText/>
</code>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
</act>

0.047
testValidateProcedureActivityActOriginalTextReference

Constraint

Consol Procedure Activity Act originalText, if present, SHOULD contain zero or one [0..1] reference (CONF:15596)

OCL

not self.code.originalText.oclIsUndefined() implies self.code.originalText->one(reference->size() = 1)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<code>
<originalText/>
</code>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<code>
<originalText><reference value="test"/></originalText>
</code>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
</act>

0.047
testValidateProcedureActivityActOriginalTextReferenceValue

Constraint

Consol Procedure Activity Act reference, if present, MAY contain zero or one [0..1] @value (CONF:15597)

OCL

self.code.originalText.reference->size() = 1 implies self.code.originalText.reference.value->size() = 1

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<code>
<originalText><reference/></originalText>
</code>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<code>
<originalText><reference value="test"/></originalText>
</code>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
</act>

0.052
testValidateProcedureActivityActReferenceValue

Constraint

Consol Procedure Activity Act reference/@value SHALL begin with a '#' and SHALL point to its corresponding narrative (using the approach defined in CDA Release 2, section 4.3.5.1) (CONF:15598)

OCL

not self.code.originalText.reference.value.oclIsUndefined() implies not self.getSection().text.getText(self.code.originalText.reference.value.substring(2, self.code.originalText.reference.value.size())).oclIsUndefined()

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.2.5"/>
<code code="10210-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="GENERAL STATUS"/>
<text><content ID="">
No particular procedure enacted.
</content></text>
<entry>
<act classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<code>
<originalText>Some sample text<reference value="#1.2.3.4"/></originalText>
</code>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
</act>
</entry>
</section>

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.2.5"/>
<code code="10210-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="GENERAL STATUS"/>
<text><content ID="1.2.3.4">
No particular procedure enacted.
</content></text>
<entry>
<act classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<code>
<originalText>Some sample text<reference value="#1.2.3.4"/></originalText>
</code>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
</act>
</entry>
</section>

0.082
testValidateProcedureActivityActEncounterInversion

Constraint

Consol Procedure Activity Act entryRelationship with target class encounter SHALL contain exactly one [1..1] @inversionInd="true" (CONF:8316)

OCL

self.entryRelationship->select(er : cda::EntryRelationship | er.encounter->size() > 0)->forAll(ent : cda::EntryRelationship | ent.inversionInd=true)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<entryRelationship>
<encounter/>
</entryRelationship>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<entryRelationship/>
</act>

0.031
testValidateProcedureActivityActServiceDeliveryLocationTypeCode

Constraint

Consol Procedure Activity Act participant with target class Service Delivery Location SHALL contain exactly one [1..1] @typeCode="LOC" Location (CodeSystem: 2.16.840.1.113883.5.1002 HL7ActRelationshipType) STATIC (CONF:8312)

OCL

self.participant->select(par : cda::Participant2 | par.participantRole.oclIsKindOf(consol::ServiceDeliveryLocation))->forAll(p : cda::Participant2 | p.typeCode=vocab::ParticipationType::LOC)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<participant>
<participantRole/>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<participant typeCode="LOC">
<participantRole/>
</participant>
</act>

0.019
testValidateProcedureActivityActInstructionsInversion

Constraint

Consol Procedure Activity Act entryRelationship with target class Instructions SHALL contain exactly one [1..1] @inversionInd="true" (CONF:8324)

OCL

self.entryRelationship->select(er : cda::EntryRelationship | er.act.oclIsTypeOf(consol::Instructions))->forAll(ent : cda::EntryRelationship | ent.inversionInd=true)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<entryRelationship>
<act/>
</entryRelationship>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<entryRelationship/>
</act>

0.023
testValidateProcedureActivityActClassCode

Constraint

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

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">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
</act>

0.008
testValidateProcedureActivityActStatusCode

Constraint

Consol Procedure Activity Act SHALL contain zero or one [0..1] statusCode, where the @code SHALL be selected from ValueSet ProcedureActStatusCode 2.16.840.1.113883.11.20.9.22 DYNAMIC (CONF:8298)

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' or value.code = 'active' or value.code = 'aborted' or value.code = 'cancelled')

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<statusCode code="completed" codeSystem="2.16.840.1.113883.5.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
</act>

0.142
testValidateProcedureActivityActPriorityCode

Constraint

Consol Procedure Activity Act MAY contain zero or one [0..1] priorityCode, where the @code SHALL be selected from ValueSet ActPriority 2.16.840.1.113883.1.11.16866 STATIC (CONF:8300)

OCL

(self.priorityCode.oclIsUndefined() or self.priorityCode.isNullFlavorUndefined()) implies (not self.priorityCode.oclIsUndefined() and self.priorityCode.oclIsKindOf(datatypes::CE) and let value : datatypes::CE = self.priorityCode.oclAsType(datatypes::CE) in value.codeSystem = '2.16.840.1.113883.5.7' and (value.code = 'A' or value.code = 'CR' or value.code = 'CS' or value.code = 'CSP' or value.code = 'CSR' or value.code = 'EL' or value.code = 'EM' or value.code = 'P' or value.code = 'PRN' or value.code = 'R' or value.code = 'RR' or value.code = 'S' or value.code = 'T' or value.code = 'UD' or value.code = 'UR'))

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode code="A" codeSystem="2.16.840.1.113883.5.7"/>
</act>

0.312
testValidateProcedureActivityActPriorityCodeP

Constraint

Consol Procedure Activity Act MAY contain zero or one [0..1] priorityCode, where the @code SHALL be selected from ValueSet ActPriority 2.16.840.1.113883.1.11.16866 STATIC (CONF:8300)

OCL

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

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode code="aaa" codeSystem="bbb"/>
</act>

0.041
testValidateProcedureActivityActPerformer

Constraint

Consol Procedure Activity Act SHOULD contain zero or more [0..*] performer (CONF:8301)

OCL

self.performer->exists(performer : cda::Performer2 | not performer.oclIsUndefined() and performer.oclIsKindOf(cda::Performer2))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<performer/>
</act>

0.027
testValidateProcedureActivityActServiceDeliveryLocation

Constraint

Consol Procedure Activity Act MAY contain zero or more [0..*] participant (CONF:8311, CONF:8312, CONF:15599) Contains exactly one [1..1] Service Delivery Location (templateId: 2.16.840.1.113883.10.20.22.4.32)

OCL

self.participant->exists(participant : cda::Participant2 | not participant.participantRole.oclIsUndefined() and participant.participantRole.oclIsKindOf(consol::ServiceDeliveryLocation))

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<participant>
<participantRole/>
</participant>
</act>

0.031
testValidateProcedureActivityActInstructions

Constraint

Consol Procedure Activity Act MAY contain zero or one [0..1] entryRelationship (CONF:8325) Contains @typeCode="SUBJ" SUBJ, and Contains exactly one [1..1] Instructions (templateId: 2.16.840.1.113883.10.20.22.4.20)

OCL

self.entryRelationship->one(entryRelationship : cda::EntryRelationship | not entryRelationship.act.oclIsUndefined() and entryRelationship.act.oclIsKindOf(consol::Instructions) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::SUBJ)

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<entryRelationship typeCode="SUBJ">
<act/>
</entryRelationship>
</act>

0.043
testValidateProcedureActivityActIndication

Constraint

Consol Procedure Activity Act MAY contain zero or more [0..*] entryRelationship (CONF:8328) Contains @typeCode="RSON" RSON, and Contains exactly one [1..1] Indication (templateId: 2.16.840.1.113883.10.20.22.4.19)

OCL

self.entryRelationship->exists(entryRelationship : cda::EntryRelationship | not entryRelationship.observation.oclIsUndefined() and entryRelationship.observation.oclIsKindOf(consol::Indication) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::RSON)

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<entryRelationship typeCode="RSON">
<observation/>
</entryRelationship>
</act>

0.043
testValidateProcedureActivityActEntryRelationship

Constraint

Consol Procedure Activity Act MAY contain zero or more [0..*] entryRelationship (CONF:8314)

OCL

self.entryRelationship->select(entryRelationship : cda::EntryRelationship | not entryRelationship.oclIsUndefined() and entryRelationship.oclIsKindOf(cda::EntryRelationship))->select(typeCode=vocab::x_ActRelationshipEntryRelationship::COMP and not encounter.oclIsUndefined() and encounter.oclIsKindOf(cda::Encounter))->notEmpty()

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<entryRelationship typeCode="COMP">
<encounter/>
</entryRelationship>
</act>

0.083
testValidateProcedureActivityActProcedureActPerformerAssignedEntity

Constraint

Consol Procedure Activity Act SHOULD contain zero or more [0..*] performer (CONF:8301) performer SHALL contain exactly one [1..1] assignedEntity (CONF:7720)

OCL

self.performer->excluding(null)->reject(assignedEntity->size() = 1)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<performer/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<performer>
<assignedEntity/>
</performer>
</act>

0.031
testValidateProcedureActivityActProcedureActPerformerAssignedEntityId

Constraint

Consol Procedure Activity Act SHOULD contain zero or more [0..*] performer (CONF:8301) performer assignedEntity SHALL contain at least one [1..*] id (CONF:7722)

OCL

self.performer->excluding(null)->reject(assignedEntity.id->size() >= 1)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<performer>
<assignedEntity/>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<performer>
<assignedEntity>
<id/>
</assignedEntity>
</performer>
</act>

0.035
testValidateProcedureActivityActProcedureActPerformerAssignedEntityAddr

Constraint

Consol Procedure Activity Act SHOULD contain zero or more [0..*] performer (CONF:8301) performer assignedEntity SHALL contain exactly one [1..1] addr (CONF:7731)

OCL

self.performer->excluding(null)->reject(assignedEntity.addr->size() = 1)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<performer>
<assignedEntity/>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<performer>
<assignedEntity>
<addr/>
</assignedEntity>
</performer>
</act>

0.034
testValidateProcedureActivityActProcedureActPerformerAssignedEntityTelecom

Constraint

Consol Procedure Activity Act SHOULD contain zero or more [0..*] performer (CONF:8301) performer assignedEntity SHALL contain exactly one [1..1] telecom (CONF:7732)

OCL

self.performer->excluding(null)->reject(assignedEntity.telecom->size() = 1)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<performer>
<assignedEntity/>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<performer>
<assignedEntity>
<telecom/>
</assignedEntity>
</performer>
</act>

0.034
testValidateProcedureActivityActProcedureActPerformerAssignedEntityRepOrg

Constraint

Consol Procedure Activity Act SHOULD contain zero or more [0..*] performer (CONF:8301) performer assignedEntity SHOULD contain zero or one [0..1] representedOrganization (CONF:7733)

OCL

self.performer->excluding(null)->reject(assignedEntity.representedOrganization->size() = 1)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<performer>
<assignedEntity/>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<performer>
<assignedEntity>
<representedOrganization/>
</assignedEntity>
</performer>
</act>

0.034
testValidateProcedureActivityActProcedureActPerformerAssignedEntityRepOrgId

Constraint

Consol Procedure Activity Act SHOULD contain zero or more [0..*] performer (CONF:8301) performer representedOrganization, if present, SHOULD contain zero or more [0..*] id (CONF:7734)

OCL

self.performer->excluding(null)->reject(assignedEntity.representedOrganization.id->size() > 0)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<performer>
<assignedEntity>
<representedOrganization/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<performer>
<assignedEntity>
<representedOrganization>
<id/>
</representedOrganization>
</assignedEntity>
</performer>
</act>

0.037
testValidateProcedureActivityActProcedureActPerformerAssignedEntityRepOrgName

Constraint

Consol Procedure Activity Act SHOULD contain zero or more [0..*] performer (CONF:8301) performer representedOrganization, if present, MAY contain zero or more [0..*] name (CONF:7735)

OCL

self.performer->excluding(null)->reject(assignedEntity.representedOrganization.name->size() > 0)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<performer>
<assignedEntity>
<representedOrganization/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<performer>
<assignedEntity>
<representedOrganization>
<name/>
</representedOrganization>
</assignedEntity>
</performer>
</act>

0.036
testValidateProcedureActivityActProcedureActPerformerAssignedEntityRepOrgAddr

Constraint

Consol Procedure Activity Act SHOULD contain zero or more [0..*] performer (CONF:8301) performer representedOrganization, if present, SHALL contain exactly one [1..1] addr (CONF:7736)

OCL

self.performer->excluding(null)->reject(assignedEntity.representedOrganization.addr->size() = 1)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<performer>
<assignedEntity>
<representedOrganization/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<performer>
<assignedEntity>
<representedOrganization>
<addr/>
</representedOrganization>
</assignedEntity>
</performer>
</act>

0.037
testValidateProcedureActivityActProcedureActPerformerAssignedEntityRepOrgTelecom

Constraint

Consol Procedure Activity Act SHOULD contain zero or more [0..*] performer (CONF:8301) performer representedOrganization, if present, SHALL contain exactly one [1..1] telecom (CONF:7737)

OCL

self.performer->excluding(null)->reject(assignedEntity.representedOrganization.telecom->size() = 1)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<performer>
<assignedEntity>
<representedOrganization/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<performer>
<assignedEntity>
<representedOrganization>
<telecom/>
</representedOrganization>
</assignedEntity>
</performer>
</act>

0.036
testValidateProcedureActivityActEntryRelationshipProcedureActEncounterClassCode

Constraint

Consol Procedure Activity Act MAY contain zero or more [0..*] entryRelationship (CONF:8314) each SHALL contain exactly one [1..1] encounter, where (CONF:8317) procedureActEncounter SHALL contain exactly one [1..1] @classCode="ENC" (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:8318)

OCL

self.entryRelationship->excluding(null)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::COMP and not encounter.oclIsUndefined() and encounter.oclIsKindOf(cda::Encounter)).encounter->excluding(null)->reject(classCode=vocab::ActClass::ENC)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<entryRelationship typeCode="COMP">
<encounter/>
</entryRelationship>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<entryRelationship typeCode="COMP">
<encounter classCode="ENC"/>
</entryRelationship>
</act>

0.080
testValidateProcedureActivityActEntryRelationshipProcedureActEncounterMoodCode

Constraint

Consol Procedure Activity Act MAY contain zero or more [0..*] entryRelationship (CONF:8314) each SHALL contain exactly one [1..1] encounter, where (CONF:8317) procedureActEncounter SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood) (CONF:8319)

OCL

self.entryRelationship->excluding(null)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::COMP and not encounter.oclIsUndefined() and encounter.oclIsKindOf(cda::Encounter)).encounter->excluding(null)->reject(moodCode=vocab::x_DocumentEncounterMood::EVN)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<entryRelationship typeCode="COMP">
<encounter/>
</entryRelationship>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<entryRelationship typeCode="COMP">
<encounter moodCode="EVN"/>
</entryRelationship>
</act>

0.079
testValidateProcedureActivityActEntryRelationshipProcedureActEncounterId

Constraint

Consol Procedure Activity Act MAY contain zero or more [0..*] entryRelationship (CONF:8314) each SHALL contain exactly one [1..1] encounter, where (CONF:8317) procedureActEncounter SHALL contain exactly one [1..1] id (CONF:8320)

OCL

self.entryRelationship->excluding(null)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::COMP and not encounter.oclIsUndefined() and encounter.oclIsKindOf(cda::Encounter)).encounter->excluding(null)->reject((id->isEmpty() or id->exists(element | element.isNullFlavorUndefined())) implies (id->size() = 1))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<entryRelationship typeCode="COMP">
<encounter/>
</entryRelationship>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<entryRelationship typeCode="COMP">
<encounter>
<id/>
</encounter>
</entryRelationship>
</act>

0.126
testValidateProcedureActivityActEntryRelationshipInversionInd

Constraint

Consol Procedure Activity Act MAY contain zero or more [0..*] entryRelationship (CONF:8314) entryRelationship SHALL contain exactly one [1..1] @inversionInd="true" (CONF:8316)

OCL

self.entryRelationship->excluding(null)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::COMP and not encounter.oclIsUndefined() and encounter.oclIsKindOf(cda::Encounter))->select(typeCode=vocab::x_ActRelationshipEntryRelationship::COMP and not encounter.oclIsUndefined() and encounter.oclIsKindOf(cda::Encounter))->reject(not inversionInd.oclIsUndefined() and inversionInd=true)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<entryRelationship typeCode="COMP">
<encounter/>
</entryRelationship>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<entryRelationship typeCode="COMP" inversionInd="true">
<encounter moodCode="EVN"/>
</entryRelationship>
</act>

0.151
testValidateProcedureActivityActEntryRelationshipTypeCode

Constraint

OCL

self.entryRelationship->excluding(null)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::COMP and not encounter.oclIsUndefined() and encounter.oclIsKindOf(cda::Encounter))->select(typeCode=vocab::x_ActRelationshipEntryRelationship::COMP and not encounter.oclIsUndefined() and encounter.oclIsKindOf(cda::Encounter))->reject(typeCode=vocab::x_ActRelationshipEntryRelationship::COMP)

SuccessInvalid XML


Skip Fail Test

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<entryRelationship typeCode="COMP">
<encounter/>
</entryRelationship>
</act>

0.122
testValidateProcedureActivityActEntryRelationshipProcedureActEncounter

Constraint

OCL

self.entryRelationship->excluding(null)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::COMP and not encounter.oclIsUndefined() and encounter.oclIsKindOf(cda::Encounter))->select(typeCode=vocab::x_ActRelationshipEntryRelationship::COMP and not encounter.oclIsUndefined() and encounter.oclIsKindOf(cda::Encounter))->reject(encounter->one(encounter : cda::Encounter | not encounter.oclIsUndefined() and encounter.oclIsKindOf(cda::Encounter)))

SuccessInvalid XML


Skip Fail Test

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<entryRelationship typeCode="COMP">
<encounter/>
</entryRelationship>
</act>

0.140
Properties »