@ampath/esm-reports-app 1.0.0-next.81 → 1.0.0-next.82
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/README.md +2 -0
- package/dist/410.js +1 -1
- package/dist/{549.css → 544.css} +1 -1
- package/dist/544.css.map +1 -0
- package/dist/544.js +1 -0
- package/dist/544.js.map +1 -0
- package/dist/ampath-esm-reports-app.js +1 -1
- package/dist/routes.json +1 -1
- package/local-config.json +5 -0
- package/package.json +3 -2
- package/src/common/report-register/report-parents.ts +2 -0
- package/src/dashboard/report-catalog.ts +16 -0
- package/src/reports/moh-643/moh-643.component.tsx +222 -0
- package/src/reports/moh-643/moh-643.rows.ts +77 -0
- package/src/reports/moh-643/moh-643.scss +164 -0
- package/src/reports/moh-643/registers/moh-643-register.component.tsx +112 -0
- package/src/reports/moh-643/registers/moh-643.columns.ts +32 -0
- package/src/reports/moh-645/moh-645.component.tsx +331 -0
- package/src/reports/moh-645/moh-645.scss +147 -0
- package/src/reports/moh-645/registers/moh-645-register.component.tsx +125 -0
- package/src/reports/moh-645/registers/moh-645.columns.ts +40 -0
- package/src/resources/moh-643.resource.ts +61 -0
- package/src/resources/moh-645.resource.ts +61 -0
- package/src/root.component.tsx +8 -0
- package/dist/549.css.map +0 -1
- package/dist/549.js +0 -1
- package/dist/549.js.map +0 -1
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { Link, Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@carbon/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { useSearchParams } from 'react-router-dom';
|
|
5
|
+
|
|
6
|
+
import styles from '../../../common/report-register/register-table.scss';
|
|
7
|
+
import { RegisterLayout, usePatientList } from '../../../common/report-register';
|
|
8
|
+
import { getMoh643PatientList } from '../../../resources/moh-643.resource';
|
|
9
|
+
import { moh643ExportColumns } from './moh-643.columns';
|
|
10
|
+
|
|
11
|
+
function formatDateValue(value: unknown): string {
|
|
12
|
+
if (!value) {
|
|
13
|
+
return '';
|
|
14
|
+
}
|
|
15
|
+
const text = String(value);
|
|
16
|
+
return text.includes('T') ? text.slice(0, 10) : text;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function countForIndicator(row: Record<string, any>, indicator?: string | null): string {
|
|
20
|
+
if (indicator && row[indicator] != null && row[indicator] !== '') {
|
|
21
|
+
return String(row[indicator]);
|
|
22
|
+
}
|
|
23
|
+
return '';
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const Moh643Register: React.FC = () => {
|
|
27
|
+
const [searchParams] = useSearchParams();
|
|
28
|
+
|
|
29
|
+
const startDate = searchParams.get('startDate');
|
|
30
|
+
const endDate = searchParams.get('endDate');
|
|
31
|
+
const locationUuids = searchParams.get('locationUuids');
|
|
32
|
+
const indicators = searchParams.get('indicators');
|
|
33
|
+
|
|
34
|
+
const { rows: patientlist, total, isTotalExact, isLoading, page, pageSize, onPageChange, fetchAll } = usePatientList(
|
|
35
|
+
({ startIndex, limit }) =>
|
|
36
|
+
getMoh643PatientList({
|
|
37
|
+
startDate: startDate || '',
|
|
38
|
+
endDate: endDate || '',
|
|
39
|
+
locationUuids: locationUuids || '',
|
|
40
|
+
indicators: indicators || '',
|
|
41
|
+
startIndex,
|
|
42
|
+
limit,
|
|
43
|
+
}),
|
|
44
|
+
[startDate, endDate, locationUuids, indicators],
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
const exportColumns = moh643ExportColumns.map((column) =>
|
|
48
|
+
column.header === 'Count'
|
|
49
|
+
? { ...column, value: (row: Record<string, any>) => countForIndicator(row, indicators) }
|
|
50
|
+
: column,
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<RegisterLayout
|
|
55
|
+
parentLabel="MOH-643 Report"
|
|
56
|
+
parentPath="/moh-643"
|
|
57
|
+
title="MOH 643 Laboratory Commodities Register"
|
|
58
|
+
isLoading={isLoading}
|
|
59
|
+
isEmpty={patientlist.length === 0}
|
|
60
|
+
page={page}
|
|
61
|
+
pageSize={pageSize}
|
|
62
|
+
total={total}
|
|
63
|
+
isTotalExact={isTotalExact}
|
|
64
|
+
onPageChange={onPageChange}
|
|
65
|
+
fetchAll={fetchAll}
|
|
66
|
+
columns={exportColumns}
|
|
67
|
+
>
|
|
68
|
+
<div className={styles.tableContainer}>
|
|
69
|
+
<Table className={classNames(styles.table, styles.tableBordered, styles.tableStriped)}>
|
|
70
|
+
<TableHead>
|
|
71
|
+
<TableRow>
|
|
72
|
+
<TableHeader>No</TableHeader>
|
|
73
|
+
<TableHeader>Visit date</TableHeader>
|
|
74
|
+
<TableHeader>Facility</TableHeader>
|
|
75
|
+
<TableHeader>Patient name</TableHeader>
|
|
76
|
+
<TableHeader>Sex</TableHeader>
|
|
77
|
+
<TableHeader>Age</TableHeader>
|
|
78
|
+
<TableHeader>Identifier</TableHeader>
|
|
79
|
+
<TableHeader>Phone</TableHeader>
|
|
80
|
+
<TableHeader>Test</TableHeader>
|
|
81
|
+
<TableHeader>Count</TableHeader>
|
|
82
|
+
</TableRow>
|
|
83
|
+
</TableHead>
|
|
84
|
+
<TableBody>
|
|
85
|
+
{patientlist.map((patient, index) => (
|
|
86
|
+
<TableRow key={patient.patient_uuid ?? patient.person_id ?? index}>
|
|
87
|
+
<TableCell>{(page - 1) * pageSize + index + 1}</TableCell>
|
|
88
|
+
<TableCell>{formatDateValue(patient.visit_date)}</TableCell>
|
|
89
|
+
<TableCell>{patient.facility ?? ''}</TableCell>
|
|
90
|
+
<TableCell>
|
|
91
|
+
{patient.patient_uuid ? (
|
|
92
|
+
<Link href={`${window.spaBase}/patient/${patient.patient_uuid}/chart/`}>{patient.person_name}</Link>
|
|
93
|
+
) : (
|
|
94
|
+
patient.person_name
|
|
95
|
+
)}
|
|
96
|
+
</TableCell>
|
|
97
|
+
<TableCell>{patient.gender ?? ''}</TableCell>
|
|
98
|
+
<TableCell>{patient.age_years ?? ''}</TableCell>
|
|
99
|
+
<TableCell>{patient.amrs_universal_id ?? ''}</TableCell>
|
|
100
|
+
<TableCell>{patient.phone_number ?? ''}</TableCell>
|
|
101
|
+
<TableCell>{patient.test_name ?? ''}</TableCell>
|
|
102
|
+
<TableCell>{countForIndicator(patient, indicators)}</TableCell>
|
|
103
|
+
</TableRow>
|
|
104
|
+
))}
|
|
105
|
+
</TableBody>
|
|
106
|
+
</Table>
|
|
107
|
+
</div>
|
|
108
|
+
</RegisterLayout>
|
|
109
|
+
);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export default Moh643Register;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type RegisterColumn } from '../../../common/report-register';
|
|
2
|
+
|
|
3
|
+
function formatDateValue(value: unknown): string {
|
|
4
|
+
if (!value) {
|
|
5
|
+
return '';
|
|
6
|
+
}
|
|
7
|
+
const text = String(value);
|
|
8
|
+
return text.includes('T') ? text.slice(0, 10) : text;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function countForIndicator(row: Record<string, any>, indicator?: string | null): string {
|
|
12
|
+
if (indicator && row[indicator] != null && row[indicator] !== '') {
|
|
13
|
+
return String(row[indicator]);
|
|
14
|
+
}
|
|
15
|
+
const tests = Object.keys(row).filter((key) => key.startsWith('tests_') && Number(row[key]));
|
|
16
|
+
if (tests.length === 1) {
|
|
17
|
+
return String(row[tests[0]]);
|
|
18
|
+
}
|
|
19
|
+
return '';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const moh643ExportColumns: RegisterColumn[] = [
|
|
23
|
+
{ header: 'Visit date', value: (row) => formatDateValue(row.visit_date) },
|
|
24
|
+
{ header: 'Facility', value: (row) => row.facility ?? '' },
|
|
25
|
+
{ header: 'Patient name', value: (row) => row.person_name ?? '' },
|
|
26
|
+
{ header: 'Sex', value: (row) => row.gender ?? '' },
|
|
27
|
+
{ header: 'Age (years)', value: (row) => row.age_years ?? '' },
|
|
28
|
+
{ header: 'Identifier', value: (row) => row.amrs_universal_id ?? '', text: true },
|
|
29
|
+
{ header: 'Phone', value: (row) => row.phone_number ?? '', text: true },
|
|
30
|
+
{ header: 'Test', value: (row) => row.test_name ?? '' },
|
|
31
|
+
{ header: 'Count', value: (row) => countForIndicator(row) },
|
|
32
|
+
];
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { formatDate, useSession } from '@openmrs/esm-framework';
|
|
3
|
+
import { useNavigate } from 'react-router-dom';
|
|
4
|
+
import dayjs from 'dayjs';
|
|
5
|
+
|
|
6
|
+
import { ReportFiltersComponent, type ReportPeriod, useRestorePeriod } from '../../common/report-filters';
|
|
7
|
+
import { showReportError } from '../../common/report-error';
|
|
8
|
+
import { hasReportData, ReportPlaceholder } from '../../common/report-placeholder';
|
|
9
|
+
import { ReportSkeleton } from '../../common/report-skeleton';
|
|
10
|
+
import { ReportPage } from '../../common/report-page';
|
|
11
|
+
import { getMoh645 } from '../../resources/moh-645.resource';
|
|
12
|
+
|
|
13
|
+
import styles from './moh-645.scss';
|
|
14
|
+
|
|
15
|
+
const STOCK_COLUMNS = [
|
|
16
|
+
{ letter: 'A', label: 'Beginning balance' },
|
|
17
|
+
{ letter: 'B', label: 'Quantity received' },
|
|
18
|
+
{ letter: 'C', label: 'Quantity dispensed' },
|
|
19
|
+
{ letter: 'D', label: 'Losses' },
|
|
20
|
+
{ letter: 'E', label: 'Positive adjustment' },
|
|
21
|
+
{ letter: 'F', label: 'Negative adjustment' },
|
|
22
|
+
{ letter: 'G', label: 'Physical count' },
|
|
23
|
+
{ letter: 'H', label: 'Expired' },
|
|
24
|
+
{ letter: 'I', label: 'Days stocked out' },
|
|
25
|
+
{ letter: 'J', label: 'Quantity to order' },
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
const COMMODITY_ROWS: Array<{ label: string; indicator?: string }> = [
|
|
29
|
+
{ label: 'RDT kits' },
|
|
30
|
+
{ label: 'AL 6s (5–14 kg)', indicator: 'qty_dispensed_al_6s' },
|
|
31
|
+
{ label: 'AL 12s (15–24 kg)', indicator: 'qty_dispensed_al_12s' },
|
|
32
|
+
{ label: 'AL 18s (25–34 kg)', indicator: 'qty_dispensed_al_18s' },
|
|
33
|
+
{ label: 'AL 24s (≥35 kg)', indicator: 'qty_dispensed_al_24s' },
|
|
34
|
+
{ label: 'Inj. Artesunate 60 mg (vials)', indicator: 'qty_dispensed_artesunate_vials' },
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
const WEIGHT_BAND_ROWS: Array<{ label: string; indicator: string }> = [
|
|
38
|
+
{ label: '5–14 kg (AL 6s)', indicator: 'patients_al_5_14kg' },
|
|
39
|
+
{ label: '15–24 kg (AL 12s)', indicator: 'patients_al_15_24kg' },
|
|
40
|
+
{ label: '25–34 kg (AL 18s)', indicator: 'patients_al_25_34kg' },
|
|
41
|
+
{ label: '≥35 kg (AL 24s)', indicator: 'patients_al_35kg' },
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
interface ClickCellProps {
|
|
45
|
+
value?: number | string | null;
|
|
46
|
+
indicator?: string;
|
|
47
|
+
label: string;
|
|
48
|
+
onOpen: (indicator: string, label: string) => void;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const ClickCell: React.FC<ClickCellProps> = ({ value, indicator, label, onOpen }) => {
|
|
52
|
+
if (!indicator) {
|
|
53
|
+
return <td></td>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<td className={styles.clickable} onClick={() => onOpen(indicator, label)}>
|
|
58
|
+
{value ?? 0}
|
|
59
|
+
</td>
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const Moh645Component: React.FC = () => {
|
|
64
|
+
const [moh645Data, setMoh645Data] = useState<Record<string, any>>({});
|
|
65
|
+
const isReportGenerated = hasReportData(moh645Data);
|
|
66
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
67
|
+
const [startDate, setStartDate] = useState('');
|
|
68
|
+
const [endDate, setEndDate] = useState('');
|
|
69
|
+
|
|
70
|
+
const session = useSession();
|
|
71
|
+
const locationUuids = session?.sessionLocation?.uuid;
|
|
72
|
+
const facility = session?.sessionLocation?.display ?? '';
|
|
73
|
+
const monthYear = startDate ? dayjs(startDate).format('MMMM YYYY') : '';
|
|
74
|
+
const compiledBy = session?.user?.person?.display ?? session?.user?.display ?? '';
|
|
75
|
+
const compiledOn = formatDate(new Date(), { mode: 'standard', time: false, noToday: true });
|
|
76
|
+
|
|
77
|
+
const navigate = useNavigate();
|
|
78
|
+
|
|
79
|
+
const fetchMoh645ReportData = async ({ startDate, endDate }: ReportPeriod) => {
|
|
80
|
+
setIsLoading(true);
|
|
81
|
+
setStartDate(startDate);
|
|
82
|
+
setEndDate(endDate);
|
|
83
|
+
|
|
84
|
+
try {
|
|
85
|
+
const data = await getMoh645({
|
|
86
|
+
locationUuids: locationUuids || '',
|
|
87
|
+
startDate,
|
|
88
|
+
endDate,
|
|
89
|
+
});
|
|
90
|
+
const rows = Array.isArray(data?.result) ? data.result : [];
|
|
91
|
+
setMoh645Data(Object.assign({}, ...rows));
|
|
92
|
+
} catch (error) {
|
|
93
|
+
showReportError('the MOH-645 report', error);
|
|
94
|
+
} finally {
|
|
95
|
+
setIsLoading(false);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
useRestorePeriod(fetchMoh645ReportData);
|
|
100
|
+
|
|
101
|
+
const openRegister = (indicator: string, label: string) => {
|
|
102
|
+
const params = new URLSearchParams({
|
|
103
|
+
startDate,
|
|
104
|
+
endDate,
|
|
105
|
+
locationUuids: locationUuids || '',
|
|
106
|
+
indicators: indicator,
|
|
107
|
+
label,
|
|
108
|
+
from: 'moh-645',
|
|
109
|
+
});
|
|
110
|
+
navigate(`/moh-645-register?${params.toString()}`);
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
return (
|
|
114
|
+
<>
|
|
115
|
+
<ReportFiltersComponent
|
|
116
|
+
reportName="MOH-645 Report"
|
|
117
|
+
mode="monthly"
|
|
118
|
+
onGenerate={fetchMoh645ReportData}
|
|
119
|
+
isLoading={isLoading}
|
|
120
|
+
isReportGenerated={isReportGenerated}
|
|
121
|
+
generatedPeriod={{ startDate, endDate }}
|
|
122
|
+
/>
|
|
123
|
+
{isLoading && <ReportSkeleton />}
|
|
124
|
+
{!isLoading && !isReportGenerated && <ReportPlaceholder reportName="MOH-645" />}
|
|
125
|
+
{!isLoading && isReportGenerated && (
|
|
126
|
+
<ReportPage>
|
|
127
|
+
<div className={styles.headerContainer}>
|
|
128
|
+
<div className={styles.mainTitleBox}>
|
|
129
|
+
<h2 className={styles.mainTitle}>Ministry of Health</h2>
|
|
130
|
+
<h3 className={styles.subTitle}>Malaria Commodities: Monthly Summary Form (MOH 645)</h3>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
|
|
134
|
+
<table className={styles.topMeta}>
|
|
135
|
+
<tbody>
|
|
136
|
+
<tr>
|
|
137
|
+
<td>
|
|
138
|
+
Name of the facility: <strong>{facility}</strong>
|
|
139
|
+
</td>
|
|
140
|
+
<td>
|
|
141
|
+
MFL code: <strong></strong>
|
|
142
|
+
</td>
|
|
143
|
+
<td>
|
|
144
|
+
County: <strong></strong>
|
|
145
|
+
</td>
|
|
146
|
+
<td>
|
|
147
|
+
Sub County: <strong></strong>
|
|
148
|
+
</td>
|
|
149
|
+
<td>
|
|
150
|
+
Month/Year: <strong>{monthYear}</strong>
|
|
151
|
+
</td>
|
|
152
|
+
</tr>
|
|
153
|
+
</tbody>
|
|
154
|
+
</table>
|
|
155
|
+
|
|
156
|
+
<table className={styles.table}>
|
|
157
|
+
<thead>
|
|
158
|
+
<tr>
|
|
159
|
+
<th className={styles.sectionHeader} colSpan={STOCK_COLUMNS.length + 1}>
|
|
160
|
+
Malaria commodities
|
|
161
|
+
</th>
|
|
162
|
+
</tr>
|
|
163
|
+
<tr>
|
|
164
|
+
<th>Commodity</th>
|
|
165
|
+
{STOCK_COLUMNS.map((column) => (
|
|
166
|
+
<th key={column.letter} className={styles.rotateUp}>
|
|
167
|
+
{column.letter}. {column.label}
|
|
168
|
+
</th>
|
|
169
|
+
))}
|
|
170
|
+
</tr>
|
|
171
|
+
</thead>
|
|
172
|
+
<tbody>
|
|
173
|
+
{COMMODITY_ROWS.map((row) => (
|
|
174
|
+
<tr key={row.label}>
|
|
175
|
+
<td>{row.label}</td>
|
|
176
|
+
{STOCK_COLUMNS.map((column) =>
|
|
177
|
+
column.letter === 'C' ? (
|
|
178
|
+
<ClickCell
|
|
179
|
+
key={column.letter}
|
|
180
|
+
value={row.indicator ? moh645Data[row.indicator] : null}
|
|
181
|
+
indicator={row.indicator}
|
|
182
|
+
label={`${row.label} — quantity dispensed`}
|
|
183
|
+
onOpen={openRegister}
|
|
184
|
+
/>
|
|
185
|
+
) : (
|
|
186
|
+
<td key={column.letter}></td>
|
|
187
|
+
),
|
|
188
|
+
)}
|
|
189
|
+
</tr>
|
|
190
|
+
))}
|
|
191
|
+
</tbody>
|
|
192
|
+
</table>
|
|
193
|
+
|
|
194
|
+
<table className={styles.table}>
|
|
195
|
+
<thead>
|
|
196
|
+
<tr>
|
|
197
|
+
<th className={styles.sectionHeader} colSpan={2}>
|
|
198
|
+
Patients treated with AL by weight band
|
|
199
|
+
</th>
|
|
200
|
+
</tr>
|
|
201
|
+
<tr>
|
|
202
|
+
<th>Weight band</th>
|
|
203
|
+
<th>Number of patients</th>
|
|
204
|
+
</tr>
|
|
205
|
+
</thead>
|
|
206
|
+
<tbody>
|
|
207
|
+
{WEIGHT_BAND_ROWS.map((row) => (
|
|
208
|
+
<tr key={row.indicator}>
|
|
209
|
+
<td>{row.label}</td>
|
|
210
|
+
<ClickCell
|
|
211
|
+
value={moh645Data[row.indicator]}
|
|
212
|
+
indicator={row.indicator}
|
|
213
|
+
label={row.label}
|
|
214
|
+
onOpen={openRegister}
|
|
215
|
+
/>
|
|
216
|
+
</tr>
|
|
217
|
+
))}
|
|
218
|
+
</tbody>
|
|
219
|
+
</table>
|
|
220
|
+
|
|
221
|
+
<table className={styles.table}>
|
|
222
|
+
<thead>
|
|
223
|
+
<tr>
|
|
224
|
+
<th className={styles.sectionHeader} colSpan={5}>
|
|
225
|
+
Malaria diagnostics
|
|
226
|
+
</th>
|
|
227
|
+
</tr>
|
|
228
|
+
<tr>
|
|
229
|
+
<th>Test</th>
|
|
230
|
+
<th>Positive</th>
|
|
231
|
+
<th>Negative</th>
|
|
232
|
+
<th>Invalid</th>
|
|
233
|
+
<th>Total tested</th>
|
|
234
|
+
</tr>
|
|
235
|
+
</thead>
|
|
236
|
+
<tbody>
|
|
237
|
+
<tr>
|
|
238
|
+
<td>Microscopy (blood smear)</td>
|
|
239
|
+
<ClickCell
|
|
240
|
+
value={moh645Data.microscopy_positive}
|
|
241
|
+
indicator="microscopy_positive"
|
|
242
|
+
label="Microscopy positive"
|
|
243
|
+
onOpen={openRegister}
|
|
244
|
+
/>
|
|
245
|
+
<ClickCell
|
|
246
|
+
value={moh645Data.microscopy_negative}
|
|
247
|
+
indicator="microscopy_negative"
|
|
248
|
+
label="Microscopy negative"
|
|
249
|
+
onOpen={openRegister}
|
|
250
|
+
/>
|
|
251
|
+
<td></td>
|
|
252
|
+
<ClickCell
|
|
253
|
+
value={moh645Data.microscopy_total_tested}
|
|
254
|
+
indicator="microscopy_total_tested"
|
|
255
|
+
label="Microscopy total tested"
|
|
256
|
+
onOpen={openRegister}
|
|
257
|
+
/>
|
|
258
|
+
</tr>
|
|
259
|
+
<tr>
|
|
260
|
+
<td>mRDT</td>
|
|
261
|
+
<ClickCell
|
|
262
|
+
value={moh645Data.rdt_positive}
|
|
263
|
+
indicator="rdt_positive"
|
|
264
|
+
label="mRDT positive"
|
|
265
|
+
onOpen={openRegister}
|
|
266
|
+
/>
|
|
267
|
+
<ClickCell
|
|
268
|
+
value={moh645Data.rdt_negative}
|
|
269
|
+
indicator="rdt_negative"
|
|
270
|
+
label="mRDT negative"
|
|
271
|
+
onOpen={openRegister}
|
|
272
|
+
/>
|
|
273
|
+
<ClickCell
|
|
274
|
+
value={moh645Data.rdt_invalid}
|
|
275
|
+
indicator="rdt_invalid"
|
|
276
|
+
label="mRDT invalid"
|
|
277
|
+
onOpen={openRegister}
|
|
278
|
+
/>
|
|
279
|
+
<ClickCell
|
|
280
|
+
value={moh645Data.rdt_total_tested}
|
|
281
|
+
indicator="rdt_total_tested"
|
|
282
|
+
label="mRDT total tested"
|
|
283
|
+
onOpen={openRegister}
|
|
284
|
+
/>
|
|
285
|
+
</tr>
|
|
286
|
+
<tr>
|
|
287
|
+
<td>Total</td>
|
|
288
|
+
<ClickCell
|
|
289
|
+
value={moh645Data.diagnostics_total_positive}
|
|
290
|
+
indicator="diagnostics_total_positive"
|
|
291
|
+
label="Diagnostics total positive"
|
|
292
|
+
onOpen={openRegister}
|
|
293
|
+
/>
|
|
294
|
+
<ClickCell
|
|
295
|
+
value={moh645Data.diagnostics_total_negative}
|
|
296
|
+
indicator="diagnostics_total_negative"
|
|
297
|
+
label="Diagnostics total negative"
|
|
298
|
+
onOpen={openRegister}
|
|
299
|
+
/>
|
|
300
|
+
<td></td>
|
|
301
|
+
<ClickCell
|
|
302
|
+
value={moh645Data.diagnostics_total_tested}
|
|
303
|
+
indicator="diagnostics_total_tested"
|
|
304
|
+
label="Diagnostics total tested"
|
|
305
|
+
onOpen={openRegister}
|
|
306
|
+
/>
|
|
307
|
+
</tr>
|
|
308
|
+
</tbody>
|
|
309
|
+
</table>
|
|
310
|
+
|
|
311
|
+
<div className={styles.signOff}>
|
|
312
|
+
<span>
|
|
313
|
+
Compiled by: Name <span className={styles.line}>{compiledBy}</span>
|
|
314
|
+
</span>
|
|
315
|
+
<span>
|
|
316
|
+
Signature <span className={styles.line}></span>
|
|
317
|
+
</span>
|
|
318
|
+
<span>
|
|
319
|
+
Phone no <span className={styles.shortLine}></span>
|
|
320
|
+
</span>
|
|
321
|
+
<span>
|
|
322
|
+
Date <span className={styles.shortLine}>{compiledOn}</span>
|
|
323
|
+
</span>
|
|
324
|
+
</div>
|
|
325
|
+
</ReportPage>
|
|
326
|
+
)}
|
|
327
|
+
</>
|
|
328
|
+
);
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
export default Moh645Component;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/* MOH-645 laid out for A4, matching MOH-745 and MOH-740: geometry in
|
|
2
|
+
millimetres, type in points, one rule weight. */
|
|
3
|
+
|
|
4
|
+
$ink: #000;
|
|
5
|
+
$bar: #d9d9d9;
|
|
6
|
+
$rule: 1px solid $ink;
|
|
7
|
+
|
|
8
|
+
$text: 7pt;
|
|
9
|
+
$title: 7.5pt;
|
|
10
|
+
$sub: 7.5pt;
|
|
11
|
+
$meta: 6.5pt;
|
|
12
|
+
|
|
13
|
+
.headerContainer {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: flex-start;
|
|
16
|
+
width: 100%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.mainTitleBox {
|
|
20
|
+
width: 100%;
|
|
21
|
+
padding: 3mm;
|
|
22
|
+
text-align: center;
|
|
23
|
+
border: $rule;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.mainTitle {
|
|
27
|
+
margin: 0;
|
|
28
|
+
font-size: $title;
|
|
29
|
+
font-weight: 700;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.subTitle {
|
|
33
|
+
margin: 1mm 0 0;
|
|
34
|
+
font-size: $sub;
|
|
35
|
+
font-weight: 700;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.topMeta {
|
|
39
|
+
width: 100%;
|
|
40
|
+
table-layout: fixed;
|
|
41
|
+
border-collapse: collapse;
|
|
42
|
+
border: $rule;
|
|
43
|
+
border-top: none;
|
|
44
|
+
|
|
45
|
+
td {
|
|
46
|
+
width: 17%;
|
|
47
|
+
padding: 1.5mm;
|
|
48
|
+
font-size: $meta;
|
|
49
|
+
vertical-align: top;
|
|
50
|
+
word-break: break-word;
|
|
51
|
+
border: none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
td:first-child {
|
|
55
|
+
width: 32%;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.table {
|
|
60
|
+
width: 100%;
|
|
61
|
+
border-collapse: collapse;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.table th,
|
|
65
|
+
.table td {
|
|
66
|
+
padding: 1mm 1.5mm;
|
|
67
|
+
font-size: $text;
|
|
68
|
+
text-align: center;
|
|
69
|
+
border: $rule;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.table th {
|
|
73
|
+
font-weight: 700;
|
|
74
|
+
background-color: $bar;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.table td:first-child,
|
|
78
|
+
.table th:first-child {
|
|
79
|
+
text-align: left;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.sectionHeader {
|
|
83
|
+
font-weight: 700;
|
|
84
|
+
text-align: center;
|
|
85
|
+
text-transform: uppercase;
|
|
86
|
+
letter-spacing: 0.02em;
|
|
87
|
+
background-color: #ececec;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.table tbody tr:nth-of-type(odd) {
|
|
91
|
+
background-color: #fafafa;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.clickable {
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
font-weight: 600;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.clickable:hover {
|
|
100
|
+
background-color: #e8e8e8;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.rotateUp {
|
|
104
|
+
writing-mode: vertical-rl;
|
|
105
|
+
transform: rotate(180deg);
|
|
106
|
+
white-space: nowrap;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.signOff {
|
|
110
|
+
display: flex;
|
|
111
|
+
flex-wrap: nowrap;
|
|
112
|
+
align-items: baseline;
|
|
113
|
+
justify-content: space-between;
|
|
114
|
+
gap: 2.5mm;
|
|
115
|
+
padding: 3mm;
|
|
116
|
+
font-size: $meta;
|
|
117
|
+
white-space: nowrap;
|
|
118
|
+
border: $rule;
|
|
119
|
+
border-top: none;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.line,
|
|
123
|
+
.shortLine {
|
|
124
|
+
display: inline-block;
|
|
125
|
+
padding: 0 0.5mm;
|
|
126
|
+
margin-left: 1mm;
|
|
127
|
+
overflow: hidden;
|
|
128
|
+
font-weight: 600;
|
|
129
|
+
text-align: center;
|
|
130
|
+
text-overflow: ellipsis;
|
|
131
|
+
vertical-align: bottom;
|
|
132
|
+
border-bottom: $rule;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.line {
|
|
136
|
+
width: 36mm;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.shortLine {
|
|
140
|
+
width: 22mm;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@media print {
|
|
144
|
+
.table tbody tr:nth-of-type(odd) {
|
|
145
|
+
background-color: transparent;
|
|
146
|
+
}
|
|
147
|
+
}
|