Correct/Clarify the behavior for Conditional Update

XMLWordPrintableJSON

    • Type: Change Request
    • Resolution: Persuasive with Modification
    • Priority: Medium
    • FHIR Core (FHIR)
    • STU3
    • FHIR Infrastructure
    • STU
    • REST (http)
    • 3.1.0.4.3
    • Hide

      Clarify as requested, specifically:

      Change the "No matches" and "One match" bullets of the Conditional Update section as follows:

      No matches, no id provided: The server creates the resource.

      No matches, id provided: The server treats the interaction as an Update as Create interaction (or rejects it, if it does not support Update as Create)"

      One Match, no resource id provided OR (resource id provided and it matches the found resource): update that resource


      One Match, resource id provided but does not match resource found: reject with an http 400 and potentially an OperationOutcome

      Show
      Clarify as requested, specifically: Change the "No matches" and "One match" bullets of the Conditional Update section as follows: No matches, no id provided : The server creates the resource. No matches, id provided : The server treats the interaction as an Update as Create interaction (or rejects it, if it does not support Update as Create)" One Match, no resource id provided OR (resource id provided and it matches the found resource) : update that resource One Match, resource id provided but does not match resource found : reject with an http 400 and potentially an OperationOutcome
    • Rick Geimer/Christiaan Knaap: 20-0-1
    • Correction
    • Non-substantive
    • STU3

      The current definition of conditional update states:

      "No matches: The server treats the interaction as an Update as Create interaction (or rejects it, if it does not support Update as Create)"

      But "Update as Create" is an optional part of the API ("Servers MAY choose ..."). It also talks about ids, which typically are not present here - The main use case of Conditional Update is not knowing the id, but other unique identifying data within a resource.

      Following that wording, a Conditional Update on a server that does not support "Update as Create" will result in discarding the resource if it doesn't exist.

      And even if the server supports "Update as Create", an id would have to be provided by the client, since that is what "Update as Create" talks about. That is not the typical use case, especially in the context of Conditional Update.

      Proposal:

      Change the "No matches" bullet of the Conditional Update section as follows:

      No matches, no id provided: The server creates the resource.

      No matches, id provided: The server treats the interaction as an Update as Create interaction (or rejects it, if it does not support Update as Create)"

      See also the Zulip discussion:

      https://chat.fhir.org/#narrow/stream/4-implementers/topic/Transaction.20conditional.20create.20OR.20update

            Assignee:
            Unassigned
            Reporter:
            Stefan Lang
            Stefan Lang
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: