Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
ProcedureActivityObservationTest47002.7782013-01-31T13:36:00JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testGetMedicationActivity

Constraint

OCL

SuccessInvalid XML

Valid XML

0.045
testValidateProcedureActivityObservationTemplateId

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</observation>

0.014
testValidateProcedureActivityObservationMoodCode

Constraint

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

OCL

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

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</observation>

Valid XML


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

0.053
testValidateProcedureActivityObservationCode

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


<observation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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"/>
</observation>

0.039
testValidateProcedureActivityObservationEffectiveTime

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


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

0.048
testValidateProcedureActivityObservationId

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


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

0.043
testValidateProcedureActivityObservationStatusCode

Constraint

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

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


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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"/>
</observation>

0.143
testValidateProcedureActivityObservationMedicationActivity

Constraint

Consol Procedure Activity Observation MAY contain zero or one [0..1] entryRelationship (CONF:8279, CONF:8280, CONF:15907) 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


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

0.046
testGetServiceDeliveryLocations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.039
testGetIndications

Constraint

OCL

SuccessInvalid XML

Valid XML

0.037
testGetInstructions

Constraint

OCL

SuccessInvalid XML

Valid XML

0.043
testValidateProcedureActivityObservationCodeCodeSystems

Constraint

Consol Procedure Activity Observation 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.4) (CONF:8241)

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'

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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"/>
</observation>

0.072
testValidateProcedureActivityObservationCodeOriginalText

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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"/>
</observation>

0.048
testValidateProcedureActivityObservationOriginalTextReference

Constraint

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

OCL

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

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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"/>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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"/>
</observation>

0.048
testValidateProcedureActivityObservationOriginalTextReferenceValue

Constraint

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

OCL

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

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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"/>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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"/>
</observation>

0.053
testValidateProcedureActivityObservationReferenceValue

Constraint

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

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 observed.
</content></text>
<entry>
<observation classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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"/>
</observation>
</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 observed.
</content></text>
<entry>
<observation classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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"/>
</observation>
</entry>
</section>

0.082
testValidateProcedureActivityObservationEncounterInversion

Constraint

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

OCL

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

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

Valid XML


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

0.031
testValidateProcedureActivityObservationServiceDeliveryLocationTypeCode

Constraint

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

OCL

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

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

0.019
testValidateProcedureActivityObservationInstructionsInversion

Constraint

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

OCL

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

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

Valid XML


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

0.023
testValidateProcedureActivityObservationClassCode

Constraint

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

OCL

self.classCode=vocab::ActClassObservation::OBS

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</observation>

0.009
testValidateProcedureActivityObservationValue

Constraint

Consol Procedure Activity Observation SHALL contain exactly one [1..1] value (CONF:16846)

OCL

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

SuccessInvalid XML


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

Valid XML


<observation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<value xsi:type="CD"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</observation>

0.045
testValidateProcedureActivityObservationPriorityCode

Constraint

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

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


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

Valid XML


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

0.318
testValidateProcedureActivityObservationPriorityCodeP

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<priorityCode code="aaa" codeSystem="bbb"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</observation>

0.042
testValidateProcedureActivityObservationMethodCode

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


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

0.044
testValidateProcedureActivityObservationTargetSiteCode

Constraint

Consol Procedure Activity Observation SHOULD contain zero or more [0..*] targetSiteCode (CONF:8250), 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:10121)

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


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<targetSiteCode/>
</observation>

Valid XML


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

0.092
testValidateProcedureActivityObservationTargetSiteCodeP

Constraint

Consol Procedure Activity Observation SHOULD contain zero or more [0..*] targetSiteCode (CONF:8250), 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:10121)

OCL

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

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</observation>

0.044
testValidateProcedureActivityObservationPerformer

Constraint

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

OCL

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

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</observation>

Valid XML


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

0.028
testValidateProcedureActivityObservationServiceDeliveryLocation

Constraint

Consol Procedure Activity Observation MAY contain zero or more [0..*] participant (CONF:8261, CONF:8262, CONF:15904) 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


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

0.031
testValidateProcedureActivityObservationInstructions

Constraint

Consol Procedure Activity Observation MAY contain zero or one [0..1] entryRelationship (CONF:8272, CONF:8273, CONF:15905) 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


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

0.044
testValidateProcedureActivityObservationIndication

Constraint

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


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

0.044
testValidateProcedureActivityObservationEntryRelationship

Constraint

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

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


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

0.084
testValidateProcedureActivityObservationProcedureObservationPerformerAssignedEntity

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

0.032
testValidateProcedureActivityObservationProcedureObservationPerformerAssignedEntityId

Constraint

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

OCL

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

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

0.034
testValidateProcedureActivityObservationProcedureObservationPerformerAssignedEntityAddr

Constraint

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

OCL

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

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

0.034
testValidateProcedureActivityObservationProcedureObservationPerformerAssignedEntityTelecom

Constraint

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

OCL

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

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

0.034
testValidateProcedureActivityObservationProcedureObservationPerformerAssignedEntityRepOrg

Constraint

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

OCL

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

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

0.036
testValidateProcedureActivityObservationProcedureObservationPerformerAssignedEntityRepOrgId

Constraint

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


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

0.037
testValidateProcedureActivityObservationProcedureObservationPerformerAssignedEntityRepOrgName

Constraint

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


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

0.037
testValidateProcedureActivityObservationProcedureObservationPerformerAssignedEntityRepOrgAddr

Constraint

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


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

0.036
testValidateProcedureActivityObservationProcedureObservationPerformerAssignedEntityRepOrgTelecom

Constraint

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


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

0.036
testValidateProcedureActivityObservationEntryRelationshipProcedureObservationEncounterClassCode

Constraint

Consol Procedure Activity Observation MAY contain zero or more [0..*] entryRelationship (CONF:8264) each SHALL contain exactly one [1..1] encounter, where (CONF:8267) procedureObservationEncounter SHALL contain exactly one [1..1] @classCode="ENC" (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:8268)

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


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

0.080
testValidateProcedureActivityObservationEntryRelationshipProcedureObservationEncounterMoodCode

Constraint

Consol Procedure Activity Observation MAY contain zero or more [0..*] entryRelationship (CONF:8264) each SHALL contain exactly one [1..1] encounter, where (CONF:8267) procedureObservationEncounter SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood) (CONF:8269)

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


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

0.081
testValidateProcedureActivityObservationEntryRelationshipProcedureObservationEncounterId

Constraint

Consol Procedure Activity Observation MAY contain zero or more [0..*] entryRelationship (CONF:8264) each SHALL contain exactly one [1..1] encounter, where (CONF:8267) procedureObservationEncounter SHALL contain exactly one [1..1] id (CONF:8270)

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


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

0.127
testValidateProcedureActivityObservationEntryRelationshipInversionInd

Constraint

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


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

0.148
testValidateProcedureActivityObservationEntryRelationshipTypeCode

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


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

0.121
testValidateProcedureActivityObservationEntryRelationshipProcedureObservationEncounter

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


<observation xmlns="urn:hl7-org:v3" classCode="OBS">
<templateId root="2.16.840.1.113883.10.20.22.4.13"/>
<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>
</observation>

0.142
Properties »