Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
ProcedureActivityProcedureTest52002.9982013-01-31T13:36:03JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testGetProductInstances

Constraint

OCL

SuccessInvalid XML

Valid XML

0.040
testGetMedicationActivity

Constraint

OCL

SuccessInvalid XML

Valid XML

0.043
testValidateProcedureActivityProcedureTemplateId

Constraint

The 'ProcedureActivityProcedureTemplateId' invariant is violated on 'org.openhealthtools.mdht.uml.cda.mu2consol.impl.ProcedureActivityProcedureImpl@4ed1ee4e{#//}'

OCL

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

SuccessInvalid XML


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

0.014
testValidateProcedureActivityProcedureMoodCode

Constraint

Consol Procedure Activity Procedure 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:7653)

OCL

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

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

0.054
testValidateProcedureActivityProcedureCode

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


<procedure xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<code xsi:type="CE"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

0.040
testValidateProcedureActivityProcedureEffectiveTime

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<effectiveTime/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

0.048
testValidateProcedureActivityProcedureId

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<id/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

0.044
testValidateProcedureActivityProcedureSpecimen

Constraint

Consol Procedure Activity Procedure MAY contain zero or more [0..*] specimen (CONF:7697)

OCL

self.specimen->exists(specimen : cda::Specimen | not specimen.oclIsUndefined() and specimen.oclIsKindOf(cda::Specimen))

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<specimen/>
</procedure>

0.028
testValidateProcedureActivityProcedureMedicationActivity

Constraint

Consol Procedure Activity Procedure MAY contain zero or one [0..1] entryRelationship (CONF:7886, CONF:7887, CONF:15915) 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


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<entryRelationship typeCode="COMP">
<substanceAdministration/>
</entryRelationship>
</procedure>

0.045
testValidateProcedureActivityProcedurePatientInstruction

Constraint

Consol Procedure Activity Procedure MAY contain zero or one [0..1] entryRelationship (CONF:7775, CONF:7776, CONF:15913) 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


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<entryRelationship typeCode="SUBJ">
<act/>
</entryRelationship>
</procedure>

0.047
testGetServiceDeliveryLocations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.039
testGetIndications

Constraint

OCL

SuccessInvalid XML

Valid XML

0.037
testValidateProcedureActivityProcedureCodeCodeSystems

Constraint

Consol Procedure Activity Procedure code in a procedure activity SHOULD be selected from LOINC (codeSystem 2.16.840.1.113883.6.1) or SNOMED CT (codeSystem 2.16.840.1.113883.6.96), and MAY be selected from CPT-4 (codeSystem 2.16.840.1.113883.6.12), ICD9 Procedures (codeSystem 2.16.840.1.113883.6.104), ICD10 Procedure Coding System (codeSystem 2.16.840.1.113883.6.4) (CONF:7657)

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' xor self.code.codeSystem = '2.16.840.1.113883.6.12' xor self.code.codeSystem = '2.16.840.1.113883.6.104' xor self.code.codeSystem = '2.16.840.1.113883.6.4'

SuccessInvalid XML


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<code codeSystem="2.16.840.1.113883.6.96"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

0.088
testValidateProcedureActivityProcedureCodeOriginalText

Constraint

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

OCL

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

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<code/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<code>
<originalText/>
</code>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

0.047
testValidateProcedureActivityProcedureOriginalTextReference

Constraint

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

OCL

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

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<code>
<originalText/>
</code>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<code>
<originalText><reference/></originalText>
</code>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

0.050
testValidateProcedureActivityProcedureOriginalTextReferenceValue

Constraint

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

OCL

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

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<code>
<originalText><reference/></originalText>
</code>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<code>
<originalText><reference value="test"/></originalText>
</code>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

0.053
testValidateProcedureActivityProcedureReferenceValue

Constraint

Consol Procedure Activity Procedure 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:15910)

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 to document.
</content></text>
<entry>
<procedure classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<code>
<originalText>Some sample text<reference value="#1.2.3.4"/></originalText>
</code>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>
</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 to document.
</content></text>
<entry>
<procedure classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<code>
<originalText>Some sample text<reference value="#1.2.3.4"/></originalText>
</code>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>
</entry>
</section>

0.083
testValidateProcedureActivityProcedureEncounterInversion

Constraint

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

OCL

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

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<entryRelationship>
<encounter/>
</entryRelationship>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<entryRelationship/>
</procedure>

0.032
testValidateProcedureActivityProcedureProductInstanceTypeCode

Constraint

Consol Procedure Activity Procedure participant with target entry Product Instance SHALL contain exactly one [1..1] @typeCode="DEV" Device (CodeSystem: 2.16.840.1.113883.5.1002 HL7ActRelationshipType) STATIC (CONF:7752)

OCL

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

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<participant>
<participantRole/>
</participant>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<participant typeCode="DEV">
<participantRole/>
</participant>
</procedure>

0.019
testValidateProcedureActivityProcedureServiceDeliveryLocationTypeCode

Constraint

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

OCL

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

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<participant>
<participantRole/>
</participant>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<participant typeCode="LOC">
<participantRole/>
</participant>
</procedure>

0.019
testValidateProcedureActivityProcedureInstructionsInversion

Constraint

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

OCL

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

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<entryRelationship>
<act/>
</entryRelationship>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<entryRelationship/>
</procedure>

0.024
testValidateProcedureActivityProcedureClassCode

Constraint

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

OCL

self.classCode=vocab::ActClass::PROC

SuccessInvalid XML


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

0.009
testValidateProcedureActivityProcedureStatusCode

Constraint

Consol Procedure Activity Procedure SHALL contain exactly one [1..1] statusCode, where the @code SHALL be selected from ValueSet ProcedureActStatusCode 2.16.840.1.113883.11.20.9.22 DYNAMIC (CONF:7661)

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


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<statusCode code="completed" codeSystem="2.16.840.1.113883.5.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

0.146
testValidateProcedureActivityProcedurePriorityCode

Constraint

Consol Procedure Activity Procedure 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:7668)

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


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode code="A" codeSystem="2.16.840.1.113883.5.7"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

0.324
testValidateProcedureActivityProcedurePriorityCodeP

Constraint

Consol Procedure Activity Procedure 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:7668)

OCL

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

SuccessInvalid XML


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.1.11.16866"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

0.042
testValidateProcedureActivityProcedureMethodCode

Constraint

Consol Procedure Activity Procedure MAY contain zero or one [0..1] methodCode (CONF:7670)

OCL

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

SuccessInvalid XML


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<methodCode/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

0.045
testValidateProcedureActivityProcedureTargetSiteCode

Constraint

Consol Procedure Activity Procedure SHOULD contain zero or more [0..*] targetSiteCode (CONF:7683), where the @code SHALL be selected from ValueSet Body Site Value Set 2.16.840.1.113883.3.88.12.3221.8.9 STATIC 2 (CONF:16082)

OCL

(self.targetSiteCode->isEmpty() or self.targetSiteCode->exists(element | element.isNullFlavorUndefined())) implies (self.targetSiteCode->forAll(element | not element.oclIsUndefined() and element.oclIsKindOf(datatypes::CD) and let value : datatypes::CD = element.oclAsType(datatypes::CD) in value.codeSystem = '2.16.840.1.113883.6.96' and not value.code.oclIsUndefined()))

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<targetSiteCode/>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode code="test" codeSystem="2.16.840.1.113883.6.96"/>
</procedure>

0.093
testValidateProcedureActivityProcedureTargetSiteCodeP

Constraint

Consol Procedure Activity Procedure SHOULD contain zero or more [0..*] targetSiteCode (CONF:7683), where the @code SHALL be selected from ValueSet Body Site Value Set 2.16.840.1.113883.3.88.12.3221.8.9 STATIC 2 (CONF:16082)

OCL

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

SuccessInvalid XML


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

0.044
testValidateProcedureActivityProcedureIndication

Constraint

Consol Procedure Activity Procedure MAY contain zero or more [0..*] entryRelationship (CONF:7779, CONF:7780, CONF:15914) 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


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<entryRelationship typeCode="RSON">
<observation/>
</entryRelationship>
</procedure>

