@ampath/esm-reports-app 1.0.0-next.92 → 1.0.0-next.94

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.
Files changed (29) hide show
  1. package/dist/410.js +1 -1
  2. package/dist/410.js.map +1 -1
  3. package/dist/8.css.map +1 -0
  4. package/dist/8.js +1 -0
  5. package/dist/8.js.map +1 -0
  6. package/dist/ampath-esm-reports-app.js +1 -1
  7. package/dist/ampath-esm-reports-app.js.map +1 -1
  8. package/dist/routes.json +1 -1
  9. package/package.json +1 -1
  10. package/src/common/report-filters/use-restore-period.ts +14 -4
  11. package/src/common/report-register/register-layout.component.tsx +1 -0
  12. package/src/reports/moh-705B/linelist/moh-705b-linelist.component.tsx +78 -0
  13. package/src/reports/moh-705B/moh-204b-register.component.tsx +1 -1
  14. package/src/reports/moh-705B/moh-705b.component.tsx +79 -79
  15. package/src/reports/moh-705a/linelist/moh-705a-linelist.component.tsx +84 -0
  16. package/src/reports/moh-705a/moh-705a.component.tsx +80 -80
  17. package/src/reports/moh-705a/registers/moh-204a-register.component.tsx +1 -1
  18. package/src/reports/moh-711/linelist/moh-711-anc-linelist.component.tsx +3 -2
  19. package/src/reports/moh-711/linelist/moh-711-maternity-linelist.component.tsx +3 -2
  20. package/src/reports/moh-711/linelist/moh-711-pnc-linelist.component.tsx +3 -2
  21. package/src/reports/moh-717/sections/maternity.component.tsx +9 -11
  22. package/src/reports/moh-717/sections/outpatient.component.tsx +41 -43
  23. package/src/resources/moh-705.resource.ts +2 -0
  24. package/src/resources/moh-711.resource.ts +3 -3
  25. package/src/root.component.tsx +4 -0
  26. package/dist/325.css.map +0 -1
  27. package/dist/325.js +0 -1
  28. package/dist/325.js.map +0 -1
  29. /package/dist/{325.css → 8.css} +0 -0
