Hello.
What is the proper syntax for IfNoneExist in bundle? I tried to ignore Patient resource creation if there is such with this id but it seems like this option is ignored. I tried:
1) <ifNoneExist value="identifier=613876"/>
2) <ifNoneExist value="Patient.identifier=613876"/>
3) <ifNoneExist value="ID613876"/> (referncing Patient.id)
I have a bundle with two resources: Patient and Encounter (see attached file). The Patient must be added to fhir Server if a patient with such id does not exist. The Encounter must be added as well and must reference newly added patient.
To solve this problem I create a bundle with type transaction. I specify id for every resource (do not want FHIR server to give out its ids), add "request" instruction where I set method=PUT, and add URL (see extract below).
<resource>
<Patient>
<id value="ID613876"/>
<identifier>
<use value="usual"/>
<type>
<coding>
<code value="MR"/>
<display value="Medical record number"/>
</coding>
</type>
<value value="613876"/>
</identifier>
<name>
<use value="official"/>
<family value="Hill"/>
<given value="Joshua"/>
<given value="H."/>
</name>
<gender value="male" />
<birthDate value="1965-02-13" />
<active value="true"/>
</Patient>
</resource>
<request>
<method value="PUT"/>
<url value="Patient/ID613876"/>
<ifNoneExist value="identifier=613876"/>
</request>
</entry>
However, when I resubmit my bundle it overrides existing Patient and Encounter (because I use <request>/ <method value="PUT"/>). I also tried <method value="POST"/> but in this case Patient is created wtih FHIR provided id and following Encounter cannot be linked to this Patient (since I specify one id but FHIR server gives out another).
Please help me understand how to ignore resource creation if there is a resource with such id. The key probably somewhere in IfNoneExist usage.
Thank you,
Artem