0.046
testValidateProcedureActivityProcedureServiceDeliveryLocation

Constraint

Consol Procedure Activity Procedure MAY contain zero or more [0..*] participant (CONF:7765, CONF:7752, CONF:15912) 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


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<participant>
<participantRole/>
</participant>
</procedure>

0.032
testValidateProcedureActivityProcedurePerformer

Constraint

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

OCL

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

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<performer/>
</procedure>

0.028
testValidateProcedureActivityProcedureProductInstance

Constraint

Consol Procedure Activity Procedure MAY contain zero or more [0..*] participant (CONF:7751, CONF:7752, CONF:15911) Contains exactly one [1..1] Product Instance (templateId: 2.16.840.1.113883.10.20.22.4.37)

OCL

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

SuccessInvalid XML


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<participant>
<participantRole/>
</participant>
</procedure>

0.031
testValidateProcedureActivityProcedureEntryRelationship

Constraint

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

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


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<entryRelationship typeCode="COMP">
<encounter/>
</entryRelationship>
</procedure>

0.085
testValidateProcedureActivityProcedureProcedureSpecimenSpecimenRole

Constraint

Consol Procedure Activity Procedure MAY contain zero or more [0..*] specimen (CONF:7697) specimen SHALL contain exactly one [1..1] specimenRole (CONF:7704)

OCL

self.specimen->excluding(null)->reject(specimenRole->size() = 1)

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<specimen/>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<specimen>
<specimenRole>
<id/>
</specimenRole>
</specimen>
</procedure>

0.035
testValidateProcedureActivityProcedureProcedureSpecimenSpecimentRoleId

Constraint

Consol Procedure Activity Procedure MAY contain zero or more [0..*] specimen (CONF:7697) specimen specimenRole SHOULD contain zero or more [0..*] id (CONF:7716)

OCL

self.specimen->excluding(null)->reject(specimenRole.id->size() > 0)

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<specimen>
<specimenRole/>
</specimen>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<specimen>
<specimenRole>
<id/>
</specimenRole>
</specimen>
</procedure>

0.035
testValidateProcedureActivityProcedureProcedureActivityPerformerAssignedEntity

Constraint

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

OCL

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

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<performer/>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<performer>
<assignedEntity/>
</performer>
</procedure>

0.033
testValidateProcedureActivityProcedureProcedureActivityPerformerAssignedEntityId

Constraint

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

OCL

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

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<performer>
<assignedEntity/>
</performer>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<performer>
<assignedEntity>
<id/>
</assignedEntity>
</performer>
</procedure>

0.036
testValidateProcedureActivityProcedureProcedureActivityPerformerAssignedEntityAddr

Constraint

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

OCL

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

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<performer>
<assignedEntity/>
</performer>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<performer>
<assignedEntity>
<addr/>
</assignedEntity>
</performer>
</procedure>

0.034
testValidateProcedureActivityProcedureProcedureActivityPerformerAssignedEntityTelecom

Constraint

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

OCL

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

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<performer>
<assignedEntity/>
</performer>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<performer>
<assignedEntity>
<telecom/>
</assignedEntity>
</performer>
</procedure>

0.035
testValidateProcedureActivityProcedureProcedureActivityPerformerAssignedEntityRepOrg

Constraint

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

OCL

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

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<performer>
<assignedEntity/>
</performer>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<performer>
<assignedEntity>
<representedOrganization/>
</assignedEntity>
</performer>
</procedure>

0.035
testValidateProcedureActivityProcedureProcedureActivityPerformerAssignedEntityRepOrgId

Constraint

Consol Procedure Activity Procedure SHOULD contain zero or more [0..*] performer (CONF:7718) 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


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<performer>
<assignedEntity>
<representedOrganization/>
</assignedEntity>
</performer>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<performer>
<assignedEntity>
<representedOrganization>
<id/>
</representedOrganization>
</assignedEntity>
</performer>
</procedure>

0.037
testValidateProcedureActivityProcedureProcedureActivityPerformerAssignedEntityRepOrgName

