android-fhir icon indicating copy to clipboard operation
android-fhir copied to clipboard

Enable ValueSet expansion in the Search API so developers can search by ValueSet rather than disjunction of codes

Open fredhersch opened this issue 3 years ago • 4 comments

Describe the solution you'd like

Add functionality to the search API to find concepts within a ValueSet resource:

  • By code
  • By DisplayName

Return the concept (from the CodeSystem) or Concept Not Found

Estimated effort: 10 days

fredhersch avatar Jul 01 '21 06:07 fredhersch

For value sets that are expanded, it's very simple to look up the codes within the expansion of the valueset. There doesn't need to be any api or utilities for reading an already expanded value set. Even if this is a common operation by developers, there is very little value in providing a common API for that.

So within this issue we should focus on search by value set where a code is the searched parameter. For example, find observations with a code in a given value set .

jingtang10 avatar Jul 19 '21 10:07 jingtang10

Based on discussion with @jingtang10 and @aditya-07 there is no additional search API required here.

An example is: return all Blood Pressure observations for a given Patient using the code(s) for Blood Pressure

Steps to achieve this:

  1. Client app: Get the code or codes for blood pressure: e.g search within ValueSet Resource. Return a single code or set of codes
  2. Client app construct query via SDK to find observation with code value = code1 OR code 2 (uses the search OR operator support)
  3. Uses the search by observations of different types (#611) to return all observations for a given patient
  4. Client app retrieves a collection of observation resources with codes that represent Blood Pressure

fredhersch avatar Aug 11 '21 09:08 fredhersch

agreed. in other words, this can be achieved now (with the OR operator implemented) if the look up from valueset -> codes is done by the app.

if we want to make this better(?) for devs, we can make it so that you don't have to do the look up but only need to provide the valueset url to the search API. but that is probably slightly lower priority (since there is a solution for the app).

jingtang10 avatar Aug 13 '21 08:08 jingtang10

De-prioritized for now. Nice to have feature to simplify, hence moving this out of Q3 scope as per discussion with Jing & Fred.

Tarun-Bhardwaj avatar Aug 18 '21 15:08 Tarun-Bhardwaj