Uploaded image for project: 'FHIR Specification Feedback'
  1. FHIR Specification Feedback
  2. FHIR-31965

Location header on conditional create

    XMLWordPrintableJSON

Details

    • Icon: Change Request Change Request
    • Resolution: Persuasive
    • Icon: Medium Medium
    • FHIR Core (FHIR)
    • R4
    • FHIR Infrastructure
    • REST (http)
    • 3.1.0.8.1
    • Hide

      We will update to say:

      "The server ignores the post and returns 200 OK, with headers and body populated as they would have been if a create had actually occurred.  (i.e. the body set as per the prefer header, location and etag headers set, etc.)

      Show
      We will update to say: "The server ignores the post and returns  200  OK, with headers and body populated as they would have been if a create had actually occurred.  (i.e. the body set as per the prefer header, location and etag headers set, etc.)
    • Michael Donnelly/Gino Canessa: 7-0-0
    • Enhancement
    • Compatible, substantive
    • R5

    Description

      A common operation with a data store is GET or CREATE, and I was hoping to achieve this using Conditional Create of resrouces in FHIR, but the current specification prevents this:

      One Match: The server ignores the post and returns 200 OK.

      I was expecting Conditional Create to return Location, ETag and LastModified headers the same way regardless whether resource was created or already existed. I also think it would make sense for Conditional Create to interact with Prefer header the same way. My thinking is, server had to perform the search to resolve the condition already, so there is little overhead in returning the headers/resource back to the client.

      This change should also apply when Conditional Create is used in a batch or transaction, where Location, ETag and LastModified headers should be set in corresponding properties in Bundle.entry.response and resource returned if requested with Prefer header (to match the existing behaviour for regular Create).

      I would like to propose a change to the Conditional Create definition when One Match is found to something among the lines of:

      One Match: The server returns the result of the search on the condition

      Attachments

        Activity

          People

            richard.ettema Richard Ettema
            vjaneiko Valentinas Janeiko (Inactive)
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: