I do have a use case which I can not yet fully test, as it's in the works.
Making long story short - I do receive data from external system and I need to import it into FHIR server. Every record I get have external identifier which is appended to resource.
I would like to use transaction endpoint to update resource if it exists or create if not exisats. I know that conditional creation is fine, I tested it, but I have doubts on conditional update without version and search url (Patient?identifier=foo) instead of singular resource (Patient/x). Sample bundle could look like below - first make conditional update and then conditional create (to avoid update of already created resource).
{
"resourceType": "Bundle",
"entry": [{
"fullUrl": "....",
"resource": {},
"request": {
"method": "PUT",
"url": "Patient?identifier=foo",
//"If-Match": "??"
}
},{
"fullUrl": "....",
"resource": {},
"request": {
"method": "POST",
"url": "Patient",
"If-None-Exist": "identifier=foo"
}
}]
}
Main thing in whole scenario is - I do not care about data which could be overriden (because it shouldn't be updated). I just need to create a new snapshot with data I received from 3rd party, thus I don't care about previous version.
Cheers,
Lukasz