@ampath/esm-reports-app 1.0.0-next.98 → 1.0.0-next.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,9 @@ import React from 'react';
2
2
 
3
3
  import styles from '../moh-733.scss';
4
4
  import classNames from 'classnames';
5
+
6
+ import { useOpenMoh733Linelist } from '../linelist/use-open-moh-733-linelist';
7
+
5
8
  interface NutritionStatusWeightComponentProps {
6
9
  moh733Data: any;
7
10
  startDate: string;
@@ -15,6 +18,8 @@ const NutritionStatusWeightComponent: React.FC<NutritionStatusWeightComponentPro
15
18
  endDate,
16
19
  locationUuids,
17
20
  }) => {
21
+ const openLinelist = useOpenMoh733Linelist(startDate, endDate, locationUuids);
22
+
18
23
  return (
19
24
  <>
20
25
  <div className={styles.category}>
@@ -44,69 +49,165 @@ const NutritionStatusWeightComponent: React.FC<NutritionStatusWeightComponentPro
44
49
  <tbody>
45
50
  <tr>
46
51
  <td>0 - 5 Months</td>
47
- <td></td>
48
- <td></td>
49
- <td></td>
50
- <td></td>
51
- <td></td>
52
- <td></td>
53
- <td></td>
54
- <td></td>
52
+ <td onClick={() => openLinelist('gen_population_0_5_months')}>
53
+ {moh733Data?.gen_population_0_5_months || 0}
54
+ </td>
55
+ <td onClick={() => openLinelist('undernutrition_risk_hiv_male_0_5_months')}>
56
+ {moh733Data?.undernutrition_risk_hiv_male_0_5_months || 0}
57
+ </td>
58
+ <td onClick={() => openLinelist('undernutrition_risk_hiv_and_tb_male_0_5_months')}>
59
+ {moh733Data?.undernutrition_risk_hiv_and_tb_male_0_5_months || 0}
60
+ </td>
61
+ <td onClick={() => openLinelist('undernutrition_risk_tb_male_0_5_months')}>
62
+ {moh733Data?.undernutrition_risk_tb_male_0_5_months || 0}
63
+ </td>
64
+ <td onClick={() => openLinelist('gen_population_0_5_months')}>
65
+ {moh733Data?.gen_population_0_5_months || 0}
66
+ </td>
67
+ <td onClick={() => openLinelist('undernutrition_risk_hiv_female_0_5_months')}>
68
+ {moh733Data?.undernutrition_risk_hiv_female_0_5_months || 0}
69
+ </td>
70
+ <td onClick={() => openLinelist('undernutrition_risk_hiv_and_tb_female_0_5_months')}>
71
+ {moh733Data?.undernutrition_risk_hiv_and_tb_female_0_5_months || 0}
72
+ </td>
73
+ <td onClick={() => openLinelist('undernutrition_risk_tb_female_0_5_months')}>
74
+ {moh733Data?.undernutrition_risk_tb_female_0_5_months || 0}
75
+ </td>
55
76
  </tr>
56
77
  <tr>
57
78
  <td>6 - 59 Months</td>
58
- <td></td>
59
- <td></td>
60
- <td></td>
61
- <td></td>
62
- <td></td>
63
- <td></td>
64
- <td></td>
65
- <td></td>
79
+ <td onClick={() => openLinelist('gen_population_6_59_months')}>
80
+ {moh733Data?.gen_population_6_59_months || 0}
81
+ </td>
82
+ <td onClick={() => openLinelist('undernutrition_risk_hiv_male_6_59_months')}>
83
+ {moh733Data?.undernutrition_risk_hiv_male_6_59_months || 0}
84
+ </td>
85
+ <td onClick={() => openLinelist('undernutrition_risk_hiv_and_tb_male_6_59_months')}>
86
+ {moh733Data?.undernutrition_risk_hiv_and_tb_male_6_59_months || 0}
87
+ </td>
88
+ <td onClick={() => openLinelist('undernutrition_risk_tb_male_6_59_months')}>
89
+ {moh733Data?.undernutrition_risk_tb_male_6_59_months || 0}
90
+ </td>
91
+ <td onClick={() => openLinelist('gen_population_6_59_months')}>
92
+ {moh733Data?.gen_population_6_59_months || 0}
93
+ </td>
94
+ <td onClick={() => openLinelist('undernutrition_risk_hiv_female_6_59_months')}>
95
+ {moh733Data?.undernutrition_risk_hiv_female_6_59_months || 0}
96
+ </td>
97
+ <td onClick={() => openLinelist('undernutrition_risk_hiv_and_tb_female_6_59_months')}>
98
+ {moh733Data?.undernutrition_risk_hiv_and_tb_female_6_59_months || 0}
99
+ </td>
100
+ <td onClick={() => openLinelist('undernutrition_risk_tb_female_6_59_months')}>
101
+ {moh733Data?.undernutrition_risk_tb_female_6_59_months || 0}
102
+ </td>
66
103
  </tr>
67
104
  <tr>
68
105
  <td>5 - 9 Years</td>
69
- <td></td>
70
- <td></td>
71
- <td></td>
72
- <td></td>
73
- <td></td>
74
- <td></td>
75
- <td></td>
76
- <td></td>
106
+ <td onClick={() => openLinelist('gen_population_5_9_years')}>
107
+ {moh733Data?.gen_population_5_9_years || 0}
108
+ </td>
109
+ <td onClick={() => openLinelist('undernutrition_risk_hiv_male_5_9_years')}>
110
+ {moh733Data?.undernutrition_risk_hiv_male_5_9_years || 0}
111
+ </td>
112
+ <td onClick={() => openLinelist('undernutrition_risk_hiv_and_tb_male_5_9_years')}>
113
+ {moh733Data?.undernutrition_risk_hiv_and_tb_male_5_9_years || 0}
114
+ </td>
115
+ <td onClick={() => openLinelist('undernutrition_risk_tb_male_5_9_years')}>
116
+ {moh733Data?.undernutrition_risk_tb_male_5_9_years || 0}
117
+ </td>
118
+ <td onClick={() => openLinelist('gen_population_5_9_years')}>
119
+ {moh733Data?.gen_population_5_9_years || 0}
120
+ </td>
121
+ <td onClick={() => openLinelist('undernutrition_risk_hiv_female_5_9_years')}>
122
+ {moh733Data?.undernutrition_risk_hiv_female_5_9_years || 0}
123
+ </td>
124
+ <td onClick={() => openLinelist('undernutrition_risk_hiv_and_tb_female_5_9_years')}>
125
+ {moh733Data?.undernutrition_risk_hiv_and_tb_female_5_9_years || 0}
126
+ </td>
127
+ <td onClick={() => openLinelist('undernutrition_risk_tb_female_5_9_years')}>
128
+ {moh733Data?.undernutrition_risk_tb_female_5_9_years || 0}
129
+ </td>
77
130
  </tr>
78
131
  <tr>
79
132
  <td>10 - 17 Years</td>
80
- <td></td>
81
- <td></td>
82
- <td></td>
83
- <td></td>
84
- <td></td>
85
- <td></td>
86
- <td></td>
87
- <td></td>
133
+ <td onClick={() => openLinelist('gen_population_10_17_years')}>
134
+ {moh733Data?.gen_population_10_17_years || 0}
135
+ </td>
136
+ <td onClick={() => openLinelist('undernutrition_risk_hiv_male_10_17_years')}>
137
+ {moh733Data?.undernutrition_risk_hiv_male_10_17_years || 0}
138
+ </td>
139
+ <td onClick={() => openLinelist('undernutrition_risk_hiv_and_tb_male_10_17_years')}>
140
+ {moh733Data?.undernutrition_risk_hiv_and_tb_male_10_17_years || 0}
141
+ </td>
142
+ <td onClick={() => openLinelist('undernutrition_risk_tb_male_10_17_years')}>
143
+ {moh733Data?.undernutrition_risk_tb_male_10_17_years || 0}
144
+ </td>
145
+ <td onClick={() => openLinelist('gen_population_10_17_years')}>
146
+ {moh733Data?.gen_population_10_17_years || 0}
147
+ </td>
148
+ <td onClick={() => openLinelist('undernutrition_risk_hiv_female_10_17_years')}>
149
+ {moh733Data?.undernutrition_risk_hiv_female_10_17_years || 0}
150
+ </td>
151
+ <td onClick={() => openLinelist('undernutrition_risk_hiv_and_tb_female_10_17_years')}>
152
+ {moh733Data?.undernutrition_risk_hiv_and_tb_female_10_17_years || 0}
153
+ </td>
154
+ <td onClick={() => openLinelist('undernutrition_risk_tb_female_10_17_years')}>
155
+ {moh733Data?.undernutrition_risk_tb_female_10_17_years || 0}
156
+ </td>
88
157
  </tr>
89
158
  <tr>
90
159
  <td>18+ Years</td>
91
- <td></td>
92
- <td></td>
93
- <td></td>
94
- <td></td>
95
- <td></td>
96
- <td></td>
97
- <td></td>
98
- <td></td>
160
+ <td onClick={() => openLinelist('gen_population_18_above_years')}>
161
+ {moh733Data?.gen_population_18_above_years || 0}
162
+ </td>
163
+ <td onClick={() => openLinelist('undernutrition_risk_hiv_male_18_above_years')}>
164
+ {moh733Data?.undernutrition_risk_hiv_male_18_above_years || 0}
165
+ </td>
166
+ <td onClick={() => openLinelist('undernutrition_risk_hiv_and_tb_male_18_above_years')}>
167
+ {moh733Data?.undernutrition_risk_hiv_and_tb_male_18_above_years || 0}
168
+ </td>
169
+ <td onClick={() => openLinelist('undernutrition_risk_tb_male_18_above_years')}>
170
+ {moh733Data?.undernutrition_risk_tb_male_18_above_years || 0}
171
+ </td>
172
+ <td onClick={() => openLinelist('gen_population_18_above_years')}>
173
+ {moh733Data?.gen_population_18_above_years || 0}
174
+ </td>
175
+ <td onClick={() => openLinelist('undernutrition_risk_hiv_female_18_above_years')}>
176
+ {moh733Data?.undernutrition_risk_hiv_female_18_above_years || 0}
177
+ </td>
178
+ <td onClick={() => openLinelist('undernutrition_risk_hiv_and_tb_female_18_above_years')}>
179
+ {moh733Data?.undernutrition_risk_hiv_and_tb_female_18_above_years || 0}
180
+ </td>
181
+ <td onClick={() => openLinelist('undernutrition_risk_tb_female_18_above_years')}>
182
+ {moh733Data?.undernutrition_risk_tb_female_18_above_years || 0}
183
+ </td>
99
184
  </tr>
100
185
  <tr>
101
186
  <td>18 - 19 Years</td>
102
- <td></td>
103
- <td></td>
104
- <td></td>
105
- <td></td>
106
- <td></td>
107
- <td></td>
108
- <td></td>
109
- <td></td>
187
+ <td onClick={() => openLinelist('gen_population_18_19_years')}>
188
+ {moh733Data?.gen_population_18_19_years || 0}
189
+ </td>
190
+ <td onClick={() => openLinelist('undernutrition_risk_hiv_male_18_19_years')}>
191
+ {moh733Data?.undernutrition_risk_hiv_male_18_19_years || 0}
192
+ </td>
193
+ <td onClick={() => openLinelist('undernutrition_risk_hiv_and_tb_male_18_19_years')}>
194
+ {moh733Data?.undernutrition_risk_hiv_and_tb_male_18_19_years || 0}
195
+ </td>
196
+ <td onClick={() => openLinelist('undernutrition_risk_tb_male_18_19_years')}>
197
+ {moh733Data?.undernutrition_risk_tb_male_18_19_years || 0}
198
+ </td>
199
+ <td onClick={() => openLinelist('gen_population_18_19_years')}>
200
+ {moh733Data?.gen_population_18_19_years || 0}
201
+ </td>
202
+ <td onClick={() => openLinelist('undernutrition_risk_hiv_female_18_19_years')}>
203
+ {moh733Data?.undernutrition_risk_hiv_female_18_19_years || 0}
204
+ </td>
205
+ <td onClick={() => openLinelist('undernutrition_risk_hiv_and_tb_female_18_19_years')}>
206
+ {moh733Data?.undernutrition_risk_hiv_and_tb_female_18_19_years || 0}
207
+ </td>
208
+ <td onClick={() => openLinelist('undernutrition_risk_tb_female_18_19_years')}>
209
+ {moh733Data?.undernutrition_risk_tb_female_18_19_years || 0}
210
+ </td>
110
211
  </tr>
111
212
  </tbody>
112
213
  </table>
@@ -137,69 +238,165 @@ const NutritionStatusWeightComponent: React.FC<NutritionStatusWeightComponentPro
137
238
  <tbody>
138
239
  <tr>
139
240
  <td>0 - 5 Months</td>
140
- <td></td>
141
- <td></td>
142
- <td></td>
143
- <td></td>
144
- <td></td>
145
- <td></td>
146
- <td></td>
147
- <td></td>
241
+ <td onClick={() => openLinelist('gen_population_0_5_months')}>
242
+ {moh733Data?.gen_population_0_5_months || 0}
243
+ </td>
244
+ <td onClick={() => openLinelist('overweight_obese_hiv_male_0_5_months')}>
245
+ {moh733Data?.overweight_obese_hiv_male_0_5_months || 0}
246
+ </td>
247
+ <td onClick={() => openLinelist('overweight_obese_hiv_and_tb_male_0_5_months')}>
248
+ {moh733Data?.overweight_obese_hiv_and_tb_male_0_5_months || 0}
249
+ </td>
250
+ <td onClick={() => openLinelist('overweight_obese_tb_male_0_5_months')}>
251
+ {moh733Data?.overweight_obese_tb_male_0_5_months || 0}
252
+ </td>
253
+ <td onClick={() => openLinelist('gen_population_0_5_months')}>
254
+ {moh733Data?.gen_population_0_5_months || 0}
255
+ </td>
256
+ <td onClick={() => openLinelist('overweight_obese_hiv_female_0_5_months')}>
257
+ {moh733Data?.overweight_obese_hiv_female_0_5_months || 0}
258
+ </td>
259
+ <td onClick={() => openLinelist('overweight_obese_hiv_and_tb_female_0_5_months')}>
260
+ {moh733Data?.overweight_obese_hiv_and_tb_female_0_5_months || 0}
261
+ </td>
262
+ <td onClick={() => openLinelist('overweight_obese_tb_female_0_5_months')}>
263
+ {moh733Data?.overweight_obese_tb_female_0_5_months || 0}
264
+ </td>
148
265
  </tr>
149
266
  <tr>
150
267
  <td>6 - 59 Months</td>
151
- <td></td>
152
- <td></td>
153
- <td></td>
154
- <td></td>
155
- <td></td>
156
- <td></td>
157
- <td></td>
158
- <td></td>
268
+ <td onClick={() => openLinelist('gen_population_6_59_months')}>
269
+ {moh733Data?.gen_population_6_59_months || 0}
270
+ </td>
271
+ <td onClick={() => openLinelist('overweight_obese_hiv_male_6_59_months')}>
272
+ {moh733Data?.overweight_obese_hiv_male_6_59_months || 0}
273
+ </td>
274
+ <td onClick={() => openLinelist('overweight_obese_hiv_and_tb_male_6_59_months')}>
275
+ {moh733Data?.overweight_obese_hiv_and_tb_male_6_59_months || 0}
276
+ </td>
277
+ <td onClick={() => openLinelist('overweight_obese_tb_male_6_59_months')}>
278
+ {moh733Data?.overweight_obese_tb_male_6_59_months || 0}
279
+ </td>
280
+ <td onClick={() => openLinelist('gen_population_6_59_months')}>
281
+ {moh733Data?.gen_population_6_59_months || 0}
282
+ </td>
283
+ <td onClick={() => openLinelist('overweight_obese_hiv_female_6_59_months')}>
284
+ {moh733Data?.overweight_obese_hiv_female_6_59_months || 0}
285
+ </td>
286
+ <td onClick={() => openLinelist('overweight_obese_hiv_and_tb_female_6_59_months')}>
287
+ {moh733Data?.overweight_obese_hiv_and_tb_female_6_59_months || 0}
288
+ </td>
289
+ <td onClick={() => openLinelist('overweight_obese_tb_female_6_59_months')}>
290
+ {moh733Data?.overweight_obese_tb_female_6_59_months || 0}
291
+ </td>
159
292
  </tr>
160
293
  <tr>
161
294
  <td>5 - 9 Years</td>
162
- <td></td>
163
- <td></td>
164
- <td></td>
165
- <td></td>
166
- <td></td>
167
- <td></td>
168
- <td></td>
169
- <td></td>
295
+ <td onClick={() => openLinelist('gen_population_5_9_years')}>
296
+ {moh733Data?.gen_population_5_9_years || 0}
297
+ </td>
298
+ <td onClick={() => openLinelist('overweight_obese_hiv_male_5_9_years')}>
299
+ {moh733Data?.overweight_obese_hiv_male_5_9_years || 0}
300
+ </td>
301
+ <td onClick={() => openLinelist('overweight_obese_hiv_and_tb_male_5_9_years')}>
302
+ {moh733Data?.overweight_obese_hiv_and_tb_male_5_9_years || 0}
303
+ </td>
304
+ <td onClick={() => openLinelist('overweight_obese_tb_male_5_9_years')}>
305
+ {moh733Data?.overweight_obese_tb_male_5_9_years || 0}
306
+ </td>
307
+ <td onClick={() => openLinelist('gen_population_5_9_years')}>
308
+ {moh733Data?.gen_population_5_9_years || 0}
309
+ </td>
310
+ <td onClick={() => openLinelist('overweight_obese_hiv_female_5_9_years')}>
311
+ {moh733Data?.overweight_obese_hiv_female_5_9_years || 0}
312
+ </td>
313
+ <td onClick={() => openLinelist('overweight_obese_hiv_and_tb_female_5_9_years')}>
314
+ {moh733Data?.overweight_obese_hiv_and_tb_female_5_9_years || 0}
315
+ </td>
316
+ <td onClick={() => openLinelist('overweight_obese_tb_female_5_9_years')}>
317
+ {moh733Data?.overweight_obese_tb_female_5_9_years || 0}
318
+ </td>
170
319
  </tr>
171
320
  <tr>
172
321
  <td>10 - 17 Years</td>
173
- <td></td>
174
- <td></td>
175
- <td></td>
176
- <td></td>
177
- <td></td>
178
- <td></td>
179
- <td></td>
180
- <td></td>
322
+ <td onClick={() => openLinelist('gen_population_10_17_years')}>
323
+ {moh733Data?.gen_population_10_17_years || 0}
324
+ </td>
325
+ <td onClick={() => openLinelist('overweight_obese_hiv_male_10_17_years')}>
326
+ {moh733Data?.overweight_obese_hiv_male_10_17_years || 0}
327
+ </td>
328
+ <td onClick={() => openLinelist('overweight_obese_hiv_and_tb_male_10_17_years')}>
329
+ {moh733Data?.overweight_obese_hiv_and_tb_male_10_17_years || 0}
330
+ </td>
331
+ <td onClick={() => openLinelist('overweight_obese_tb_male_10_17_years')}>
332
+ {moh733Data?.overweight_obese_tb_male_10_17_years || 0}
333
+ </td>
334
+ <td onClick={() => openLinelist('gen_population_10_17_years')}>
335
+ {moh733Data?.gen_population_10_17_years || 0}
336
+ </td>
337
+ <td onClick={() => openLinelist('overweight_obese_hiv_female_10_17_years')}>
338
+ {moh733Data?.overweight_obese_hiv_female_10_17_years || 0}
339
+ </td>
340
+ <td onClick={() => openLinelist('overweight_obese_hiv_and_tb_female_10_17_years')}>
341
+ {moh733Data?.overweight_obese_hiv_and_tb_female_10_17_years || 0}
342
+ </td>
343
+ <td onClick={() => openLinelist('overweight_obese_tb_female_10_17_years')}>
344
+ {moh733Data?.overweight_obese_tb_female_10_17_years || 0}
345
+ </td>
181
346
  </tr>
182
347
  <tr>
183
348
  <td>18+ Years</td>
184
- <td></td>
185
- <td></td>
186
- <td></td>
187
- <td></td>
188
- <td></td>
189
- <td></td>
190
- <td></td>
191
- <td></td>
349
+ <td onClick={() => openLinelist('gen_population_18_above_years')}>
350
+ {moh733Data?.gen_population_18_above_years || 0}
351
+ </td>
352
+ <td onClick={() => openLinelist('overweight_obese_hiv_male_18_above_years')}>
353
+ {moh733Data?.overweight_obese_hiv_male_18_above_years || 0}
354
+ </td>
355
+ <td onClick={() => openLinelist('overweight_obese_hiv_and_tb_male_18_above_years')}>
356
+ {moh733Data?.overweight_obese_hiv_and_tb_male_18_above_years || 0}
357
+ </td>
358
+ <td onClick={() => openLinelist('overweight_obese_tb_male_18_above_years')}>
359
+ {moh733Data?.overweight_obese_tb_male_18_above_years || 0}
360
+ </td>
361
+ <td onClick={() => openLinelist('gen_population_18_above_years')}>
362
+ {moh733Data?.gen_population_18_above_years || 0}
363
+ </td>
364
+ <td onClick={() => openLinelist('overweight_obese_hiv_female_18_above_years')}>
365
+ {moh733Data?.overweight_obese_hiv_female_18_above_years || 0}
366
+ </td>
367
+ <td onClick={() => openLinelist('overweight_obese_hiv_and_tb_female_18_above_years')}>
368
+ {moh733Data?.overweight_obese_hiv_and_tb_female_18_above_years || 0}
369
+ </td>
370
+ <td onClick={() => openLinelist('overweight_obese_tb_female_18_above_years')}>
371
+ {moh733Data?.overweight_obese_tb_female_18_above_years || 0}
372
+ </td>
192
373
  </tr>
193
374
  <tr>
194
375
  <td>18 - 19 Years</td>
195
- <td></td>
196
- <td></td>
197
- <td></td>
198
- <td></td>
199
- <td></td>
200
- <td></td>
201
- <td></td>
202
- <td></td>
376
+ <td onClick={() => openLinelist('gen_population_18_19_years')}>
377
+ {moh733Data?.gen_population_18_19_years || 0}
378
+ </td>
379
+ <td onClick={() => openLinelist('overweight_obese_hiv_male_18_19_years')}>
380
+ {moh733Data?.overweight_obese_hiv_male_18_19_years || 0}
381
+ </td>
382
+ <td onClick={() => openLinelist('overweight_obese_hiv_and_tb_male_18_19_years')}>
383
+ {moh733Data?.overweight_obese_hiv_and_tb_male_18_19_years || 0}
384
+ </td>
385
+ <td onClick={() => openLinelist('overweight_obese_tb_male_18_19_years')}>
386
+ {moh733Data?.overweight_obese_tb_male_18_19_years || 0}
387
+ </td>
388
+ <td onClick={() => openLinelist('gen_population_18_19_years')}>
389
+ {moh733Data?.gen_population_18_19_years || 0}
390
+ </td>
391
+ <td onClick={() => openLinelist('overweight_obese_hiv_female_18_19_years')}>
392
+ {moh733Data?.overweight_obese_hiv_female_18_19_years || 0}
393
+ </td>
394
+ <td onClick={() => openLinelist('overweight_obese_hiv_and_tb_female_18_19_years')}>
395
+ {moh733Data?.overweight_obese_hiv_and_tb_female_18_19_years || 0}
396
+ </td>
397
+ <td onClick={() => openLinelist('overweight_obese_tb_female_18_19_years')}>
398
+ {moh733Data?.overweight_obese_tb_female_18_19_years || 0}
399
+ </td>
203
400
  </tr>
204
401
  </tbody>
205
402
  </table>