Stream: implementers
Topic: Resolving references with version
Jeremy Chapman (Oct 18 2019 at 16:05):
When resolving absolute or relative reference, we must take into account the version of the resource as specified in meta.versionId of the resource being referenced. Does the same logic apply to references to contained resources? I ask because the Fhir .net API appears to contain version logic in functions for resolving absolute references with version specified (BundleExtensions.FindEntry), but does not have any version specific logic for in functions for resolving contained resources (DomainResource.FindContainedResource).
Lloyd McKenzie (Oct 18 2019 at 19:20):
Entries within Bundles and contained resources inside other resources are all expected to have the same FHIR version
Lloyd McKenzie (Oct 18 2019 at 19:20):
(Schema validation blows up otherwise)
Lloyd McKenzie (Oct 18 2019 at 19:20):
as do the reference implementations :)
Brian Postlethwaite (Oct 18 2019 at 21:42):
Typically in a bundled usage versions wouldn't come into it, but I guess could.
Contained won't as they are referenced by the bookmark #id and there isn't a syntax for specifying version there. You'd just have another Id value.
Paul Church (Oct 19 2019 at 03:33):
I'm confused, is this question about FHIR versions or resource _history versions?
Brian Postlethwaite (Oct 19 2019 at 03:54):
Resource history versions I'm expecting.
Jeremy Chapman (Oct 21 2019 at 17:56):
About resource history versions. where you might have multiple resources in the bundle with the same id, but if the reference specifies a particular version (using the _history syntax in the reference) then you only resolve to the resource that has the matching meta.versionId. I don't think this has anything to do with FHIR versions. Can you have a version references when referencing contained resources?
Jeremy Chapman (Oct 21 2019 at 22:03):
Never mind. I found the statement Contained resources SHALL NOT contain meta.versionId, meta.lastUpdated, or meta.security located on https://www.hl7.org/FHIR/references.html#contained
Last updated: Apr 12 2022 at 19:14 UTC