-
Notifications
You must be signed in to change notification settings - Fork 306
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
Configure Review layout for SDC catalog application #2783
base: master
Are you sure you want to change the base?
Conversation
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.
Can we directly launch the review mode by providing both the questionnaire JSON and the questionnaire response? This way, when the layout is displayed in review mode, it will show the pre-filled answers. If the user wants to edit those answers, they can click on the edit button at the top.
catalog/src/main/java/com/google/android/fhir/catalog/DemoQuestionnaireFragment.kt
Show resolved
Hide resolved
"status": "draft", | ||
"publisher": "Roshnee team", | ||
"name": "covid-19-screening", | ||
"title": "COVID-19 Screening", | ||
"resourceType": "Questionnaire", | ||
"subjectType": [ | ||
"Encounter" |
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.
can you remove these fields? would be good for the questionnaire to be minimal
), | ||
REVIEW(R.drawable.ic_reviewlayout, R.string.layout_name_review, ""), | ||
READ_ONLY(R.drawable.ic_readonlylayout, R.string.layout_name_read_only, ""), | ||
REVIEW(R.drawable.ic_reviewlayout, R.string.layout_name_review, "layout_review.json", true), |
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.
@santosh-pingle fyi
I was asking santosh to see if there's a way to use lambda to configure this.. it's sort of annoying to keep adding new arguments to this. @rahulmalhotra can you think of a way to do this?
santosh has a similar pr as well #2803
IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).
Fixes #2777
Description
This change configures Review layout for SDC Catalog Application. It consist of the following updates:
enableReviewMode
to Layout enum underLayoutListViewModel.kt
and pass it astrue
for the REVIEW enum value along withlayout_review.json
to render questionnaireDemoQuestionnaireFragment.kt
and use it to show Review Page when its value istrue
layout_review.json
to render questionnaire properlyAlternative(s) considered
N/A
Type
Bug fix
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.