Stream: implementers
Topic: Should conditional update/patch support If-Match header?
Jie Fan (Jul 31 2018 at 14:28):
Search (https://www.hl7.org/fhir/search.html) doesn't seem to allow searching by version id, does it make sense to support version aware conditional update/patch?
Lloyd McKenzie (Jul 31 2018 at 14:35):
In what situations would a decision to apply an update/patch be based on a version of a resource other than the current one?
Jie Fan (Jul 31 2018 at 15:01):
E.g. there are multiple clients
Lloyd McKenzie (Jul 31 2018 at 15:42):
I understand how there can be colliding updates. I don't understand why the decision on apply changes would not be driven by the most recent version of the artifact
Jenni Syed (Jul 31 2018 at 17:13):
@Jie Fan are you referring to the version concurrency aspect: http://hl7.org/fhir/stu3/http.html#concurrency
Jenni Syed (Jul 31 2018 at 17:13):
If so, yes, you can use if-match on patch
Jenni Syed (Jul 31 2018 at 17:13):
We specifically tested this during our connectathon tracks
Jenni Syed (Jul 31 2018 at 17:14):
That is different than a Conditional Update or Conditional Patch (see GF#17256 for some clarification on behavior for Patch specifically)
Jenni Syed (Jul 31 2018 at 17:14):
Though perhaps we need to call out the concurrency support for patch specifically??
Jie Fan (Jul 31 2018 at 17:22):
Yes, I should have clarified that :)
I understand that If-Match is supported for Patch, however, should it also be supported for Conditional Patch as well (or are they considered the same operation)? My understand is that Conditional Patch would face the issues which If-Match tries to solve (e.g. race conditions), so we would need If-Match support as well.
Lloyd McKenzie (Jul 31 2018 at 18:47):
If-Match makes sense. Why would that be on historical versions?
Jie Fan (Jul 31 2018 at 19:48):
Oh, I don't think that would be on historical versions. I meant if search supported version id, then a client might be able to get around by searching for current version's id for conditional update/patch.
Grahame Grieve (Jul 31 2018 at 20:17):
I just explicitly added a comment that if-match works on patch to the current build
Lloyd McKenzie (Jul 31 2018 at 20:44):
With conditional updates, you do either an ETAG match or a timestamp match. You don't need to do a version-based search.
Christiaan Knaap (Aug 01 2018 at 08:42):
How do you know the version but not the id? And if you know the id, why do a conditional update / patch and not a normal one?
Last updated: Apr 12 2022 at 19:14 UTC