Stream: implementers
Topic: Bulk updating resources with PATCH/FHIRPath
Wayne Heth (Mar 22 2017 at 16:36):
Hello, as part of a new system we are developing we are looking for a way to specify that a bulk update of resources should occur. i.e. in response to a patient link/unlink we'd like to update the patient references in all of the resources that contain matching references to the old patient to the new patient. Using a Parameters resource as part of a Bundle and patch seems promising. Has anyone had any experience doing PATCHes for bulk updates?
{
"resourceType": "Parameters",
"parameter": [
{
"name": "operation",
"part": [
{"name": "type",
"valueCode": "replace"},
{"name": "path",
"valueString": "Encounter.subject.reference.where(contains('identifier=2.16.840.1.113883.3.144.2.54|90178'))"},
{"name": "value",
"valueString": "Patient?identifier=2.16.840.1.113883.3.144.2.1|6135368&identifier=2.16.840.1.113883.3.144.2.54|90178"}]
}
Grahame Grieve (Mar 22 2017 at 20:02):
no this is not supported. And if it was, you would specify the selection criteria in the URL:
PATCH [base]/Patient?id=namespace:id
Grahame Grieve (Mar 22 2017 at 20:03):
I'm not sure that it's a good idea though. I can see some problems with it. What other uses might there be? (I've always thought that we'll need server side operations for bulk patient link/unlink in order to change records not exposed on the FHIR api)
Last updated: Apr 12 2022 at 19:14 UTC