In the (last) FHIR specification (v1.8.0), it's mentioned that a contained resource can be embedded in a Reference (documentation), when no reference exists.
But, by looking at the XSD, I can't figure out how to validate the XML against the patient.xsd with such a mechanism.
Here is my attempt
<?xml version="1.0" encoding="UTF-8"?>
<Patient xmlns="http://hl7.org/fhir">
<identifier>
<system value="urn:oid:1.2.250.1.311.1.1"/>
<value value="2000100439"/>
<assigner>
<display value="ap-hm"/>
</assigner>
</identifier>
<name>
<use value="official"/>
<family value="COPTER"/>
<given value="ELI"/>
</name>
<gender value="male"/>
<birthDate value="1954-08-14"/>
<deceasedBoolean value="false"/>
<address>
<use value="home"/>
<line value="45 boulevard des cigales"/>
<city value="MARSEILLE 10"/>
<postalCode value="13010"/>
</address>
<maritalStatus>
<coding>
<system value="http://hl7.org/fhir/v3/MaritalStatus"/>
<code value="U"/>
</coding>
</maritalStatus>
<generalPractitioner>
<contained>
<Practitioner>
<id value="p1"/>
<name>
<family value="PASTEUR"/>
<given value="LOUIS"/>
</name>
<address>
<city>MARSEILLE</city>
<postalCode>13005</postalCode>
</address>
<gender value="male"/>
</Practitioner>
</contained>
</generalPractitioner>
</Patient>
What is the correct way to have a contained reference ?
All contained resources are sent near the top using the "contained" element. They are then referenced as a local reference. So your example would look as follows: