0

In order to submit a PATCH operation in a FHIR transaction bundle, I see that we can use a resourceType as Binary and submit like this (quoted from https://smilecdr.com/docs/fhir_repository/updating_data.html),

  "resourceType": "Bundle",
  "type": "transaction",
  "entry": [
    {
      "fullUrl": "Patient/1",
      "resource": {
        "resourceType": "Binary",
        "contentType": "application/json-patch+json",
        "data": "WyB7ICJvcCI6InJlcGxhY2UiLCAicGF0aCI6Ii9hY3RpdmUiLCAidmFsdWUiOmZhbHNlIH0gXQ=="
      },
      "request": {
        "method": "PATCH",
        "url": "Patient/1"
      }
    }
  ]
}

But is it possible to submit the patch body as it is, like this [ { "op":"replace", "path":"/active", "value":false } ] instead of Base-64 encoded within the transaction bundle? If so what should be the resource type and how should I pass it? I couldn't find much information on this anywhere? (Note:- I have implemented it as a standalone PATCH API for each of the resource, but I have trouble figuring out how to pass the request as a transaction bundle.

1 Answers1

1

Already answered here: https://chat.fhir.org/#narrow/stream/179166-implementers/topic/Transaction.20with.20PATCH.20request

Short answer: no. The content must be a Parameters operation as described in the spec because Bundles must contain resources.

(side note - please don't ask the same question in multiple forums at the same time)

Lloyd McKenzie
  • 6,345
  • 1
  • 13
  • 10