hasadna / avid-covider

MIT License
23 stars 8 forks source link

ease retruning reports [?h] #310

Closed noamoss closed 4 years ago

noamoss commented 4 years ago

Definitions `

This task will focus on easing returning reporters flow, by picking previous report(s) data (it will be referred here as a "_previous_reportdata") and asking the reporter to (actively) approve they are still relevant for the current day ("approved detail"). This method - a multiselection question, showing previous report data, will be named a " summary question".

Requirements

Implementation

in the current script, we plan using the summary questions in frequencies: daily (i.e. every report) and weekly.

Demonstration:

- say: מה מהפרטים הבאים נכון גם היום?
- wait:
    kind: summary-daily
   default_update_question: מה הדיווח הנכון להיום?
   args:
    - varname: general_feeling
      - options:
          - match: feel_good
             label: הרגשה טובה בסך הכל
          - match: feel_bad
             label: הרגשה לא כל כך טובה
       - update:
             update_question: אז איך ההרגשה היום?
             update_goto: general_feeling

   - varname: exposure_status
     - options:
        - match: diagnosed
          label: אבחנה כחולה בקורונה בתוקף
        - match: insulation_with_family
          label: בבידוד עם בני המשפחה
        - match: has_symptoms
          label: יש לי סימפטומים של קורונה
        - match: voluntary
          label: בבידוד מבחירה
       - match: none
         label: לא בבידוד וללא אבחון כחולה בקורונה
       - update:
             update_question: אז מה השתנה
             update_goto: insulation

   - varname: diagnosed_location
      - match: hotel
        label: אני שוהה בבית מלון
      - match: hospital
         label: אני שוהה בבית חולים
      - match: home
        label: אני שוהה בבית
       - match: recovered
         label: החלמתי מקורונה, אבל אני עדיין שוהה בבית
      - default: 
         label:  אני שוהה ב{{record.diagnoed_location}}
       - update:
             update_question: אז מה השתנה
             update_goto: insulation
   - varname: temperature
     - match: none
       label: לא מדדתי היום חום
       - update:
             update_goto: current-report-temperature

   - varname: symptoms_clogged_nose
     - match: true
       label: יש לי נזלת או גודש באף
      - update:
        update_question: יש תסמינים אחרים?
        update_goto: current-report-top-level-symptoms
   - varname: symptoms_dry_cough
     - match: true
       label: יש לי שיעול יבש
      - update:
        update_question: יש תסמינים אחרים?
        update_goto: current-report-top-level-symptoms
   - varname: symptoms_moist_cough
     - match: true
       label: יש לי שיעול לח או עם כיח
      - update:
        update_question: יש תסמינים אחרים?
        update_goto: current-report-top-level-symptoms
.
.
.
   - varname: met_above_18
     - match: 0
       label: לא פגשתי היום אנשים מבוגרים, מעל גיל 18
     - default:
       label   היום פגשתי {{met_above_18}} אנשים מבוגרים, כולל בני ביתי
  - varnmae: met_under_18
     - match: 0
       label: לא פגשתי היום אנשים מתחת לגיל 18
     - default:
       label: פגשתי {{met_above_18}} אנשים , כולל בני ביתי
  1. the danger in this implementation. of course, is not covering all variable's content, or forgetting to update the summary question when we update the valid values in the selection/multi-selection questions in the script. Therefore, part of this mechanism should be default behavior, under the default_update_question section. It will help us to catch problems and uncovered scenarios.

  2. we ignore the multiselection question (answers) dilemma, by showing each selected answer separately. See the symptoms questions example.

  3. sometimes an empty/nonexistent variable in the record means the question/detail was not relevant in the previous report, and sometimes it means the answer was "No"/"None"/0. The optional "no_value_label" will be used for these cases:

    • see the "diagnosed_location" example for no value which should be displayed in a summary question
    • see the "symptoms_clogged_nose" (and all other symptoms) as an example for no value that should not be displayed in the summary question
  4. for open questions, we need to enable label templating (see the diagnoed_location example)

  5. this structure will let us check real scenarios - we might end up splitting the daily summary question into separate 2 questions.

1. Daily Report Details

questions:

2. Weekly Report Details

3. update reporter's details

(later we might use this method to update/change the address as well, putting it aside for now)

Design

image

Updated in Zeplin: https://app.zeplin.io/project/5e74f33aec70626a34e66595/screen/5eb17fb8e353e71b0123fec1/ https://app.zeplin.io/project/5e74f33aec70626a34e66595/screen/5eb17fb8c67343b0adca5258/ https://app.zeplin.io/project/5e74f33aec70626a34e66595/screen/5eb17fb86979f51b378f9f5b/

noamoss commented 4 years ago

@akariv it is not prioritized for upcoming week (unfortunately), but I assign it to you for review and feedback whenever relevant.

noamoss commented 4 years ago

@akariv @maryLoi closing in favor of a simpler version(s): #342, #343, #341