-
Notifications
You must be signed in to change notification settings - Fork 294
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
Repeated groups #1559
Repeated groups #1559
Conversation
32327a5
to
068fb15
Compare
73c0694
to
61fb146
Compare
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 @kevinmost! this is amazing!
datacapture/src/main/res/layout/questionnaire_item_group_header_view.xml
Show resolved
Hide resolved
datacapture/src/main/res/layout/questionnaire_item_group_header_view.xml
Show resolved
Hide resolved
datacapture/src/main/res/layout/questionnaire_item_group_header_view.xml
Outdated
Show resolved
Hide resolved
datacapture/src/main/java/com/google/android/fhir/datacapture/QuestionnaireViewModel.kt
Outdated
Show resolved
Hide resolved
datacapture/src/test/java/com/google/android/fhir/datacapture/QuestionnaireViewModelTest.kt
Show resolved
Hide resolved
datacapture/src/test/java/com/google/android/fhir/datacapture/QuestionnaireViewModelTest.kt
Show resolved
Hide resolved
datacapture/src/main/java/com/google/android/fhir/datacapture/QuestionnaireViewModel.kt
Show resolved
Hide resolved
datacapture/src/main/java/com/google/android/fhir/datacapture/QuestionnaireViewModel.kt
Outdated
Show resolved
Hide resolved
Hi @kevinmost , could you please provide an ETA by when this can be done? |
61fb146
to
f7e512f
Compare
1d024d2
to
3d2ac8d
Compare
I think this is ready for re-review, @jingtang10 |
Thanks, @kevinmost Will review it. Not sure what is the issue with the failing tests CC @jingtang10 |
42ec4af
to
1c9c594
Compare
Hm, the changes from #1670 seem to be breaking my tests (reverting that commit locally shows them working again). The issue is definitely with my PR though (I agree that the ViewModel should be the source-of-truth for answers, and Testing locally, the logic still seems to work. Any suggestions on how to restructure this test so it passes, @jingtang10? |
datacapture/src/test/java/com/google/android/fhir/datacapture/QuestionnaireViewModelTest.kt
Outdated
Show resolved
Hide resolved
ec53b08
to
2af50c4
Compare
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 kevin - approved.
just a commen to add some tests for the group header widget. once that's done please feel free to merge
...in/java/com/google/android/fhir/datacapture/views/QuestionnaireItemGroupViewHolderFactory.kt
Show resolved
Hide resolved
22977f7
to
92f3122
Compare
Codecov Report
@@ Coverage Diff @@
## master #1559 +/- ##
============================================
- Coverage 41.54% 41.41% -0.14%
+ Complexity 377 376 -1
============================================
Files 150 150
Lines 5300 5332 +32
Branches 952 960 +8
============================================
+ Hits 2202 2208 +6
- Misses 2767 2789 +22
- Partials 331 335 +4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Support repeated groups
Support repeated groups
IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).
Fixes #726
Description
Adds support for repeated groups.
Also added a sample form that uses repeated groups to record multiple COVID vaccine doses.
Several features are still missing. Given the size of this PR, it seems better to add those features in a follow-up. Most of those features would involve a header per instance of the repeated group which would allow for:
Alternative(s) considered
N/A
Type
Choose one: (Feature)
Screenshots (if applicable)
Example form with 2 group response instances:
Resulting JSON:
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.