Stream: implementers
Topic: FHIR Conditional Patch
Daniel Ye (May 23 2018 at 21:12):
Hi all,
Under the link for FHIR Patch (https://www.hl7.org/fhir/http.html#patch), the specs say it should behave the same way as Conditional Update. If the precondition does not match any resources, Conditional Update will create it. However, isn't it against the purpose of Patch to create a resource? Is this the intended behavior or should there be a different behavior when no resources is matched?
Thanks!
Jenni Syed (May 23 2018 at 21:16):
That should probably link to https://www.hl7.org/fhir/http.html#concurrency instead of Conditional Update. I think it was intended to be the conflict management functionality....
Daniel Ye (May 23 2018 at 21:24):
Hi Jenni, I was referring to this line here 'In addition, servers SHALL support Conditional PATCH, which works exactly as described for Conditional Update.' Do you mean this should point to Concurrency?
Jenni Syed (May 23 2018 at 21:32):
Would need to confirm with others, but I remember testing the if-match specifically in the tracks, not the conditional update
Grahame Grieve (May 23 2018 at 22:18):
I think that we should rather say that if you support patch, and you support conditional update, you should support conditional patch
Jenni Syed (May 24 2018 at 13:30):
@Grahame Grieve what would a conditional patch do?
Jenni Syed (May 24 2018 at 13:31):
specifically for the no match scenario
Grahame Grieve (May 24 2018 at 17:51):
conditional update:
- if you don't find a match, create
- if you find a match, update it
- if you find multiple matches
Grahame Grieve (May 24 2018 at 17:51):
conditional patch:
- if you don't find a match, ignore it
- if you find a match, update it
- if you find multiple matches
Jenni Syed (May 24 2018 at 18:59):
I think that makes sense, but may need to document it
Grahame Grieve (May 24 2018 at 19:26):
that'd be a good idea indeed
Jenni Syed (May 24 2018 at 19:35):
Daniel Ye (May 28 2018 at 14:07):
Thanks Jenni and Grahame, yeah that makes sense to me as well.
Last updated: Apr 12 2022 at 19:14 UTC