GoCorona-org / Backend

GNU General Public License v3.0
0 stars 2 forks source link

Question options and API model mismatch #35

Open theTechie opened 4 years ago

theTechie commented 4 years ago

We have found the following differences when it comes to Medmap API and the UI questions and answer options.

  1. There is a screen to capture the user's gender (Male / Female)
    • this is not present in the API model (do we need this?)
  2. "Asthma" is present in the UI for health history
    • this is not present in the API model (do we need this?)
  3. "Smoking cigarettes" is present in the UI for health history
    • this is not present in the API model (do we need this?)
  4. "Fever" has extra information like below (describe fever)
    • "Fever" is just a range (0-4) as per the API model
    • do we need this extra description? image
  5. "Cough" is a multi-selection in UI
    • as per the API its a range (0-4)
    • what is right here?
  6. "Breathlessness" is a range answer in UI (0-4)
    • as per the API it's a boolean (have it or not)
    • what is right here? image
  7. "Do you have any kind of pain?" is another question in UI
    • API only considers joint_pain (yes or no)
    • the model does not match right
    • do we need this? image
  8. "Headache" is also a range answer (0-4)
    • API just handles true or false
  9. "Symptoms progression" is a range 0-4 answer,
    • API just handles 0-3
    • what is right? image

How do we handle the following scenarios?

  1. How to point to the API if the questionnaire is being answered for "self" or "someone else" ?
  2. Should we publish the questionnaire results to Backend if user is just "exploring" ?

image

theTechie commented 4 years ago

@sanjanamoha @Aakashv6 @codeJRV

theTechie commented 4 years ago

@sanjanamoha - this is how the JSON payload will be like. Please note the newly required fields are added below.

  "age": 33,
  "asthma": true,
  "breathlessness": true,
  "breathlessness_type": 2,
  "chills": true,
  "conjunctival_congestion": true,
  "cough": 0,
  "cough_since": 4,
  "diabetes": true,
  "diarrhea": true,
  "fatigue": true,
  "fever": 2,
  "fever_since": 3,
  "gender": "female",
  "headache": true,
  "headache_since": 6,
  "heart": true,
  "height": 189,
  "hiv": true,
  "hypertension": true,
  "joint_pain": true,
  "kidney": true,
  "loss_of_taste_and_smell": true,
  "lungs": true,
  "med_uuid": "393ca5ae-4ffc-4881-92dc-c2f5cda375ac",
  "nasal_congestion": true,
  "nausea_or_vomiting": true,
  "smokes": true,
  "sore_throat": true,
  "stroke": true,
  "symptoms_improvement": 2,
  "transplant": true,
  "weight": 106,
}