FHIR Chat · references in bundles · implementers

Stream: implementers

Topic: references in bundles


view this post on Zulip René Spronk (Jul 26 2018 at 10:07):

Context: http://build.fhir.org/bundle.html#references - this doesn't fully detail the required behavior of a server.

If server A sends a Patient & Observation transaction bundle to B, 2 POSTs, then the fullURLs of the patient and the observation will be (as an example) a.org/Patient/1 and a.org/Observation/7. The reference from the Observation resource to the Patient resource will be to a.org/Patient/1.
Question: should server B, when it stores the resources contained in this transaction bundle, replace the reference a.org/Patient/1 with a reference to its own copy of that patient resource on server B, given that the Patient with that same fullURL was also contained in the transaction bundle ?

(System A can force this behavior by just using UUIDs instead of URLs, but that's not the question)

view this post on Zulip Christiaan Knaap (Jul 26 2018 at 11:20):

I think yes.
The text in the references paragraph states that server first tries to resolve the reference within the bundle, and hence arrives at the Patient/1 in the bundle. That Patient/1 is created on server B first, so the reference from Observation/7 must be replaced. ("If the server assigns a new id to any resource in the bundle as part of the processing rules above, it SHALL also update any references to that resource in the same bundle as they are processed. " - from http://build.fhir.org/http.html#transaction)

view this post on Zulip René Spronk (Jul 26 2018 at 11:42):

Agree - http://build.fhir.org/http.html#3.1.0.18.2 does answer the issue.

view this post on Zulip Christiaan Knaap (Jul 26 2018 at 11:48):

Dank voor het melden. Stuur je de transactie waarmee je dat getest hebt mee?
Noot: er is een al bekende beperking op de volgorde in transacties: http://docs.simplifier.net/vonk/features/restful_api.html#transaction


Last updated: Apr 12 2022 at 19:14 UTC