0

I am currently using a managed Azure FHIR API and I need to do a mass update to a FHIR element.I have about 200K+ resources of type Specimen

"resourceType": "Specimen",
"id": "101",
"text": {
      "status": "created",
}

And, I would like to update the "text" fhir element like this

"resourceType": "Specimen",
"id": "101",
"text": {
      "status": "generated",
}

What is the best approach to fix a large set of fhir resources? I've looked at PATCH but it seems to work for a single resource.

Amit Joshi
  • 15,448
  • 21
  • 77
  • 141
nobody
  • 10,892
  • 8
  • 45
  • 63

1 Answers1

1

You could submit a Batch full of patches. Other than that, you'd be looking at a custom operation or directly manipulating the datastore, bypassing the FHIR interface. There's no standard mechanism to apply an arbitrary change to a set of resources.

Lloyd McKenzie
  • 6,345
  • 1
  • 13
  • 10
  • Managed Azure FHIR Api does not provide access to the backend datastore. The current implementation is using that and I suspect it won't change in near future. This is an area of concern primarily because FHIR standards are evolving and we need the capability to do large updates to the datastore. – nobody Oct 21 '22 at 15:28
  • In most cases, if you're updating a resource, you need to specify the eTag for the resource to avoid collisions - because updates could come from anyone, anywhere, at any time. FHIR isn't intended as a mechanism to perform database maintenance - that's expected to happen internally. FHIR has no presumption about what the internal databases will even look like... – Lloyd McKenzie Oct 21 '22 at 19:35