Stream: implementers
Topic: conditional create
Dave Henderson (Aug 09 2017 at 14:34):
Hi guys,
Dave Henderson (Aug 09 2017 at 14:39):
I'm looking at using the conditional create REST functionality to post a record without that record already existing. I know a conditional create will allow me to do something like this:
If-None-Exists: If-None-Exist: identifier=http://my-system|123
FHIR doc states that this is used in the HL7 Extension Header. What and how is a HL7 extension header used ? I'll be using the Consent resource and don't want to duplicate any records.
Any info on how to use conditional create would be appreciated.
Cheers
Dave
Grahame Grieve (Aug 09 2017 at 23:00):
"If-None-Exist" is an http header defined by HL7. You use it exactly like this:
If-None-Exist: [search parameters]
Grahame Grieve (Aug 09 2017 at 23:00):
as one of the http headers
René Spronk (Apr 10 2020 at 11:40):
On a conditional create (http://build.fhir.org/http.html#ccreate), the defined behaviour when there is "One Match: The server ignores the post and returns 200 OK". I was assuming that the server would return (in the response header) the Location of the resource. Some servers do indeed implement this, others (like test.fhir.org) don't. The FHIR spec doesn't specifyc anything about the Location ehader, so there's probably something defined in the underlying HTTP spec. Should there, or should there not be, a Location header when there is 'One Match' in a conditional create? @Grahame Grieve
Grahame Grieve (Apr 10 2020 at 19:54):
I think it would be useful if we said that there had to be
René Spronk (Apr 14 2020 at 06:48):
https://jira.hl7.org/browse/FHIR-26845 - by the way @Grahame Grieve it's test.fhir.org that's missing the Location header..
Grahame Grieve (Apr 22 2020 at 04:36):
fixed next upgade
Last updated: Apr 12 2022 at 19:14 UTC