@@ -138,16 +138,16 @@ const Moh705AComponent: React.FC = () => {
138
138
  placeholder. */
139
139
  useRestorePeriod(fetchMoh705bReportData);
140
140
 
141
- const navigateToRegister = (indicator: string, day?: number) => {
141
+ const openLinelist = (indicator: string, day?: number) => {
142
142
  const selectedDate = day ? dayjs(startDate).startOf('month').date(day) : undefined;
143
143
  if (selectedDate && day && day > dayjs(startDate).daysInMonth()) {
144
144
  return;
145
145
  }
146
- const registerStartDate = selectedDate?.format('YYYY-MM-DD') ?? startDate;
147
- const registerEndDate = selectedDate?.format('YYYY-MM-DD') ?? endDate;
146
+ const listStartDate = selectedDate?.format('YYYY-MM-DD') ?? startDate;
147
+ const listEndDate = selectedDate?.format('YYYY-MM-DD') ?? endDate;
148
148
 
149
149
  navigate(
150
- `/moh-204a?startDate=${registerStartDate}&endDate=${registerEndDate}&locationUuids=${locationUuids}&indicator=${indicator}&from=moh-705a`,
150
+ `/moh-705a-linelist?startDate=${listStartDate}&endDate=${listEndDate}&locationUuids=${locationUuids}&indicator=${indicator}&from=moh-705a`,
151
151
  );
152
152
  };
153
153
 
@@ -217,424 +217,424 @@ const Moh705AComponent: React.FC = () => {
217
217
  <tr>
218
218
  <td>1</td>
219
219
  <td>Diarrhoea with no dehydration</td>
220
- <td onClick={() => navigateToRegister('diarrhoea_with_no_dehydration')}>
220
+ <td onClick={() => openLinelist('diarrhoea_with_no_dehydration')}>
221
221
  {moh705aData.diarrhoea_with_no_dehydration}
222
222
  </td>
223
223
  </tr>
224
224
  <tr>
225
225
  <td>2</td>
226
226
  <td>Diarrhoea with some dehydration</td>
227
- <td onClick={() => navigateToRegister('diarrhoea_with_some_dehydration')}>
227
+ <td onClick={() => openLinelist('diarrhoea_with_some_dehydration')}>
228
228
  {moh705aData.diarrhoea_with_some_dehydration}
229
229
  </td>
230
230
  </tr>
231
231
  <tr>
232
232
  <td>3</td>
233
233
  <td>Diarrhoea with severe dehydration</td>
234
- <td onClick={() => navigateToRegister('diarrhoea_with_severe_dehydration')}>
234
+ <td onClick={() => openLinelist('diarrhoea_with_severe_dehydration')}>
235
235
  {moh705aData.diarrhoea_with_severe_dehydration}
236
236
  </td>
237
237
  </tr>
238
238
  <tr>
239
239
  <td>4</td>
240
240
  <td>Cholera</td>
241
- <td onClick={() => navigateToRegister('cholera')}>{moh705aData.cholera}</td>
241
+ <td onClick={() => openLinelist('cholera')}>{moh705aData.cholera}</td>
242
242
  </tr>
243
243
  <tr>
244
244
  <td>5</td>
245
245
  <td>Dysentary (Blood diarrhoea)</td>
246
- <td onClick={() => navigateToRegister('dysentry')}>{moh705aData.dysentry}</td>
246
+ <td onClick={() => openLinelist('dysentry')}>{moh705aData.dysentry}</td>
247
247
  </tr>
248
248
  <tr>
249
249
  <td>6</td>
250
250
  <td>Gastroenterities</td>
251
- <td onClick={() => navigateToRegister('gastroenterities')}>{moh705aData.gastroenterities}</td>
251
+ <td onClick={() => openLinelist('gastroenterities')}>{moh705aData.gastroenterities}</td>
252
252
  </tr>
253
253
  <tr>
254
254
  <td>7</td>
255
255
  <td>Pneomonia</td>
256
- <td onClick={() => navigateToRegister('pneumonia')}>{moh705aData.pneumonia}</td>
256
+ <td onClick={() => openLinelist('pneumonia')}>{moh705aData.pneumonia}</td>
257
257
  </tr>
258
258
  <tr>
259
259
  <td>8</td>
260
260
  <td>Severe pneumonia</td>
261
- <td onClick={() => navigateToRegister('severe_pneumonia')}>{moh705aData.severe_pneumonia}</td>
261
+ <td onClick={() => openLinelist('severe_pneumonia')}>{moh705aData.severe_pneumonia}</td>
262
262
  </tr>
263
263
  <tr>
264
264
  <td>9</td>
265
265
  <td>Upper Respiratory Tract Infections</td>
266
- <td onClick={() => navigateToRegister('upper_respiratory_tract_infections')}>
266
+ <td onClick={() => openLinelist('upper_respiratory_tract_infections')}>
267
267
  {moh705aData.upper_respiratory_tract_infections}
268
268
  </td>
269
269
  </tr>
270
270
  <tr>
271
271
  <td>10</td>
272
272
  <td>Lower Respiratory Tract Infections</td>
273
- <td onClick={() => navigateToRegister('lower_respiratory_tract_infections')}>
273
+ <td onClick={() => openLinelist('lower_respiratory_tract_infections')}>
274
274
  {moh705aData.lower_respiratory_tract_infections}
275
275
  </td>
276
276
  </tr>
277
277
  <tr>
278
278
  <td>11</td>
279
279
  <td>Asthma</td>
280
- <td onClick={() => navigateToRegister('asthma')}>{moh705aData.asthma}</td>
280
+ <td onClick={() => openLinelist('asthma')}>{moh705aData.asthma}</td>
281
281
  </tr>
282
282
  <tr>
283
283
  <td>12</td>
284
284
  <td>Presumed Tuberculosis</td>
285
- <td onClick={() => navigateToRegister('presumed_tuberculosis')}>
285
+ <td onClick={() => openLinelist('presumed_tuberculosis')}>
286
286
  {moh705aData.presumed_tuberculosis}
287
287
  </td>
288
288
  </tr>
289
289
  <tr>
290
290
  <td>13</td>
291
291
  <td>Suspected Malaria</td>
292
- <td onClick={() => navigateToRegister('suspected_malaria')}>{moh705aData.suspected_malaria}</td>
292
+ <td onClick={() => openLinelist('suspected_malaria')}>{moh705aData.suspected_malaria}</td>
293
293
  </tr>
294
294
  <tr>
295
295
  <td>14</td>
296
296
  <td>Tested for Malaria</td>
297
- <td onClick={() => navigateToRegister('tested_for_malaria')}>{moh705aData.tested_for_malaria}</td>
297
+ <td onClick={() => openLinelist('tested_for_malaria')}>{moh705aData.tested_for_malaria}</td>
298
298
  </tr>
299
299
  <tr>
300
300
  <td>15</td>
301
301
  <td>Confirmed malaria</td>
302
- <td onClick={() => navigateToRegister('confirmed_malaria')}>{moh705aData.confirmed_malaria}</td>
302
+ <td onClick={() => openLinelist('confirmed_malaria')}>{moh705aData.confirmed_malaria}</td>
303
303
  </tr>
304
304
  <tr>
305
305
  <td>16</td>
306
306
  <td>Ear infection</td>
307
- <td onClick={() => navigateToRegister('ear_infection')}>{moh705aData.ear_infection}</td>
307
+ <td onClick={() => openLinelist('ear_infection')}>{moh705aData.ear_infection}</td>
308
308
  </tr>
309
309
  <tr>
310
310
  <td>17</td>
311
311
  <td>Malnutrition</td>
312
- <td onClick={() => navigateToRegister('malnutrition')}>{moh705aData.malnutrition}</td>
312
+ <td onClick={() => openLinelist('malnutrition')}>{moh705aData.malnutrition}</td>
313
313
  </tr>
314
314
  <tr>
315
315
  <td>18</td>
316
316
  <td>Anaemia</td>
317
- <td onClick={() => navigateToRegister('anaemia')}>{moh705aData.anaemia}</td>
317
+ <td onClick={() => openLinelist('anaemia')}>{moh705aData.anaemia}</td>
318
318
  </tr>
319
319
  <tr>
320
320
  <td>19</td>
321
321
  <td>Meningococcal Menengitis</td>
322
- <td onClick={() => navigateToRegister('meningococcal_meningitis')}>
322
+ <td onClick={() => openLinelist('meningococcal_meningitis')}>
323
323
  {moh705aData.meningococcal_meningitis}
324
324
  </td>
325
325
  </tr>
326
326
  <tr>
327
327
  <td>20</td>
328
328
  <td>Other Meningitis</td>
329
- <td onClick={() => navigateToRegister('other_meningitis')}>{moh705aData.other_meningitis}</td>
329
+ <td onClick={() => openLinelist('other_meningitis')}>{moh705aData.other_meningitis}</td>
330
330
  </tr>
331
331
  <tr>
332
332
  <td>21</td>
333
333
  <td>Neonatal Sepsis</td>
334
- <td onClick={() => navigateToRegister('neonatal_sepsis')}>{moh705aData.neonatal_sepsis}</td>
334
+ <td onClick={() => openLinelist('neonatal_sepsis')}>{moh705aData.neonatal_sepsis}</td>
335
335
  </tr>
336
336
  <tr>
337
337
  <td>22</td>
338
338
  <td>Neonatal Tetanus</td>
339
- <td onClick={() => navigateToRegister('neonatal_tetanus')}>{moh705aData.neonatal_tetanus}</td>
339
+ <td onClick={() => openLinelist('neonatal_tetanus')}>{moh705aData.neonatal_tetanus}</td>
340
340
  </tr>
341
341
  <tr>
342
342
  <td>23</td>
343
343
  <td>Poliomyelitis (AFP)</td>
344
- <td onClick={() => navigateToRegister('poliomyelitis')}>{moh705aData.poliomyelitis}</td>
344
+ <td onClick={() => openLinelist('poliomyelitis')}>{moh705aData.poliomyelitis}</td>
345
345
  </tr>
346
346
  <tr>
347
347
  <td>24</td>
348
348
  <td>Chicken Pox</td>
349
- <td onClick={() => navigateToRegister('chicken_pox')}>{moh705aData.chicken_pox}</td>
349
+ <td onClick={() => openLinelist('chicken_pox')}>{moh705aData.chicken_pox}</td>
350
350
  </tr>
351
351
  <tr>
352
352
  <td>25</td>
353
353
  <td>Measles</td>
354
- <td onClick={() => navigateToRegister('measles')}>{moh705aData.measles}</td>
354
+ <td onClick={() => openLinelist('measles')}>{moh705aData.measles}</td>
355
355
  </tr>
356
356
  <tr>
357
357
  <td>26</td>
358
358
  <td>Hepatitis</td>
359
- <td onClick={() => navigateToRegister('hepatitis')}>{moh705aData.hepatitis}</td>
359
+ <td onClick={() => openLinelist('hepatitis')}>{moh705aData.hepatitis}</td>
360
360
  </tr>
361
361
  <tr>
362
362
  <td>27</td>
363
363
  <td>Amoebiasis</td>
364
- <td onClick={() => navigateToRegister('amoebiasis')}>{moh705aData.amoebiasis}</td>
364
+ <td onClick={() => openLinelist('amoebiasis')}>{moh705aData.amoebiasis}</td>
365
365
  </tr>
366
366
  <tr>
367
367
  <td>28</td>
368
368
  <td>Mumps</td>
369
- <td onClick={() => navigateToRegister('mumps')}>{moh705aData.mumps}</td>
369
+ <td onClick={() => openLinelist('mumps')}>{moh705aData.mumps}</td>
370
370
  </tr>
371
371
  <tr>
372
372
  <td>29</td>
373
373
  <td>Typhoid fever</td>
374
- <td onClick={() => navigateToRegister('typhoid_fever')}>{moh705aData.typhoid_fever}</td>
374
+ <td onClick={() => openLinelist('typhoid_fever')}>{moh705aData.typhoid_fever}</td>
375
375
  </tr>
376
376
  <tr>
377
377
  <td>30</td>
378
378
  <td>Bilharzia (Schistosomiasis)</td>
379
- <td onClick={() => navigateToRegister('bilharzia')}>{moh705aData.bilharzia}</td>
379
+ <td onClick={() => openLinelist('bilharzia')}>{moh705aData.bilharzia}</td>
380
380
  </tr>
381
381
  <tr>
382
382
  <td>31</td>
383
383
  <td>Intestinal worms</td>
384
- <td onClick={() => navigateToRegister('intestinal_worms')}>{moh705aData.intestinal_worms}</td>
384
+ <td onClick={() => openLinelist('intestinal_worms')}>{moh705aData.intestinal_worms}</td>
385
385
  </tr>
386
386
  <tr>
387
387
  <td>32</td>
388
388
  <td>Eye Infections</td>
389
- <td onClick={() => navigateToRegister('eye_infections')}>{moh705aData.eye_infections}</td>
389
+ <td onClick={() => openLinelist('eye_infections')}>{moh705aData.eye_infections}</td>
390
390
  </tr>
391
391
  <tr>
392
392
  <td>33</td>
393
393
  <td>Tonsilitis</td>
394
- <td onClick={() => navigateToRegister('tonsilities')}>{moh705aData.tonsilities}</td>
394
+ <td onClick={() => openLinelist('tonsilities')}>{moh705aData.tonsilities}</td>
395
395
  </tr>
396
396
  <tr>
397
397
  <td>34</td>
398
398
  <td>Urinary Tract Infection</td>
399
- <td onClick={() => navigateToRegister('urinary_tract_infections')}>
399
+ <td onClick={() => openLinelist('urinary_tract_infections')}>
400
400
  {moh705aData.urinary_tract_infections}
401
401
  </td>
402
402
  </tr>
403
403
  <tr>
404
404
  <td>35</td>
405
405
  <td>Mental Disorders</td>
406
- <td onClick={() => navigateToRegister('mental_disorders')}>{moh705aData.mental_disorders}</td>
406
+ <td onClick={() => openLinelist('mental_disorders')}>{moh705aData.mental_disorders}</td>
407
407
  </tr>
408
408
  <tr>
409
409
  <td>36</td>
410
410
  <td>Dental Disorders</td>
411
- <td onClick={() => navigateToRegister('dental_disorders')}>{moh705aData.dental_disorders}</td>
411
+ <td onClick={() => openLinelist('dental_disorders')}>{moh705aData.dental_disorders}</td>
412
412
  </tr>
413
413
  <tr>
414
414
  <td>37</td>
415
415
  <td>Jiggers Infestation</td>
416
- <td onClick={() => navigateToRegister('jiggers_infestation')}>
416
+ <td onClick={() => openLinelist('jiggers_infestation')}>
417
417
  {moh705aData.jiggers_infestation}
418
418
  </td>
419
419
  </tr>
420
420
  <tr>
421
421
  <td>38</td>
422
422
  <td>Diseases fo the skin</td>
423
- <td onClick={() => navigateToRegister('diseases_of_the_skin')}>
423
+ <td onClick={() => openLinelist('diseases_of_the_skin')}>
424
424
  {moh705aData.diseases_of_the_skin}
425
425
  </td>
426
426
  </tr>
427
427
  <tr>
428
428
  <td>39</td>
429
429
  <td>Down's syndrome</td>
430
- <td onClick={() => navigateToRegister('downs_syndrome')}>{moh705aData.downs_syndrome}</td>
430
+ <td onClick={() => openLinelist('downs_syndrome')}>{moh705aData.downs_syndrome}</td>
431
431
  </tr>
432
432
  <tr>
433
433
  <td>40</td>
434
434
  <td>Poisoning</td>
435
- <td onClick={() => navigateToRegister('poisoning')}>{moh705aData.poisoning}</td>
435
+ <td onClick={() => openLinelist('poisoning')}>{moh705aData.poisoning}</td>
436
436
  </tr>
437
437
  <tr>
438
438
  <td>41</td>
439
439
  <td>Road Traffic Injuries</td>
440
- <td onClick={() => navigateToRegister('road_traffic_injuries')}>
440
+ <td onClick={() => openLinelist('road_traffic_injuries')}>
441
441
  {moh705aData.road_traffic_injuries}
442
442
  </td>
443
443
  </tr>
444
444
  <tr>
445
445
  <td>42</td>
446
446
  <td>Deaths due to Road Traffic Injuries</td>
447
- <td onClick={() => navigateToRegister('deaths_due_to_road_traffic_injuries')}>
447
+ <td onClick={() => openLinelist('deaths_due_to_road_traffic_injuries')}>
448
448
  {moh705aData.deaths_due_to_road_traffic_injuries}
449
449
  </td>
450
450
  </tr>
451
451
  <tr>
452
452
  <td>43</td>
453
453
  <td>Violence related injuries</td>
454
- <td onClick={() => navigateToRegister('violence_related_injuries')}>
454
+ <td onClick={() => openLinelist('violence_related_injuries')}>
455
455
  {moh705aData.violence_related_injuries}
456
456
  </td>
457
457
  </tr>
458
458
  <tr>
459
459
  <td>44</td>
460
460
  <td>Other injuries</td>
461
- <td onClick={() => navigateToRegister('other_injuries')}>{moh705aData.other_injuries}</td>
461
+ <td onClick={() => openLinelist('other_injuries')}>{moh705aData.other_injuries}</td>
462
462
  </tr>
463
463
  <tr>
464
464
  <td>45</td>
465
465
  <td>Sexual Violence</td>
466
- <td onClick={() => navigateToRegister('sexual_violence')}>{moh705aData.sexual_violence}</td>
466
+ <td onClick={() => openLinelist('sexual_violence')}>{moh705aData.sexual_violence}</td>
467
467
  </tr>
468
468
  <tr>
469
469
  <td>46</td>
470
470
  <td>Burns</td>
471
- <td onClick={() => navigateToRegister('burns')}>{moh705aData.burns}</td>
471
+ <td onClick={() => openLinelist('burns')}>{moh705aData.burns}</td>
472
472
  </tr>
473
473
  <tr>
474
474
  <td>47</td>
475
475
  <td>Snake Bites</td>
476
- <td onClick={() => navigateToRegister('snake_bites')}>{moh705aData.snake_bites}</td>
476
+ <td onClick={() => openLinelist('snake_bites')}>{moh705aData.snake_bites}</td>
477
477
  </tr>
478
478
  <tr>
479
479
  <td>48</td>
480
480
  <td>Dog bites</td>
481
- <td onClick={() => navigateToRegister('dog_bites')}>{moh705aData.dog_bites}</td>
481
+ <td onClick={() => openLinelist('dog_bites')}>{moh705aData.dog_bites}</td>
482
482
  </tr>
483
483
  <tr>
484
484
  <td>49</td>
485
485
  <td>Other Bites</td>
486
- <td onClick={() => navigateToRegister('other_bites')}>{moh705aData.other_bites}</td>
486
+ <td onClick={() => openLinelist('other_bites')}>{moh705aData.other_bites}</td>
487
487
  </tr>
488
488
  <tr>
489
489
  <td>50</td>
490
490
  <td>Diabetes</td>
491
- <td onClick={() => navigateToRegister('diabetes')}>{moh705aData.diabetes}</td>
491
+ <td onClick={() => openLinelist('diabetes')}>{moh705aData.diabetes}</td>
492
492
  </tr>
493
493
  <tr>
494
494
  <td>51</td>
495
495
  <td>Epilepsy</td>
496
- <td onClick={() => navigateToRegister('epilepsy')}>{moh705aData.epilepsy}</td>
496
+ <td onClick={() => openLinelist('epilepsy')}>{moh705aData.epilepsy}</td>
497
497
  </tr>
498
498
  <tr>
499
499
  <td>52</td>
500
500
  <td>Other Convulsive Disorders</td>
501
- <td onClick={() => navigateToRegister('other_convulsive_disorders')}>
501
+ <td onClick={() => openLinelist('other_convulsive_disorders')}>
502
502
  {moh705aData.other_convulsive_disorders}
503
503
  </td>
504
504
  </tr>
505
505
  <tr>
506
506
  <td>53</td>
507
507
  <td>Rheumatic Fever</td>
508
- <td onClick={() => navigateToRegister('rheumatic_fever')}>{moh705aData.rheumatic_fever}</td>
508
+ <td onClick={() => openLinelist('rheumatic_fever')}>{moh705aData.rheumatic_fever}</td>
509
509
  </tr>
510
510
  <tr>
511
511
  <td>54</td>
512
512
  <td>Brucellosis</td>
513
- <td onClick={() => navigateToRegister('brucellosis')}>{moh705aData.brucellosis}</td>
513
+ <td onClick={() => openLinelist('brucellosis')}>{moh705aData.brucellosis}</td>
514
514
  </tr>
515
515
  <tr>
516
516
  <td>55</td>
517
517
  <td>Rickets</td>
518
- <td onClick={() => navigateToRegister('rickets')}>{moh705aData.rickets}</td>
518
+ <td onClick={() => openLinelist('rickets')}>{moh705aData.rickets}</td>
519
519
  </tr>
520
520
  <tr>
521
521
  <td>56</td>
522
522
  <td>Cerebral Palsy</td>
523
- <td onClick={() => navigateToRegister('cerebral_palsy')}>{moh705aData.cerebral_palsy}</td>
523
+ <td onClick={() => openLinelist('cerebral_palsy')}>{moh705aData.cerebral_palsy}</td>
524
524
  </tr>
525
525
  <tr>
526
526
  <td>57</td>
527
527
  <td>Autism</td>
528
- <td onClick={() => navigateToRegister('autism')}>{moh705aData.autism}</td>
528
+ <td onClick={() => openLinelist('autism')}>{moh705aData.autism}</td>
529
529
  </tr>
530
530
  <tr>
531
531
  <td>58</td>
532
532
  <td>Tryponosomiasis</td>
533
- <td onClick={() => navigateToRegister('tryponosomiasis')}>{moh705aData.tryponosomiasis}</td>
533
+ <td onClick={() => openLinelist('tryponosomiasis')}>{moh705aData.tryponosomiasis}</td>
534
534
  </tr>
535
535
  <tr>
536
536
  <td>59</td>
537
537
  <td>Yellow Fever</td>
538
- <td onClick={() => navigateToRegister('yellow_fever')}>{moh705aData.yellow_fever}</td>
538
+ <td onClick={() => openLinelist('yellow_fever')}>{moh705aData.yellow_fever}</td>
539
539
  </tr>
540
540
  <tr>
541
541
  <td>60</td>
542
542
  <td>Viral Haemorrhagic Fever</td>
543
- <td onClick={() => navigateToRegister('viral_haemorrhagic_fever')}>
543
+ <td onClick={() => openLinelist('viral_haemorrhagic_fever')}>
544
544
  {moh705aData.viral_haemorrhagic_fever}
545
545
  </td>
546
546
  </tr>
547
547
  <tr>
548
548
  <td>61</td>
549
549
  <td>Rift valley fever</td>
550
- <td onClick={() => navigateToRegister('rift_valley_fever')}>{moh705aData.rift_valley_fever}</td>
550
+ <td onClick={() => openLinelist('rift_valley_fever')}>{moh705aData.rift_valley_fever}</td>
551
551
  </tr>
552
552
  <tr>
553
553
  <td>62</td>
554
554
  <td>Chikungunya</td>
555
- <td onClick={() => navigateToRegister('chikungunya')}>{moh705aData.chikungunya}</td>
555
+ <td onClick={() => openLinelist('chikungunya')}>{moh705aData.chikungunya}</td>
556
556
  </tr>
557
557
  <tr>
558
558
  <td>63</td>
559
559
  <td>Dengue fever</td>
560
- <td onClick={() => navigateToRegister('dengue_fever')}>{moh705aData.dengue_fever}</td>
560
+ <td onClick={() => openLinelist('dengue_fever')}>{moh705aData.dengue_fever}</td>
561
561
  </tr>
562
562
  <tr>
563
563
  <td>64</td>
564
564
  <td>Leishmaniasis(Kalaazar)</td>
565
- <td onClick={() => navigateToRegister('leishmaniasis')}>{moh705aData.leishmaniasis}</td>
565
+ <td onClick={() => openLinelist('leishmaniasis')}>{moh705aData.leishmaniasis}</td>
566
566
  </tr>
567
567
  <tr>
568
568
  <td>65</td>
569
569
  <td>Cutaneous leishmaniasis</td>
570
- <td onClick={() => navigateToRegister('cutaneous_leishmaniasis')}>
570
+ <td onClick={() => openLinelist('cutaneous_leishmaniasis')}>
571
571
  {moh705aData.cutaneous_leishmaniasis}
572
572
  </td>
573
573
  </tr>
574
574
  <tr>
575
575
  <td>66</td>
576
576
  <td>Suspected anthrax</td>
577
- <td onClick={() => navigateToRegister('suspected_anthrax')}>{moh705aData.suspected_anthrax}</td>
577
+ <td onClick={() => openLinelist('suspected_anthrax')}>{moh705aData.suspected_anthrax}</td>
578
578
  </tr>
579
579
  <tr>
580
580
  <td>67</td>
581
581
  <td>Suspected Childhood Cancers</td>
582
- <td onClick={() => navigateToRegister('suspected_childhood_cancers')}>
582
+ <td onClick={() => openLinelist('suspected_childhood_cancers')}>
583
583
  {moh705aData.suspected_childhood_cancers}
584
584
  </td>
585
585
  </tr>
586
586
  <tr>
587
587
  <td>68</td>
588
588
  <td>Hypoxaemia (Spo2&lt;90%)</td>
589
- <td onClick={() => navigateToRegister('hypoxaemia')}>{moh705aData.hypoxaemia}</td>
589
+ <td onClick={() => openLinelist('hypoxaemia')}>{moh705aData.hypoxaemia}</td>
590
590
  </tr>
591
591
  <tr>
592
592
  <td>69</td>
593
593
  <td>All Other Diseases</td>
594
- <td onClick={() => navigateToRegister('all_other_diseases')}>{moh705aData.all_other_diseases}</td>
594
+ <td onClick={() => openLinelist('all_other_diseases')}>{moh705aData.all_other_diseases}</td>
595
595
  </tr>
596
596
  <tr>
597
597
  <td>70</td>
598
598
  <td>No. of New Attendances</td>
599
- <td onClick={() => navigateToRegister('new_attendances')}>{moh705aData.new_attendances}</td>
599
+ <td onClick={() => openLinelist('new_attendances')}>{moh705aData.new_attendances}</td>
600
600
  </tr>
601
601
  <tr>
602
602
  <td>71</td>
603
603
  <td>No of Re-Attendances</td>
604
- <td onClick={() => navigateToRegister('re_attendances')}>{moh705aData.re_attendances}</td>
604
+ <td onClick={() => openLinelist('re_attendances')}>{moh705aData.re_attendances}</td>
605
605
  </tr>
606
606
  <tr>
607
607
  <td>72</td>
608
608
  <td>Referrals From Other Health Facility</td>
609
- <td onClick={() => navigateToRegister('referrals_from_other_health_facility')}>
609
+ <td onClick={() => openLinelist('referrals_from_other_health_facility')}>
610
610
  {moh705aData.referrals_from_other_health_facility}
611
611
  </td>
612
612
  </tr>
613
613
  <tr>
614
614
  <td>73</td>
615
615
  <td>Referrals To Other Health Facility</td>
616
- <td onClick={() => navigateToRegister('referrals_to_other_health_facility')}>
616
+ <td onClick={() => openLinelist('referrals_to_other_health_facility')}>
617
617
  {moh705aData.referrals_to_other_health_facility}
618
618
  </td>
619
619
  </tr>
620
620
  <tr>
621
621
  <td>74</td>
622
622
  <td>Referrals From Community Unit</td>
623
- <td onClick={() => navigateToRegister('referrals_from_community_unit')}>
623
+ <td onClick={() => openLinelist('referrals_from_community_unit')}>
624
624
  {moh705aData.referrals_from_community_unit}
625
625
  </td>
626
626
  </tr>
627
627
  <tr>
628
628
  <td>74</td>
629
629
  <td>Referrals To Community Unit</td>
630
- <td onClick={() => navigateToRegister('referrals_to_community_unit')}>
630
+ <td onClick={() => openLinelist('referrals_to_community_unit')}>
631
631
  {moh705aData.referrals_to_community_unit}
632
632
  </td>
633
633
  </tr>
634
634
  </>,
635
635
  moh705aData,
636
636
  indicators,
637
- navigateToRegister,
637
+ openLinelist,
638
638
  )}
639
639
  </tbody>
640
640
  </table>
@@ -71,7 +71,7 @@ const Moh204ARegisterComponent: React.FC<Moh204ARegisterComponentProps> = () =>
71
71
  startDate: startDate!,
72
72
  endDate: endDate!,
73
73
  locationUuids,
74
- indicator,
74
+ ...(indicator ? { indicator } : {}),
75
75
  startIndex,
76
76
  limit,
77
77
  from,
@@ -38,6 +38,7 @@ const Moh711AncLinelist: React.FC = () => {
38
38
  const endDate = searchParams.get('endDate');
39
39
  const locationUuids = searchParams.get('locationUuids');
40
40
  const indicator = searchParams.get('indicator') ?? '';
41
+ const from = searchParams.get('from');
41
42
  const locationName = useLocationName(locationUuids);
42
43
 
43
44
  const fetchPatientList = useCallback(
@@ -51,9 +52,9 @@ const Moh711AncLinelist: React.FC = () => {
51
52
  startIndex,
52
53
  limit,
53
54
  }),
54
- [startDate, endDate, locationUuids, indicator],
55
+ [startDate, endDate, locationUuids, indicator, from],
55
56
  );
56
- const { rows, isLoading } = useAllRows(fetchPatientList, [startDate, endDate, locationUuids, indicator]);
57
+ const { rows, isLoading } = useAllRows(fetchPatientList, [startDate, endDate, locationUuids, indicator, from]);
57
58
  return (
58
59
  <RegisterLayout
59
60
  parentLabel="MOH-711 Report"
@@ -63,6 +63,7 @@ const Moh711MaternityLinelist: React.FC = () => {
63
63
  const endDate = searchParams.get('endDate');
64
64
  const locationUuids = searchParams.get('locationUuids');
65
65
  const indicator = searchParams.get('indicator') ?? '';
66
+ const from = searchParams.get('from');
66
67
  const locationName = useLocationName(locationUuids);
67
68
 
68
69
  const fetchPatientList = useCallback(
@@ -76,9 +77,9 @@ const Moh711MaternityLinelist: React.FC = () => {
76
77
  startIndex,
77
78
  limit,
78
79
  }),
79
- [startDate, endDate, locationUuids, indicator],
80
+ [startDate, endDate, locationUuids, indicator, from],
80
81
  );
81
- const { rows, isLoading } = useAllRows(fetchPatientList, [startDate, endDate, locationUuids, indicator]);
82
+ const { rows, isLoading } = useAllRows(fetchPatientList, [startDate, endDate, locationUuids, indicator, from]);
82
83
 
83
84
  return (
84
85
  <RegisterLayout
@@ -40,6 +40,7 @@ const Moh711PncLinelist: React.FC = () => {
40
40
  const endDate = searchParams.get('endDate');
41
41
  const locationUuids = searchParams.get('locationUuids');
42
42
  const indicator = searchParams.get('indicator') ?? '';
43
+ const from = searchParams.get('from');
43
44
  const locationName = useLocationName(locationUuids);
44
45
 
45
46
  const fetchPatientList = useCallback(
@@ -53,9 +54,9 @@ const Moh711PncLinelist: React.FC = () => {
53
54
  startIndex,
54
55
  limit,
55
56
  }),
56
- [startDate, endDate, locationUuids, indicator],
57
+ [startDate, endDate, locationUuids, indicator, from],
57
58
  );
58
- const { rows, isLoading } = useAllRows(fetchPatientList, [startDate, endDate, locationUuids, indicator]);
59
+ const { rows, isLoading } = useAllRows(fetchPatientList, [startDate, endDate, locationUuids, indicator, from]);
59
60
 
60
61
  return (
61
62
  <RegisterLayout
@@ -2,7 +2,7 @@ import React from 'react';
2
2
 
3
3
  import styles from '../moh717.scss';
4
4
  import classNames from 'classnames';
5
- import { useLocation, useNavigate } from 'react-router-dom';
5
+ import { useNavigate } from 'react-router-dom';
6
6
 
7
7
  interface MaternityComponentProps {
8
8
  moh717ReportData: any;
@@ -18,17 +18,15 @@ const MaternityComponent: React.FC<MaternityComponentProps> = ({
18
18
  locationUuids,
19
19
  }) => {
20
20
  const navigate = useNavigate();
21
- const location = useLocation();
22
21
  const navigateToRegister = (indicator: string | string[]) => {
23
- navigate(
24
- `/moh-333-register?startDate=${startDate}&endDate=${endDate}&locationUuids=${locationUuids}&indicator=${indicator}&from=moh-717`,
25
- {
26
- state: {
27
- from: location.pathname,
28
- reportName: 'moh717Report',
29
- },
30
- },
31
- );
22
+ const params = new URLSearchParams({
23
+ startDate,
24
+ endDate,
25
+ locationUuids,
26
+ indicator: Array.isArray(indicator) ? indicator.join(',') : indicator,
27
+ from: 'moh-717',
28
+ });
29
+ navigate(`/moh-711-maternity-linelist?${params}`);
32
30
  };
33
31
  return (
34
32
  <>