@ampath/esm-reports-app 1.0.0-next.76 → 1.0.0-next.78

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.
@@ -1,5 +1,6 @@
1
- import React from 'react';
2
- import { useLocation, useNavigate, useSearchParams } from 'react-router-dom';
1
+ import React, { useState } from 'react';
2
+ import { useLocation, useSearchParams } from 'react-router-dom';
3
+ import { useSession } from '@openmrs/esm-framework';
3
4
 
4
5
  import styles from '../../../common/report-register/register-table.scss';
5
6
  import classNames from 'classnames';
@@ -7,17 +8,27 @@ import { getMoh406PatientList } from '../../../resources/moh-711.resource';
7
8
  import { moh406Columns } from './type';
8
9
  import { moh406ExportColumns } from './moh-406.columns';
9
10
  import { RegisterLayout, usePatientList } from '../../../common/report-register';
11
+ import { ReportFiltersComponent, type ReportPeriod } from '../../../common/report-filters';
10
12
 
11
13
  const Moh406Register: React.FC = () => {
12
- const [searchParams] = useSearchParams();
14
+ const [searchParams, setSearchParams] = useSearchParams();
13
15
  const location = useLocation();
16
+ const session = useSession();
14
17
 
15
- const startDate = searchParams.get('startDate');
16
- const endDate = searchParams.get('endDate');
17
- const locationUuids = searchParams.get('locationUuids');
18
- const indicator = searchParams.get('indicator');
19
- const reportName = location.state?.reportName || '';
20
18
  const from = searchParams.get('from');
19
+ const isDrilldown = Boolean(from);
20
+ const [generatedPeriod, setGeneratedPeriod] = useState<{ startDate: string; endDate: string } | null>(() => {
21
+ const startDate = searchParams.get('startDate');
22
+ const endDate = searchParams.get('endDate');
23
+ return !isDrilldown && startDate && endDate ? { startDate, endDate } : null;
24
+ });
25
+ const isGenerated = isDrilldown || Boolean(generatedPeriod);
26
+
27
+ const startDate = generatedPeriod?.startDate ?? searchParams.get('startDate');
28
+ const endDate = generatedPeriod?.endDate ?? searchParams.get('endDate');
29
+ const locationUuids = searchParams.get('locationUuids') ?? session?.sessionLocation?.uuid ?? '';
30
+ const indicator = searchParams.get('indicator');
31
+ const reportName = location.state?.reportName || 'moh711Report';
21
32
 
22
33
  const {
23
34
  rows: patientlist,
@@ -29,8 +40,12 @@ const Moh406Register: React.FC = () => {
29
40
  onPageChange,
30
41
  fetchAll,
31
42
  } = usePatientList(
32
- ({ startIndex, limit }) =>
33
- getMoh406PatientList({
43
+ ({ startIndex, limit }) => {
44
+ if (!isDrilldown && !generatedPeriod) {
45
+ return Promise.resolve({ results: [], total: 0, isTotalExact: true });
46
+ }
47
+
48
+ return getMoh406PatientList({
34
49
  startDate,
35
50
  endDate,
36
51
  locationUuids,
@@ -39,493 +54,527 @@ const Moh406Register: React.FC = () => {
39
54
  startIndex,
40
55
  limit,
41
56
  from,
42
- }),
43
- [startDate, endDate, locationUuids, indicator, reportName],
57
+ });
58
+ },
59
+ [startDate, endDate, locationUuids, indicator, reportName, from, isDrilldown, generatedPeriod],
44
60
  );
61
+
62
+ const generate = ({ startDate, endDate }: ReportPeriod) => {
63
+ setGeneratedPeriod({ startDate, endDate });
64
+ setSearchParams((currentParams) => {
65
+ const nextParams = new URLSearchParams(currentParams);
66
+ nextParams.set('startDate', startDate);
67
+ nextParams.set('endDate', endDate);
68
+ if (!nextParams.has('locationUuids') && locationUuids) {
69
+ nextParams.set('locationUuids', locationUuids);
70
+ }
71
+ return nextParams;
72
+ });
73
+ };
74
+
45
75
  return (
46
- <RegisterLayout
47
- parentLabel="MOH-711 Report"
48
- parentPath="/moh-711"
49
- title="MOH 406 Register"
50
- isLoading={isLoading}
51
- isEmpty={patientlist.length === 0}
52
- page={page}
53
- pageSize={pageSize}
54
- total={total}
55
- isTotalExact={isTotalExact}
56
- onPageChange={onPageChange}
57
- fetchAll={fetchAll}
58
- columns={moh406ExportColumns}
59
- >
60
- <div className={styles.tableContainer}>
61
- <table className={classNames(`${styles.table}`, `${styles.tableBordered}`, `${styles.tableStriped}`)}>
62
- <thead>
63
- <tr>
64
- <th colSpan={8}>Registration Information</th>
65
- <th colSpan={3}>Maternity History</th>
66
- <th colSpan={2}>Postpartum Visit</th>
67
- <th colSpan={3}>Vital Signs</th>
68
- <th colSpan={8}>Postnatal Examinations</th>
69
- <th>TB screening</th>
70
- <th colSpan={6}></th>
71
- <th colSpan={4}>HAART & Infant Prophylaxis and Treatment</th>
72
- <th>
73
- Cervical Cancer
74
- <br />
75
- Screening
76
- <br />
77
- (VIA/VILLI/PAP
78
- <br />
79
- Smear/ND)
80
- </th>
81
- <th>
82
- Modern Post
83
- <br />
84
- Partum Family
85
- <br />
86
- Planning
87
- <br />
88
- (Y/N)
89
- </th>
90
- <th>
91
- Other Maternal
92
- <br />
93
- Complications
94
- </th>
95
- <th>
96
- Haematinics
97
- <br />
98
- (Y/N)
99
- </th>
100
- <th colSpan={3}>Refferals</th>
101
- <th rowSpan={7}>Remarks</th>
102
- </tr>
103
- <tr>
104
- <th rowSpan={6}>
105
- Date of Visit
106
- <br />
107
- (dd/mm/yyyy)
108
- </th>
109
- <th>
110
- PNC Number
111
- <br />
112
- (New Visit)
113
- </th>
114
- <th rowSpan={6}>
115
- PNC Number/NUPI <br />
116
- (Revisit)
117
- </th>
118
- <th rowSpan={6}>CRID</th>
119
- <th rowSpan={6}>
120
- Full Name(first name, middle and <br />
121
- surname)
122
- </th>
123
- <th>
124
- Date of Birth
125
- <br />
126
- (dd/mm/yyyy)
127
- </th>
128
- <th rowSpan={6}>
129
- County/ <br />
130
- SubCounty
131
- </th>
132
- <th>Village/Estate/ Landmark</th>
133
- <th rowSpan={6}>
134
- Date of Delivery
135
- <br />
136
- (dd/mm/yyyy)
137
- </th>
138
- <th rowSpan={6}>
139
- Place of <br />
140
- Delivery
141
- <br />
142
- 1)Facility <br />
143
- 2) Home
144
- <br />
145
- 3) BBA
146
- </th>
147
- <th rowSpan={6}>
148
- Mode of
149
- <br />
150
- Delivery
151
- <br />
152
- 1) SVD
153
- <br />
154
- 2) CS
155
- <br />
156
- 3) Breech
157
- <br />
158
- 4) AVD
159
- </th>
160
- <th>
161
- Timing <br />
162
- Mother
163
- </th>
164
- <th>Timing Baby</th>
165
- <th rowSpan={6}>Temp</th>
166
- <th rowSpan={6}>Pulse</th>
167
- <th rowSpan={6}>
168
- Blood <br />
169
- Pressure
170
- </th>
171
- <th>
172
- Pallor
173
- <br />
174
- (Y/N)
175
- </th>
176
- <th rowSpan={6}>
177
- Breast <br />
178
- 1=normal <br />
179
- 2= cracked
180
- <br />
181
- nipple
182
- <br />
183
- 3=engorged <br />
184
- 4=mastitis
185
- </th>
186
- <th rowSpan={6}>
187
- Uterus <br />
188
- 1=
189
- <br />
190
- contracte d<br />
191
- 2= not
192
- <br />
193
- contracte d <br />
194
- 3= Others
195
- <br />
196
- Specify
197
- </th>
198
- <th rowSpan={6}>
199
- PPH <br />
200
- 1=present
201
- <br />
202
- 2=Absent
203
- </th>
204
- <th rowSpan={6}>
205
- C-Section Site <br />
206
- 1=Bleeding <br />
207
- 2=Normal <br />
208
- 3=Infected
209
- <br />
210
- 4=Gapping <br />
211
- 5=N/A
212
- </th>
213
- <th rowSpan={6}>
214
- Lochia <br />
215
- 1=Normal <br />
216
- 2=Foul <br />
217
- smelling <br />
218
- 3=Excessi <br />
219
- ve
220
- </th>
221
- <th rowSpan={6}>
222
- Episiotomy <br />
223
- 1=Repaired <br />
224
- 2=Gaping <br />
225
- 3=Infected <br />
226
- 4=Healed <br />
227
- 5=N/
228
- </th>
229
- <th rowSpan={6}>
230
- Fistula <br />
231
- 1=VVF <br />
232
- 2=RVF <br />
233
- 3=VVR <br />
234
- 4=Non
235
- </th>
236
- <th>
237
- TB Screening
238
- <br />
239
- 1: Presumed TB
240
- <br />
241
- 2: No signs
242
- <br />
243
- 3: On TB treatment
244
- <br />
245
- 4: On TPT
246
- <br />
247
- 5: Not done
248
- </th>
249
- <th>Tested PNC</th>
250
- <th>HIV Test 1</th>
251
- <th>HIV Test 2</th>
252
- <th>HIV Test 3</th>
253
- <th colSpan={2}>Results in PNC</th>
254
- <th colSpan={2}>&le;6wks</th>
255
- <th colSpan={2}>&gt;6wks</th>
256
- <th>
257
- Results
258
- <br />
259
- 1=Normal,
260
- <br />
261
- 2=Suspected,
262
- <br />
263
- 3= Confirmed,
264
- <br />
265
- 4= Not done
266
- </th>
267
- <th>
268
- Counseled <br />
269
- Method received
270
- </th>
271
- <th rowSpan={6}></th>
272
- <th rowSpan={6}></th>
273
- <th>From</th>
274
- <th>To</th>
275
- <th>
276
- Reasons for <br />
277
- referral <br />
278
- (specify)
279
- </th>
280
- </tr>
281
- <tr>
282
- <th rowSpan={6}>NUPI</th>
283
- <th rowSpan={6}>Age in Years</th>
284
- <th rowSpan={6}>Telephone number</th>
285
- <th rowSpan={5}>
286
- 1=no change, <br />
287
- 2=10 days to
288
- <br />
289
- 14 days; <br />
290
- 3=4 to 6 <br />
291
- weeks; <br />
292
- 4=4 to 6 <br />
293
- months
294
- </th>
295
- <th rowSpan={5}>
296
- 1=no change,
297
- <br />
298
- 2=10 days to <br />
299
- 14 days; <br />
300
- 3=4 to 6 <br />
301
- weeks; <br />
302
- 4=4 to 6 <br />
303
- months
304
- </th>
305
- <th rowSpan={5}>
306
- 1= mild;
307
- <br />
308
- 2= moderate;
309
- <br />
310
- 3= severe
311
- </th>
312
- <th rowSpan={5}></th>
313
- <th rowSpan={5}>(I/R/ND/KP)</th>
314
- <th>Kit Name:</th>
315
- <th>Kit Name:</th>
316
- <th>Kit Name:</th>
317
- <th>&le;6wks</th>
318
- <th>&gt;6wks</th>
319
- <th>Infant</th>
320
- <th>Mother</th>
321
- <th>Infant</th>
322
- <th>Mother</th>
323
- <th rowSpan={5}></th>
324
- <th rowSpan={5}></th>
325
- <th>
326
- 1 = Community Unit
327
- <br />
328
- 2 = Another Health
329
- <br />
330
- Facility
331
- <br />3 = Not Applicable
332
- </th>
333
- <th>
334
- 1 = Community Unit
335
- <br />
336
- <br />
337
- 2 = Another Health
338
- <br />
339
- Facility
340
- <br />3 = Not Applicable
341
- </th>
342
- <th rowSpan={5}></th>
343
- </tr>
344
- <tr>
345
- <th>Lot No.</th>
346
- <th>Lot No.</th>
347
- <th>Lot No.</th>
348
- <th rowSpan={4}>(N/P/Ic/NA)</th>
349
- <th rowSpan={4}>(N/P/Ic/NA)</th>
350
- <th>
351
- NVP +AZT
352
- <br />
353
- +CTX
354
- <br />
355
- or
356
- <br />
357
- NVP +CTX
358
- </th>
359
- <th>HAART</th>
360
- <th>
361
- NVP +AZT
362
- <br />
363
- +CTX
364
- <br />
365
- or
366
- <br />
367
- NVP +CTX
368
- </th>
369
- <th>HAART</th>
370
- <th rowSpan={4}></th>
371
- <th rowSpan={4}></th>
372
- </tr>
373
- <tr>
374
- <th>Expiry No. / /</th>
375
- <th>Expiry No. / /</th>
376
- <th>Expiry No. / /</th>
377
- <th rowSpan={3}>(Y/N/NA/R)</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
- </tr>
382
- <tr>
383
- <th rowSpan={2}>(N,P,I,NA)</th>
384
- <th rowSpan={2}>(N,P,I,NA)</th>
385
- <th rowSpan={2}>(N,P,I,NA)</th>
386
- </tr>
387
- </thead>
388
- <tbody>
389
- <tr>
390
- <td className={styles.textCentre}>(a)</td>
391
- <td className={styles.textCentre}>(b)</td>
392
- <td className={styles.textCentre}>(c)</td>
393
- <td className={styles.textCentre}>(d)</td>
394
- <td className={styles.textCentre}>(e)</td>
395
- <td className={styles.textCentre}>(f)</td>
396
- <td className={styles.textCentre}>(g)</td>
397
- <td className={styles.textCentre}>(h)</td>
398
- <td className={styles.textCentre}>(i)</td>
399
- <td className={styles.textCentre}>(j)</td>
400
- <td className={styles.textCentre}>(k)</td>
401
- <td className={styles.textCentre}>(l)</td>
402
- <td className={styles.textCentre}>(m)</td>
403
- <td className={styles.textCentre}>(n)</td>
404
- <td className={styles.textCentre}>(o)</td>
405
- <td className={styles.textCentre}>(p)</td>
406
- <td className={styles.textCentre}>(q)</td>
407
- <td className={styles.textCentre}>(r)</td>
408
- <td className={styles.textCentre}>(s)</td>
409
- <td className={styles.textCentre}>(t)</td>
410
- <td className={styles.textCentre}>(u)</td>
411
- <td className={styles.textCentre}>(v)</td>
412
- <td className={styles.textCentre}>(w)</td>
413
- <td className={styles.textCentre}>(x)</td>
414
- <td className={styles.textCentre}>(y)</td>
415
- <td className={styles.textCentre}>(z)</td>
416
- <td className={styles.textCentre}>(aa)</td>
417
- <td className={styles.textCentre}>(ab)</td>
418
- <td className={styles.textCentre}>(ac)</td>
419
- <td className={styles.textCentre}>(ad)</td>
420
- <td className={styles.textCentre}>(ae)</td>
421
- <td className={styles.textCentre}>(af)</td>
422
- <td className={styles.textCentre}>(ag)</td>
423
- <td className={styles.textCentre}>(ah)</td>
424
- <td className={styles.textCentre}>(ai)</td>
425
- <td className={styles.textCentre}>(aj)</td>
426
- <td className={styles.textCentre}>(ak)</td>
427
- <td className={styles.textCentre}>(al)</td>
428
- <td className={styles.textCentre}>(am)</td>
429
- <td className={styles.textCentre}>(an)</td>
430
- <td className={styles.textCentre}>(ao)</td>
431
- <td className={styles.textCentre}>(ap)</td>
432
- <td className={styles.textCentre}>(aq)</td>
433
- </tr>
434
- {patientlist?.length > 0 ? (
435
- patientlist.map((patient, index) => (
436
- <React.Fragment key={index}>
437
- <tr>
438
- <td rowSpan={2}>
439
- {patient.date_of_visit ? new Date(patient.date_of_visit).toLocaleDateString('en-GB') : ''}
440
- </td>
441
- <td>{patient.pnc_number}</td>
442
- <td rowSpan={2}>{patient.pnc_number}</td>
443
- <td rowSpan={2}>{patient.cr_id}</td>
444
- <td rowSpan={2}>{patient.full_names}</td>
76
+ <>
77
+ {!isDrilldown && (
78
+ <ReportFiltersComponent
79
+ reportName="MOH 406 Register"
80
+ mode="range"
81
+ onGenerate={generate}
82
+ isLoading={isLoading}
83
+ isReportGenerated={Boolean(generatedPeriod)}
84
+ generatedPeriod={generatedPeriod ?? undefined}
85
+ backLink={{ label: 'All registers', to: '/?tab=registers' }}
86
+ />
87
+ )}
88
+ <RegisterLayout
89
+ parentLabel={isDrilldown ? 'MOH-711 Report' : 'All registers'}
90
+ parentPath={isDrilldown ? '/moh-711' : '/?tab=registers'}
91
+ title="MOH 406 Register"
92
+ isLoading={isLoading}
93
+ isEmpty={isGenerated && patientlist.length === 0}
94
+ page={page}
95
+ pageSize={pageSize}
96
+ total={total}
97
+ isTotalExact={isTotalExact}
98
+ onPageChange={onPageChange}
99
+ fetchAll={isGenerated ? fetchAll : undefined}
100
+ columns={moh406ExportColumns}
101
+ >
102
+ {isGenerated && (
103
+ <div className={styles.tableContainer}>
104
+ <table className={classNames(`${styles.table}`, `${styles.tableBordered}`, `${styles.tableStriped}`)}>
105
+ <thead>
106
+ <tr>
107
+ <th colSpan={8}>Registration Information</th>
108
+ <th colSpan={3}>Maternity History</th>
109
+ <th colSpan={2}>Postpartum Visit</th>
110
+ <th colSpan={3}>Vital Signs</th>
111
+ <th colSpan={8}>Postnatal Examinations</th>
112
+ <th>TB screening</th>
113
+ <th colSpan={6}></th>
114
+ <th colSpan={4}>HAART & Infant Prophylaxis and Treatment</th>
115
+ <th>
116
+ Cervical Cancer
117
+ <br />
118
+ Screening
119
+ <br />
120
+ (VIA/VILLI/PAP
121
+ <br />
122
+ Smear/ND)
123
+ </th>
124
+ <th>
125
+ Modern Post
126
+ <br />
127
+ Partum Family
128
+ <br />
129
+ Planning
130
+ <br />
131
+ (Y/N)
132
+ </th>
133
+ <th>
134
+ Other Maternal
135
+ <br />
136
+ Complications
137
+ </th>
138
+ <th>
139
+ Haematinics
140
+ <br />
141
+ (Y/N)
142
+ </th>
143
+ <th colSpan={3}>Refferals</th>
144
+ <th rowSpan={7}>Remarks</th>
145
+ </tr>
146
+ <tr>
147
+ <th rowSpan={6}>
148
+ Date of Visit
149
+ <br />
150
+ (dd/mm/yyyy)
151
+ </th>
152
+ <th>
153
+ PNC Number
154
+ <br />
155
+ (New Visit)
156
+ </th>
157
+ <th rowSpan={6}>
158
+ PNC Number/NUPI <br />
159
+ (Revisit)
160
+ </th>
161
+ <th rowSpan={6}>CRID</th>
162
+ <th rowSpan={6}>
163
+ Full Name(first name, middle and <br />
164
+ surname)
165
+ </th>
166
+ <th>
167
+ Date of Birth
168
+ <br />
169
+ (dd/mm/yyyy)
170
+ </th>
171
+ <th rowSpan={6}>
172
+ County/ <br />
173
+ SubCounty
174
+ </th>
175
+ <th>Village/Estate/ Landmark</th>
176
+ <th rowSpan={6}>
177
+ Date of Delivery
178
+ <br />
179
+ (dd/mm/yyyy)
180
+ </th>
181
+ <th rowSpan={6}>
182
+ Place of <br />
183
+ Delivery
184
+ <br />
185
+ 1)Facility <br />
186
+ 2) Home
187
+ <br />
188
+ 3) BBA
189
+ </th>
190
+ <th rowSpan={6}>
191
+ Mode of
192
+ <br />
193
+ Delivery
194
+ <br />
195
+ 1) SVD
196
+ <br />
197
+ 2) CS
198
+ <br />
199
+ 3) Breech
200
+ <br />
201
+ 4) AVD
202
+ </th>
203
+ <th>
204
+ Timing <br />
205
+ Mother
206
+ </th>
207
+ <th>Timing Baby</th>
208
+ <th rowSpan={6}>Temp</th>
209
+ <th rowSpan={6}>Pulse</th>
210
+ <th rowSpan={6}>
211
+ Blood <br />
212
+ Pressure
213
+ </th>
214
+ <th>
215
+ Pallor
216
+ <br />
217
+ (Y/N)
218
+ </th>
219
+ <th rowSpan={6}>
220
+ Breast <br />
221
+ 1=normal <br />
222
+ 2= cracked
223
+ <br />
224
+ nipple
225
+ <br />
226
+ 3=engorged <br />
227
+ 4=mastitis
228
+ </th>
229
+ <th rowSpan={6}>
230
+ Uterus <br />
231
+ 1=
232
+ <br />
233
+ contracte d<br />
234
+ 2= not
235
+ <br />
236
+ contracte d <br />
237
+ 3= Others
238
+ <br />
239
+ Specify
240
+ </th>
241
+ <th rowSpan={6}>
242
+ PPH <br />
243
+ 1=present
244
+ <br />
245
+ 2=Absent
246
+ </th>
247
+ <th rowSpan={6}>
248
+ C-Section Site <br />
249
+ 1=Bleeding <br />
250
+ 2=Normal <br />
251
+ 3=Infected
252
+ <br />
253
+ 4=Gapping <br />
254
+ 5=N/A
255
+ </th>
256
+ <th rowSpan={6}>
257
+ Lochia <br />
258
+ 1=Normal <br />
259
+ 2=Foul <br />
260
+ smelling <br />
261
+ 3=Excessi <br />
262
+ ve
263
+ </th>
264
+ <th rowSpan={6}>
265
+ Episiotomy <br />
266
+ 1=Repaired <br />
267
+ 2=Gaping <br />
268
+ 3=Infected <br />
269
+ 4=Healed <br />
270
+ 5=N/
271
+ </th>
272
+ <th rowSpan={6}>
273
+ Fistula <br />
274
+ 1=VVF <br />
275
+ 2=RVF <br />
276
+ 3=VVR <br />
277
+ 4=Non
278
+ </th>
279
+ <th>
280
+ TB Screening
281
+ <br />
282
+ 1: Presumed TB
283
+ <br />
284
+ 2: No signs
285
+ <br />
286
+ 3: On TB treatment
287
+ <br />
288
+ 4: On TPT
289
+ <br />
290
+ 5: Not done
291
+ </th>
292
+ <th>Tested PNC</th>
293
+ <th>HIV Test 1</th>
294
+ <th>HIV Test 2</th>
295
+ <th>HIV Test 3</th>
296
+ <th colSpan={2}>Results in PNC</th>
297
+ <th colSpan={2}>&le;6wks</th>
298
+ <th colSpan={2}>&gt;6wks</th>
299
+ <th>
300
+ Results
301
+ <br />
302
+ 1=Normal,
303
+ <br />
304
+ 2=Suspected,
305
+ <br />
306
+ 3= Confirmed,
307
+ <br />
308
+ 4= Not done
309
+ </th>
310
+ <th>
311
+ Counseled <br />
312
+ Method received
313
+ </th>
314
+ <th rowSpan={6}></th>
315
+ <th rowSpan={6}></th>
316
+ <th>From</th>
317
+ <th>To</th>
318
+ <th>
319
+ Reasons for <br />
320
+ referral <br />
321
+ (specify)
322
+ </th>
323
+ </tr>
324
+ <tr>
325
+ <th rowSpan={6}>NUPI</th>
326
+ <th rowSpan={6}>Age in Years</th>
327
+ <th rowSpan={6}>Telephone number</th>
328
+ <th rowSpan={5}>
329
+ 1=no change, <br />
330
+ 2=10 days to
331
+ <br />
332
+ 14 days; <br />
333
+ 3=4 to 6 <br />
334
+ weeks; <br />
335
+ 4=4 to 6 <br />
336
+ months
337
+ </th>
338
+ <th rowSpan={5}>
339
+ 1=no change,
340
+ <br />
341
+ 2=10 days to <br />
342
+ 14 days; <br />
343
+ 3=4 to 6 <br />
344
+ weeks; <br />
345
+ 4=4 to 6 <br />
346
+ months
347
+ </th>
348
+ <th rowSpan={5}>
349
+ 1= mild;
350
+ <br />
351
+ 2= moderate;
352
+ <br />
353
+ 3= severe
354
+ </th>
355
+ <th rowSpan={5}></th>
356
+ <th rowSpan={5}>(I/R/ND/KP)</th>
357
+ <th>Kit Name:</th>
358
+ <th>Kit Name:</th>
359
+ <th>Kit Name:</th>
360
+ <th>&le;6wks</th>
361
+ <th>&gt;6wks</th>
362
+ <th>Infant</th>
363
+ <th>Mother</th>
364
+ <th>Infant</th>
365
+ <th>Mother</th>
366
+ <th rowSpan={5}></th>
367
+ <th rowSpan={5}></th>
368
+ <th>
369
+ 1 = Community Unit
370
+ <br />
371
+ 2 = Another Health
372
+ <br />
373
+ Facility
374
+ <br />3 = Not Applicable
375
+ </th>
376
+ <th>
377
+ 1 = Community Unit
378
+ <br />
379
+ <br />
380
+ 2 = Another Health
381
+ <br />
382
+ Facility
383
+ <br />3 = Not Applicable
384
+ </th>
385
+ <th rowSpan={5}></th>
386
+ </tr>
387
+ <tr>
388
+ <th>Lot No.</th>
389
+ <th>Lot No.</th>
390
+ <th>Lot No.</th>
391
+ <th rowSpan={4}>(N/P/Ic/NA)</th>
392
+ <th rowSpan={4}>(N/P/Ic/NA)</th>
393
+ <th>
394
+ NVP +AZT
395
+ <br />
396
+ +CTX
397
+ <br />
398
+ or
399
+ <br />
400
+ NVP +CTX
401
+ </th>
402
+ <th>HAART</th>
403
+ <th>
404
+ NVP +AZT
405
+ <br />
406
+ +CTX
407
+ <br />
408
+ or
409
+ <br />
410
+ NVP +CTX
411
+ </th>
412
+ <th>HAART</th>
413
+ <th rowSpan={4}></th>
414
+ <th rowSpan={4}></th>
415
+ </tr>
416
+ <tr>
417
+ <th>Expiry No. / /</th>
418
+ <th>Expiry No. / /</th>
419
+ <th>Expiry No. / /</th>
420
+ <th rowSpan={3}>(Y/N/NA/R)</th>
421
+ <th rowSpan={3}>(Y/N/NA/R)</th>
422
+ <th rowSpan={3}>(Y/N/NA/R)</th>
423
+ <th rowSpan={3}>(Y/N/NA/R)</th>
424
+ </tr>
425
+ <tr>
426
+ <th rowSpan={2}>(N,P,I,NA)</th>
427
+ <th rowSpan={2}>(N,P,I,NA)</th>
428
+ <th rowSpan={2}>(N,P,I,NA)</th>
429
+ </tr>
430
+ </thead>
431
+ <tbody>
432
+ <tr>
433
+ <td className={styles.textCentre}>(a)</td>
434
+ <td className={styles.textCentre}>(b)</td>
435
+ <td className={styles.textCentre}>(c)</td>
436
+ <td className={styles.textCentre}>(d)</td>
437
+ <td className={styles.textCentre}>(e)</td>
438
+ <td className={styles.textCentre}>(f)</td>
439
+ <td className={styles.textCentre}>(g)</td>
440
+ <td className={styles.textCentre}>(h)</td>
441
+ <td className={styles.textCentre}>(i)</td>
442
+ <td className={styles.textCentre}>(j)</td>
443
+ <td className={styles.textCentre}>(k)</td>
444
+ <td className={styles.textCentre}>(l)</td>
445
+ <td className={styles.textCentre}>(m)</td>
446
+ <td className={styles.textCentre}>(n)</td>
447
+ <td className={styles.textCentre}>(o)</td>
448
+ <td className={styles.textCentre}>(p)</td>
449
+ <td className={styles.textCentre}>(q)</td>
450
+ <td className={styles.textCentre}>(r)</td>
451
+ <td className={styles.textCentre}>(s)</td>
452
+ <td className={styles.textCentre}>(t)</td>
453
+ <td className={styles.textCentre}>(u)</td>
454
+ <td className={styles.textCentre}>(v)</td>
455
+ <td className={styles.textCentre}>(w)</td>
456
+ <td className={styles.textCentre}>(x)</td>
457
+ <td className={styles.textCentre}>(y)</td>
458
+ <td className={styles.textCentre}>(z)</td>
459
+ <td className={styles.textCentre}>(aa)</td>
460
+ <td className={styles.textCentre}>(ab)</td>
461
+ <td className={styles.textCentre}>(ac)</td>
462
+ <td className={styles.textCentre}>(ad)</td>
463
+ <td className={styles.textCentre}>(ae)</td>
464
+ <td className={styles.textCentre}>(af)</td>
465
+ <td className={styles.textCentre}>(ag)</td>
466
+ <td className={styles.textCentre}>(ah)</td>
467
+ <td className={styles.textCentre}>(ai)</td>
468
+ <td className={styles.textCentre}>(aj)</td>
469
+ <td className={styles.textCentre}>(ak)</td>
470
+ <td className={styles.textCentre}>(al)</td>
471
+ <td className={styles.textCentre}>(am)</td>
472
+ <td className={styles.textCentre}>(an)</td>
473
+ <td className={styles.textCentre}>(ao)</td>
474
+ <td className={styles.textCentre}>(ap)</td>
475
+ <td className={styles.textCentre}>(aq)</td>
476
+ </tr>
477
+ {patientlist?.length > 0 ? (
478
+ patientlist.map((patient, index) => (
479
+ <React.Fragment key={index}>
480
+ <tr>
481
+ <td rowSpan={2}>
482
+ {patient.date_of_visit ? new Date(patient.date_of_visit).toLocaleDateString('en-GB') : ''}
483
+ </td>
484
+ <td>{patient.pnc_number}</td>
485
+ <td rowSpan={2}>{patient.pnc_number}</td>
486
+ <td rowSpan={2}>{patient.cr_id}</td>
487
+ <td rowSpan={2}>{patient.full_names}</td>
445
488
 
446
- <td>{patient.date_of_birth ? new Date(patient.date_of_birth).toLocaleDateString('en-GB') : ''}</td>
489
+ <td>
490
+ {patient.date_of_birth ? new Date(patient.date_of_birth).toLocaleDateString('en-GB') : ''}
491
+ </td>
447
492
 
448
- <td rowSpan={2}>{patient.subcounty_county}</td>
449
- <td>{patient.village_estate_landmark}</td>
493
+ <td rowSpan={2}>{patient.subcounty_county}</td>
494
+ <td>{patient.village_estate_landmark}</td>
450
495
 
451
- <td rowSpan={2}>
452
- {patient.date_of_delivery ? new Date(patient.date_of_delivery).toLocaleDateString('en-GB') : ''}
453
- </td>
496
+ <td rowSpan={2}>
497
+ {patient.date_of_delivery
498
+ ? new Date(patient.date_of_delivery).toLocaleDateString('en-GB')
499
+ : ''}
500
+ </td>
454
501
 
455
- <td rowSpan={2}>{patient.place_of_delivery}</td>
456
- <td rowSpan={2}>{patient.mode_of_delivery}</td>
457
- <td rowSpan={2}>{patient.timing_mother}</td>
458
- <td rowSpan={2}>{patient.timing_baby}</td>
459
- <td rowSpan={2}>{patient.temperature}</td>
460
- <td rowSpan={2}>{patient.pulse}</td>
461
- <td rowSpan={2}>{patient.blood_pressure}</td>
502
+ <td rowSpan={2}>{patient.place_of_delivery}</td>
503
+ <td rowSpan={2}>{patient.mode_of_delivery}</td>
504
+ <td rowSpan={2}>{patient.timing_mother}</td>
505
+ <td rowSpan={2}>{patient.timing_baby}</td>
506
+ <td rowSpan={2}>{patient.temperature}</td>
507
+ <td rowSpan={2}>{patient.pulse}</td>
508
+ <td rowSpan={2}>{patient.blood_pressure}</td>
462
509
 
463
- <td>{patient.pallor_present}</td>
510
+ <td>{patient.pallor_present}</td>
464
511
 
465
- <td rowSpan={2}>{patient.breast}</td>
466
- <td rowSpan={2}>{patient.uterus}</td>
467
- <td rowSpan={2}>{patient.pph}</td>
468
- <td rowSpan={2}>{patient.c_section_site}</td>
469
- <td rowSpan={2}>{patient.lochia}</td>
470
- <td rowSpan={2}>{patient.episiotomy}</td>
471
- <td rowSpan={2}>{patient.fistula}</td>
472
- <td rowSpan={2}>{patient.tb_screening}</td>
473
- <td rowSpan={2}>{patient.tested_pnc}</td>
512
+ <td rowSpan={2}>{patient.breast}</td>
513
+ <td rowSpan={2}>{patient.uterus}</td>
514
+ <td rowSpan={2}>{patient.pph}</td>
515
+ <td rowSpan={2}>{patient.c_section_site}</td>
516
+ <td rowSpan={2}>{patient.lochia}</td>
517
+ <td rowSpan={2}>{patient.episiotomy}</td>
518
+ <td rowSpan={2}>{patient.fistula}</td>
519
+ <td rowSpan={2}>{patient.tb_screening}</td>
520
+ <td rowSpan={2}>{patient.tested_pnc}</td>
474
521
 
475
- <td rowSpan={2}>
476
- {patient.hiv_test_1_kit_name} / {patient.hiv_test_1_lot_no} / {patient.hiv_test_1_expiry_date} /{' '}
477
- {patient.hiv_test_1_test_result}
478
- </td>
522
+ <td rowSpan={2}>
523
+ {patient.hiv_test_1_kit_name} / {patient.hiv_test_1_lot_no} / {patient.hiv_test_1_expiry_date}{' '}
524
+ / {patient.hiv_test_1_test_result}
525
+ </td>
479
526
 
480
- <td rowSpan={2}>
481
- {patient.hiv_test_2_kit_name} / {patient.hiv_test_2_lot_no} / {patient.hiv_test_2_expiry_date} /{' '}
482
- {patient.hiv_test_2_test_result}
483
- </td>
527
+ <td rowSpan={2}>
528
+ {patient.hiv_test_2_kit_name} / {patient.hiv_test_2_lot_no} / {patient.hiv_test_2_expiry_date}{' '}
529
+ / {patient.hiv_test_2_test_result}
530
+ </td>
484
531
 
485
- <td rowSpan={2}>
486
- {patient.hiv_test_3_kit_name} / {patient.hiv_test_3_lot_no} / {patient.hiv_test_3_expiry_date} /{' '}
487
- {patient.hiv_test_3_test_result}
488
- </td>
532
+ <td rowSpan={2}>
533
+ {patient.hiv_test_3_kit_name} / {patient.hiv_test_3_lot_no} / {patient.hiv_test_3_expiry_date}{' '}
534
+ / {patient.hiv_test_3_test_result}
535
+ </td>
489
536
 
490
- <td rowSpan={2}>{patient.results_less_6_weeks}</td>
491
- <td rowSpan={2}>{patient.results_greater_6_weeks}</td>
492
- <td rowSpan={2}>{patient.infant_prophylaxis_less_6_weeks}</td>
493
- <td rowSpan={2}>{patient.maternal_haart_less_6_weeks}</td>
494
- <td rowSpan={2}>{patient.infant_prophylaxis_greater_6_weeks}</td>
495
- <td rowSpan={2}>{patient.maternal_haart_greater_6_weeks}</td>
537
+ <td rowSpan={2}>{patient.results_less_6_weeks}</td>
538
+ <td rowSpan={2}>{patient.results_greater_6_weeks}</td>
539
+ <td rowSpan={2}>{patient.infant_prophylaxis_less_6_weeks}</td>
540
+ <td rowSpan={2}>{patient.maternal_haart_less_6_weeks}</td>
541
+ <td rowSpan={2}>{patient.infant_prophylaxis_greater_6_weeks}</td>
542
+ <td rowSpan={2}>{patient.maternal_haart_greater_6_weeks}</td>
496
543
 
497
- <td>{patient.cervical_cancer_method}</td>
498
- <td>{patient.counselled}</td>
544
+ <td>{patient.cervical_cancer_method}</td>
545
+ <td>{patient.counselled}</td>
499
546
 
500
- <td rowSpan={2}>{patient.other_maternal_complications}</td>
501
- <td rowSpan={2}>{patient.haematinics}</td>
502
- <td rowSpan={2}>{patient.referrals_from}</td>
503
- <td rowSpan={2}>{patient.referrals_to}</td>
504
- <td rowSpan={2}>{patient.reason_for_referral}</td>
505
- <td rowSpan={2}>{patient.remarks}</td>
506
- </tr>
547
+ <td rowSpan={2}>{patient.other_maternal_complications}</td>
548
+ <td rowSpan={2}>{patient.haematinics}</td>
549
+ <td rowSpan={2}>{patient.referrals_from}</td>
550
+ <td rowSpan={2}>{patient.referrals_to}</td>
551
+ <td rowSpan={2}>{patient.reason_for_referral}</td>
552
+ <td rowSpan={2}>{patient.remarks}</td>
553
+ </tr>
507
554
 
555
+ <tr>
556
+ <td>{patient.nupi}</td>
557
+ <td>{patient.age}</td>
558
+ <td>{patient.phone_number}</td>
559
+ <td>{patient.pallor}</td>
560
+ <td>{patient.cervical_cancer_results}</td>
561
+ <td>{patient.women_received_post_partum_fp}</td>
562
+ </tr>
563
+ </React.Fragment>
564
+ ))
565
+ ) : (
508
566
  <tr>
509
- <td>{patient.nupi}</td>
510
- <td>{patient.age}</td>
511
- <td>{patient.phone_number}</td>
512
- <td>{patient.pallor}</td>
513
- <td>{patient.cervical_cancer_results}</td>
514
- <td>{patient.women_received_post_partum_fp}</td>
567
+ <td colSpan={moh406Columns.length} className={styles.textCentre}>
568
+ No data available
569
+ </td>
515
570
  </tr>
516
- </React.Fragment>
517
- ))
518
- ) : (
519
- <tr>
520
- <td colSpan={moh406Columns.length} className={styles.textCentre}>
521
- No data available
522
- </td>
523
- </tr>
524
- )}
525
- </tbody>
526
- </table>
527
- </div>
528
- </RegisterLayout>
571
+ )}
572
+ </tbody>
573
+ </table>
574
+ </div>
575
+ )}
576
+ </RegisterLayout>
577
+ </>
529
578
  );
530
579
  };
531
580