@ampath/esm-reports-app 1.0.0-next.41 → 1.0.0-next.45
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/143.css +1 -0
- package/dist/143.css.map +1 -0
- package/dist/143.js +1 -0
- package/dist/143.js.map +1 -0
- package/dist/197.js +1 -1
- package/dist/282.js +1 -1
- package/dist/282.js.map +1 -1
- package/dist/295.css +1 -0
- package/dist/295.css.map +1 -0
- package/dist/295.js +1 -0
- package/dist/295.js.map +1 -0
- package/dist/300.js +1 -1
- package/dist/311.js +1 -1
- package/dist/311.js.map +1 -1
- package/dist/335.js +1 -1
- package/dist/353.js +1 -1
- package/dist/353.js.map +1 -1
- package/dist/410.js +1 -0
- package/dist/410.js.map +1 -0
- package/dist/427.js +2 -0
- package/dist/427.js.LICENSE.txt +35 -0
- package/dist/427.js.map +1 -0
- package/dist/441.js +1 -0
- package/dist/441.js.map +1 -0
- package/dist/478.js +1 -1
- package/dist/478.js.map +1 -1
- package/dist/540.js +1 -1
- package/dist/540.js.map +1 -1
- package/dist/55.js +1 -1
- package/dist/652.js +1 -1
- package/dist/961.js +1 -1
- package/dist/961.js.map +1 -1
- package/dist/99.js +1 -1
- package/dist/ampath-esm-reports-app.js +1 -1
- package/dist/ampath-esm-reports-app.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +2 -2
- package/src/common/report-error/index.ts +1 -0
- package/src/common/report-error/show-report-error.ts +25 -0
- package/src/common/report-filters/date-range.ts +137 -0
- package/src/common/report-filters/index.ts +4 -0
- package/src/common/report-filters/report-filters.component.tsx +281 -151
- package/src/common/report-filters/report-filters.scss +180 -55
- package/src/common/report-filters/types.ts +66 -0
- package/src/common/report-filters/use-restore-period.ts +43 -0
- package/src/common/report-page/index.ts +2 -0
- package/src/common/report-page/report-page.component.tsx +32 -0
- package/src/common/report-page/report-page.scss +45 -0
- package/src/common/report-page/use-page-scale.ts +50 -0
- package/src/common/report-placeholder/has-report-data.ts +15 -0
- package/src/common/report-placeholder/index.ts +2 -0
- package/src/common/report-placeholder/report-placeholder.component.tsx +56 -0
- package/src/common/report-placeholder/report-placeholder.scss +46 -0
- package/src/common/report-register/index.ts +5 -0
- package/src/common/report-register/register-columns.ts +34 -0
- package/src/common/report-register/register-layout.component.tsx +237 -0
- package/src/common/report-register/register-layout.scss +140 -0
- package/src/common/report-register/register-table.scss +62 -0
- package/src/common/report-register/report-parents.ts +27 -0
- package/src/common/report-register/rows-to-csv.ts +59 -0
- package/src/common/report-register/use-patient-list.ts +92 -0
- package/src/common/report-skeleton/index.ts +1 -0
- package/src/common/report-skeleton/report-skeleton.component.tsx +46 -0
- package/src/common/report-skeleton/report-skeleton.scss +29 -0
- package/src/config-schema.ts +9 -1
- package/src/dashboard/report-catalog.ts +173 -0
- package/src/dashboard/reports-dasboard.tsx +101 -35
- package/src/dashboard/reports-dashboard.module.scss +269 -11
- package/src/index.ts +13 -1
- package/src/reports/datatable-wrapper/datatable-wrapper.component.tsx +50 -48
- package/src/reports/moh-240/moh-240-header.component.tsx +54 -56
- package/src/reports/moh-240/moh-240.columns.ts +64 -0
- package/src/reports/moh-240/moh-240.component.tsx +65 -84
- package/src/reports/moh-240/moh-240.scss +36 -7
- package/src/reports/moh-240/sub-reports/moh-240-register.component.tsx +27 -65
- package/src/reports/moh-240/sub-reports/page-summary.component.tsx +2 -2
- package/src/reports/moh-505/moh-505-header.component.tsx +59 -57
- package/src/reports/moh-505/moh-505.component.tsx +51 -56
- package/src/reports/moh-505/moh-505.scss +116 -2
- package/src/reports/moh-705B/moh-204b-register.component.tsx +41 -42
- package/src/reports/moh-705B/moh-204b.columns.ts +39 -0
- package/src/reports/moh-705B/moh-705b.component.tsx +492 -473
- package/src/reports/moh-705B/moh-705b.scss +110 -24
- package/src/reports/moh-705a/moh-705a.component.tsx +496 -476
- package/src/reports/moh-705a/moh-705a.scss +109 -24
- package/src/reports/moh-705a/registers/moh-204a-register.component.tsx +41 -42
- package/src/reports/moh-705a/registers/moh-204a.columns.ts +57 -0
- package/src/reports/moh-706/moh-706-header.component.tsx +58 -56
- package/src/reports/moh-706/moh-706.component.tsx +84 -55
- package/src/reports/moh-706/moh-706.scss +115 -19
- package/src/reports/moh-710/moh-710.component.tsx +743 -727
- package/src/reports/moh-710/moh-710.scss +140 -23
- package/src/reports/moh-710/registers/moh-511-710-register.component.tsx +48 -43
- package/src/reports/moh-710/registers/moh-511-710.columns.ts +52 -0
- package/src/reports/moh-711/moh-711.component.tsx +94 -106
- package/src/reports/moh-711/moh711.scss +95 -64
- package/src/reports/moh-711/registers/moh-333-register.component.tsx +92 -94
- package/src/reports/moh-711/registers/moh-333.columns.ts +119 -0
- package/src/reports/moh-711/registers/moh-405-register.component.tsx +88 -89
- package/src/reports/moh-711/registers/moh-405.columns.ts +120 -0
- package/src/reports/moh-711/registers/moh-406-register.component.tsx +85 -88
- package/src/reports/moh-711/registers/moh-406.columns.ts +133 -0
- package/src/reports/moh-711/registers/moh-510-register.component.tsx +38 -44
- package/src/reports/moh-711/registers/moh-511-register.component.tsx +42 -43
- package/src/reports/moh-711/registers/moh-511.columns.ts +59 -0
- package/src/reports/moh-711/sections/anc.component.tsx +3 -3
- package/src/reports/moh-711/sections/cervical-cancer.component.tsx +3 -3
- package/src/reports/moh-711/sections/chanis.component.tsx +2 -3
- package/src/reports/moh-711/sections/family-planning.component.tsx +2 -2
- package/src/reports/moh-711/sections/gbv.component.tsx +2 -2
- package/src/reports/moh-711/sections/maternity.component.tsx +3 -8
- package/src/reports/moh-711/sections/medical-social-work.component.tsx +2 -12
- package/src/reports/moh-711/sections/other.component.tsx +2 -2
- package/src/reports/moh-711/sections/physiotherapy.component.tsx +2 -2
- package/src/reports/moh-711/sections/pnc.component.tsx +7 -5
- package/src/reports/moh-711/sections/post-abortion.component.tsx +2 -2
- package/src/reports/moh-711/sections/rehabilitation.component.tsx +2 -2
- package/src/reports/moh-711/sections/report-compiled-by.component.tsx +12 -4
- package/src/reports/moh-711/sections/tb-screening.component.tsx +2 -2
- package/src/reports/moh-717/moh-717.component.tsx +100 -121
- package/src/reports/moh-717/moh717.scss +163 -102
- package/src/reports/moh-717/sections/maternity.component.tsx +1 -1
- package/src/reports/moh-717/sections/orthopaedic-trauma.component.tsx +1 -1
- package/src/reports/moh-717/sections/outpatient.component.tsx +23 -23
- package/src/reports/moh-717/sections/preparedby.component.tsx +7 -2
- package/src/reports/moh-717/sections/special-services.component.tsx +1 -1
- package/src/reports/moh-731/moh-731.component.tsx +127 -110
- package/src/reports/moh-731/moh-731.scss +396 -68
- package/src/reports/moh-731/registers/moh-366.columns.ts +38 -0
- package/src/reports/moh-731/registers/moh-366.component.tsx +76 -83
- package/src/reports/moh-731/registers/prep-register.component.tsx +70 -78
- package/src/reports/moh-731/registers/prep.columns.ts +34 -0
- package/src/reports/moh-731/sections/hiv-and-tb-treatment.component.tsx +1031 -751
- package/src/reports/moh-731/sections/hiv-testing-and-pre-exposure.component.tsx +230 -86
- package/src/reports/moh-731/sections/pmtct.component.tsx +185 -64
- package/src/reports/moh-740/moh-740.component.scss +159 -79
- package/src/reports/moh-740/moh-740.component.tsx +261 -230
- package/src/reports/moh-740/moh-740.resource.ts +17 -10
- package/src/reports/moh-740/registers/moh-222-daily-register/moh-222-daily-register.tsx +77 -96
- package/src/reports/moh-740/registers/moh-270-permanent-register/moh-270-permanent-register.tsx +50 -70
- package/src/reports/moh-740/registers/moh-740-patient-list.tsx +61 -32
- package/src/reports/moh-740/registers/moh-740.columns.ts +52 -0
- package/src/reports/moh-740/shared/utils/indicator-register-map.ts +3 -3
- package/src/reports/moh-740/types/index.ts +3 -3
- package/src/reports/moh-745/moh-745.component.tsx +897 -877
- package/src/reports/moh-745/moh-745.scss +104 -46
- package/src/reports/moh-745/registers/moh-412-register.component.tsx +42 -43
- package/src/reports/moh-745/registers/moh-412.columns.ts +52 -0
- package/src/reports/table-wrapper/table-wrapper.component.tsx +23 -14
- package/src/reports/table-wrapper/table-wrapper.scss +1 -16
- package/src/resources/moh-505.resource.ts +18 -35
- package/src/resources/moh-705.resource.ts +28 -39
- package/src/resources/moh-706.resource.ts +17 -30
- package/src/resources/moh-710.resource.ts +7 -17
- package/src/resources/moh-711.resource.ts +46 -64
- package/src/resources/moh-717.resource.ts +7 -17
- package/src/resources/moh-731.resource.ts +26 -32
- package/src/resources/moh-745.resource.ts +18 -20
- package/src/resources/patient-list-page.ts +66 -0
- package/src/root.component.tsx +28 -26
- package/src/root.scss +36 -0
- package/src/utils/get-base-url.ts +39 -7
- package/tsconfig.json +1 -1
- package/dist/110.js +0 -1
- package/dist/110.js.map +0 -1
- package/dist/184.js +0 -2
- package/dist/184.js.LICENSE.txt +0 -14
- package/dist/184.js.map +0 -1
- package/dist/205.js +0 -1
- package/dist/205.js.map +0 -1
- package/dist/812.js +0 -1
- package/dist/812.js.map +0 -1
- package/dist/822.js +0 -2
- package/dist/822.js.LICENSE.txt +0 -20
- package/dist/822.js.map +0 -1
- package/dist/ampath-esm-reports-app.js.buildmanifest.json +0 -560
- package/dist/main.js +0 -1
- package/dist/main.js.map +0 -1
- package/src/reports/moh-731/registers/moh-366.scss +0 -45
- package/src/reports/moh-731/registers/prep-registers.scss +0 -45
- package/src/reports/moh-740/registers/moh-222-daily-register/moh-222-daily-register.scss +0 -18
- package/src/reports/moh-740/registers/moh-270-permanent-register/moh-270-permanent-register.scss +0 -18
- /package/src/{reports/moh-740/shared/utils → utils}/format-indicator.ts +0 -0
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import styles from '
|
|
3
|
+
import styles from '../../../common/report-register/register-table.scss';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
|
-
import {
|
|
5
|
+
import { useSearchParams } from 'react-router-dom';
|
|
6
6
|
import { getMoh366PatientList } from '../../../resources/moh-731.resource';
|
|
7
|
-
import {
|
|
7
|
+
import { RegisterLayout, usePatientList } from '../../../common/report-register';
|
|
8
|
+
import { moh366Columns } from './moh-366.columns';
|
|
8
9
|
|
|
9
10
|
interface Moh366RegisterProps {}
|
|
10
11
|
const Moh366Register: React.FC<Moh366RegisterProps> = () => {
|
|
11
|
-
const navigate = useNavigate();
|
|
12
|
-
const [patientlist, setPatientList] = useState<any[]>([]);
|
|
13
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
14
|
-
|
|
15
12
|
const [searchParams] = useSearchParams();
|
|
16
13
|
|
|
17
14
|
const startDate = searchParams.get('startDate');
|
|
@@ -20,48 +17,44 @@ const Moh366Register: React.FC<Moh366RegisterProps> = () => {
|
|
|
20
17
|
const indicator = searchParams.get('indicator');
|
|
21
18
|
const gender = searchParams.get('gender');
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
fetchData();
|
|
49
|
-
}, [startDate, endDate, locationUuids, indicator, gender]);
|
|
50
|
-
|
|
51
|
-
function navigateBack() {
|
|
52
|
-
navigate('/moh-731');
|
|
53
|
-
}
|
|
20
|
+
const {
|
|
21
|
+
rows: patientlist,
|
|
22
|
+
total,
|
|
23
|
+
isTotalExact,
|
|
24
|
+
isLoading,
|
|
25
|
+
page,
|
|
26
|
+
pageSize,
|
|
27
|
+
onPageChange,
|
|
28
|
+
fetchAll,
|
|
29
|
+
} = usePatientList(
|
|
30
|
+
({ startIndex, limit }) =>
|
|
31
|
+
getMoh366PatientList({
|
|
32
|
+
startDate,
|
|
33
|
+
endDate,
|
|
34
|
+
locationUuids,
|
|
35
|
+
indicator,
|
|
36
|
+
gender,
|
|
37
|
+
startIndex,
|
|
38
|
+
limit,
|
|
39
|
+
}),
|
|
40
|
+
[startDate, endDate, locationUuids, indicator, gender],
|
|
41
|
+
);
|
|
42
|
+
|
|
54
43
|
return (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
{isLoading
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
44
|
+
<RegisterLayout
|
|
45
|
+
parentLabel="MOH-731 Report"
|
|
46
|
+
parentPath="/moh-731"
|
|
47
|
+
title="HIV Care Treatment Daily Activity Register MOH 366"
|
|
48
|
+
isLoading={isLoading}
|
|
49
|
+
isEmpty={patientlist.length === 0}
|
|
50
|
+
page={page}
|
|
51
|
+
pageSize={pageSize}
|
|
52
|
+
total={total}
|
|
53
|
+
isTotalExact={isTotalExact}
|
|
54
|
+
onPageChange={onPageChange}
|
|
55
|
+
fetchAll={fetchAll}
|
|
56
|
+
columns={moh366Columns}
|
|
57
|
+
>
|
|
65
58
|
<table className={classNames(styles.table, styles.tableBordered, styles.textCentre)}>
|
|
66
59
|
<thead>
|
|
67
60
|
<tr>
|
|
@@ -114,7 +107,7 @@ const Moh366Register: React.FC<Moh366RegisterProps> = () => {
|
|
|
114
107
|
<th colSpan={4} className={styles.textCentre}>
|
|
115
108
|
Indicate Y/N/NA
|
|
116
109
|
</th>
|
|
117
|
-
<th colSpan={2} rowSpan={2} className={classNames(styles.
|
|
110
|
+
<th colSpan={2} rowSpan={2} className={classNames(styles.textCentre, styles.verticalText)}>
|
|
118
111
|
E=Established <br />
|
|
119
112
|
NE=Not Established
|
|
120
113
|
</th>
|
|
@@ -138,38 +131,38 @@ const Moh366Register: React.FC<Moh366RegisterProps> = () => {
|
|
|
138
131
|
</th>
|
|
139
132
|
</tr>
|
|
140
133
|
<tr>
|
|
141
|
-
<th className={classNames(styles.
|
|
142
|
-
<th className={classNames(styles.
|
|
143
|
-
<th className={classNames(styles.
|
|
144
|
-
<th className={classNames(styles.
|
|
145
|
-
<th className={classNames(styles.
|
|
146
|
-
<th className={classNames(styles.
|
|
147
|
-
<th className={classNames(styles.
|
|
148
|
-
<th className={classNames(styles.
|
|
149
|
-
<th className={classNames(styles.
|
|
150
|
-
<th className={classNames(styles.
|
|
151
|
-
<th className={classNames(styles.
|
|
152
|
-
<th className={classNames(styles.
|
|
153
|
-
<th className={classNames(styles.
|
|
154
|
-
<th className={classNames(styles.
|
|
155
|
-
<th className={classNames(styles.
|
|
156
|
-
<th className={classNames(styles.
|
|
157
|
-
<th className={classNames(styles.
|
|
158
|
-
<th className={classNames(styles.
|
|
159
|
-
<th className={classNames(styles.
|
|
160
|
-
<th className={classNames(styles.
|
|
161
|
-
<th className={classNames(styles.
|
|
162
|
-
<th className={classNames(styles.
|
|
163
|
-
<th className={classNames(styles.
|
|
164
|
-
<th className={classNames(styles.
|
|
165
|
-
<th className={classNames(styles.
|
|
166
|
-
<th className={classNames(styles.
|
|
167
|
-
<th className={classNames(styles.
|
|
168
|
-
<th className={classNames(styles.
|
|
169
|
-
<th className={classNames(styles.
|
|
170
|
-
<th className={classNames(styles.
|
|
171
|
-
<th className={classNames(styles.
|
|
172
|
-
<th className={classNames(styles.
|
|
134
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>< 1 yrs (M)</th>
|
|
135
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>< 1 yrs (F)</th>
|
|
136
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>1-4 yrs (M)</th>
|
|
137
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>1-4 yrs (F)</th>
|
|
138
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>5-9 yrs (M)</th>
|
|
139
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>5-9 yrs (F)</th>
|
|
140
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>10-14 yrs (M)</th>
|
|
141
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>10-14 yrs (F)</th>
|
|
142
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>15-19 yrs (M)</th>
|
|
143
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>15-19 yrs (F)</th>
|
|
144
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>20-24 yrs(M)</th>
|
|
145
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>20-24 yrs (F)</th>
|
|
146
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>25+ yrs (M)</th>
|
|
147
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>25+ yrs (F)</th>
|
|
148
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>< 15 yrs</th>
|
|
149
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>15+ yrs</th>
|
|
150
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>< 15 yrs</th>
|
|
151
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>15+ yrs</th>
|
|
152
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>< 1 yrs (M)</th>
|
|
153
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>< 1 yrs (F)</th>
|
|
154
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>1-4 yrs (M)</th>
|
|
155
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>1-4 yrs (F)</th>
|
|
156
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>5-9 yrs (M)</th>
|
|
157
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>5-9 yrs (F)</th>
|
|
158
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>10-14 yrs (M)</th>
|
|
159
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>10-14 yrs (F)</th>
|
|
160
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>15-19 yrs (M)</th>
|
|
161
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>15-19 yrs (F)</th>
|
|
162
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>20-24 yrs(M)</th>
|
|
163
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>20-24 yrs (F)</th>
|
|
164
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>25+ yrs (M)</th>
|
|
165
|
+
<th className={classNames(styles.textCentre, styles.verticalText)}>25+ yrs (F)</th>
|
|
173
166
|
</tr>
|
|
174
167
|
<tr>
|
|
175
168
|
<th className={styles.textCentre}>(a)</th>
|
|
@@ -471,7 +464,7 @@ const Moh366Register: React.FC<Moh366RegisterProps> = () => {
|
|
|
471
464
|
))}
|
|
472
465
|
</tbody>
|
|
473
466
|
</table>
|
|
474
|
-
|
|
467
|
+
</RegisterLayout>
|
|
475
468
|
);
|
|
476
469
|
};
|
|
477
470
|
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import styles from '
|
|
4
|
-
import {
|
|
3
|
+
import styles from '../../../common/report-register/register-table.scss';
|
|
4
|
+
import { useSearchParams } from 'react-router-dom';
|
|
5
5
|
import { getPrepPatientList } from '../../../resources/moh-731.resource';
|
|
6
|
-
import { Button, Loading } from '@carbon/react';
|
|
7
6
|
import classNames from 'classnames';
|
|
7
|
+
import { prepExportColumns } from './prep.columns';
|
|
8
|
+
import { RegisterLayout, usePatientList } from '../../../common/report-register';
|
|
8
9
|
const PrepRegisterComponent: React.FC = () => {
|
|
9
|
-
const navigate = useNavigate();
|
|
10
|
-
const [patientlist, setPatientList] = useState<any[]>([]);
|
|
11
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
12
|
-
|
|
13
10
|
const [searchParams] = useSearchParams();
|
|
14
11
|
|
|
15
12
|
const startDate = searchParams.get('startDate');
|
|
@@ -18,37 +15,28 @@ const PrepRegisterComponent: React.FC = () => {
|
|
|
18
15
|
const indicator = searchParams.get('indicator');
|
|
19
16
|
const gender = searchParams.get('gender');
|
|
20
17
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
fetchData();
|
|
47
|
-
}, [startDate, endDate, locationUuids, indicator, gender]);
|
|
48
|
-
|
|
49
|
-
function navigateBack() {
|
|
50
|
-
navigate('/moh-731');
|
|
51
|
-
}
|
|
18
|
+
const {
|
|
19
|
+
rows: patientlist,
|
|
20
|
+
total,
|
|
21
|
+
isTotalExact,
|
|
22
|
+
isLoading,
|
|
23
|
+
page,
|
|
24
|
+
pageSize,
|
|
25
|
+
onPageChange,
|
|
26
|
+
fetchAll,
|
|
27
|
+
} = usePatientList(
|
|
28
|
+
({ startIndex, limit }) =>
|
|
29
|
+
getPrepPatientList({
|
|
30
|
+
startDate,
|
|
31
|
+
endDate,
|
|
32
|
+
locationUuids,
|
|
33
|
+
indicator,
|
|
34
|
+
gender,
|
|
35
|
+
startIndex,
|
|
36
|
+
limit,
|
|
37
|
+
}),
|
|
38
|
+
[startDate, endDate, locationUuids, indicator, gender],
|
|
39
|
+
);
|
|
52
40
|
|
|
53
41
|
const transformDate = (date: string): string => {
|
|
54
42
|
if (!date) return '';
|
|
@@ -60,16 +48,20 @@ const PrepRegisterComponent: React.FC = () => {
|
|
|
60
48
|
}).format(new Date(date));
|
|
61
49
|
};
|
|
62
50
|
return (
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
{isLoading
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
51
|
+
<RegisterLayout
|
|
52
|
+
parentLabel="MOH-731 Report"
|
|
53
|
+
parentPath="/moh-731"
|
|
54
|
+
title="MOH 267 PrEP Daily Activity Register"
|
|
55
|
+
isLoading={isLoading}
|
|
56
|
+
isEmpty={patientlist.length === 0}
|
|
57
|
+
page={page}
|
|
58
|
+
pageSize={pageSize}
|
|
59
|
+
total={total}
|
|
60
|
+
isTotalExact={isTotalExact}
|
|
61
|
+
onPageChange={onPageChange}
|
|
62
|
+
fetchAll={fetchAll}
|
|
63
|
+
columns={prepExportColumns}
|
|
64
|
+
>
|
|
73
65
|
<table className={classNames(styles.table, styles.tableBordered, styles.textCentre)}>
|
|
74
66
|
<thead>
|
|
75
67
|
<tr>
|
|
@@ -141,40 +133,40 @@ const PrepRegisterComponent: React.FC = () => {
|
|
|
141
133
|
</th>
|
|
142
134
|
</tr>
|
|
143
135
|
<tr>
|
|
144
|
-
<th colSpan={2} className={styles.
|
|
136
|
+
<th colSpan={2} className={styles.textCentre}>
|
|
145
137
|
(a)
|
|
146
138
|
</th>
|
|
147
|
-
<th colSpan={2} className={styles.
|
|
139
|
+
<th colSpan={2} className={styles.textCentre}>
|
|
148
140
|
(b)
|
|
149
141
|
</th>
|
|
150
|
-
<th colSpan={2} className={styles.
|
|
142
|
+
<th colSpan={2} className={styles.textCentre}>
|
|
151
143
|
(l)
|
|
152
144
|
</th>
|
|
153
|
-
<th colSpan={3} className={styles.
|
|
145
|
+
<th colSpan={3} className={styles.textCentre}>
|
|
154
146
|
(c)
|
|
155
147
|
</th>
|
|
156
|
-
<th colSpan={2} className={styles.
|
|
148
|
+
<th colSpan={2} className={styles.textCentre}>
|
|
157
149
|
(d)
|
|
158
150
|
</th>
|
|
159
|
-
<th colSpan={2} className={styles.
|
|
151
|
+
<th colSpan={2} className={styles.textCentre}>
|
|
160
152
|
(e)
|
|
161
153
|
</th>
|
|
162
|
-
<th colSpan={3} className={styles.
|
|
154
|
+
<th colSpan={3} className={styles.textCentre}>
|
|
163
155
|
(f)
|
|
164
156
|
</th>
|
|
165
|
-
<th colSpan={2} className={styles.
|
|
157
|
+
<th colSpan={2} className={styles.textCentre}>
|
|
166
158
|
(g)
|
|
167
159
|
</th>
|
|
168
|
-
<th colSpan={3} className={styles.
|
|
160
|
+
<th colSpan={3} className={styles.textCentre}>
|
|
169
161
|
(h)
|
|
170
162
|
</th>
|
|
171
|
-
<th colSpan={2} className={styles.
|
|
163
|
+
<th colSpan={2} className={styles.textCentre}>
|
|
172
164
|
(i)
|
|
173
165
|
</th>
|
|
174
|
-
<th colSpan={2} className={styles.
|
|
166
|
+
<th colSpan={2} className={styles.textCentre}>
|
|
175
167
|
(j)
|
|
176
168
|
</th>
|
|
177
|
-
<th colSpan={4} className={styles.
|
|
169
|
+
<th colSpan={4} className={styles.textCentre}>
|
|
178
170
|
(k)
|
|
179
171
|
</th>
|
|
180
172
|
</tr>
|
|
@@ -241,23 +233,23 @@ const PrepRegisterComponent: React.FC = () => {
|
|
|
241
233
|
<b>TOTAL this Page</b>
|
|
242
234
|
</td>
|
|
243
235
|
|
|
244
|
-
<td colSpan={2} className={styles.
|
|
236
|
+
<td colSpan={2} className={styles.textCentre}>
|
|
245
237
|
{patientlist.length}
|
|
246
238
|
</td>
|
|
247
239
|
|
|
248
|
-
<td colSpan={2} className={styles.
|
|
240
|
+
<td colSpan={2} className={styles.textCentre}></td>
|
|
249
241
|
|
|
250
|
-
<td colSpan={3} className={styles.
|
|
242
|
+
<td colSpan={3} className={styles.textCentre}></td>
|
|
251
243
|
|
|
252
|
-
<td colSpan={2} className={styles.
|
|
244
|
+
<td colSpan={2} className={styles.textCentre}></td>
|
|
253
245
|
|
|
254
|
-
<td colSpan={3} className={styles.
|
|
246
|
+
<td colSpan={3} className={styles.textCentre}></td>
|
|
255
247
|
|
|
256
|
-
<td colSpan={2} className={styles.
|
|
248
|
+
<td colSpan={2} className={styles.textCentre}></td>
|
|
257
249
|
|
|
258
|
-
<td colSpan={2} className={styles.
|
|
250
|
+
<td colSpan={2} className={styles.textCentre}></td>
|
|
259
251
|
|
|
260
|
-
<td colSpan={4} className={styles.
|
|
252
|
+
<td colSpan={4} className={styles.textCentre}></td>
|
|
261
253
|
</tr>
|
|
262
254
|
|
|
263
255
|
<tr>
|
|
@@ -265,27 +257,27 @@ const PrepRegisterComponent: React.FC = () => {
|
|
|
265
257
|
<b>TOTAL this Month</b>
|
|
266
258
|
</td>
|
|
267
259
|
|
|
268
|
-
<td colSpan={2} className={styles.
|
|
260
|
+
<td colSpan={2} className={styles.textCentre}>
|
|
269
261
|
{patientlist.length}
|
|
270
262
|
</td>
|
|
271
263
|
|
|
272
|
-
<td colSpan={2} className={styles.
|
|
264
|
+
<td colSpan={2} className={styles.textCentre}></td>
|
|
273
265
|
|
|
274
|
-
<td colSpan={3} className={styles.
|
|
266
|
+
<td colSpan={3} className={styles.textCentre}></td>
|
|
275
267
|
|
|
276
|
-
<td colSpan={2} className={styles.
|
|
268
|
+
<td colSpan={2} className={styles.textCentre}></td>
|
|
277
269
|
|
|
278
|
-
<td colSpan={3} className={styles.
|
|
270
|
+
<td colSpan={3} className={styles.textCentre}></td>
|
|
279
271
|
|
|
280
|
-
<td colSpan={2} className={styles.
|
|
272
|
+
<td colSpan={2} className={styles.textCentre}></td>
|
|
281
273
|
|
|
282
|
-
<td colSpan={2} className={styles.
|
|
274
|
+
<td colSpan={2} className={styles.textCentre}></td>
|
|
283
275
|
|
|
284
|
-
<td colSpan={4} className={styles.
|
|
276
|
+
<td colSpan={4} className={styles.textCentre}></td>
|
|
285
277
|
</tr>
|
|
286
278
|
</tbody>
|
|
287
279
|
</table>
|
|
288
|
-
|
|
280
|
+
</RegisterLayout>
|
|
289
281
|
);
|
|
290
282
|
};
|
|
291
283
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type RegisterColumn } from '../../../common/report-register';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The PrEP register's columns, with the headings the register prints.
|
|
5
|
+
*
|
|
6
|
+
* This register prints two rows per client with cells spanning both, so the
|
|
7
|
+
* headings could not be paired to fields by position; they are taken from the
|
|
8
|
+
* header row by the column letter each one carries.
|
|
9
|
+
*/
|
|
10
|
+
export const prepExportColumns: RegisterColumn[] = [
|
|
11
|
+
{ header: 'PrEP No (a)', value: (row) => row.PrEP_Number ?? '' },
|
|
12
|
+
{ header: 'Date of Visit (b)', value: (row) => row.Date_Of_Visit ?? '' },
|
|
13
|
+
{ header: 'AMRSID (l)', value: (row) => row.amrsId ?? '' },
|
|
14
|
+
{ header: 'National Identification Number (c)', value: (row) => row.National_ID ?? '' },
|
|
15
|
+
{ header: 'National Unique Patient Identifier (NUPI) (c)', value: (row) => row.NUPI ?? '' },
|
|
16
|
+
{ header: 'Age (d)', value: (row) => row.Age ?? '' },
|
|
17
|
+
{ header: 'Sex (M/F) (e)', value: (row) => row.Sex ?? '' },
|
|
18
|
+
{
|
|
19
|
+
header: 'Population type (f): 1. General Population 2. Discordant Couple 3. MSM/MSW 4. FSW 5. PWID/PWUD 6. VP',
|
|
20
|
+
value: (row) => row.population_type ?? '',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
header: 'Client PrEP Status (g): N-New C-Continuing D-Discontinued R-Restart',
|
|
24
|
+
value: (row) => row.client_prep_status ?? '',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
header:
|
|
28
|
+
'PrEP Method (h): 1. Daily oral PrEP 2. Event driven oral PrEP 3. Dapivirine Vaginal ring 4. Cabotegravir Injectable',
|
|
29
|
+
value: (row) => row.prep_method ?? '',
|
|
30
|
+
},
|
|
31
|
+
{ header: 'HIV Results (N/P/Ic/NA) (i)', value: (row) => row.HIV_result ?? '' },
|
|
32
|
+
{ header: 'Diagnosed with STI (N/Y) (j)', value: (row) => row.with_STI ?? '' },
|
|
33
|
+
{ header: 'Remarks (k)', value: (row) => row.remarks ?? '' },
|
|
34
|
+
];
|