Skip to content
This repository was archived by the owner on Apr 21, 2025. It is now read-only.

Commit c907a7b

Browse files
authored
Symptom Checker UI (#1279)
1 parent 9b7f228 commit c907a7b

11 files changed

Lines changed: 490 additions & 236 deletions

File tree

client/flutter/assets/content_bundles/symptom_checker.en.yaml

Lines changed: 58 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -6,168 +6,145 @@ contents:
66
-
77
id: q1_emergency
88
type: single_selection
9-
question_html: |
10-
<p><b>Is this an emergency?</b></p>
11-
<p>Stop and seek immediate medical attention if you are experiencing:<br/>
12-
- Difficulty breathing<br/>
13-
- Shortness of breath<br/>
14-
- Chest pain or pressure<br/>
15-
- Loss of speech or movement<br/></p>
9+
title: Is this an emergency?
10+
body_html: |
11+
<p>Stop and seek immediate medical attention if you are experiencing:
12+
<ul><li>Difficulty breathing</li>
13+
<li>Shortness of breath</li>
14+
<li>Chest pain or pressure</li>
15+
<li>Loss of speech or movement</li></ul></p>
1616
answers:
1717
-
1818
id: emergency
1919
icon_name: snowflake
20-
body_html: |
21-
<p>I am experiencing at least one of these symptoms</p>
20+
title: I am experiencing at least one of these symptoms
2221
-
2322
id: no_emergency
2423
icon_name: snowflake
25-
body_html: |
26-
<p>I do not have any of these symptoms</p>
24+
title: I do not have any of these symptoms
2725

2826
-
2927
id: q2_symptoms
3028
type: multiple_selection
3129
display_condition: >-
3230
has('no_emergency')
33-
question_html: |
34-
<p><b>Do you have any of these symptoms?</b></p>
31+
title: Do you have any of these symptoms?
3532
answers:
3633
-
3734
id: fever
3835
icon_name: snowflake
39-
body_html: |
40-
<p>Fever</p>
36+
title: Fever
4137
-
4238
id: dry_cough
4339
icon_name: snowflake
44-
body_html: |
45-
<p>Dry cough</p>
40+
title: Dry cough
4641
-
4742
id: tiredness
4843
icon_name: snowflake
49-
body_html: |
50-
<p>Tiredness</p>
44+
title: Tiredness
5145
-
5246
id: aches_and_pains
5347
icon_name: snowflake
54-
body_html: |
55-
<p>Aches and pains</p>
48+
title: Aches and pains
5649
-
5750
id: sore_throat
5851
icon_name: snowflake
59-
body_html: |
60-
<p>Sore throat</p>
52+
title: Sore throat
6153
-
6254
id: diarrhoea
6355
icon_name: snowflake
64-
body_html: |
65-
<p>Diarrhoea</p>
56+
title: Diarrhoea
6657
-
6758
id: conjunctivitis
6859
icon_name: snowflake
69-
body_html: |
70-
<p>Conjunctivitis</p>
60+
title: Conjunctivitis
7161
-
7262
id: headache
7363
icon_name: snowflake
74-
body_html: |
75-
<p>Headache</p>
64+
title: Headache
7665
-
7766
id: loss_of_taste_or_smell
7867
icon_name: snowflake
79-
body_html: |
80-
<p>Loss of taste or smell</p>
68+
title: Loss of taste or smell
8169
-
8270
id: rash_or_discolouration
8371
icon_name: snowflake
84-
body_html: |
85-
<p>A rash on the skin, or discolouration of fingers or toes</p>
72+
title: A rash on the skin, or discolouration of fingers or toes
8673
-
8774
id: q3_covid19contact
8875
type: single_selection
8976
display_condition: >-
9077
has('no_emergency') &&
9178
!(has('fever') && has('dry_cough'))
92-
question_html: |
93-
<p><b>Close contact with COVID-19?</b></p>
79+
title: Close contact with COVID-19?
80+
body_html: |
9481
<p>In the last 14 days, are you aware of having been in close contact with someone who has been diagnosed with COVID-19 or has symptoms of COVID-19 (cough, fever, or difficulty breathing)?</p>
9582
answers:
9683
-
9784
id: contact
9885
icon_name: snowflake
99-
body_html: |
100-
<p>Yes</p>
86+
title: Yes
10187
-
10288
id: no_contact
10389
icon_name: snowflake
104-
body_html: |
105-
<p>No</p>
90+
title: No
10691
-
10792
id: q4_ltc_hcf
10893
type: single_selection
10994
display_condition: >-
11095
has('no_emergency') &&
11196
(selectionCount('q2_symptoms') > 0) &&
11297
has('no_contact')
113-
question_html: |
114-
<p><b>Are you a resident of or do you work in a healthcare facility or a longterm care facility?</b></p>
98+
title: Are you a resident of or do you work in a healthcare facility or a longterm care facility?
11599
answers:
116100
-
117101
id: ltc_hcf
118102
icon_name: snowflake
119-
body_html: |
120-
<p>Yes</p>
103+
title: Yes
121104
-
122105
id: no_ltc_hcf
123106
icon_name: snowflake
124-
body_html: |
125-
<p>No</p>
107+
title: No
126108
-
127109
id: q5_age
128110
type: single_selection
129111
display_condition: >-
130112
has('no_emergency') &&
131113
!(has('contact') && (selectionCount('q2_symptoms') == 0))
132-
question_html: |
133-
<p><b>How old are you?</b></p>
114+
title: How old are you?
134115
answers:
135116
-
136117
id: under60
137118
icon_name: snowflake
138-
body_html: |
139-
<p>Under 60</p>
119+
title: Under 60
140120
-
141121
id: over60
142122
icon_name: snowflake
143-
body_html: |
144-
<p>Over 60</p>
123+
title: Over 60
145124

146125
-
147126
id: q6_preexisting_cond
148127
type: single_selection
149128
display_condition: >-
150129
has('under60')
151-
question_html: |
152-
<p><b>Pre-existing conditions?</b><p>
153-
Do you have any of the following conditions?<br/>
154-
- Hypertension<br/>
155-
- Diabetes<br/>
156-
- Cardiovascular disease<br/>
157-
- Chronic respiratory disease<br/>
158-
- Immunocompromising conditions<br/>
159-
- Extreme obesity (Body Mass Index [BMI] > 40)</p>
130+
title: Pre-existing conditions?
131+
body_html: |
132+
<p>Do you have any of the following conditions?
133+
<ul><li>Hypertension</li>
134+
<li>Diabetes</li>
135+
<li>Cardiovascular disease</li>
136+
<li>Chronic respiratory disease</li>
137+
<li>Immunocompromising conditions</li>
138+
<li>Extreme obesity (Body Mass Index [BMI] > 40)</li></ul></p>
160139
answers:
161140
-
162141
id: preexisting_cond
163142
icon_name: snowflake
164-
body_html: |
165-
<p>Yes</p>
143+
title: Yes
166144
-
167145
id: no_preexisting_cond
168146
icon_name: snowflake
169-
body_html: |
170-
<p>No</p>
147+
title: No
171148
results_cards:
172149
-
173150
id: emergency_call
@@ -180,49 +157,55 @@ contents:
180157
icon_name: call
181158
-
182159
id: local_guidance
183-
title: Always follow local guidance.
184-
body_html: <p>Regularly check for the latest info from WHO and national and local public health authorities.</p>
185-
icon_name: note
160+
title: Always follow local guidance. Regularly check for the latest info from WHO and national and local public health authorities.
186161
-
187162
id: testing
188163
title: Testing
189164
body_html: >-
190165
<p>We recommend getting tested for COVID-19. Contact your local health authorities to learn more about testing and care options in your area.</p>
166+
icon_name: note
191167
-
192168
id: avoid_all_contact
193169
title: Avoid all contact
194170
body_html: >-
195171
<p>Avoid contact with other people, including the people you live with. Try and stay away from others for at least 14 days from when your symptoms resolve. Isolation can end if your symptoms improve and you have had no fever for at least 3 days without the use of medicine.</p>
172+
icon_name: note
196173
-
197174
id: wear_a_mask_now
198175
title: Masks
199176
body_html: >-
200177
<p>We recommend that you wear a mask around others. Your caregivers should wear a mask too [TODO: link to guidance for caregivers]. Don't have a mask? [TODO: Link out to instructions for people without a mask]. How to use a mask [TODO: Link out to instructions on how to use a mask]</p>
178+
icon_name: note
201179
-
202180
id: wear_a_mask_if_coughing
203181
title: Wear a mask
204182
body_html: >-
205183
<p>Wear a mask around others, especially if you are coughing. Don’t touch the mask or face during use and discard afterwards. Don't have a mask? [Link out to instructions for people without a mask] How to use a mask [Link out to instructions on how to use a mask]</p>
184+
icon_name: note
206185
-
207186
id: wear_a_mask_if_ill
208187
title: Masks
209188
body_html: >-
210189
<p>Wear a mask if you or someone you are looking after or in close contact with are ill with COVID-19 symptoms (especially coughing). Don’t touch the mask or face during use and discard afterwards. Don't have a mask? [Link out to instructions for people without a mask] How to use a mask [Link out to instructions on how to use a mask]</p>
190+
icon_name: note
211191
-
212192
id: cough_tissue
213193
title: Cough into your elbow or tissue
214194
body_html: >-
215195
<p>If you're not wearing a mask, when coughing and sneezing, cover your mouth and nose with flexed elbow or tissue. Throw your tissue into a closed bin immediately after use.</p>
196+
icon_name: note
216197
-
217198
id: monitor_symptoms_getting_worse
218199
title: Monitor Symptoms
219200
body_html: >-
220201
<p>You should monitor your symptoms closely and if they get worse consult with a healthcare provider.</p>
202+
icon_name: note
221203
-
222204
id: monitor_symptoms_begin
223205
title: Monitor Symptoms
224206
body_html: >-
225207
<p>You should monitor your symptoms closely. If you begin to develop symptoms, consult with a healthcare provider.</p>
208+
icon_name: note
226209
-
227210
id: rest
228211
title: Rest and Take Care
@@ -233,11 +216,10 @@ contents:
233216
id: protect_others
234217
title: >-
235218
Learn other ways to protect others [TODO: Link out to "prevent" section of app content]
219+
icon_name: note
236220
-
237221
id: call_if_concerned
238-
title: If you have any concerns, call your healthcare provider.
239-
body_html: >-
240-
<p>Always follow local guidance. Regularly check for the latest info from WHO and national and local public health authorities.</p>
222+
title: If you have any concerns, call your healthcare provider. Always follow local guidance. Regularly check for the latest info from WHO and national and local public health authorities.
241223
-
242224
id: quarantine
243225
title: Quarantine
@@ -261,27 +243,32 @@ contents:
261243
title: Contact local health authorities
262244
body_html: >-
263245
<p>Because you have known risk factors for COVID-19, testing and care might be available in your area. Contact local health authorities to learn more.</p>
246+
icon_name: note
264247
-
265248
id: physical_distancing
266249
title: Practice Physical Distancing
267250
body_html: >-
268251
<p>Avoid groups of people and keep 6 feet apart from anyone who you do not live with. Avoid anyone showing symptoms.</p>
252+
icon_name: note
269253
-
270254
id: hand_hygiene
271255
title: Hand hygiene
272256
body_html: >-
273257
<p>Perform hand hygiene frequently, using an alcohol-based hand rub if hands are not visibly dirty or soap and water when hands are visibly dirty</p>
258+
icon_name: note
274259
-
275260
id: dont_touch_face
276261
title: Don't touch your face
277262
body_html: >-
278263
<p>Avoid touching eyes, nose and mouth. Why? Hands touch many surfaces and can pick up viruses. Once contaminated, hands can transfer the virus to your eyes, nose or mouth. From there, the virus can enter your body and infect you.</p>
264+
icon_name: note
279265
-
280266
id: if_sick_later
281267
title: >-
282268
If you feel sick later:
283269
body_html: >-
284-
Stay home if you feel sick, even if you develop a slight fever or cough
270+
<p>Stay home if you feel sick, even if you develop a slight fever or cough</p>
271+
icon_name: note
285272

286273
results:
287274
-

client/flutter/lib/api/content/schema/symptom_checker_content.dart

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ class SymptomCheckerContent extends ContentBase {
4646
return SymptomCheckerQuestion(
4747
type: type,
4848
id: item['id'],
49-
questionHtml: item['question_html'],
49+
title: item['title'],
50+
bodyHtml: item['body_html'],
5051
displayCondition: item['display_condition'],
5152
imageName: item['image_name'],
5253
answers: _answersFromContent(item));
@@ -107,7 +108,7 @@ class SymptomCheckerContent extends ContentBase {
107108
SymptomCheckerAnswer _answerFromContent(dynamic item) {
108109
return SymptomCheckerAnswer(
109110
id: item['id'],
110-
bodyHtml: item['body_html'],
111+
title: item['title'],
111112
iconName: item['icon_name'],
112113
);
113114
}
@@ -132,7 +133,9 @@ class SymptomCheckerQuestion {
132133
final String id;
133134

134135
/// The question.
135-
final String questionHtml;
136+
final String title;
137+
138+
final String bodyHtml;
136139

137140
/// An optional image to be displayed with the question.
138141
final String imageName;
@@ -156,8 +159,9 @@ class SymptomCheckerQuestion {
156159
SymptomCheckerQuestion({
157160
@required this.type,
158161
@required this.id,
159-
@required this.questionHtml,
160-
@required this.imageName,
162+
@required this.title,
163+
this.bodyHtml,
164+
this.imageName,
161165
@required this.displayCondition,
162166
this.answers,
163167
});
@@ -224,15 +228,15 @@ class SymptomCheckerAnswer {
224228
final String displayCondition;
225229

226230
/// The answer
227-
final String bodyHtml;
231+
final String title;
228232

229233
/// An icon to display with the answer
230234
final String iconName;
231235

232236
SymptomCheckerAnswer({
233237
@required this.id,
234238
this.displayCondition,
235-
@required this.bodyHtml,
239+
@required this.title,
236240
this.iconName,
237241
});
238242
}

0 commit comments

Comments
 (0)