@ampath/esm-reports-app 1.0.0-next.26 → 1.0.0-next.27

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 (42) hide show
  1. package/dist/645.js +1 -0
  2. package/dist/645.js.map +1 -0
  3. package/dist/812.js +1 -1
  4. package/dist/ampath-esm-reports-app.js.buildmanifest.json +26 -26
  5. package/dist/main.js +1 -1
  6. package/dist/routes.json +1 -1
  7. package/package.json +1 -1
  8. package/src/reports/moh-705B/moh-204b-register.component.tsx +235 -0
  9. package/src/reports/moh-705B/moh-705b.component.tsx +141 -83
  10. package/src/reports/moh-705B/moh-705b.scss +4 -1
  11. package/src/reports/moh-705a/moh-705a.component.tsx +141 -86
  12. package/src/reports/moh-705a/moh-705a.scss +5 -1
  13. package/src/reports/moh-705a/registers/moh-204a-register.component.tsx +320 -0
  14. package/src/reports/moh-705a/type.ts +6 -0
  15. package/src/reports/moh-710/moh-710.component.tsx +3 -1
  16. package/src/reports/moh-710/moh-710.scss +4 -0
  17. package/src/reports/moh-710/patient-list/moh-710-patient-list.component.tsx +13 -0
  18. package/src/reports/moh-711/moh-711.component.tsx +30 -12
  19. package/src/reports/moh-711/moh711.scss +11 -0
  20. package/src/reports/moh-711/registers/moh-333-register.component.tsx +636 -0
  21. package/src/reports/moh-711/registers/moh-405-register.component.tsx +518 -0
  22. package/src/reports/moh-711/registers/moh-406-register.component.tsx +530 -0
  23. package/src/reports/moh-711/registers/moh-510-register.component.tsx +61 -0
  24. package/src/reports/moh-711/registers/moh-511-register.component.tsx +263 -0
  25. package/src/reports/moh-711/registers/type.ts +194 -0
  26. package/src/reports/moh-711/sections/anc.component.tsx +45 -22
  27. package/src/reports/moh-711/sections/maternity.component.tsx +79 -40
  28. package/src/reports/moh-711/sections/pnc.component.tsx +39 -13
  29. package/src/reports/moh-717/moh-717.component.tsx +28 -10
  30. package/src/reports/moh-717/moh717.scss +4 -0
  31. package/src/reports/moh-717/sections/maternity.component.tsx +38 -13
  32. package/src/reports/moh-745/moh-745.component.tsx +440 -141
  33. package/src/reports/moh-745/moh-745.scss +5 -0
  34. package/src/reports/moh-745/registers/moh-412-register.component.tsx +190 -0
  35. package/src/reports/moh-745/registers/type.ts +29 -0
  36. package/src/resources/moh-705.resource.ts +57 -0
  37. package/src/resources/moh-710.resource.ts +26 -0
  38. package/src/resources/moh-711.resource.ts +141 -0
  39. package/src/resources/moh-745.resource.ts +32 -2
  40. package/src/root.component.tsx +18 -0
  41. package/dist/269.js +0 -1
  42. package/dist/269.js.map +0 -1
