Replies: 9 comments 13 replies
-
@f-odhiambo @dubdabasoduba @pld Please have a look at this and add any thoughts on the same |
Beta Was this translation helpful? Give feedback.
-
Turns out, answer-expression can only access FHIRPath context from launch-context.
@f-odhiambo remember our chat about "can answerExpression works on rendered questionnaire? just like calculated-expression". |
Beta Was this translation helpful? Give feedback.
-
@pld @f-odhiambo @dubdabasoduba |
Beta Was this translation helpful? Give feedback.
-
@pld @f-odhiambo @dubdabasoduba device-2023-07-11-191923.webm |
Beta Was this translation helpful? Give feedback.
-
@FikriMilano when you run the app with locations, you need to click on the questionnaire fields twice for it to load filtered resources from the local db. Have you experienced this? |
Beta Was this translation helpful? Give feedback.
-
This is how it appears the first time However, when you press the dash and press the drop-down again, the |
Beta Was this translation helpful? Give feedback.
-
@FikriMilano can you try testing the drop-down on the questionnaire without this part
|
Beta Was this translation helpful? Give feedback.
-
@pld @allan-on Can I pick up on documenting this implementation? It will be very useful for the entire team to get to understand how this is done. |
Beta Was this translation helpful? Give feedback.
-
Yes please go aheadOn Dec 18, 2023, at 02:00, Sharon Akinyi ***@***.***> wrote:
@pld @allan-on Can I pick up on documenting this implementation? It will be very useful for the entire team to get to understand how this is done.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
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
Beta Was this translation helpful? Give feedback.
All reactions