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