FHIR Chat · Searching ValueSets by code · terminology

Stream: terminology

Topic: Searching ValueSets by code


view this post on Zulip Paul Lynch (Jun 25 2020 at 19:39):

If one searches ValueSet?code=... will that find ValueSets whose expansion contains a matching code, or only ValueSets whose definition includes the matching code? If the latter, is there any syntax that would let you find the ValueSets who expansion contains a particular code? (I am really interested in code:text, but "code" make for a simpler question.)

view this post on Zulip Jean Duteau (Jun 25 2020 at 19:49):

both. here is the expression for the code search parameter: ValueSet.expansion.contains.code | ValueSet.compose.include.concept.code

view this post on Zulip Paul Lynch (Jun 25 2020 at 21:51):

I saw that, but I think Value.expansion might be referring to a definitional expansion, i.e., where the definition contains an expansion. In that case it should work, but what about the case where the ValueSet definition only contains .compose (without enumerating all of the codes)?

view this post on Zulip Robert McClure (Jun 25 2020 at 22:06):

I suspect this is a function that is up to the server as to if it is willing to expand every value set with the code system of interest, so should be in the capability statement. I suspect no one makes this clear yet and likely no one does such a combinatorial set of expansions. @Peter Jordan @Rob Hausam @Grahame Grieve

view this post on Zulip Grahame Grieve (Jun 25 2020 at 22:25):

http://hl7.org/fhir/valueset.html#search - seems to cover it sufficiently for me

view this post on Zulip Rob Hausam (Jun 25 2020 at 22:52):

I agree that was the intent of that section. We haven't exercised TerminologyCapabilities much yet, and I don't think we have (yet) an explicit way in the resource to document this search behavior.

view this post on Zulip Peter Jordan (Jun 25 2020 at 22:59):

Looking for all the ValueSets on a Terminology Server that contain a specific code might be akin to searching for a needle in a haystack - particularly if the Code System (reference parameter) is not defined. However, it would be informative to hear more about the use case, assuming that this isn't purely an academic question? My Server implements a parameter for the $lookup operation for the NZ Edition of SNOMED CT that returns RefSet (effectively ValueSet) membership.

Regarding what's possible to declare in CapabilityStatement or TerminologyCapabilities, I don't see a way to express that some parameters (e.g. code) are only supported in combination with others (e.g. reference) for searching on ValueSets.

view this post on Zulip Paul Lynch (Jun 26 2020 at 00:09):

The use case would be to search for LOINC answer lists based on certain words in answers, so that one could re-use the list in a new question. (That would require code:text, not code). I am not convinced that this is useful thing to do; it might be better to search on LOINC question text and then pull the associated list. The "search the answers" approach was suggested to me, and I was trying to see if it was possible.


Last updated: Apr 12 2022 at 19:14 UTC