If one uses this in combination with a bundle, how would one indicate in
the HTTP header that there are multiple resources that are to be subject
of the "If-None-Exist" header tag? (I'm not exactly an expert on HTTP
headers) ..
In our v2-to-FHIR scenario I won't be able to ever assume that a
communication server would be able to know (unless it persists some
mapping table between ids gleaned from the mesage and logical IDs as
assigned by the FHIR server) what the logical ids are of the resources
it has to update/create. So effectively the best option would be for the
comm. server to use conditional create/update for all (or almost all)
resources. It doesn't care about the logical IDs assigned to the
resources by the FHIR server, it wants to update/create based on identifier.
Why is it that a conditional update uses a URL:
PUT [base]/[type]/?[search parameters]
and a conditional create a HTTP header? That's inconsistent..
If-None-Exist: base/[type]?[search parameters]
Not being a HTTP header expert, having a POST [base]/[type]/?[search
parameters] would be my preference. (if match - do nothing, if no match:
create).
TTYL,
-Rene
On 15-4-2015 6:07, Grahame Grieve wrote:
you'd use a conditional create for this circumstance, not a
conditional update
See http://hl7.org/fhir/2015May/http.html#2.1.0.10.1
> No matches: The server performs a create operation
> One Match: The server performs the update against the matching
resource
> Multiple matches: The server returns a 412 Precondition Failed
error indicating the the client's criteria were not selective enough
In the context of v2 to FHIR mapping there's a need for a
variation of the above rules:
> No matches: The server performs a create operation
One Match: The server performs NOTHING against the matching
resource (because it already exists, we don't wish to override)
> Multiple matches: The server returns a 412 Precondition Failed
error indicating the the client's criteria were not selective enough
Scenario: Lab system wishing to conditionally create a Patient
resource, in the full knowledge that the Patient probably already
has been created by a HIS/MPI [a much more reliable source for
Patient demographics than a Lab system]. Apart from first
querying, and subsequent creation (if the query has no matches),
there doesn't seem to be a way to do this within a transaction.
(or is there?)
-Rene
--
------------------------------------------------------------
Rene Spronk Cell: +31 (0)655 363 446
<tel:%2B31%20%280%29655%20363%20446>
Tutor/Senior Consultant Office: +31 (0)33 7 630 636
<tel:%2B31%20%280%2933%207%20630%20636>
Ringholm bv The Netherlands
http://www.ringholm.com mailto:Rene.Spronk@ringholm.com
<mailto:Rene.Spronk@ringholm.com>
twitter:@Ringholm skype:rene_ringholm
Ringholm is registered at the Amsterdam KvK reg.# 30155695
------------------------------------------------------------
Learn * Share * Connect
***********************************************************************************
Manage subscriptions - http://www.HL7.org/listservice
View archives - http://lists.HL7.org/read/?forum=fhir
Unsubscribe -
http://www.HL7.org/tools/unsubscribe.cfm?email=grahame@healthintersections.com.au&list=fhir
Terms of use -
http://www.HL7.org/myhl7/managelistservs.cfm?ref=nav#listrules
About conditional create:
If one uses this in combination with a bundle, how would one indicate in the HTTP header that there are multiple resources that are to be subject of the "If-None-Exist" header tag? (I'm not exactly an expert on HTTP headers) ..
In our v2-to-FHIR scenario I won't be able to ever assume that a communication server would be able to know (unless it persists some mapping table between ids gleaned from the mesage and logical IDs as assigned by the FHIR server) what the logical ids are of the resources it has to update/create. So effectively the best option would be for the comm. server to use conditional create/update for all (or almost all) resources. It doesn't care about the logical IDs assigned to the resources by the FHIR server, it wants to update/create based on identifier.
Why is it that a conditional update uses a URL:
TTYL,
-Rene
On 15-4-2015 6:07, Grahame Grieve wrote:
Rene Spronk Cell: +31 (0)655 363 446 Tutor/Senior Consultant Office: +31 (0)33 7 630 636 Ringholm bv The Netherlands http://www.ringholm.com mailto:Rene.Spronk@ringholm.com twitter:@Ringholm skype:rene_ringholm
Ringholm is registered at the Amsterdam KvK reg.# 30155695