-
Notifications
You must be signed in to change notification settings - Fork 253
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
Implement answerOption initialSelected to set initial value for choice #2032
Conversation
- With unmerged PR #1 - With unmerged PR google#1917 - With unmerged PR google#1978 - With unmerged PR google#1907 - With unmerged PR google#2016 - With unmerged PR google#2032
- With unmerged PR #1 - With unmerged PR google#1917 - With unmerged PR google#1978 - With unmerged PR google#1907 - With unmerged PR google#2016 - With unmerged PR google#2032 - With unmerged PR google#1669
- With unmerged PR #1 - With unmerged PR google#1917 - With unmerged PR google#1978 - With unmerged PR google#1907 - With unmerged PR google#2032 - With unmerged PR google#1669 - With unmerged PR google#2047
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.
Thanks @maimoonak! Great job! 🙏🙏🙏
.../main/java/com/google/android/fhir/datacapture/extensions/MoreQuestionnaireItemComponents.kt
Outdated
Show resolved
Hide resolved
.../main/java/com/google/android/fhir/datacapture/extensions/MoreQuestionnaireItemComponents.kt
Outdated
Show resolved
Hide resolved
catalog/src/main/java/com/google/android/fhir/catalog/BehaviorListViewModel.kt
Outdated
Show resolved
Hide resolved
.../main/java/com/google/android/fhir/datacapture/extensions/MoreQuestionnaireItemComponents.kt
Outdated
Show resolved
Hide resolved
- With unmerged PR google#2032 - With unmerged PR #1 - With unmerged PR google#1669 - With unmerged PR google#2132 - With unmerged PR #9
- With unmerged PR google#2032 - With unmerged PR #1 - With unmerged PR google#1669 - With unmerged PR google#2132
- With unmerged PR google#2032 - With unmerged PR #1 - With unmerged PR google#1669 - With unmerged PR google#2132 - With unmerged PR #9 - With unmerged PR google#2076 - With unmerged PR #10
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.
Thanks @maimoonak - i do have some comments but this PR is good to be merged. Please just address the comments (in some cases just acknowledge them and create todo/issue). Thanks again for the great work! 🎉🙏👍
.../main/java/com/google/android/fhir/datacapture/extensions/MoreQuestionnaireItemComponents.kt
Outdated
Show resolved
Hide resolved
.../main/java/com/google/android/fhir/datacapture/extensions/MoreQuestionnaireItemComponents.kt
Outdated
Show resolved
Hide resolved
...om/google/android/fhir/datacapture/extensions/MoreQuestionnaireItemAnswerOptionComponents.kt
Outdated
Show resolved
Hide resolved
...om/google/android/fhir/datacapture/extensions/MoreQuestionnaireItemAnswerOptionComponents.kt
Outdated
Show resolved
Hide resolved
- With unmerged PR google#2032 - With unmerged PR #1 - With unmerged PR google#1669 - With unmerged PR google#2132 - With unmerged PR #9 - With unmerged PR google#2076 - With unmerged PR #10
- With unmerged PR google#2032 - With unmerged PR #1 - With unmerged PR google#1669 - With unmerged PR google#2132 - With unmerged PR #9 - With unmerged PR google#2076 - With unmerged PR #10
…extensions/MoreQuestionnaireItemAnswerOptionComponents.kt Co-authored-by: Jing Tang <[email protected]>
@jingtang10 the mentioned changes are done and we need to communicate to users in next release about this change... the use of initialSelected instead on initial property for choice questions (and these are breaking changes if anyone was using initial for choice questions). |
...oogle/android/fhir/datacapture/extensions/MoreQuestionnaireItemAnswerOptionComponentsTest.kt
Outdated
Show resolved
Hide resolved
...oogle/android/fhir/datacapture/extensions/MoreQuestionnaireItemAnswerOptionComponentsTest.kt
Outdated
Show resolved
Hide resolved
...t/java/com/google/android/fhir/datacapture/extensions/MoreQuestionnaireItemComponentsTest.kt
Outdated
Show resolved
Hide resolved
...t/java/com/google/android/fhir/datacapture/extensions/MoreQuestionnaireItemComponentsTest.kt
Outdated
Show resolved
Hide resolved
…extensions/MoreQuestionnaireItemAnswerOptionComponentsTest.kt Co-authored-by: Jing Tang <[email protected]>
...oogle/android/fhir/datacapture/extensions/MoreQuestionnaireItemAnswerOptionComponentsTest.kt
Outdated
Show resolved
Hide resolved
…extensions/MoreQuestionnaireItemAnswerOptionComponentsTest.kt
Fixes #2035
Description
Fhir spec allows to add boolean property to set initial selection of answerOptions as defined here . Also Rule 11 specifies that "If one or more answerOption is present, initial cannot be present. Use answerOption.initialSelected instead"
Alternative(s) considered
Rule specifies to use only one of the property for initial answers. When we are creating responseItem we are setting initial value hence updating answer there.
Type
Choose one: (Bug fix | Feature)
Screenshots
![](https://private-user-images.githubusercontent.com/4829880/245393293-4a9f5f9a-3a9d-46b8-8cc4-fcb1dbcbca10.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUwNDE1MzksIm5iZiI6MTcyNTA0MTIzOSwicGF0aCI6Ii80ODI5ODgwLzI0NTM5MzI5My00YTlmNWY5YS0zYTlkLTQ2YjgtOGNjNC1mY2IxZGJjYmNhMTAuZ2lmP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgzMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MzBUMTgwNzE5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZGNiYmQwOWM1NTQ5NmNlOTM1YzQ2NjMyODc2MDFiOGY1MDQ1Zjc3Njk5ZjA3NzU1ZWUxZjJhMjcxYTU4MWQ0MyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.fExc96iNoVfsTqs005r2KH8j_sdd-pPuQ2paIdAlapA)
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.