@ampath/esm-reports-app 1.0.0-next.4 → 1.0.0-next.40

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 (131) hide show
  1. package/dist/110.js +1 -0
  2. package/dist/110.js.map +1 -0
  3. package/dist/{260.js → 205.js} +1 -1
  4. package/dist/{260.js.map → 205.js.map} +1 -1
  5. package/dist/812.js +1 -1
  6. package/dist/812.js.map +1 -1
  7. package/dist/822.js +2 -0
  8. package/dist/822.js.map +1 -0
  9. package/dist/ampath-esm-reports-app.js +1 -1
  10. package/dist/ampath-esm-reports-app.js.buildmanifest.json +95 -74
  11. package/dist/ampath-esm-reports-app.js.map +1 -1
  12. package/dist/main.js +1 -1
  13. package/dist/main.js.map +1 -1
  14. package/dist/routes.json +1 -1
  15. package/package.json +1 -1
  16. package/src/common/report-filters/report-filters.component.tsx +5 -1
  17. package/src/dashboard/reports-dasboard.tsx +21 -0
  18. package/src/reports/datatable-wrapper/datatable-wrapper.component.tsx +54 -0
  19. package/src/reports/moh-240/moh-240-header.component.tsx +61 -0
  20. package/src/reports/moh-240/moh-240.component.tsx +93 -0
  21. package/src/reports/moh-240/moh-240.scss +11 -0
  22. package/src/reports/moh-240/sub-reports/moh-240-register.component.tsx +75 -0
  23. package/src/reports/moh-240/sub-reports/page-summary.component.tsx +98 -0
  24. package/src/reports/moh-505/moh-505-header.component.tsx +62 -0
  25. package/src/reports/moh-505/moh-505.component.tsx +440 -0
  26. package/src/reports/moh-505/moh-505.scss +3 -0
  27. package/src/reports/moh-705B/moh-204b-register.component.tsx +236 -0
  28. package/src/reports/moh-705B/moh-705b.component.tsx +524 -0
  29. package/src/reports/moh-705B/moh-705b.scss +44 -0
  30. package/src/reports/moh-705a/moh-705a.component.tsx +528 -0
  31. package/src/reports/moh-705a/moh-705a.scss +45 -0
  32. package/src/reports/moh-705a/registers/moh-204a-register.component.tsx +321 -0
  33. package/src/reports/moh-705a/type.ts +6 -0
  34. package/src/reports/moh-706/moh-706-header.component.tsx +61 -0
  35. package/src/reports/moh-706/moh-706.component.tsx +117 -0
  36. package/src/reports/moh-706/moh-706.scss +30 -0
  37. package/src/reports/moh-706/sub-reports/bacteriology/bacteriology.component.tsx +124 -0
  38. package/src/reports/moh-706/sub-reports/blood-chemistry/blood-chemistry.component.tsx +318 -0
  39. package/src/reports/moh-706/sub-reports/drug-susceptibility-testing/drug-susceptibility-testing.component.tsx +137 -0
  40. package/src/reports/moh-706/sub-reports/haematology/haematology.component.tsx +179 -0
  41. package/src/reports/moh-706/sub-reports/histology-and-cytology/histology-and-cytology.component.tsx +88 -0
  42. package/src/reports/moh-706/sub-reports/parasitology/parasitology.component.tsx +121 -0
  43. package/src/reports/moh-706/sub-reports/serology/serology.component.tsx +47 -0
  44. package/src/reports/moh-706/sub-reports/specimen-referral-to-higher-levels/specimen-referral-to-higher-levels.component.tsx +39 -0
  45. package/src/reports/moh-706/sub-reports/urine-analysis/urine-analysis.component.tsx +108 -0
  46. package/src/reports/moh-710/moh-710.component.tsx +211 -79
  47. package/src/reports/moh-710/moh-710.scss +5 -1
  48. package/src/reports/moh-710/registers/moh-511-710-register.component.tsx +263 -0
  49. package/src/reports/moh-710/registers/type.ts +31 -0
  50. package/src/reports/moh-711/moh-711.component.tsx +109 -1234
  51. package/src/reports/moh-711/moh711.scss +92 -8
  52. package/src/reports/moh-711/registers/moh-333-register.component.tsx +639 -0
  53. package/src/reports/moh-711/registers/moh-405-register.component.tsx +521 -0
  54. package/src/reports/moh-711/registers/moh-406-register.component.tsx +533 -0
  55. package/src/reports/moh-711/registers/moh-510-register.component.tsx +61 -0
  56. package/src/reports/moh-711/registers/moh-511-register.component.tsx +271 -0
  57. package/src/reports/moh-711/registers/type.ts +192 -0
  58. package/src/reports/moh-711/sections/anc.component.tsx +159 -0
  59. package/src/reports/moh-711/sections/cervical-cancer.component.tsx +148 -0
  60. package/src/reports/moh-711/sections/chanis.component.tsx +367 -0
  61. package/src/reports/moh-711/sections/family-planning.component.tsx +221 -0
  62. package/src/reports/moh-711/sections/gbv.component.tsx +115 -0
  63. package/src/reports/moh-711/sections/maternity.component.tsx +326 -0
  64. package/src/reports/moh-711/sections/medical-social-work.component.tsx +83 -0
  65. package/src/reports/moh-711/sections/other.component.tsx +47 -0
  66. package/src/reports/moh-711/sections/physiotherapy.component.tsx +61 -0
  67. package/src/reports/moh-711/sections/pnc.component.tsx +125 -0
  68. package/src/reports/moh-711/sections/post-abortion.component.tsx +42 -0
  69. package/src/reports/moh-711/sections/rehabilitation.component.tsx +57 -0
  70. package/src/reports/moh-711/sections/report-compiled-by.component.tsx +42 -0
  71. package/src/reports/moh-711/sections/tb-screening.component.tsx +57 -0
  72. package/src/reports/moh-717/moh-717.component.tsx +120 -946
  73. package/src/reports/moh-717/moh717.scss +138 -3
  74. package/src/reports/moh-717/registers/nutrition-register.component.tsx +48 -0
  75. package/src/reports/moh-717/sections/finance.component.tsx +42 -0
  76. package/src/reports/moh-717/sections/inpatient.component.tsx +374 -0
  77. package/src/reports/moh-717/sections/maternity.component.tsx +126 -0
  78. package/src/reports/moh-717/sections/medical-records.component.tsx +35 -0
  79. package/src/reports/moh-717/sections/mortuary.component.tsx +43 -0
  80. package/src/reports/moh-717/sections/operations.component.tsx +53 -0
  81. package/src/reports/moh-717/sections/orthopaedic-trauma.component.tsx +98 -0
  82. package/src/reports/moh-717/sections/outpatient.component.tsx +597 -0
  83. package/src/reports/moh-717/sections/pharmacy.component.tsx +43 -0
  84. package/src/reports/moh-717/sections/preparedby.component.tsx +47 -0
  85. package/src/reports/moh-717/sections/special-services.component.tsx +114 -0
  86. package/src/reports/moh-731/moh-731.component.tsx +181 -0
  87. package/src/reports/moh-731/moh-731.scss +118 -0
  88. package/src/reports/moh-731/registers/moh-366.component.tsx +478 -0
  89. package/src/reports/moh-731/registers/moh-366.scss +45 -0
  90. package/src/reports/moh-731/registers/prep-register.component.tsx +292 -0
  91. package/src/reports/moh-731/registers/prep-registers.scss +45 -0
  92. package/src/reports/moh-731/sections/hiv-and-tb-treatment.component.tsx +932 -0
  93. package/src/reports/moh-731/sections/hiv-testing-and-pre-exposure.component.tsx +569 -0
  94. package/src/reports/moh-731/sections/pmtct.component.tsx +451 -0
  95. package/src/reports/moh-740/moh-740.component.scss +120 -0
  96. package/src/reports/moh-740/moh-740.component.tsx +1271 -0
  97. package/src/reports/moh-740/moh-740.resource.ts +42 -0
  98. package/src/reports/moh-740/registers/moh-222-daily-register/moh-222-daily-register.scss +18 -0
  99. package/src/reports/moh-740/registers/moh-222-daily-register/moh-222-daily-register.tsx +104 -0
  100. package/src/reports/moh-740/registers/moh-270-permanent-register/moh-270-permanent-register.scss +18 -0
  101. package/src/reports/moh-740/registers/moh-270-permanent-register/moh-270-permanent-register.tsx +79 -0
  102. package/src/reports/moh-740/registers/moh-740-patient-list.scss +0 -0
  103. package/src/reports/moh-740/registers/moh-740-patient-list.tsx +66 -0
  104. package/src/reports/moh-740/shared/data-cell/data-cell.scss +6 -0
  105. package/src/reports/moh-740/shared/data-cell/data-cell.tsx +23 -0
  106. package/src/reports/moh-740/shared/utils/format-indicator.ts +22 -0
  107. package/src/reports/moh-740/shared/utils/indicator-register-map.ts +157 -0
  108. package/src/reports/moh-740/types/index.ts +216 -0
  109. package/src/reports/moh-745/moh-745.component.tsx +928 -0
  110. package/src/reports/moh-745/moh-745.scss +74 -0
  111. package/src/reports/moh-745/registers/moh-412-register.component.tsx +191 -0
  112. package/src/reports/moh-745/registers/type.ts +30 -0
  113. package/src/reports/table-wrapper/table-row-mapper.component.tsx +53 -0
  114. package/src/reports/table-wrapper/table-wrapper.component.tsx +21 -0
  115. package/src/reports/table-wrapper/table-wrapper.scss +31 -0
  116. package/src/resources/moh-505.resource.ts +86 -0
  117. package/src/resources/moh-705.resource.ts +117 -0
  118. package/src/resources/moh-706.resource.ts +86 -0
  119. package/src/resources/moh-710.resource.ts +28 -0
  120. package/src/resources/moh-711.resource.ts +146 -0
  121. package/src/resources/moh-717.resource.ts +27 -0
  122. package/src/resources/moh-731.resource.ts +96 -0
  123. package/src/resources/moh-745.resource.ts +64 -0
  124. package/src/root.component.tsx +39 -0
  125. package/src/routes.json +3 -1
  126. package/src/utils/utils.ts +36 -0
  127. package/dist/367.js +0 -2
  128. package/dist/367.js.map +0 -1
  129. package/dist/86.js +0 -1
  130. package/dist/86.js.map +0 -1
  131. /package/dist/{367.js.LICENSE.txt → 822.js.LICENSE.txt} +0 -0
