Stream: implementers
Topic: Resolve polymorphic canonical
Brian Kaney (Jun 02 2020 at 00:45):
How should you resolve canonical references that are polymorphic/any (such as RelatedArtifact.resource
https://www.hl7.org/fhir/metadatatypes.html#RelatedArtifact)?
Lloyd McKenzie (Jun 02 2020 at 03:25):
You'd have to search against all of the types that have canonical URLs. (Or at least all those you know how to search for.) It would be worth clarifying this in the spec - can you submit a change request?
Brian Kaney (Jun 02 2020 at 14:23):
@Lloyd McKenzie There is no search at the system level that could work across resources (for a URL)? So that is not possible? it's technically possible, but would require up to (total number of resource types with canonical URLs) search requests
Brian Kaney (Jun 02 2020 at 14:43):
I think a more practical solution would be a system search, like GET /fhir/?url=<canonical-url>
, that would search across all resource types (that have canonical URLs)?
Lloyd McKenzie (Jun 02 2020 at 14:58):
Yes, that would work.
Alexander Zautke (Jun 02 2020 at 15:01):
Can’t you use _type on the system level for this?
Brian Kaney (Jun 02 2020 at 15:03):
What would you use for _type
? In this case the Canonical is ploymorphic, so you don't know what type it is.
Alexander Zautke (Jun 02 2020 at 15:04):
To constrain at least to all types which can have a canonical url
Alexander Zautke (Jun 02 2020 at 15:05):
so _type=StructureDefinition,ValueSet,CodeSystem&url=<canonical>
Brian Kaney (Jun 02 2020 at 15:05):
I see, that's a great idea
Brian Kaney (Jun 02 2020 at 15:06):
but this pattern will be common as we start using canonical, so maybe we think about a system level capability for this.
Paul Church (Jun 02 2020 at 15:10):
CanonicalResource could define this search parameter: http://build.fhir.org/canonicalresource.html#search
but I would think it should be _url
Last updated: Apr 12 2022 at 19:14 UTC