-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Populate initial value from dropdown list for questionnaire items with type reference #2065
Conversation
…e#1778) * Added custom search paramter. * Review changes : Injecting ResourceIndexer into ResourceDao
* Show submit button in review mode * Added tests * Review comments: Updated the fragment result listener to check explicit result values
* Fix for removing old indexes when resource is updated * Added comments
Sometimes choiceColumn evaluated to similar 'display' text across many options, and the autocompletetextview text would get set to null
@LZRS Can you add a description of what this change does in the Description section above? |
datacapture/src/main/java/com/google/android/fhir/datacapture/extensions/MoreTypes.kt
Outdated
Show resolved
Hide resolved
...c/main/java/com/google/android/fhir/datacapture/views/factories/DropDownViewHolderFactory.kt
Outdated
Show resolved
Hide resolved
...c/main/java/com/google/android/fhir/datacapture/views/factories/DropDownViewHolderFactory.kt
Show resolved
Hide resolved
...c/main/java/com/google/android/fhir/datacapture/views/factories/DropDownViewHolderFactory.kt
Show resolved
Hide resolved
...c/main/java/com/google/android/fhir/datacapture/views/factories/DropDownViewHolderFactory.kt
Outdated
Show resolved
Hide resolved
@omarismail94 I've added the relevant description and addressed the comments |
datacapture/src/main/java/com/google/android/fhir/datacapture/extensions/MoreTypes.kt
Outdated
Show resolved
Hide resolved
datacapture/src/main/java/com/google/android/fhir/datacapture/mapping/ResourceMapper.kt
Outdated
Show resolved
Hide resolved
...in/java/com/google/android/fhir/datacapture/views/factories/AutoCompleteViewHolderFactory.kt
Show resolved
Hide resolved
Co-authored-by: Omar Ismail <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great change!
Head branch was pushed to by a user without write access
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! Good to see our testing also caught it :D
* Returns the unique identifier of a [Type]. Used to differentiate between item answer options that | ||
* may have similar display strings | ||
*/ | ||
fun Type.identifierString(context: Context): String = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
slightly worried we're not dealing with identify of codes carefully enough. can we make this function much more rigorous please?
for example, comparing two coding just by code but not by system doesn't meet the brief of returning "unique identifier".
IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).
Fixes #1830, and close #1831
Description
Adds support for setting initial values using initial expressions for questionnaire field items of type
reference
in the following formsUsing Resource.id expression
and Using Resource
Also adds fix for the autocomplete textview being set to empty when a dropdown item (using the
choiceColumn
) is selected. Seems to have been occuring when thedisplayString
no longer evaluated to a unique string and.singleOrNull()
always evaluated to nullAlternative(s) considered
Have you considered any alternatives? And if so, why have you chosen the approach in this PR?
Type
Choose one: (Bug fix | Feature | Documentation | Testing | Code health | Builds | Releases | Other)
Screenshots (if applicable)
Checklist
./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the style guide of this project../gradlew check
and./gradlew connectedCheck
to test my changes locally.