Stream: implementers
Topic: How should a client provide references
Niek van Galen (Apr 01 2021 at 10:11):
The Dutch MedMij FHIR IG states that references SHALL be resolvable. See here: https://informatiestandaarden.nictiz.nl/wiki/MedMij:V2020.01/FHIR_IG#Use_of_the_reference_datatype
When, within MedMij context, a FHIR client interacts with FHIR server, for instance posts a bundle of Observation resources, should the client be expected to include the references from the Observation resource (to Patient, Practitioner for example) in the bundle so the server can resolve them in the bundle? Or is the client expected to act as a server and let the actual server resolve the references on an endpoint?
In both situations: would it make sense to describe such expected behavior in the IG, or is there a part of the FHIR spec where we can rely on / refer to?
Simone Heckmann (Apr 01 2021 at 14:43):
Clients usually provide UUIDs for resources in a Bundle and use them to reference the entries in a Bundle, see http://hl7.org/fhir/bundle.html#bundle-unique
Simone Heckmann (Apr 01 2021 at 14:48):
In our IGs we sometimes use an invariant on the Bundle to check whether every reference resolves to an entry with a corresponding fullURL of the same UUID: Bundle.entry.descendants().reference.distinct().subsetOf(%context.entry.fullUrl)
Vassil Peytchev (Apr 01 2021 at 14:48):
Are the Patient and Practitioner resources in the Bundle? is this a transaction/batch bundle, or a different kind? The answer to that will determine how to provide the references. @Simone Heckmann's answer is correct when the answers to the first two questions are Yes
and No
Simone Heckmann (Apr 01 2021 at 14:49):
Yes, I should have added that in our case these Bundles are of type document
. So there is an expectation that all references resolve within the Bundle.
Last updated: Apr 12 2022 at 19:14 UTC