Constraint

Consol Procedure Activity Procedure SHOULD contain zero or more [0..*] performer (CONF:7718) 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


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<performer>
<assignedEntity>
<representedOrganization/>
</assignedEntity>
</performer>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<performer>
<assignedEntity>
<representedOrganization>
<name/>
</representedOrganization>
</assignedEntity>
</performer>
</procedure>

0.038
testValidateProcedureActivityProcedureProcedureActivityPerformerAssignedEntityRepOrgAddr

Constraint

Consol Procedure Activity Procedure SHOULD contain zero or more [0..*] performer (CONF:7718) 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


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<performer>
<assignedEntity>
<representedOrganization/>
</assignedEntity>
</performer>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<performer>
<assignedEntity>
<representedOrganization>
<addr/>
</representedOrganization>
</assignedEntity>
</performer>
</procedure>

0.038
testValidateProcedureActivityProcedureProcedureActivityPerformerAssignedEntityRepOrgTelecom

Constraint

Consol Procedure Activity Procedure SHOULD contain zero or more [0..*] performer (CONF:7718) 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


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<performer>
<assignedEntity>
<representedOrganization/>
</assignedEntity>
</performer>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<performer>
<assignedEntity>
<representedOrganization>
<telecom/>
</representedOrganization>
</assignedEntity>
</performer>
</procedure>

0.037
testValidateProcedureActivityProcedureEntryRelationshipProcedureActivityEncounterClassCode

Constraint

Consol Procedure Activity Procedure MAY contain zero or more [0..*] entryRelationship (CONF:7768) each SHALL contain exactly one [1..1] encounter, where (CONF:7770) procedureActivityEncounter SHALL contain exactly one [1..1] @classCode="ENC" (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:7771)

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


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<entryRelationship typeCode="COMP">
<encounter/>
</entryRelationship>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<entryRelationship typeCode="COMP">
<encounter classCode="ENC"/>
</entryRelationship>
</procedure>

0.082
testValidateProcedureActivityProcedureEntryRelationshipProcedureActivityEncounterMoodCode

Constraint

Consol Procedure Activity Procedure MAY contain zero or more [0..*] entryRelationship (CONF:7768) each SHALL contain exactly one [1..1] encounter, where (CONF:7770) procedureActivityEncounter SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood) (CONF:7772)

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


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<entryRelationship typeCode="COMP">
<encounter/>
</entryRelationship>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<entryRelationship typeCode="COMP">
<encounter moodCode="EVN"/>
</entryRelationship>
</procedure>

0.082
testValidateProcedureActivityProcedureEntryRelationshipProcedureActivityEncounterId

Constraint

Consol Procedure Activity Procedure MAY contain zero or more [0..*] entryRelationship (CONF:7768) each SHALL contain exactly one [1..1] encounter, where (CONF:7770) procedureActivityEncounter SHALL contain exactly one [1..1] id (CONF:7773)

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


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<entryRelationship typeCode="COMP">
<encounter/>
</entryRelationship>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<entryRelationship typeCode="COMP">
<encounter>
<id/>
</encounter>
</entryRelationship>
</procedure>

0.130
testValidateProcedureActivityProcedureEntryRelationshipInversionInd

Constraint

Consol Procedure Activity Procedure MAY contain zero or more [0..*] entryRelationship (CONF:7768) 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


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<entryRelationship typeCode="COMP">
<encounter/>
</entryRelationship>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<entryRelationship typeCode="COMP" inversionInd="true">
<encounter moodCode="EVN"/>
</entryRelationship>
</procedure>

0.150
testValidateProcedureActivityProcedureEntryRelationshipTypeCode

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


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<entryRelationship typeCode="COMP">
<encounter/>
</entryRelationship>
</procedure>

0.130
testValidateProcedureActivityProcedureEntryRelationshipProcedureActivityEncounter

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


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<entryRelationship typeCode="COMP">
<encounter/>
</entryRelationship>
</procedure>

0.152
testGetPatientInstruction

Constraint

OCL

SuccessInvalid XML

Valid XML

0.045
Properties »