I have a question around patient create/updates in FHIR.
The scenario I describe should not really exist but it use to describe my question with a sample. I hope it is understandable.
So first “the short version”: the patient.identifier is optional in fhir. So do we expect the resource.id to be the holy grail?
Should we always do a patient GET before we decide to do a POST/PUT?
Is this somewhere described? I find it rather dangerous to not check the containing identifiers (if they even exist in the resource) to match up to the resource you want to update. Or should we always trust the sending system and its resource id’s … . Even, if by example the containing identifiers would not match. (Which in essence means you are updating a wrong patient -> patient safety … ) . I would even consider not accepting patient POSTs or PUTS that don’t have any identifier from the sending system … .
Or is this all up to the receiving system to decide as part of business rules to not accept the POST/PUT?
The longer version with a sample.
Imagine we have FHIR System A and FHIR system B.
What i read from the specification if we do a patient PUT (A -> B) we should update(or even create) the entire resource based on the resource identifier without further checks (at least as far I can find back)
In HL7 V2 for an ADT message, we did not really have some key identifier for a record. We would always update a patient based on its identifier (PID.3). Therefore, we would find the patient based on its identifier and update the record based on that match. Otherwise NACK the message or put bus. logic in it that would create a patient (would mean we missed the A01 or A04 somehow).
Imagine this case:
In system A this resource exists and was also put in B at first.
patient.id=111 patientidentifier.code X1 patient.system MYSYS1
In system B this resource exists: (this was manually changed but the PUT to system A failed for some reason so system A is out of sync with B)
patient.id=111 patientidentifier.code X222 patient.system MYSYS1
So if I would now send a patient PUT A->B with with resourceid=111 fhir states it would update the entire resource even though it clearly has other identifier data in it from another patient … .