not(exists($reffedObject)) or $reffedObject[@moodCode=$refMoodCode]
Message
The @moodCode of the reference SHALL match the @moodCode of the referenced element
Schematron assert
role
error
test
exists($reffedObject)
Message
The root and extension attributes SHALL identify an element defined elsewhere in the
same document.
Schematron assert
role
error
test
not(exists($reffedObject)) or ($reffedObject[not(*:code/@code)] and hl7:code[@nullFlavor='NA'])
or $reffedObject/*:code[concat(@code,'#',@codeSystem)=$refCode]
Message
The code of the reference SHALL match the code of the referenced element
This element shall be present. It shall be valued when the internal reference is to
element that has a element, and shall have the same attributes as the element in the act it references. If the element it references does not have a element, then the nullFlavor attribute should be set to "NA".