FHIR Chat · Bundle.entry.fullUrl -- conditional updates · implementers

Stream: implementers

Topic: Bundle.entry.fullUrl -- conditional updates


view this post on Zulip Ivan Dubrov (Mar 24 2020 at 17:13):

Should FHIR server "resolve" bundle references for conditional updates as well?
For example, in the following bundle:

{
    "resourceType": "Bundle",
    "type": "transaction",
    "entry": [{
        "fullUrl": "urn:uuid:ac7ed09f-3711-4884-a0ff-13ed81ea21d0",
        "request": {
            "method": "PUT",
            "url": "Patient?identifier=patient-xyz"
        }
        "resource": ...
    },
    {
        "request": {
            "method": "PUT",
            "url": "RelatedPerson?patient=urn:uuid:ac7ed09f-3711-4884-a0ff-13ed81ea21d0"
        }
        "resource": ...
    }]
}

Is it reasonable to expect that patient= reference in the query is also replaced with real FHIR resource identity?

view this post on Zulip Lloyd McKenzie (Mar 24 2020 at 17:33):

@Grahame Grieve

view this post on Zulip Paul Church (Mar 24 2020 at 17:50):

That sounds technically problematic, it could require an unbounded number of passes to finish resolving all of the references in a bundle.

view this post on Zulip Ivan Dubrov (Mar 24 2020 at 18:01):

But that's not any different from using these references as references inside resources? I can have conditional PUT, then second entry having a reference to the first one and also doing a conditional PUT, then third entry having a reference to the second one, etc.

view this post on Zulip Paul Church (Mar 24 2020 at 18:04):

The way I think of it is that you can do one pass to figure out what resource identities exist in the bundle (including resolving conditional create/updates) and then a second pass to rewrite references using that information.

view this post on Zulip Ivan Dubrov (Mar 24 2020 at 18:13):

Hmm, I see what you mean.

I guess, this is where our use/implementation of transactions is non-conformant with the spec: we allow dependencies between entries (for example, through logical references) where we have to process resource fully for identifiers to resolve for the following entry. Extended operations would be another example where we have to process an operation before entries that depend on its result.

view this post on Zulip Paul Church (Mar 24 2020 at 18:28):

I think logical references could be done with only one pass though? As part of figuring out what resource identities exist in the bundle, the identifiers could be extracted. It's a bit more cumbersome because there could be other resources already on the server with those identifiers.

view this post on Zulip Grahame Grieve (Mar 29 2020 at 10:57):

that makes my head hurt. My server certainly doesn't

view this post on Zulip Chidamber Kumar (Apr 04 2020 at 13:20):

Hi
I have a question regarding conditional update. The section here http://build.fhir.org/http.html#cond-update
The 4th bullet point says, the server returns a 400 Bad Request if a resource match is found but resource id doesn't match.
While, the last statement of the same section mentions that "If an id is provided, the server SHALL ignore it".

Any clarifications ?

view this post on Zulip Lloyd McKenzie (Apr 04 2020 at 13:51):

@Grahame Grieve @Josh Mandel

view this post on Zulip Josh Mandel (Apr 04 2020 at 14:40):

Given the amount of detail we provide in the paragraphs above about exactly to do in circumstance when there is an ID or not an ID, and when the ID matches or does not match... I have to conclude that the sentence at the end is a mistake in our specification and should be deleted. At least this is trial use material :-)

view this post on Zulip Josh Mandel (Apr 04 2020 at 14:41):

I will add an issue to our tracker

view this post on Zulip Josh Mandel (Apr 04 2020 at 14:45):

FHIR#26688

view this post on Zulip David Moorhouse (Nov 26 2020 at 22:22):

Thanks Josh, we just stumbled across this one too. :)


Last updated: Apr 12 2022 at 19:14 UTC