android-fhir
android-fhir copied to clipboard
Enable ValueSet expansion in the Search API so developers can search by ValueSet rather than disjunction of codes
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
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
.
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:
- Client app: Get the code or codes for blood pressure: e.g search within ValueSet Resource. Return a single code or set of codes
- Client app construct query via SDK to find observation with code value = code1 OR code 2 (uses the search OR operator support)
- Uses the search by observations of different types (#611) to return all observations for a given patient
- Client app retrieves a collection of observation resources with codes that represent
Blood Pressure
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).
De-prioritized for now. Nice to have feature to simplify, hence moving this out of Q3 scope as per discussion with Jing & Fred.