@@ -0,0 +1,533 @@
1
+ import { Button, Loading } from '@carbon/react';
2
+ import React, { useEffect, useState } from 'react';
3
+ import { useLocation, useNavigate, useSearchParams } from 'react-router-dom';
4
+
5
+ import styles from '../moh711.scss';
6
+ import classNames from 'classnames';
7
+ import { getMoh406PatientList } from '../../../resources/moh-711.resource';
8
+ import { moh406Columns } from './type';
9
+
10
+ const Moh406Register: React.FC = () => {
11
+ const navigate = useNavigate();
12
+
13
+ const [patientlist, setPatientList] = useState<any[]>([]);
14
+ const [isLoading, setIsLoading] = useState(false);
15
+
16
+ const [searchParams] = useSearchParams();
17
+ const location = useLocation();
18
+
19
+ const startDate = searchParams.get('startDate');
20
+ const endDate = searchParams.get('endDate');
21
+ const locationUuids = searchParams.get('locationUuids');
22
+ const indicator = searchParams.get('indicator');
23
+ const reportName = location.state?.reportName || '';
24
+
25
+ useEffect(() => {
26
+ const fetchData = async () => {
27
+ if (!startDate || !endDate || !locationUuids || !indicator) return;
28
+
29
+ setIsLoading(true);
30
+
31
+ try {
32
+ const params = {
33
+ startDate,
34
+ endDate,
35
+ locationUuids,
36
+ indicator,
37
+ reportName,
38
+ };
39
+
40
+ const data = await getMoh406PatientList(params);
41
+
42
+ setPatientList(data?.results.results || []);
43
+ } catch (error) {
44
+ console.error('Failed to fetch register data', error);
45
+ } finally {
46
+ setIsLoading(false);
47
+ }
48
+ };
49
+
50
+ fetchData();
51
+ }, [startDate, endDate, locationUuids, indicator, reportName]);
52
+ function navigateBack() {
53
+ navigate('/moh-711');
54
+ }
55
+ return (
56
+ <>
57
+ <div className={styles.buttonContainer}>
58
+ <Button onClick={navigateBack}>Back</Button>
59
+ </div>
60
+ <div>{isLoading && <Loading />}</div>
61
+ <div className={styles.tableContainer}>
62
+ <table className={classNames(`${styles.table}`, `${styles.tableBordered}`, `${styles.tableStriped}`)}>
63
+ <thead>
64
+ <tr>
65
+ <th colSpan={8}>Registration Information</th>
66
+ <th colSpan={3}>Maternity History</th>
67
+ <th colSpan={2}>Postpartum Visit</th>
68
+ <th colSpan={3}>Vital Signs</th>
69
+ <th colSpan={8}>Postnatal Examinations</th>
70
+ <th>TB screening</th>
71
+ <th colSpan={6}></th>
72
+ <th colSpan={4}>HAART & Infant Prophylaxis and Treatment</th>
73
+ <th>
74
+ Cervical Cancer
75
+ <br />
76
+ Screening
77
+ <br />
78
+ (VIA/VILLI/PAP
79
+ <br />
80
+ Smear/ND)
81
+ </th>
82
+ <th>
83
+ Modern Post
84
+ <br />
85
+ Partum Family
86
+ <br />
87
+ Planning
88
+ <br />
89
+ (Y/N)
90
+ </th>
91
+ <th>
92
+ Other Maternal
93
+ <br />
94
+ Complications
95
+ </th>
96
+ <th>
97
+ Haematinics
98
+ <br />
99
+ (Y/N)
100
+ </th>
101
+ <th colSpan={3}>Refferals</th>
102
+ <th rowSpan={7}>Remarks</th>
103
+ </tr>
104
+ <tr>
105
+ <th rowSpan={6}>
106
+ Date of Visit
107
+ <br />
108
+ (dd/mm/yyyy)
109
+ </th>
110
+ <th>
111
+ PNC Number
112
+ <br />
113
+ (New Visit)
114
+ </th>
115
+ <th rowSpan={6}>
116
+ PNC Number/NUPI <br />
117
+ (Revisit)
118
+ </th>
119
+ <th rowSpan={6}>AMRSID</th>
120
+ <th rowSpan={6}>
121
+ Full Name(first name, middle and <br />
122
+ surname)
123
+ </th>
124
+ <th>
125
+ Date of Birth
126
+ <br />
127
+ (dd/mm/yyyy)
128
+ </th>
129
+ <th rowSpan={6}>
130
+ County/ <br />
131
+ SubCounty
132
+ </th>
133
+ <th>Village/Estate/ Landmark</th>
134
+ <th rowSpan={6}>
135
+ Date of Delivery
136
+ <br />
137
+ (dd/mm/yyyy)
138
+ </th>
139
+ <th rowSpan={6}>
140
+ Place of <br />
141
+ Delivery
142
+ <br />
143
+ 1)Facility <br />
144
+ 2) Home
145
+ <br />
146
+ 3) BBA
147
+ </th>
148
+ <th rowSpan={6}>
149
+ Mode of
150
+ <br />
151
+ Delivery
152
+ <br />
153
+ 1) SVD
154
+ <br />
155
+ 2) CS
156
+ <br />
157
+ 3) Breech
158
+ <br />
159
+ 4) AVD
160
+ </th>
161
+ <th>
162
+ Timing <br />
163
+ Mother
164
+ </th>
165
+ <th>Timing Baby</th>
166
+ <th rowSpan={6}>Temp</th>
167
+ <th rowSpan={6}>Pulse</th>
168
+ <th rowSpan={6}>
169
+ Blood <br />
170
+ Pressure
171
+ </th>
172
+ <th>
173
+ Pallor
174
+ <br />
175
+ (Y/N)
176
+ </th>
177
+ <th rowSpan={6}>
178
+ Breast <br />
179
+ 1=normal <br />
180
+ 2= cracked
181
+ <br />
182
+ nipple
183
+ <br />
184
+ 3=engorged <br />
185
+ 4=mastitis
186
+ </th>
187
+ <th rowSpan={6}>
188
+ Uterus <br />
189
+ 1=
190
+ <br />
191
+ contracte d<br />
192
+ 2= not
193
+ <br />
194
+ contracte d <br />
195
+ 3= Others
196
+ <br />
197
+ Specify
198
+ </th>
199
+ <th rowSpan={6}>
200
+ PPH <br />
201
+ 1=present
202
+ <br />
203
+ 2=Absent
204
+ </th>
205
+ <th rowSpan={6}>
206
+ C-Section Site <br />
207
+ 1=Bleeding <br />
208
+ 2=Normal <br />
209
+ 3=Infected
210
+ <br />
211
+ 4=Gapping <br />
212
+ 5=N/A
213
+ </th>
214
+ <th rowSpan={6}>
215
+ Lochia <br />
216
+ 1=Normal <br />
217
+ 2=Foul <br />
218
+ smelling <br />
219
+ 3=Excessi <br />
220
+ ve
221
+ </th>
222
+ <th rowSpan={6}>
223
+ Episiotomy <br />
224
+ 1=Repaired <br />
225
+ 2=Gaping <br />
226
+ 3=Infected <br />
227
+ 4=Healed <br />
228
+ 5=N/
229
+ </th>
230
+ <th rowSpan={6}>
231
+ Fistula <br />
232
+ 1=VVF <br />
233
+ 2=RVF <br />
234
+ 3=VVR <br />
235
+ 4=Non
236
+ </th>
237
+ <th>
238
+ TB Screening
239
+ <br />
240
+ 1: Presumed TB
241
+ <br />
242
+ 2: No signs
243
+ <br />
244
+ 3: On TB treatment
245
+ <br />
246
+ 4: On TPT
247
+ <br />
248
+ 5: Not done
249
+ </th>
250
+ <th>Tested PNC</th>
251
+ <th>HIV Test 1</th>
252
+ <th>HIV Test 2</th>
253
+ <th>HIV Test 3</th>
254
+ <th colSpan={2}>Results in PNC</th>
255
+ <th colSpan={2}>&le;6wks</th>
256
+ <th colSpan={2}>&gt;6wks</th>
257
+ <th>
258
+ Results
259
+ <br />
260
+ 1=Normal,
261
+ <br />
262
+ 2=Suspected,
263
+ <br />
264
+ 3= Confirmed,
265
+ <br />
266
+ 4= Not done
267
+ </th>
268
+ <th>
269
+ Counseled <br />
270
+ Method received
271
+ </th>
272
+ <th rowSpan={6}></th>
273
+ <th rowSpan={6}></th>
274
+ <th>From</th>
275
+ <th>To</th>
276
+ <th>
277
+ Reasons for <br />
278
+ referral <br />
279
+ (specify)
280
+ </th>
281
+ </tr>
282
+ <tr>
283
+ <th rowSpan={6}>NUPI</th>
284
+ <th rowSpan={6}>Age in Years</th>
285
+ <th rowSpan={6}>Telephone number</th>
286
+ <th rowSpan={5}>
287
+ 1=no change, <br />
288
+ 2=10 days to
289
+ <br />
290
+ 14 days; <br />
291
+ 3=4 to 6 <br />
292
+ weeks; <br />
293
+ 4=4 to 6 <br />
294
+ months
295
+ </th>
296
+ <th rowSpan={5}>
297
+ 1=no change,
298
+ <br />
299
+ 2=10 days to <br />
300
+ 14 days; <br />
301
+ 3=4 to 6 <br />
302
+ weeks; <br />
303
+ 4=4 to 6 <br />
304
+ months
305
+ </th>
306
+ <th rowSpan={5}>
307
+ 1= mild;
308
+ <br />
309
+ 2= moderate;
310
+ <br />
311
+ 3= severe
312
+ </th>
313
+ <th rowSpan={5}></th>
314
+ <th rowSpan={5}>(I/R/ND/KP)</th>
315
+ <th>Kit Name:</th>
316
+ <th>Kit Name:</th>
317
+ <th>Kit Name:</th>
318
+ <th>&le;6wks</th>
319
+ <th>&gt;6wks</th>
320
+ <th>Infant</th>
321
+ <th>Mother</th>
322
+ <th>Infant</th>
323
+ <th>Mother</th>
324
+ <th rowSpan={5}></th>
325
+ <th rowSpan={5}></th>
326
+ <th>
327
+ 1 = Community Unit
328
+ <br />
329
+ 2 = Another Health
330
+ <br />
331
+ Facility
332
+ <br />3 = Not Applicable
333
+ </th>
334
+ <th>
335
+ 1 = Community Unit
336
+ <br />
337
+ <br />
338
+ 2 = Another Health
339
+ <br />
340
+ Facility
341
+ <br />3 = Not Applicable
342
+ </th>
343
+ <th rowSpan={5}></th>
344
+ </tr>
345
+ <tr>
346
+ <th>Lot No.</th>
347
+ <th>Lot No.</th>
348
+ <th>Lot No.</th>
349
+ <th rowSpan={4}>(N/P/Ic/NA)</th>
350
+ <th rowSpan={4}>(N/P/Ic/NA)</th>
351
+ <th>
352
+ NVP +AZT
353
+ <br />
354
+ +CTX
355
+ <br />
356
+ or
357
+ <br />
358
+ NVP +CTX
359
+ </th>
360
+ <th>HAART</th>
361
+ <th>
362
+ NVP +AZT
363
+ <br />
364
+ +CTX
365
+ <br />
366
+ or
367
+ <br />
368
+ NVP +CTX
369
+ </th>
370
+ <th>HAART</th>
371
+ <th rowSpan={4}></th>
372
+ <th rowSpan={4}></th>
373
+ </tr>
374
+ <tr>
375
+ <th>Expiry No. / /</th>
376
+ <th>Expiry No. / /</th>
377
+ <th>Expiry No. / /</th>
378
+ <th rowSpan={3}>(Y/N/NA/R)</th>
379
+ <th rowSpan={3}>(Y/N/NA/R)</th>
380
+ <th rowSpan={3}>(Y/N/NA/R)</th>
381
+ <th rowSpan={3}>(Y/N/NA/R)</th>
382
+ </tr>
383
+ <tr>
384
+ <th rowSpan={2}>(N,P,I,NA)</th>
385
+ <th rowSpan={2}>(N,P,I,NA)</th>
386
+ <th rowSpan={2}>(N,P,I,NA)</th>
387
+ </tr>
388
+ </thead>
389
+ <tbody>
390
+ <tr>
391
+ <td className={styles.textCenter}>(a)</td>
392
+ <td className={styles.textCenter}>(b)</td>
393
+ <td className={styles.textCenter}>(c)</td>
394
+ <td className={styles.textCenter}>(d)</td>
395
+ <td className={styles.textCenter}>(e)</td>
396
+ <td className={styles.textCenter}>(f)</td>
397
+ <td className={styles.textCenter}>(g)</td>
398
+ <td className={styles.textCenter}>(h)</td>
399
+ <td className={styles.textCenter}>(i)</td>
400
+ <td className={styles.textCenter}>(j)</td>
401
+ <td className={styles.textCenter}>(k)</td>
402
+ <td className={styles.textCenter}>(l)</td>
403
+ <td className={styles.textCenter}>(m)</td>
404
+ <td className={styles.textCenter}>(n)</td>
405
+ <td className={styles.textCenter}>(o)</td>
406
+ <td className={styles.textCenter}>(p)</td>
407
+ <td className={styles.textCenter}>(q)</td>
408
+ <td className={styles.textCenter}>(r)</td>
409
+ <td className={styles.textCenter}>(s)</td>
410
+ <td className={styles.textCenter}>(t)</td>
411
+ <td className={styles.textCenter}>(u)</td>
412
+ <td className={styles.textCenter}>(v)</td>
413
+ <td className={styles.textCenter}>(w)</td>
414
+ <td className={styles.textCenter}>(x)</td>
415
+ <td className={styles.textCenter}>(y)</td>
416
+ <td className={styles.textCenter}>(z)</td>
417
+ <td className={styles.textCenter}>(aa)</td>
418
+ <td className={styles.textCenter}>(ab)</td>
419
+ <td className={styles.textCenter}>(ac)</td>
420
+ <td className={styles.textCenter}>(ad)</td>
421
+ <td className={styles.textCenter}>(ae)</td>
422
+ <td className={styles.textCenter}>(af)</td>
423
+ <td className={styles.textCenter}>(ag)</td>
424
+ <td className={styles.textCenter}>(ah)</td>
425
+ <td className={styles.textCenter}>(ai)</td>
426
+ <td className={styles.textCenter}>(aj)</td>
427
+ <td className={styles.textCenter}>(ak)</td>
428
+ <td className={styles.textCenter}>(al)</td>
429
+ <td className={styles.textCenter}>(am)</td>
430
+ <td className={styles.textCenter}>(an)</td>
431
+ <td className={styles.textCenter}>(ao)</td>
432
+ <td className={styles.textCenter}>(ap)</td>
433
+ <td className={styles.textCenter}>(aq)</td>
434
+ </tr>
435
+ {patientlist?.length > 0 ? (
436
+ patientlist.map((patient, index) => (
437
+ <React.Fragment key={index}>
438
+ <tr>
439
+ <td rowSpan={2}>
440
+ {patient.date_of_visit ? new Date(patient.date_of_visit).toLocaleDateString('en-GB') : ''}
441
+ </td>
442
+ <td>{patient.pnc_number}</td>
443
+ <td rowSpan={2}>{patient.pnc_number}</td>
444
+ <td rowSpan={2}>{patient.amrsID}</td>
445
+ <td rowSpan={2}>{patient.full_names}</td>
446
+
447
+ <td>{patient.date_of_birth ? new Date(patient.date_of_birth).toLocaleDateString('en-GB') : ''}</td>
448
+
449
+ <td rowSpan={2}>{patient.subcounty_county}</td>
450
+ <td>{patient.village_estate_landmark}</td>
451
+
452
+ <td rowSpan={2}>
453
+ {patient.date_of_delivery ? new Date(patient.date_of_delivery).toLocaleDateString('en-GB') : ''}
454
+ </td>
455
+
456
+ <td rowSpan={2}>{patient.place_of_delivery}</td>
457
+ <td rowSpan={2}>{patient.mode_of_delivery}</td>
458
+ <td rowSpan={2}>{patient.timing_mother}</td>
459
+ <td rowSpan={2}>{patient.timing_baby}</td>
460
+ <td rowSpan={2}>{patient.temperature}</td>
461
+ <td rowSpan={2}>{patient.pulse}</td>
462
+ <td rowSpan={2}>{patient.blood_pressure}</td>
463
+
464
+ <td>{patient.pallor_present}</td>
465
+
466
+ <td rowSpan={2}>{patient.breast}</td>
467
+ <td rowSpan={2}>{patient.uterus}</td>
468
+ <td rowSpan={2}>{patient.pph}</td>
469
+ <td rowSpan={2}>{patient.c_section_site}</td>
470
+ <td rowSpan={2}>{patient.lochia}</td>
471
+ <td rowSpan={2}>{patient.episiotomy}</td>
472
+ <td rowSpan={2}>{patient.fistula}</td>
473
+ <td rowSpan={2}>{patient.tb_screening}</td>
474
+ <td rowSpan={2}>{patient.tested_pnc}</td>
475
+
476
+ <td rowSpan={2}>
477
+ {patient.hiv_test_1_kit_name} / {patient.hiv_test_1_lot_no} / {patient.hiv_test_1_expiry_date} /{' '}
478
+ {patient.hiv_test_1_test_result}
479
+ </td>
480
+
481
+ <td rowSpan={2}>
482
+ {patient.hiv_test_2_kit_name} / {patient.hiv_test_2_lot_no} / {patient.hiv_test_2_expiry_date} /{' '}
483
+ {patient.hiv_test_2_test_result}
484
+ </td>
485
+
486
+ <td rowSpan={2}>
487
+ {patient.hiv_test_3_kit_name} / {patient.hiv_test_3_lot_no} / {patient.hiv_test_3_expiry_date} /{' '}
488
+ {patient.hiv_test_3_test_result}
489
+ </td>
490
+
491
+ <td rowSpan={2}>{patient.results_less_6_weeks}</td>
492
+ <td rowSpan={2}>{patient.results_greater_6_weeks}</td>
493
+ <td rowSpan={2}>{patient.infant_prophylaxis_less_6_weeks}</td>
494
+ <td rowSpan={2}>{patient.maternal_haart_less_6_weeks}</td>
495
+ <td rowSpan={2}>{patient.infant_prophylaxis_greater_6_weeks}</td>
496
+ <td rowSpan={2}>{patient.maternal_haart_greater_6_weeks}</td>
497
+
498
+ <td>{patient.cervical_cancer_method}</td>
499
+ <td>{patient.counselled}</td>
500
+
501
+ <td rowSpan={2}>{patient.other_maternal_complications}</td>
502
+ <td rowSpan={2}>{patient.haematinics}</td>
503
+ <td rowSpan={2}>{patient.referrals_from}</td>
504
+ <td rowSpan={2}>{patient.referrals_to}</td>
505
+ <td rowSpan={2}>{patient.reason_for_referral}</td>
506
+ <td rowSpan={2}>{patient.remarks}</td>
507
+ </tr>
508
+
509
+ <tr>
510
+ <td>{patient.nupi}</td>
511
+ <td>{patient.age}</td>
512
+ <td>{patient.phone_number}</td>
513
+ <td>{patient.pallor}</td>
514
+ <td>{patient.cervical_cancer_results}</td>
515
+ <td>{patient.family_planning_method}</td>
516
+ </tr>
517
+ </React.Fragment>
518
+ ))
519
+ ) : (
520
+ <tr>
521
+ <td colSpan={moh406Columns.length} className={styles.textCenter}>
522
+ No data available
523
+ </td>
524
+ </tr>
525
+ )}
526
+ </tbody>
527
+ </table>
528
+ </div>
529
+ </>
530
+ );
531
+ };
532
+
533
+ export default Moh406Register;
@@ -0,0 +1,61 @@
1
+ import { Button, Loading } 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 { getMoh510PatientList } from '../../../resources/moh-711.resource';
7
+
8
+ const Moh510Register: React.FC = () => {
9
+ const navigate = useNavigate();
10
+
11
+ const [patientlist, setPatientList] = useState<any[]>([]);
12
+ const [isLoading, setIsLoading] = useState(false);
13
+
14
+ const [searchParams] = useSearchParams();
15
+
16
+ const startDate = searchParams.get('startDate');
17
+ const endDate = searchParams.get('endDate');
18
+ const locationUuids = searchParams.get('locationUuids');
19
+ const indicator = searchParams.get('indicator');
20
+
21
+ useEffect(() => {
22
+ const fetchData = async () => {
23
+ if (!startDate || !endDate || !locationUuids || !indicator) return;
24
+
25
+ setIsLoading(true);
26
+
27
+ try {
28
+ const params = {
29
+ startDate,
30
+ endDate,
31
+ locationUuids,
32
+ indicator,
33
+ };
34
+
35
+ const data = await getMoh510PatientList(params);
36
+
37
+ setPatientList(data?.results.results || []);
38
+ } catch (error) {
39
+ console.error('Failed to fetch register data', error);
40
+ } finally {
41
+ setIsLoading(false);
42
+ }
43
+ };
44
+
45
+ fetchData();
46
+ }, [startDate, endDate, locationUuids, indicator]);
47
+
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
+ </>
58
+ );
59
+ };
60
+
61
+ export default Moh510Register;