hapifhir / hapi-fhir

🔥 HAPI FHIR - Java API for HL7 FHIR Clients and Servers
http://hapifhir.io
Apache License 2.0
2.04k stars 1.33k forks source link

Transaction: cant delete Observation and DR with "has:" #2501

Open patrick-werner opened 3 years ago

patrick-werner commented 3 years ago

Describe the bug When sending a transaction to the current hapi jpastarter (5.3.0) hapi changes the order of the request.

{
  "resourceType": "Bundle",
  "type": "transaction",
  "entry": [
    {
      "request": {
        "method": "DELETE",
        "url": "Observation?_has:DiagnosticReport:result:_id=24471"
      }
    },
    {
      "request": {
        "method": "DELETE",
        "url": "/List?code=C115916&subject=5016"
      }
    },
    { "request": { "method": "DELETE", "url": "DiagnosticReport/24471" } }
  ]
}

I expected, that the order of the entries would be the order of execution. But hapi first deletes the DR, and then fails to delete the Observations.

To Reproduce Steps to reproduce the behavior:

  1. see above

Expected behavior HAPI deletes the observations AND the DiagnosticReport

Environment (please complete the following information):

patrick-werner commented 3 years ago

Zulip Thread: https://github.com/hapifhir/hapi-fhir/issues/2501