Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
| callbacks = mapOf(Pair(CustomCallbackType.AUTO_COMPLETE, AutoCompleteCallback( | ||
| callback = { query -> | ||
| run { | ||
| listOf(AutoCompleteViewAnswerOption("a", "Type 2 Diabetes Mellitus"), | ||
| AutoCompleteViewAnswerOption("b", "Test") | ||
| ) | ||
| } | ||
| } | ||
| ))) |
There was a problem hiding this comment.
on line 51, other than the query, I think we also need the value set resolver url to be passed in the API.
the url will be provided by the questionnaire item, what it does that it can point to a terminology server to retrieve the option lists, then the query will filter that lists so we can have less options to process
There was a problem hiding this comment.
i think what fikri meant is tha tthe url should be passed as another parameter besides the query string itself. otherwise how do we distinguish different valueset searches?
There was a problem hiding this comment.
Yeah good point. I will make this change.
jingtang10
left a comment
There was a problem hiding this comment.
Thanks @dilys-l! A couple of questions below.
| callbacks = mapOf(Pair(CustomCallbackType.AUTO_COMPLETE, AutoCompleteCallback( | ||
| callback = { query -> | ||
| run { | ||
| listOf(AutoCompleteViewAnswerOption("a", "Type 2 Diabetes Mellitus"), | ||
| AutoCompleteViewAnswerOption("b", "Test") | ||
| ) | ||
| } | ||
| } | ||
| ))) |
There was a problem hiding this comment.
i think what fikri meant is tha tthe url should be passed as another parameter besides the query string itself. otherwise how do we distinguish different valueset searches?
datacapture/src/main/java/com/google/android/fhir/datacapture/QuestionnaireEditAdapter.kt
Outdated
Show resolved
Hide resolved
catalog/src/main/java/com/google/android/fhir/catalog/CatalogApplication.kt
Outdated
Show resolved
Hide resolved
datacapture/src/main/java/com/google/android/fhir/datacapture/QuestionnaireEditAdapter.kt
Outdated
Show resolved
Hide resolved
datacapture/src/main/java/com/google/android/fhir/datacapture/DataCaptureConfig.kt
Outdated
Show resolved
Hide resolved
datacapture/src/main/java/com/google/android/fhir/datacapture/DataCaptureConfig.kt
Outdated
Show resolved
Hide resolved
...in/java/com/google/android/fhir/datacapture/views/factories/AutoCompleteViewHolderFactory.kt
Outdated
Show resolved
Hide resolved
- Combined functionality with the ExternalAnswerValueSetResolver - Renamed various functions and arguments for improved clarity - Moved filter handling out of the adapter and into the textChangedListener - Moved resolver to the viewmodel
bdaff86 to
1adc09e
Compare
e69ecaa to
2c14713
Compare
IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).
Fixes #2738
Description
Adds the ability for the client to pass a custom callback to AutoComplete for dynamic AutoComplete answer resolution
Alternative(s) considered
NA
Type
Feature
Screenshots (if applicable)
Checklist
./gradlew spotlessApplyand./gradlew spotlessCheckto check my code follows the style guide of this project../gradlew checkand./gradlew connectedCheckto test my changes locally.