Constraint Descriptor : rmim026 (type: ERROR, kind: )

Constraint : rmim026

Constraint Name
rmim026 (type: ERROR, kind: )
Constraint Class
ClinicalDocumentSpec
Package
cdabasic
Description
if regionOfInterest is target of a renderMultimedia then it shall have exactly one ObservationMedia and not an ExternalObservation (RMIM-026)
OCL
self.validateByXPATHV2('every $regionOfInterest in //cda:regionOfInterest satisfies ( not( some $ref in data(//cda:renderMultiMedia/@referencedObject) satisfies $ref = data($regionOfInterest/@ID)) or boolean($regionOfInterest/cda:entryRelationship/cda:observationMedia) or boolean(name($regionOfInterest/parent::node()/parent::node())=\u0027observationMedia\u0027))')