Reputation: 691
I am validating the below Appointment resource (which includes a contained reference) using FHIR R4 schema and schmeatron, and I always get this error:
dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource.
From my knowledge the contained reference is well included and referenced, and also the Resource validates against STU 3 schema and schematron, but I am not able to validate against R4 schematron.
What I am doing wrong?
Thanks
<?xml version="1.0" encoding="UTF-8"?>
<Appointment xmlns="http://hl7.org/fhir">
<contained>
<Slot>
<id value="slot159260820191620"/>
<schedule>
<identifier>
<system value="urn:oid:2.16.840.1.113883.3.7482.1.6"/>
<value value="159"/>
</identifier>
</schedule>
<status value="free"/>
<start value="2019-08-26T16:20:00+02:00"/>
<end value="2019-08-26T16:40:00+02:00"/>
</Slot>
</contained>
<status value="proposed"/>
<slot>
<reference value="#slot159260820191620"/>
</slot>
<participant>
<actor>
<identifier>
<system value="urn:oid:2.16.840.1.113883.3.7482.3.1"/>
<value value="143052"/>
</identifier>
</actor>
<status value="accepted"/>
</participant>
Upvotes: 1
Views: 382
Reputation: 6793
Nothing. The schematron is broken. It should say
...for $id in f:contained/*/f:id/@value...
I'll check to confirm whether this is in the list of technical corrections we'll be posting soon.
Upvotes: 1