@@ -0,0 +1,518 @@
1
+ import { Button, Loading, TableCell, TableRow } from '@carbon/react';
2
+ import React, { useEffect, useState } from 'react';
3
+ import { useNavigate, useSearchParams } from 'react-router-dom';
4
+
5
+ import styles from '../moh711.scss';
6
+ import classNames from 'classnames';
7
+ import { getMoh405PatientList } from '../../../resources/moh-711.resource';
8
+ import { moh405Columns } from './type';
9
+
10
+ const Moh405Register: React.FC = () => {
11
+ const navigate = useNavigate();
12
+ const [patientlist, setPatientList] = useState<any[]>([]);
13
+ const [isLoading, setIsLoading] = useState(false);
14
+
15
+ const [searchParams] = useSearchParams();
16
+
17
+ const startDate = searchParams.get('startDate');
18
+ const endDate = searchParams.get('endDate');
19
+ const locationUuids = searchParams.get('locationUuids');
20
+ const indicator = searchParams.get('indicator');
21
+
22
+ useEffect(() => {
23
+ const fetchData = async () => {
24
+ if (!startDate || !endDate || !locationUuids || !indicator) return;
25
+
26
+ setIsLoading(true);
27
+
28
+ try {
29
+ const params = {
30
+ startDate,
31
+ endDate,
32
+ locationUuids,
33
+ indicator,
34
+ };
35
+
36
+ const data = await getMoh405PatientList(params);
37
+
38
+ setPatientList(data?.result || []);
39
+ } catch (error) {
40
+ console.error('Failed to fetch register data', error);
41
+ } finally {
42
+ setIsLoading(false);
43
+ }
44
+ };
45
+
46
+ fetchData();
47
+ }, [startDate, endDate, locationUuids, indicator]);
48
+ function navigateBack() {
49
+ navigate('/moh-711');
50
+ }
51
+ return (
52
+ <>
53
+ <div className={styles.buttonContainer}>
54
+ <Button onClick={navigateBack}>Back</Button>
55
+ </div>
56
+ <div>{isLoading && <Loading />}</div>
57
+ <div className={styles.tableContainer}>
58
+ <table className={classNames(`${styles.table}`, `${styles.tableBordered}`, `${styles.tableStriped}`)}>
59
+ <thead>
60
+ <tr>
61
+ <th rowSpan={7}>Date of visit</th>
62
+ <th>(New Client)</th>
63
+ <th rowSpan={7}>
64
+ ANC <br />
65
+ Number/NUPI
66
+ <br />
67
+ (Re Visit)
68
+ </th>
69
+ <th rowSpan={7}>AMRSID</th>
70
+ <th rowSpan={7}>
71
+ Number of <br />
72
+ Visits <br />
73
+ (1st,2nd,3rd,
74
+ <br />
75
+ 4th ….)
76
+ </th>
77
+ <th rowSpan={7}>
78
+ Full Name
79
+ <br />
80
+ (First, Middle, Surname)
81
+ </th>
82
+ <th rowSpan={1}>
83
+ Date of Birth
84
+ <br />
85
+ (DD/MM/YYYY)
86
+ </th>
87
+ <th rowSpan={7}>Subcounty/ County</th>
88
+ <th rowSpan={1}>Village/Estate/ Landmark</th>
89
+ <th rowSpan={7}>
90
+ <u>Marital Status</u>
91
+ <br />
92
+ NM=Never <br />
93
+ Married/Single
94
+ <br />
95
+ MM=Married <br />
96
+ Monogamous
97
+ <br />
98
+ MP=Married
99
+ <br />
100
+ Polygamous
101
+ <br />
102
+ W=Widowed
103
+ <br />
104
+ D=Divorced
105
+ <br />
106
+ S=Separated
107
+ </th>
108
+ <th rowSpan={7}>Parity</th>
109
+ <th rowSpan={7}>Gravidae</th>
110
+ <th rowSpan={1}>
111
+ Date of Last Menstrual <br />
112
+ Period (LMP)
113
+ </th>
114
+ <th rowSpan={1}>Expected Date of Delivery (EDD)</th>
115
+ <th rowSpan={7}>
116
+ Gestation in
117
+ <br />
118
+ Weeks
119
+ </th>
120
+ <th rowSpan={7}>
121
+ MUAC <br />
122
+ 1= Green, <br />
123
+ 2=Yellow, <br />
124
+ 3=Red
125
+ </th>
126
+ <th rowSpan={7}>Height (cm)</th>
127
+ <th rowSpan={7}>Weight (kg)</th>
128
+ <th rowSpan={7}>Blood Pressure</th>
129
+ <th rowSpan={7}>
130
+ Breast Exam
131
+ <br />
132
+ 1=normal <br />
133
+ 2=abnormal
134
+ </th>
135
+ <th rowSpan={1}>FGM (Y/N)</th>
136
+ <th rowSpan={1} colSpan={12}>
137
+ Laboratory
138
+ </th>
139
+ <th rowSpan={1}>Maternal HAART</th>
140
+ <th rowSpan={1}>Infant Prophylaxis</th>
141
+ <th rowSpan={1}>Partner HIV Testing</th>
142
+ <th rowSpan={1}>Other Conditions and Treatment</th>
143
+ <th rowSpan={1}>Deworming</th>
144
+ <th rowSpan={1}>IPT 1-3</th>
145
+ <th rowSpan={1}>TT Dose</th>
146
+ <th rowSpan={1}>Supplementation</th>
147
+ <th rowSpan={1}>LLITNs</th>
148
+ <th rowSpan={1} colSpan={3}>
149
+ Referrrals
150
+ </th>
151
+ <th rowSpan={7}>Remarks</th>
152
+ </tr>
153
+ <tr>
154
+ <th>ANC Number</th>
155
+ <th rowSpan={6}>Age</th>
156
+ <th rowSpan={6}>Phone Number</th>
157
+ <th rowSpan={6}>(dd/mm/yyyy)</th>
158
+ <th rowSpan={6}>(dd/mm/yyyy)</th>
159
+ <th rowSpan={6}>
160
+ FGM associated <br />
161
+ complications:
162
+ <br />
163
+ 1=Scarring
164
+ <br />
165
+ 2=Keloids
166
+ <br />
167
+ 3=Dyspaneuria
168
+ <br />
169
+ 4=UTI 5 = NA
170
+ </th>
171
+ <th rowSpan={6}>
172
+ Haemoglobin <br />
173
+ (Level/ ND/NA)
174
+ </th>
175
+ <th rowSpan={6}>
176
+ Blood Sugar Testing <br />
177
+ for Diabetes: <br />
178
+ 1=RBS&lt; 11.1 <br />
179
+ mmol/L, No <br />
180
+ Diabetes,
181
+ <br />
182
+ 2=RBS&gt;11.1
183
+ <br />
184
+ mmol/L, Has <br />
185
+ Diabetes,
186
+ <br />
187
+ 3=No RBS done
188
+ </th>
189
+ <th rowSpan={6}>
190
+ Blood group <br />
191
+ and rhesus <br />
192
+ (Y/N)
193
+ </th>
194
+ <th rowSpan={6}>
195
+ Urinalysis
196
+ <br />
197
+ (Y/N)
198
+ </th>
199
+ <th rowSpan={1}>
200
+ Type of Test <br />
201
+ RPR/ VDRL/ <br />
202
+ Duo Test/ NA
203
+ </th>
204
+ <th rowSpan={1}>
205
+ Hepatitis B virus <br />
206
+ Sceening Result
207
+ <br />
208
+ (P/N/ND)
209
+ </th>
210
+ <th rowSpan={1}>
211
+ TB Screening:
212
+ <br />
213
+ Codes (1-5)
214
+ </th>
215
+ <th rowSpan={1} colSpan={5}></th>
216
+ <th rowSpan={6}>
217
+ N = New on ART.
218
+ <br />
219
+ OA = On ART
220
+ <br />
221
+ NA = Not
222
+ <br />
223
+ Applicable
224
+ </th>
225
+ <th rowSpan={6}>
226
+ AN = AZT&NVP <br />
227
+ A = AZT
228
+ <br />
229
+ N = NVP
230
+ <br />
231
+ NA
232
+ </th>
233
+ <th rowSpan={6}>N/P/KP/NA</th>
234
+ <th rowSpan={1}>
235
+ 1=Hypertension; <br />
236
+ 2=Diabetes; <br />
237
+ 3=Epilepsy; <br />
238
+ 4=Malaria in Pregnancy; <br />
239
+ 5=STIs/RTI; <br />
240
+ 6=Others (Specify) <br />
241
+ 7=None <br />
242
+ Record all that apply
243
+ </th>
244
+ <th rowSpan={6}>(Y/N/NA)</th>
245
+ <th rowSpan={6}>(1,2,3,N,NA)</th>
246
+ <th rowSpan={6}>
247
+ 1=TT Dose 1st <br />
248
+ dose 2=2nd dose <br />
249
+ 3=3rd dose <br />
250
+ 4=4th dose <br />
251
+ 5=5th dose <br />
252
+ NA=None
253
+ </th>
254
+ <th rowSpan={6}>
255
+ Given
256
+ <br />
257
+ Supplementation <br />
258
+ 1=Combined IFAs
259
+ <br />
260
+ 2=Iron <br />
261
+ 3=Folate <br />
262
+ 4=Iron+Folate <br />
263
+ Separately <br />
264
+ 5=Calcium
265
+ </th>
266
+ <th rowSpan={6}>
267
+ Received
268
+ <br />
269
+ LLITNs <br />
270
+ (Y/N)
271
+ </th>
272
+ <th rowSpan={1}>From</th>
273
+ <th rowSpan={1}>To</th>
274
+ <th rowSpan={6}>
275
+ Reason for referral
276
+ <br />
277
+ (specify)
278
+ </th>
279
+ </tr>
280
+ <tr>
281
+ <th rowSpan={5}>NUPI</th>
282
+ <th rowSpan={5}>
283
+ Test Results <br />
284
+ (P/N/NA)
285
+ </th>
286
+ <th rowSpan={5}>
287
+ Treatment
288
+ <br />
289
+ (Y/N/NA)
290
+ </th>
291
+ <th rowSpan={5}>
292
+ 1=Presumed TB <br />
293
+ 2=No Signs <br />
294
+ 3=On TB <br />
295
+ Treatment <br />
296
+ 4=On TPT
297
+ <br />
298
+ 5=Not Done
299
+ </th>
300
+ <th rowSpan={1}>
301
+ HIV Testing <br />
302
+ (Initial or Retest,
303
+ <br />
304
+ Known Poitive or <br />
305
+ Revisit)
306
+ </th>
307
+ <th rowSpan={1}>HIV Test 1</th>
308
+ <th rowSpan={1}>HIV Test 2</th>
309
+ <th rowSpan={1}>HIV Test 3</th>
310
+ <th rowSpan={1}>HIV Results</th>
311
+ <th rowSpan={5}>Treatment (Y/N/NA)</th>
312
+ <th rowSpan={5}>
313
+ 1=From <br />
314
+ Community Unit <br />
315
+ 2=Another
316
+ <br />
317
+ Health Facility <br />
318
+ 3=Not Applicable
319
+ </th>
320
+ <th rowSpan={5}>
321
+ 1=To Community <br />
322
+ Unit <br />
323
+ 2=HIV preventive <br />
324
+ services
325
+ <br />
326
+ 3=Another Health <br />
327
+ Facility 4=Not <br />
328
+ Applicable
329
+ </th>
330
+ </tr>
331
+ <tr>
332
+ <th rowSpan={5}>(I/R/KP/ND/Rev)</th>
333
+ <th rowSpan={1}>Kit Name</th>
334
+ <th rowSpan={1}>Kit Name</th>
335
+ <th rowSpan={1}>Kit Name</th>
336
+ <th rowSpan={5}>(N/P/Ic/U/N A)</th>
337
+ </tr>
338
+ <tr>
339
+ <th rowSpan={1}>Expiry / /</th>
340
+ <th rowSpan={1}>Expiry / /</th>
341
+ <th rowSpan={1}>Expiry / /</th>
342
+ </tr>
343
+ <tr>
344
+ <th rowSpan={1}>(N/P/I/NA)</th>
345
+ <th rowSpan={1}>(N/P/I/NA)</th>
346
+ <th rowSpan={1}>(N/P/I/NA)</th>
347
+ </tr>
348
+ </thead>
349
+ <tbody>
350
+ <tr>
351
+ <td className={styles.textCenter}>(a)</td>
352
+ <td className={styles.textCenter}>(b)</td>
353
+ <td className={styles.textCenter}>(c)</td>
354
+ <td className={styles.textCenter}>(d)</td>
355
+ <td className={styles.textCenter}>(e)</td>
356
+ <td className={styles.textCenter}>(f)</td>
357
+ <td className={styles.textCenter}>(g)</td>
358
+ <td className={styles.textCenter}>(h)</td>
359
+ <td className={styles.textCenter}>(i)</td>
360
+ <td className={styles.textCenter}>(j)</td>
361
+ <td className={styles.textCenter}>(k)</td>
362
+ <td className={styles.textCenter}>(l)</td>
363
+ <td className={styles.textCenter}>(m)</td>
364
+ <td className={styles.textCenter}>(n)</td>
365
+ <td className={styles.textCenter}>(o)</td>
366
+ <td className={styles.textCenter}>(p)</td>
367
+ <td className={styles.textCenter}>(q)</td>
368
+ <td className={styles.textCenter}>(r)</td>
369
+ <td className={styles.textCenter}>(s)</td>
370
+ <td className={styles.textCenter}>(t)</td>
371
+ <td className={styles.textCenter}>(u)</td>
372
+ <td className={styles.textCenter}>(v)</td>
373
+ <td className={styles.textCenter}>(w)</td>
374
+ <td className={styles.textCenter}>(x)</td>
375
+ <td className={styles.textCenter}>(y)</td>
376
+ <td className={styles.textCenter}>(z)</td>
377
+ <td className={styles.textCenter}>(aa)</td>
378
+ <td className={styles.textCenter}>(ab)</td>
379
+ <td className={styles.textCenter}>(ac)</td>
380
+ <td className={styles.textCenter}>(ad)</td>
381
+ <td className={styles.textCenter}>(ae)</td>
382
+ <td className={styles.textCenter}>(af)</td>
383
+ <td className={styles.textCenter}>(ag)</td>
384
+ <td className={styles.textCenter}>(ah)</td>
385
+ <td className={styles.textCenter}>(ai)</td>
386
+ <td className={styles.textCenter}>(aj)</td>
387
+ <td className={styles.textCenter}>(ak)</td>
388
+ <td className={styles.textCenter}>(al)</td>
389
+ <td className={styles.textCenter}>(am)</td>
390
+ <td className={styles.textCenter}>(an)</td>
391
+ <td className={styles.textCenter}>(ao)</td>
392
+ <td className={styles.textCenter}>(ap)</td>
393
+ <td className={styles.textCenter}>(aq)</td>
394
+ <td className={styles.textCenter}>(ar)</td>
395
+ <td className={styles.textCenter}>(as)</td>
396
+ <td className={styles.textCenter}>(at)</td>
397
+ </tr>
398
+ {patientlist?.length > 0 ? (
399
+ patientlist.map((patient, rowIndex) => (
400
+ <React.Fragment key={rowIndex}>
401
+ <tr>
402
+ <td rowSpan={2}>
403
+ {patient.date_of_visit ? new Date(patient.date_of_visit).toLocaleDateString('en-GB') : ''}
404
+ </td>
405
+ <td>{patient.anc_number}</td>
406
+ <td rowSpan={2}>{patient.anc_number_NUPI}</td>
407
+ <td rowSpan={2}>{patient.amrsID}</td>
408
+ <td rowSpan={2}>{patient.number_of_anc_visits}</td>
409
+ <td rowSpan={2}>{patient.full_names}</td>
410
+ <td>{patient.date_of_birth ? new Date(patient.date_of_birth).toLocaleDateString('en-GB') : ''}</td>
411
+ <td rowSpan={2}>{patient.subcounty_county}</td>
412
+ <td>{patient.village_estate_landmark}</td>
413
+ <td rowSpan={2}>{patient.marital_status}</td>
414
+ <td rowSpan={2}>{patient.parity}</td>
415
+ <td rowSpan={2}>{patient.gravidae}</td>
416
+ <td rowSpan={2}>
417
+ {patient.last_lmp_date ? new Date(patient.last_lmp_date).toLocaleDateString('en-GB') : ''}
418
+ </td>
419
+ <td rowSpan={2}>{patient.edd ? new Date(patient.edd).toLocaleDateString('en-GB') : ''}</td>
420
+ <td rowSpan={2}>{patient.gestation_in_weeks}</td>
421
+ <td rowSpan={2}>{patient.muac}</td>
422
+ <td rowSpan={2}>{patient.height}</td>
423
+ <td rowSpan={2}>{patient.weight}</td>
424
+ <td rowSpan={2}>{patient.blood_pressure}</td>
425
+ <td rowSpan={2}>{patient.breast_exam}</td>
426
+ <td>{patient.fgm}</td>
427
+ <td rowSpan={2}>{patient.haemoglobin}</td>
428
+ <td rowSpan={2}>{patient.blood_sugar_test}</td>
429
+ <td rowSpan={2}>{patient.blood_group_rhesus}</td>
430
+ <td rowSpan={2}>{patient.urinalysis}</td>
431
+ <td>{patient.rpr_vdrl_duo}</td>
432
+ <td>{patient.hepatitisB}</td>
433
+ <td rowSpan={2}>{patient.tb_screening}</td>
434
+ <td rowSpan={2}>{patient.hiv_test_type}</td>
435
+
436
+ <td>
437
+ {patient.hiv_test_1_kit_name} / {patient.hiv_test_1_lot_no} /{' '}
438
+ {patient.hiv_test_1_expiry_date
439
+ ? new Date(patient.hiv_test_1_expiry_date).toLocaleDateString('en-GB')
440
+ : ''}{' '}
441
+ / {patient.hiv_test_1_test_result}
442
+ </td>
443
+
444
+ <td>
445
+ {patient.hiv_test_2_kit_name} / {patient.hiv_test_2_lot_number} /{' '}
446
+ {patient.hiv_test_2_expiry_date
447
+ ? new Date(patient.hiv_test_2_expiry_date).toLocaleDateString('en-GB')
448
+ : ''}{' '}
449
+ / {patient.hiv_test_2_test_result}
450
+ </td>
451
+
452
+ <td>
453
+ {patient.hiv_test_3_kit_name} / {patient.hiv_test_3_lot_number} /{' '}
454
+ {patient.hiv_test_3_expiry_date
455
+ ? new Date(patient.hiv_test_3_expiry_date).toLocaleDateString('en-GB')
456
+ : ''}{' '}
457
+ / {patient.hiv_test_3_test_result}
458
+ </td>
459
+
460
+ <td rowSpan={2}>{patient.hiv_results}</td>
461
+ <td rowSpan={2}>{patient.maternal_haart}</td>
462
+ <td rowSpan={2}>{patient.infant_prophylaxis}</td>
463
+ <td rowSpan={2}>{patient.partner_hiv_testing}</td>
464
+ <td>{patient.other_conditions}</td>
465
+ <td rowSpan={2}>{patient.deworming}</td>
466
+ <td rowSpan={2}>{patient.ipt_1_3}</td>
467
+ <td rowSpan={2}>{patient.tt_dose}</td>
468
+ <td rowSpan={2}>{patient.supplementation}</td>
469
+ <td rowSpan={2}>{patient.llitns}</td>
470
+ <td rowSpan={2}>{patient.referrals_from}</td>
471
+ <td rowSpan={2}>{patient.referrals_to}</td>
472
+ <td rowSpan={2}>{patient.reason_for_referral}</td>
473
+ <td rowSpan={2}>{patient.remarks}</td>
474
+ </tr>
475
+
476
+ <tr>
477
+ <td>{patient.NUPI}</td>
478
+ <td>{patient.age}</td>
479
+ <td>{patient.phone_number}</td>
480
+ <td>{patient.fgm_complications}</td>
481
+ <td>{patient.rpr_vdrl_duo_results}</td>
482
+ <td>{patient.hepatitisB_treatment}</td>
483
+
484
+ <td>
485
+ {patient.hiv_test_1_expiry_date
486
+ ? new Date(patient.hiv_test_1_expiry_date).toLocaleDateString('en-GB')
487
+ : ''}
488
+ </td>
489
+
490
+ <td>
491
+ {patient.hiv_test_2_expiry_date
492
+ ? new Date(patient.hiv_test_2_expiry_date).toLocaleDateString('en-GB')
493
+ : ''}
494
+ </td>
495
+
496
+ <td>
497
+ {patient.hiv_test_3_expiry_date
498
+ ? new Date(patient.hiv_test_3_expiry_date).toLocaleDateString('en-GB')
499
+ : ''}
500
+ </td>
501
+
502
+ <td>{patient.other_conditions_treatment}</td>
503
+ </tr>
504
+ </React.Fragment>
505
+ ))
506
+ ) : (
507
+ <TableRow>
508
+ <TableCell colSpan={moh405Columns.length}>No data available</TableCell>
509
+ </TableRow>
510
+ )}
511
+ </tbody>
512
+ </table>
513
+ </div>
514
+ </>
515
+ );
516
+ };
517
+
518
+ export default Moh405Register;