- 
                Notifications
    
You must be signed in to change notification settings  - Fork 317
 
Configure Review layout for SDC catalog application #2783
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
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
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                catalog/src/main/java/com/google/android/fhir/catalog/LayoutListViewModel.kt
              
                Outdated
          
            Show resolved
            Hide resolved
        
      4a503f0    to
    372ed61      
    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.
can you see if something like this might work?
        
          
                catalog/src/main/java/com/google/android/fhir/catalog/LayoutConfig.kt
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                catalog/src/main/java/com/google/android/fhir/catalog/LayoutListViewModel.kt
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                catalog/src/main/java/com/google/android/fhir/catalog/LayoutListViewModel.kt
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                catalog/src/main/java/com/google/android/fhir/catalog/LayoutListViewModel.kt
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                catalog/src/main/java/com/google/android/fhir/catalog/DemoQuestionnaireFragment.kt
              
                Outdated
          
            Show resolved
            Hide resolved
        
      ce65500    to
    651efba      
    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.
would be good to have a video for features like this in the future
        
          
                catalog/src/main/java/com/google/android/fhir/catalog/LayoutListViewModel.kt
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                catalog/src/main/java/com/google/android/fhir/catalog/DemoQuestionnaireFragment.kt
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                catalog/src/main/java/com/google/android/fhir/catalog/DemoQuestionnaireFragment.kt
          
            Show resolved
            Hide resolved
        
      …to rm/review-layout-catalog-app
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 you @rahulmalhotra
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:
enableReviewModeto Layout enum underLayoutListViewModel.ktand pass it astruefor the REVIEW enum value along withlayout_review.jsonto render questionnaireDemoQuestionnaireFragment.ktand use it to show Review Page when its value istruelayout_review.jsonto render questionnaire properlyAlternative(s) considered
N/A
Type
Bug fix
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.