@ampath/esm-reports-app 1.0.0-next.112 → 1.0.0-next.114
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.
- package/dist/410.js +1 -1
- package/dist/763.css +1 -0
- package/dist/763.css.map +1 -0
- package/dist/763.js +1 -0
- package/dist/763.js.map +1 -0
- package/dist/ampath-esm-reports-app.js +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/common/report-header/facility-clinics.component.tsx +42 -0
- package/src/common/report-header/facility-clinics.scss +61 -0
- package/src/common/report-header/index.ts +1 -0
- package/src/common/report-page/download-sheet-pdf.ts +2 -0
- package/src/common/report-register/index.ts +1 -0
- package/src/common/report-register/register-layout.component.tsx +3 -26
- package/src/common/report-register/register-layout.scss +0 -58
- package/src/common/report-register/xlsx.ts +263 -0
- package/src/dashboard/report-catalog.ts +39 -145
- package/src/dashboard/reports-dasboard.tsx +5 -4
- package/src/reports/moh-718/moh-718.component.tsx +1 -1
- package/src/reports/moh-740/line-list/moh-740-line-list.component.tsx +107 -0
- package/src/reports/moh-740/moh-740.component.tsx +1 -1
- package/src/reports/moh-740/registers/moh-740.columns.ts +1 -0
- package/src/reports/program/care-and-treatment/care-and-treatment-linelist.component.tsx +87 -0
- package/src/reports/program/care-and-treatment/care-and-treatment-table.component.tsx +1 -1
- package/src/reports/program/care-and-treatment/care-and-treatment.component.tsx +122 -59
- package/src/reports/program/care-and-treatment/care-and-treatment.config.ts +120 -2
- package/src/reports/program/program-report.component.tsx +11 -5
- package/src/reports/quality-improvement/case-surveillance.component.tsx +258 -0
- package/src/reports/quality-improvement/case-surveillance.config.ts +57 -0
- package/src/reports/quality-improvement/case-surveillance.scss +305 -0
- package/src/reports/quality-improvement/quality-improvement-linelist.component.tsx +137 -0
- package/src/reports/quality-improvement/quality-improvement.component.tsx +217 -0
- package/src/reports/quality-improvement/quality-improvement.config.ts +144 -0
- package/src/reports/quality-improvement/quality-improvement.scss +227 -0
- package/src/resources/care-and-treatment.resource.ts +1 -1
- package/src/resources/quality-improvement.resource.ts +91 -0
- package/src/root.component.tsx +29 -14
- package/dist/955.css +0 -1
- package/dist/955.css.map +0 -1
- package/dist/955.js +0 -1
- package/dist/955.js.map +0 -1
|
@@ -220,7 +220,7 @@ export const reportCategories: ReportCategory[] = [
|
|
|
220
220
|
|
|
221
221
|
/**
|
|
222
222
|
* The Reports tab's groups, each with its own categories. The Ministry of
|
|
223
|
-
* Health summary forms above make up the first; program and
|
|
223
|
+
* Health summary forms above make up the first; program and quality improvement
|
|
224
224
|
* reports go in theirs as they are built.
|
|
225
225
|
*/
|
|
226
226
|
export interface ReportGroup {
|
|
@@ -308,157 +308,51 @@ export const reportGroups: ReportGroup[] = [
|
|
|
308
308
|
],
|
|
309
309
|
},
|
|
310
310
|
{
|
|
311
|
-
id: '
|
|
312
|
-
title: '
|
|
313
|
-
shortTitle: '
|
|
311
|
+
id: 'quality-improvement',
|
|
312
|
+
title: 'Quality Improvement Reports',
|
|
313
|
+
shortTitle: 'Quality improvement',
|
|
314
314
|
description: 'Clients due for follow-up or action',
|
|
315
|
-
/* each opens on the shared report template page (src/reports/program)
|
|
316
|
-
until its own template is built */
|
|
317
315
|
categories: [
|
|
318
316
|
{
|
|
319
|
-
id: '
|
|
320
|
-
title: '
|
|
321
|
-
description: 'Clients
|
|
317
|
+
id: 'gap-reviews',
|
|
318
|
+
title: 'Gap reviews',
|
|
319
|
+
description: 'Clients due for follow-up or action',
|
|
322
320
|
tone: 'teal',
|
|
323
321
|
reports: [
|
|
324
322
|
{
|
|
325
|
-
code: '
|
|
326
|
-
name: '
|
|
323
|
+
code: 'QI',
|
|
324
|
+
name: 'Quality Improvement Report',
|
|
327
325
|
description:
|
|
328
|
-
'
|
|
329
|
-
path: '/
|
|
330
|
-
icon:
|
|
331
|
-
keywords: [
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
'
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
'
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
code: 'SNS',
|
|
353
|
-
name: 'SNS contacts with undocumented HIV status',
|
|
354
|
-
description: 'Social Network Strategy (SNS) contacts whose HIV test status has not yet been documented.',
|
|
355
|
-
path: '/action-summary/sns-undocumented-status',
|
|
356
|
-
icon: UserMultiple,
|
|
357
|
-
keywords: ['sns', 'contacts', 'social network', 'strategy', 'undocumented', 'status'],
|
|
358
|
-
},
|
|
359
|
-
],
|
|
360
|
-
},
|
|
361
|
-
{
|
|
362
|
-
id: 'viral-load',
|
|
363
|
-
title: 'Viral load',
|
|
364
|
-
description: 'Clients to test or support to suppression',
|
|
365
|
-
tone: 'violet',
|
|
366
|
-
reports: [
|
|
367
|
-
{
|
|
368
|
-
code: 'VL TEST',
|
|
369
|
-
name: 'Missed opportunity in VL testing',
|
|
370
|
-
description:
|
|
371
|
-
'Clients who are due for a routine or targeted viral load test but did not have the sample collected.',
|
|
372
|
-
path: '/action-summary/missed-vl-testing',
|
|
373
|
-
icon: Microscope,
|
|
374
|
-
keywords: ['vl', 'viral load', 'missed', 'due', 'sample'],
|
|
375
|
-
},
|
|
376
|
-
{
|
|
377
|
-
code: 'VL ≥200',
|
|
378
|
-
name: 'Current on ART with VL ≥ 200',
|
|
379
|
-
description:
|
|
380
|
-
'Patients actively on antiretroviral therapy whose viral load result is 200 copies/mL or more (unsuppressed, needing EAC). Includes those of 1000 or more.',
|
|
381
|
-
path: '/action-summary/viral-load-200-plus',
|
|
382
|
-
icon: Microscope,
|
|
383
|
-
keywords: ['vl', 'viral load', 'unsuppressed', '200', 'eac', 'art', 'high vl'],
|
|
384
|
-
},
|
|
385
|
-
{
|
|
386
|
-
code: 'VL ≥1000',
|
|
387
|
-
name: 'Current on ART with VL ≥ 1000',
|
|
388
|
-
description:
|
|
389
|
-
'Patients actively on antiretroviral therapy whose viral load result is 1000 copies/mL or more (indicating virological failure).',
|
|
390
|
-
path: '/action-summary/viral-load-1000-plus',
|
|
391
|
-
icon: Microscope,
|
|
392
|
-
keywords: ['vl', 'viral load', 'unsuppressed', '1000', 'failure', 'art', 'high vl'],
|
|
393
|
-
},
|
|
394
|
-
{
|
|
395
|
-
code: 'EAC',
|
|
396
|
-
name: 'Delayed enhanced adherence counselling (EAC)',
|
|
397
|
-
description:
|
|
398
|
-
'Patients with elevated viral loads who experience delays in receiving intensive adherence support sessions.',
|
|
399
|
-
path: '/action-summary/delayed-eac',
|
|
400
|
-
icon: Warning,
|
|
401
|
-
keywords: ['eac', 'adherence', 'counselling', 'delayed', 'viral load'],
|
|
402
|
-
},
|
|
403
|
-
],
|
|
404
|
-
},
|
|
405
|
-
{
|
|
406
|
-
id: 'retention',
|
|
407
|
-
title: 'Retention',
|
|
408
|
-
description: 'Clients to trace or enrol in support',
|
|
409
|
-
tone: 'blue',
|
|
410
|
-
reports: [
|
|
411
|
-
{
|
|
412
|
-
code: 'DEFAULTERS',
|
|
413
|
-
name: 'Recent defaulters (missed app < 30 days)',
|
|
414
|
-
description:
|
|
415
|
-
'Patients who missed their scheduled clinic appointment by less than 30 days and require tracing.',
|
|
416
|
-
path: '/action-summary/recent-defaulters',
|
|
417
|
-
icon: Warning,
|
|
418
|
-
keywords: ['defaulters', 'missed', 'appointment', 'tracing', 'iit'],
|
|
419
|
-
},
|
|
420
|
-
{
|
|
421
|
-
code: 'OTZ',
|
|
422
|
-
name: 'Adolescent not enrolled in OTZ',
|
|
423
|
-
description:
|
|
424
|
-
'Adolescents living with HIV who are not enrolled in the Operation-to-Zero (OTZ) or Adolescent Package of Care program.',
|
|
425
|
-
path: '/action-summary/adolescent-not-in-otz',
|
|
426
|
-
icon: UserMultiple,
|
|
427
|
-
keywords: ['otz', 'adolescent', 'youth', 'enrol', 'package of care'],
|
|
428
|
-
},
|
|
429
|
-
],
|
|
430
|
-
},
|
|
431
|
-
{
|
|
432
|
-
id: 'hei',
|
|
433
|
-
title: 'HIV-exposed infants',
|
|
434
|
-
description: 'Infants due for a test, linkage or outcome',
|
|
435
|
-
tone: 'magenta',
|
|
436
|
-
reports: [
|
|
437
|
-
{
|
|
438
|
-
code: 'HEI PCR',
|
|
439
|
-
name: 'HEI (6–8 wk) without DNA PCR',
|
|
440
|
-
description: 'HIV-Exposed Infants at 6 to 8 weeks of age missing their virological DNA PCR test.',
|
|
441
|
-
path: '/action-summary/hei-without-dna-pcr',
|
|
442
|
-
icon: Growth,
|
|
443
|
-
keywords: ['hei', 'infant', 'pcr', 'dna', '6 weeks', 'eid'],
|
|
444
|
-
},
|
|
445
|
-
{
|
|
446
|
-
code: 'HEI LINK',
|
|
447
|
-
name: 'HEI not linked to the mother',
|
|
448
|
-
description:
|
|
449
|
-
"Infant-mother pairs where the child's file is not cross-referenced or linked with the mother's ART file.",
|
|
450
|
-
path: '/action-summary/hei-not-linked-to-mother',
|
|
451
|
-
icon: Growth,
|
|
452
|
-
keywords: ['hei', 'infant', 'mother', 'linked', 'pair'],
|
|
326
|
+
'Clients needing action this month, with counts that open their lists: linkage, PrEP for PBFs, PNS/SNS contacts, viral load testing and suppression, EAC, recent defaulters, OTZ and HEI follow-up.',
|
|
327
|
+
path: '/quality-improvement/report',
|
|
328
|
+
icon: DocumentTasks,
|
|
329
|
+
keywords: [
|
|
330
|
+
'quality improvement',
|
|
331
|
+
'qi',
|
|
332
|
+
'action',
|
|
333
|
+
'linkage',
|
|
334
|
+
'prep',
|
|
335
|
+
'pbf',
|
|
336
|
+
'pns',
|
|
337
|
+
'sns',
|
|
338
|
+
'contacts',
|
|
339
|
+
'viral load',
|
|
340
|
+
'vl',
|
|
341
|
+
'eac',
|
|
342
|
+
'defaulters',
|
|
343
|
+
'otz',
|
|
344
|
+
'hei',
|
|
345
|
+
'pcr',
|
|
346
|
+
'outcome',
|
|
347
|
+
],
|
|
453
348
|
},
|
|
454
349
|
{
|
|
455
|
-
code: '
|
|
456
|
-
name: '
|
|
457
|
-
description:
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
keywords: ['hei', 'infant', 'outcome', 'final', '2 years', 'undocumented', 'discharge'],
|
|
350
|
+
code: 'CS',
|
|
351
|
+
name: 'Case Surveillance Report',
|
|
352
|
+
description: 'Realtime gap review and progress tracking of the case surveillance indicators.',
|
|
353
|
+
path: '/quality-improvement/case-surveillance',
|
|
354
|
+
icon: ChartColumn,
|
|
355
|
+
keywords: ['case surveillance', 'gap review', 'progress tracker', 'linkage', 'prep', 'hei', 'viral load'],
|
|
462
356
|
},
|
|
463
357
|
],
|
|
464
358
|
},
|
|
@@ -497,5 +391,5 @@ const reportsOf = (groupId: string): ReportDefinition[] =>
|
|
|
497
391
|
/** Every program report, each routed to the shared report template page */
|
|
498
392
|
export const programReports = reportsOf('program');
|
|
499
393
|
|
|
500
|
-
/** Every
|
|
501
|
-
export const
|
|
394
|
+
/** Every quality improvement report */
|
|
395
|
+
export const qualityImprovementReports = reportsOf('quality-improvement');
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
type ReportCategory,
|
|
14
14
|
type ReportDefinition,
|
|
15
15
|
} from './report-catalog';
|
|
16
|
-
import {
|
|
16
|
+
import { FacilityClinics, useFacility } from '../common/report-header';
|
|
17
17
|
import styles from './reports-dashboard.module.scss';
|
|
18
18
|
|
|
19
19
|
interface ReportsDashboardProps {}
|
|
@@ -38,7 +38,7 @@ const ReportsDashboard: React.FC<ReportsDashboardProps> = () => {
|
|
|
38
38
|
setSearchParams(next, { replace: true });
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
/* The Reports tab's group (MOH, Program,
|
|
41
|
+
/* The Reports tab's group (MOH, Program, Quality improvement), also kept in the URL */
|
|
42
42
|
const selectedGroup = reportGroups.find((group) => group.id === searchParams.get('group')) ?? reportGroups[0];
|
|
43
43
|
const selectGroup = (groupId: string) => {
|
|
44
44
|
const next = new URLSearchParams(searchParams);
|
|
@@ -65,7 +65,8 @@ const ReportsDashboard: React.FC<ReportsDashboardProps> = () => {
|
|
|
65
65
|
|
|
66
66
|
/* the facility the reports cover (the session location's parent, e.g. MTRH
|
|
67
67
|
for MTRH Module 1), as the reports themselves name it */
|
|
68
|
-
const
|
|
68
|
+
const facility = useFacility(session?.sessionLocation?.uuid, session?.sessionLocation?.display ?? '');
|
|
69
|
+
const facilityName = facility.name;
|
|
69
70
|
const today = formatDate(new Date(), { mode: 'standard', time: false, noToday: true });
|
|
70
71
|
|
|
71
72
|
/* One report or register: its code and name, opening its page */
|
|
@@ -188,7 +189,7 @@ const ReportsDashboard: React.FC<ReportsDashboardProps> = () => {
|
|
|
188
189
|
{facilityName && (
|
|
189
190
|
<span className={styles.metaItem}>
|
|
190
191
|
<Location size={16} />
|
|
191
|
-
{facilityName}
|
|
192
|
+
<FacilityClinics name={facilityName} clinics={facility.clinics} />
|
|
192
193
|
</span>
|
|
193
194
|
)}
|
|
194
195
|
<span className={styles.metaItem}>
|
|
@@ -135,7 +135,7 @@ const Moh718Report: React.FC = () => {
|
|
|
135
135
|
</table>
|
|
136
136
|
</div>
|
|
137
137
|
<div className={styles.tableContainer}>
|
|
138
|
-
<div className={styles.tableTitle}>Certain
|
|
138
|
+
<div className={styles.tableTitle}>Certain infectious and parasitic diseases</div>
|
|
139
139
|
<table className={styles.reportTable}>
|
|
140
140
|
<thead>
|
|
141
141
|
<tr>
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
2
|
+
import { useSearchParams } from 'react-router-dom';
|
|
3
|
+
|
|
4
|
+
import { type LinelistColumn, LinelistTable, useAllRows } from '../../../common/linelist-table';
|
|
5
|
+
import { RegisterLayout, useLocationName } from '../../../common/report-register';
|
|
6
|
+
import { fetchMoh740Register } from '../moh-740.resource';
|
|
7
|
+
import dayjs from 'dayjs';
|
|
8
|
+
import { showSnackbar, useSession } from '@openmrs/esm-framework';
|
|
9
|
+
import { type Moh222Patient } from '../types';
|
|
10
|
+
|
|
11
|
+
const MOH_740_LINELIST_COLUMNS: LinelistColumn[] = [
|
|
12
|
+
{ header: 'Patient ID', field: 'person_id' },
|
|
13
|
+
{ header: 'AMRS Universal ID', field: 'amrs_universal_id' },
|
|
14
|
+
{ header: 'CCC NO', field: 'ccc_no' },
|
|
15
|
+
{ header: 'Patient Name', field: 'person_name' },
|
|
16
|
+
{ header: 'Age', field: 'age' },
|
|
17
|
+
{ header: 'Gender', field: 'gender' },
|
|
18
|
+
{ header: 'HIV Status', field: 'hiv_status' },
|
|
19
|
+
{ header: 'Location Name', field: 'location' },
|
|
20
|
+
{ header: 'Initiation Date', field: 'enrollment_date' },
|
|
21
|
+
{ header: 'Encounter Date', field: 'encounter_date' },
|
|
22
|
+
{ header: 'RTC Date', field: 'rtc_date' },
|
|
23
|
+
{ header: 'Disease Type', field: 'disease_type' },
|
|
24
|
+
{ header: 'Date of Diagnosis', field: 'diagnosis_date' },
|
|
25
|
+
{ header: 'Systolic', field: 'systolic' },
|
|
26
|
+
{ header: 'Diastolic', field: 'diastolic' },
|
|
27
|
+
{ header: 'RBS', field: 'rbs' },
|
|
28
|
+
{ header: 'FBS', field: 'fbs' },
|
|
29
|
+
{ header: 'HbA1C', field:'hba1c' },
|
|
30
|
+
{ header: 'HTN Meds', field:'htn_meds' },
|
|
31
|
+
{ header: 'Diabetes Meds', field:'diabetes_meds' }
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
const Moh740Linelist: React.FC = () => {
|
|
35
|
+
const [rows, setRows] = useState<Moh222Patient[] | any>([]);
|
|
36
|
+
const [searchParams] = useSearchParams();
|
|
37
|
+
const session = useSession();
|
|
38
|
+
const startDate = searchParams.get('startDate') ?? '';
|
|
39
|
+
const endDate = searchParams.get('endDate') ?? '';
|
|
40
|
+
const locationUuids = searchParams.get('locationUuids') ?? '';
|
|
41
|
+
const indicator = searchParams.get('indicator') ?? '';
|
|
42
|
+
const from = searchParams.get('from') || undefined;
|
|
43
|
+
const locationName = useLocationName(locationUuids);
|
|
44
|
+
const [isLoading,setIsLoading] = useState<boolean>(false);
|
|
45
|
+
const [period, setPeriod] = useState<{ startDate: string; endDate: string }>({ startDate: '', endDate: '' });
|
|
46
|
+
useEffect(()=>{
|
|
47
|
+
if(startDate && endDate && locationUuids){
|
|
48
|
+
fetchPatientList();
|
|
49
|
+
}
|
|
50
|
+
},[startDate,endDate,locationUuids,indicator]);
|
|
51
|
+
|
|
52
|
+
async function fetchPatientList(){
|
|
53
|
+
setIsLoading(true);
|
|
54
|
+
setPeriod({ startDate, endDate });
|
|
55
|
+
let indicators = '';
|
|
56
|
+
let locationUuid = '';
|
|
57
|
+
const selectedDate = dayjs(startDate).endOf('month')
|
|
58
|
+
const registerStartDate = selectedDate.format('YYYY-MM-DD');
|
|
59
|
+
try {
|
|
60
|
+
if(!indicator){
|
|
61
|
+
indicators = 'cumulative_all';
|
|
62
|
+
}else{
|
|
63
|
+
indicators = indicator;
|
|
64
|
+
}
|
|
65
|
+
if(!locationUuids){
|
|
66
|
+
locationUuid = session.sessionLocation?.uuid ?? '';
|
|
67
|
+
}else{
|
|
68
|
+
locationUuid = locationUuids;
|
|
69
|
+
}
|
|
70
|
+
const resp = await fetchMoh740Register({ locationUuid: locationUuid, endDate: registerStartDate,indicators: indicators});
|
|
71
|
+
console.log({resp});
|
|
72
|
+
if(resp){
|
|
73
|
+
setRows(resp);
|
|
74
|
+
}
|
|
75
|
+
}catch(error){
|
|
76
|
+
showSnackbar({
|
|
77
|
+
kind: 'error',
|
|
78
|
+
title: 'Error generating line list',
|
|
79
|
+
subtitle: 'Error generating line list, kindly try again or contact support'
|
|
80
|
+
});
|
|
81
|
+
}finally{
|
|
82
|
+
setIsLoading(false);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
return (
|
|
89
|
+
<RegisterLayout
|
|
90
|
+
parentLabel="MOH-740 Report"
|
|
91
|
+
parentPath="/moh-740"
|
|
92
|
+
title="MOH-740 Linelist"
|
|
93
|
+
location={locationName}
|
|
94
|
+
isLoading={isLoading}
|
|
95
|
+
isEmpty={!isLoading && rows.length === 0}
|
|
96
|
+
>
|
|
97
|
+
<LinelistTable
|
|
98
|
+
rows={rows}
|
|
99
|
+
columns={MOH_740_LINELIST_COLUMNS}
|
|
100
|
+
layoutKey={`moh-740:${indicator}`}
|
|
101
|
+
exportName={`MOH-740 ${indicator || 'linelist'} ${startDate} ${endDate}`}
|
|
102
|
+
/>
|
|
103
|
+
</RegisterLayout>
|
|
104
|
+
);
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export default Moh740Linelist;
|
|
@@ -80,7 +80,7 @@ const Moh740Report: React.FC<Moh740ReportProps> = () => {
|
|
|
80
80
|
const navigateToRegister = (indicator: string, register: string) => {
|
|
81
81
|
let baseUrl = '';
|
|
82
82
|
if(register === Moh740Rgisters.DailyRegister){
|
|
83
|
-
baseUrl = 'moh-
|
|
83
|
+
baseUrl = 'moh-740-line-list'
|
|
84
84
|
}
|
|
85
85
|
if(register === Moh740Rgisters.PermanentRegister){
|
|
86
86
|
baseUrl = 'moh-270'
|
|
@@ -30,6 +30,7 @@ export const MOH_222_COLUMNS: RegisterColumn[] = [
|
|
|
30
30
|
{ header: 'Screened for TB', value: (r) => r.screened_for_tb ?? '' },
|
|
31
31
|
{ header: 'TB Status after Screening', value: (r) => r.tbs_status ?? '' },
|
|
32
32
|
{ header: 'Active SHA(Y/N)', value: (r) => (r.covered_by_shif ? 'Y' : 'N') },
|
|
33
|
+
{ header: 'HIV Status', value: (r) => r.hiv_status ?? '' },
|
|
33
34
|
];
|
|
34
35
|
|
|
35
36
|
/** MOH 270, in the order the register prints its columns */
|
|
@@ -44,6 +44,22 @@ const columnsFor = (shown: string[]): LinelistColumn[] =>
|
|
|
44
44
|
{ header: 'Started TPT', field: 'started_tpt' },
|
|
45
45
|
{ header: 'Viral Load', field: 'vl_1' },
|
|
46
46
|
date('VL Date', 'vl_1_date'),
|
|
47
|
+
{ header: 'Status Now', field: 'status' },
|
|
48
|
+
{ header: 'Status Last Month', field: 'previous_status' },
|
|
49
|
+
{ header: 'Clinic Last Month', field: 'previous_location' },
|
|
50
|
+
date('Transfer In Date', 'transfer_in_date'),
|
|
51
|
+
date('Transfer Out Date', 'transfer_out_date'),
|
|
52
|
+
date('Missed Appointment', 'missed_appointment'),
|
|
53
|
+
{ header: 'Days Interrupted', field: 'interruption_days' },
|
|
54
|
+
{ header: 'Months on ART', field: 'months_on_art' },
|
|
55
|
+
{ header: 'Latest CD4', field: 'latest_cd4' },
|
|
56
|
+
date('Latest CD4 Date', 'latest_cd4_date'),
|
|
57
|
+
date('Death Date', 'death_date'),
|
|
58
|
+
{ header: 'Cause of Death', field: 'cause_of_death', wrap: true },
|
|
59
|
+
date('EDD', 'edd'),
|
|
60
|
+
date('Child Birth Date', 'child_birthdate'),
|
|
61
|
+
date('HIV Diagnosis Date', 'hiv_diagnosis_date'),
|
|
62
|
+
{ header: 'Known/New Positive', field: 'pmtct_status' },
|
|
47
63
|
].map((column) => ({ ...column, hidden: !shown.includes(column.header) }));
|
|
48
64
|
|
|
49
65
|
const COMMON = ['Name', 'CCC Number', 'AMRS Number', 'NUPI', 'Sex', 'Age', 'Clinic'];
|
|
@@ -85,6 +101,77 @@ const SECTIONS = [
|
|
|
85
101
|
title: 'Current on ART',
|
|
86
102
|
columns: columnsFor([...COMMON, 'ART Start Date', 'Regimen', 'Last Visit', 'RTC Date', 'WHO Stage', 'Stability']),
|
|
87
103
|
},
|
|
104
|
+
{
|
|
105
|
+
prefix: 'ti',
|
|
106
|
+
layoutKey: 'care-and-treatment:ti',
|
|
107
|
+
title: 'Transfer in',
|
|
108
|
+
columns: columnsFor([
|
|
109
|
+
...COMMON,
|
|
110
|
+
'ART Start Date',
|
|
111
|
+
'Regimen',
|
|
112
|
+
'Transfer In Date',
|
|
113
|
+
'Status Last Month',
|
|
114
|
+
'Clinic Last Month',
|
|
115
|
+
'Last Visit',
|
|
116
|
+
'RTC Date',
|
|
117
|
+
]),
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
prefix: 'rtt',
|
|
121
|
+
layoutKey: 'care-and-treatment:tx-rtt',
|
|
122
|
+
title: 'TX_RTT',
|
|
123
|
+
columns: columnsFor([
|
|
124
|
+
...COMMON,
|
|
125
|
+
'ART Start Date',
|
|
126
|
+
'Regimen',
|
|
127
|
+
'Status Last Month',
|
|
128
|
+
'Missed Appointment',
|
|
129
|
+
'Last Visit',
|
|
130
|
+
'Days Interrupted',
|
|
131
|
+
'Latest CD4',
|
|
132
|
+
'Latest CD4 Date',
|
|
133
|
+
]),
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
prefix: 'ml_',
|
|
137
|
+
layoutKey: 'care-and-treatment:tx-ml',
|
|
138
|
+
title: 'TX_ML',
|
|
139
|
+
/* for a loss, the RTC date is the appointment missed */
|
|
140
|
+
columns: columnsFor([
|
|
141
|
+
...COMMON,
|
|
142
|
+
'ART Start Date',
|
|
143
|
+
'Months on ART',
|
|
144
|
+
'Last Visit',
|
|
145
|
+
'RTC Date',
|
|
146
|
+
'Status Now',
|
|
147
|
+
'Transfer Out Date',
|
|
148
|
+
'Death Date',
|
|
149
|
+
]),
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
prefix: 'cod_',
|
|
153
|
+
layoutKey: 'care-and-treatment:cod',
|
|
154
|
+
title: 'Cause of death',
|
|
155
|
+
columns: columnsFor([...COMMON, 'ART Start Date', 'Last Visit', 'Death Date', 'Cause of Death']),
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
prefix: 'pmtct',
|
|
159
|
+
layoutKey: 'care-and-treatment:pmtct-vl',
|
|
160
|
+
title: 'PMTCT VL tracking',
|
|
161
|
+
columns: columnsFor([
|
|
162
|
+
...COMMON,
|
|
163
|
+
'HIV Diagnosis Date',
|
|
164
|
+
'ART Start Date',
|
|
165
|
+
'Regimen',
|
|
166
|
+
'Pregnant',
|
|
167
|
+
'EDD',
|
|
168
|
+
'Breastfeeding',
|
|
169
|
+
'Child Birth Date',
|
|
170
|
+
'Known/New Positive',
|
|
171
|
+
'Viral Load',
|
|
172
|
+
'VL Date',
|
|
173
|
+
]),
|
|
174
|
+
},
|
|
88
175
|
];
|
|
89
176
|
|
|
90
177
|
/**
|
|
@@ -111,7 +111,7 @@ const CareAndTreatmentTable: React.FC<CareAndTreatmentTableProps> = ({ count, op
|
|
|
111
111
|
>
|
|
112
112
|
{groupIndex === 0 && rowIndex === 0 && (
|
|
113
113
|
<th scope="rowgroup" rowSpan={sectionRows(section)} className={styles.sectionCell}>
|
|
114
|
-
<span className={styles.sectionNumber}>{section.number}</span>
|
|
114
|
+
{section.number && <span className={styles.sectionNumber}>{section.number}</span>}
|
|
115
115
|
<span className={styles.sectionName}>{section.title}</span>
|
|
116
116
|
</th>
|
|
117
117
|
)}
|