How to check individual resource delete status in batch response?

Hello All,

In our project, we are using Hl7.Fhir.R4.Core from Firely (.Net SDK), Version=3.2.0.0 and using “Azure API for FHIR” (as a PaaS service).

We are creating a bundle to delete multiple resources at a time.
Performing a POST call with fhir base url. Below is the request bundle

{
  "resourceType": "Bundle",
  "type": "batch",
  "entry": [
    {
      "id": "PatientIdff1c39e1-2950-41d5-a010-e0a5e8e8a5fb",
      "request": {
        "method": "DELETE",
        "url": "Patient/ff1c39e1-xxx?hardDelete=true"
      }
    },
    {
      "id": "PatientId5cbf934e-05b0-4e2c-b1e7-9e6b38ecec9d",
      "request": {
        "method": "DELETE",
        "url": "Patient/5cbf934e-xxx?hardDelete=true"
      }
    }
  ]
}

Below is the response returned

{
  "resourceType": "Bundle",
  "type": "batch-response",
  "entry": [
    {
      "response": {
        "status": "204"
      }
    },
    {
      "response": {
        "status": "204"
      }
    }
  ]
}

As no Id is returned in response, Can anyone help me how to include id in above response to retrieve delete status for individual resource.

The response will contain the same number of entries as the request, in the same order. Or else it’s an error and you can’t reliably interpret it

1 Like