Stream: implementers
Topic: Bundles with contained resources
Bart Dutkowski (Nov 09 2021 at 04:02):
Hi, We're looking at an implementation where we need to include a patient as a the subject of an observation. We are planning on doing this using a reference to a contained resource since at the time of the observation being created there is no meaningful patient resource to reference, so a minimal once with a key identifier will be included as the contained resource. We are grouping a number of observations (all about the same patient) into a bundle for transport to the server. Reading the STU3 spec, the Bundle.entry.resource field is of type resource (http://hl7.org/fhir/STU3/resource.html), which does not allow contained resources. Could you please advise if we're going down the wrong path or if we could treat the resource in the bundle as a domain resource which allows contained resources.
Grahame Grieve (Nov 09 2021 at 04:56):
in that context, Resource is abstract, and the contents of the element will be a valid concrete resource. if that concrete resource allows contained resources, then they are allowed
Richard Townley-O'Neill (Nov 09 2021 at 05:00):
If you have identifiers for the patients, you can avoid creating any Patient resources by using Observation.subject.identifier instead of Observation.subject.reference.
Bart Dutkowski (Nov 09 2021 at 23:55):
@Grahame Grieve thanks for the clarification, that makes sense. @Richard Townley-O'Neill thanks for the suggestions, I didn't know about that option. We'll take a look if we can use that approach.
Lloyd McKenzie (Nov 15 2021 at 04:18):
If you want to say that all of the Observations are about the same patient, you might consider just putting the patient in the same Bundle and having all of the other resources reference it. Multiple Observations each with their own contained resource would in no way indicate that they're all talking about the same individual
Last updated: Apr 12 2022 at 19:14 UTC