Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand support of X-FHIR-UPDATE-IF-MODIFIED to batch/transaction entries #2284

Closed
lmsurpre opened this issue Apr 24, 2021 · 1 comment
Closed
Assignees
Labels
enhancement New feature or request

Comments

@lmsurpre
Copy link
Member

Is your feature request related to a problem? Please describe.
In #2263 we added support for a server-side update optimization.
However, this optmization was only implemented for PUT requests.
Now I'd like to expand that to apply to batch/transaction interactions that contain PUTs as well.

Describe the solution you'd like
When users set X-FHIR-UPDATE-IF-MODIFIED to true, each PUT request within the bundle will be processed according to the "skippableUpdate" processing.

Describe alternatives you've considered

Acceptance Criteria
1.
GIVEN an existing resource in the server
WHEN we get an update request as part of a batch request
AND the X-FHIR-UPDATE-IF-MODIFIED header is set to true
THEN avoid performing the update
AND return the existing resource as appropriate (per the Prefer: return request)

Additional context

@prb112 prb112 added the enhancement New feature or request label Apr 26, 2021
lmsurpre added a commit that referenced this issue Apr 28, 2021
If `X-FHIR-UPDATE-IF-MODIFIED` is set to true on the request, then all
updates (including patches) will be processed in accordance with this
update optimization.

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Apr 28, 2021
If `X-FHIR-UPDATE-IF-MODIFIED` is set to true on the request, then all
updates (including patches) will be processed in accordance with this
update optimization.

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Apr 28, 2021
If `X-FHIR-UPDATE-IF-MODIFIED` is set to true on the request, then all
updates (including patches) will be processed in accordance with this
update optimization.

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Apr 28, 2021
If `X-FHIR-UPDATE-IF-MODIFIED` is set to true on the request, then all
updates (including patches) will be processed in accordance with this
update optimization.

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
@lmsurpre lmsurpre self-assigned this Apr 28, 2021
@lmsurpre lmsurpre added this to the Sprint 2021-06 milestone Apr 28, 2021
lmsurpre added a commit that referenced this issue Apr 28, 2021
…#2295)

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
@kmbarton423
Copy link
Contributor

kmbarton423 commented May 4, 2021

Ran a variety of bundles with PUT requests (both type=batch and type=transaction) with a mix of resources that were and were not equivalent to what already persisted. Confirmed the following OperationOutcome was received for those resources where equivalency was true and X-FHIR-UPDATE-IF-MODIFIED was test to true:

            "resourceType": "OperationOutcome",
            "issue": [
                {
                    "severity": "information",
                    "code": "informational",
                    "details": {
                        "text": "Update resource matches the existing resource; skipping the update"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants