FHIR Chat · conditional update · implementers

Stream: implementers

Topic: conditional update


view this post on Zulip Jie Fan (May 09 2018 at 15:58):

Hi @all

The conditional update section of the spec says: "The server performs a create interaction" when there is no match, does this mean we should always create the resource regardless whether the server doesn't allow creation through normal update?

If yes, it might be a bit confusing for customers since update and conditional update have different behaviors, especially when the server has a global configuration for that.
If no, how are clients supposed to create or update through the transaction API without knowing whether the resource exists or not?

Thanks!
Jie

view this post on Zulip Jie Fan (May 09 2018 at 16:04):

Oops sorry for @ing all. Didn't see Lloyd's message earlier.

view this post on Zulip Lloyd McKenzie (May 09 2018 at 18:01):

You would only allow the create if you normally allow creates. If you'd like to submit a change request, we can clarify that in the spec.

view this post on Zulip Jie Fan (May 09 2018 at 18:36):

Thanks Lloyd, this is what I expected. A followup question I have is, how are clients supposed to create or update a resource depending on whether the resource already exists (i.e. create the resource if it doesn't exist, update it otherwise) through the transaction API? From the transaction bundle example here: http://hl7.org/fhir/bundle-transaction.json.html, I see that the patient with identifier 234234 appears in a conditional create as well as a conditional update entry, is this the canonical way to handle the issue?

view this post on Zulip Jie Fan (May 09 2018 at 18:37):

Assuming server disables create through update of course.

view this post on Zulip Jie Fan (May 09 2018 at 18:38):

BTW, where do I submit a change request?

view this post on Zulip Lloyd McKenzie (May 09 2018 at 18:39):

For change requests, there's a link at the bottom of every page in the spec that says "propose a change". You'll need to do a 1-time registration and we'll confirm you're a real human. After that, you can submit requests at will :)

view this post on Zulip Lloyd McKenzie (May 09 2018 at 18:39):

Conditional create and conditional update is the only way if you don't have the ability to assign the resource id.

view this post on Zulip Jie Fan (May 09 2018 at 18:45):

Thanks!

view this post on Zulip Jie Fan (May 09 2018 at 20:13):

FYI, change request created: https://gforge.hl7.org/gf/project/fhir/tracker/?action=TrackerItemEdit&tracker_item_id=16549&start=10175

view this post on Zulip Lloyd McKenzie (May 09 2018 at 20:53):

Thanks

view this post on Zulip John Moehrke (May 10 2018 at 12:00):

Jie, sounds like you simply want to use the normal UPDATE (aka http POST). http://build.fhir.org/http.html#update Can you describe your use-case need in more detail?

view this post on Zulip Jie Fan (May 10 2018 at 14:47):

Hi John, I am doing HL7v2 -> FHIR conversion, update wouldn't work because the client doesn't know if the resource already exists on the server (thus the resource id, given our server disables create through update).

view this post on Zulip Ray Cai (Aug 20 2018 at 17:23):

Hi, I have a question regarding the transaction bundle example posted above, in the example the identifier 234234 is used twice but according to the spec(https://www.hl7.org/fhir/bundle.html#bundle-unique) no duplicates are allowed in transaction bundle. The example seems to conflict with the spec. Is this an error in the example?

view this post on Zulip Grahame Grieve (Aug 20 2018 at 21:08):

I think it is in R3, yes - it really doesn't make sense to do a create and an update on the same resource in the same transaction.

view this post on Zulip Ray Cai (Aug 21 2018 at 15:22):

Thanks Grahame, but if it's not allowed to do a create and an update on the same resource in the same transaction, then back to Jie's question above:
how are clients supposed to create or update through the transaction API without knowing whether the resource exists or not, given that the server disables create through update?

view this post on Zulip Grahame Grieve (Aug 21 2018 at 20:42):

probably not able to happen?

view this post on Zulip Julia Davis (Mar 25 2019 at 22:16):

@Craig Newman Hi Craig, I would love to join. I am currently involved in a few projects including ADT, pathology, pharmacy, medications management and OHC, all of which will involve a level of mapping HL7 V2 into the appropriate FHIR resources.
Many thanks
Julia

view this post on Zulip Brian Reinhold (Oct 27 2019 at 13:56):

As I understand it, if I do a conditional update, I shall NOT enter a logical id. If I do an update, I shall enter a logical id. Is this correct?

view this post on Zulip Lloyd McKenzie (Oct 27 2019 at 14:00):

Correct

view this post on Zulip Brian Reinhold (Oct 27 2019 at 14:00):

Correct

Thanks! Love a concrete statement!


Last updated: Apr 12 2022 at 19:14 UTC