This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Populating drop-down options in FHIR Core from Resources in DB #2463
Labels
Discussion
This is an open discussion that may or may not lead to actionable points
Help Wanted
Extra attention is needed
Scoping Ongoing
Feature request
Syncing location (hierarchy) data from the server and populating drop-down options in a Questionnaire
Context
In Questionnaires where the user needs to input location-related data such as the name of a physical location or Health Facility tied to a jurisdiction, a selection from a list would offer the best UX.
Implementation
Server-side implementation
The implementation should provide syncing of location data from the server added through location hierarchy or practitioner assignments on FHIR Web.
Android FHIR SDK SDC Support
Currently, it is only possible to use
answerExpressions
with an expression that takes a query and populates a drop-down item control. Support was added here Support for answerExpression extension google/android-fhir#1039This means that we can query against a Resource and use the values in a drop-down. This happens on loading of the Questionnaire and doesn't support multi-level selections. For instance, in a Questionnaire with multiple (multi-level) location selection options, a prior location selection within the same Questionnaire would not result in a change in the options in the next drop-down
With
initialExpression
x-fhir-query support that will be introduced in Initial expression with x-fhir-query support google/android-fhir#2036 it'll be possible to Query for and set an initially selected optionFHIR Core implementation
a) Drop-down selection
answerExpression
. A sample implementation can be seen here Use initial expressions to select the initial value from a dropdown list populated using answer expressions google/android-fhir#1830 (comment)b) Multi-level selections
answerExpression
s to work with an already loaded QuestionnaireAdditional Context
See Loading of data on SDC widgets meeting notes
The text was updated successfully, but these errors were encountered: