Stream: implementers
Topic: Filter ValueSet by Display
natus (Oct 11 2018 at 22:16):
Hi
AFAIK it is possible to expand ValueSets by applying filters with a limited set of operators.
I d'like to be able to filter by keyword, for example: give me all Loinc code about "pain" from the whole Loinc ValueSet.
I can imagine two ways, but I am not satisfied with them:
1) using filter (property="display", op="regex", value="(?i)\\bpain\\b")
2) using the "_text=" search parameter at resource level and return only the code that match the natural language query
Thanks if you have a better way,
Grahame Grieve (Oct 11 2018 at 22:17):
you should probably move these type of questions to the terminology stream
Grahame Grieve (Oct 11 2018 at 22:17):
the first one is the intent.
Grahame Grieve (Oct 11 2018 at 22:17):
but you really need to ask Loinc for a category in the multi-axial heirarchy for 'pain' and then you can use is-a for the entry
natus (Oct 11 2018 at 22:20):
(not sure if I can move a topic afterward sorry)
Loinc is only an example here. I d'like to filter by display in general and any kind of system.
People use to use natural language to dig terminologies, that's a common use case isn'it ?
natus (Oct 20 2018 at 09:34):
The documentation (https://www.hl7.org/fhir/valueset-operations.html#4.8.16.1.1) gives an example:
Expanding a value set that is already registered on the server as "23", with a text filter of "abdo" (Request):
GET [base]/ValueSet/23/$expand?filter=abdo
So I guess in this case the filter parameter is intended for free text searching to expand the valueset.
Apparently this is exactly what I was looking for:
GET [base]/ValueSet/$expand?filter=abdo OR digest
Last updated: Apr 12 2022 at 19:14 UTC