FHIR Chat · Delete and ETag · implementers

Stream: implementers

Topic: Delete and ETag


view this post on Zulip Michael Calderero (Feb 27 2020 at 03:18):

Hi All,

Have some questions about DELETE interaction and ETag

  1. http://build.fhir.org/http.html#history defines the format of the DELETE history entry.. For FHIR server that supports versioning, http://build.fhir.org/http.html#delete states that the DELETE operation may return an ETag header. I suppose for such FHIR servers that return an ETag header on DELETE operation SHOULD also populate entry.response.etag in the history response?

  2. For the http://build.fhir.org/http.html#delete interaction, what's the response payload going to look like for a server that returns 200 OK instead of 204 No Content when deleting a single record?

  3. When doing a conditional DELETE, should a FHIR server return an ETag for the "one match" scenario?

  4. What's the response payload going to look like for a server returning 200 OK when performing a conditional delete and it matched multiple resources?

view this post on Zulip Grahame Grieve (Feb 27 2020 at 06:13):

  1. probably
  2. has to be empty
  3. I think so
  4. empty?

view this post on Zulip Michael Calderero (Feb 27 2020 at 06:57):

Thanks Grahame for the replies.

For #2, is empty == "no response payload"? If yes then I fail to see much use for 200 OK when you already have 204 No Content as a response, or what to tell a FHIR server to make it return 200 OK.

For #4, does empty == "no response payload", a bundle with 0 entries, or a bundle with entries like below? The entries are taken from the output of a history interaction with deleted versions

{
  "resourceType": "Bundle",
  "id": "abcdefg",
  "meta": {
    "lastUpdated": "2014-08-18T01:43:30Z"
  },
  "total": 3,
  "entry": [
    {
      "request": {
        "method": "DELETE",
        "url": "Patient/pat1"
      },
      "response": {
        "lastModified": "2014-08-18T01:43:30Z",
        "etag": "W/\"1234\""
      }
    },
    {
      "request": {
        "method": "DELETE",
        "url": "Patient/pat2"
      },
      "response": {
        "lastModified": "2014-08-18T01:43:30Z",
        "etag": "W/\"1234\""
      }
    },
    {
      "request": {
        "method": "DELETE",
        "url": "Patient/pat3"
      },
      "response": {
        "lastModified": "2014-08-18T01:43:30Z",
        "etag": "W/\"1234\""
      }
    }
  ]
}

view this post on Zulip Grahame Grieve (Feb 28 2020 at 02:54):

for #4 I meant no payload

view this post on Zulip Grahame Grieve (Feb 28 2020 at 02:54):

I don't think 200 is much use but I think there are servers that are hard coded to 200ok?


Last updated: Apr 12 2022 at 19:14 UTC