FHIR Chat · Searching by canonical URI with a fragment · implementers

Stream: implementers

Topic: Searching by canonical URI with a fragment


view this post on Zulip Ivan Dubrov (Dec 09 2020 at 02:51):

Given that I have some canonical URI with a fragment (as per specification), how should I approach resolving it via FHIR API?
FHIR search API doesn't say anything about fragments.

Should FHIR search support fragments? That would be easiest for the client in the sense that client wouldn't need to know the type of the "container", the search would be simply be ValueSet?uri=http%3A%2F%2Ffhir.acme.com%2FQuestionnaire%2Fexample%7C1.0%23vs1 and then it's up to the server to somehow figure that the ValueSet being searched is actually contained inside some Questionnaire.

Another alternative would be for client to resolve canonical URI without the fragment first, then to lookup the contained resource. However, in that case, how would client formulate the search query? You cannot do ?uri=http%3A%2F%2Ffhir.acme.com%2FQuestionnaire%2Fexample%7C1.0. Maybe, ?_type=CodeSystem,ValueSet,ImplementationGuide&uri=http%3A%2F%2Ffhir.acme.com%2FQuestionnaire%2Fexample%7C1.0? That just looks plain ugly and also requires client to know the types of all possible containers.

view this post on Zulip Grahame Grieve (Dec 09 2020 at 03:06):

I don't think we've ever discussed whether search should find into contained canonicals. Does it work on test.fhir.org?

view this post on Zulip Ivan Dubrov (Dec 09 2020 at 03:27):

No, it doesn't work. I created CodeSystem http://test.fhir.org/r4/CodeSystem/1 and then searched ValueSet contained in it via http://test.fhir.org/r4/ValueSet?url=urn%3Auuid%3A49da80fe-107d-4958-aca4-2db07276f0e5%23full

This use-case of "entire" ValueSet being contained in the CodeSystem itself is by the way exactly the use-case I'm interested in: it makes sense to me from the tooling point of view (not for all CodeSystems, of course, but for some). Makes it easier to manage that pair of CodeSystem <--> entire ValueSet.

view this post on Zulip Lin Zhang (Dec 09 2020 at 04:18):

Implicit ValueSets within a CodeSystem?


Last updated: Apr 12 2022 at 19:14 UTC