@ampath/esm-reports-app 1.0.0-next.81 → 1.0.0-next.83
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/reports/moh-706/sub-reports/bacteriology/bacteriology.component.tsx +19 -17
- 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,125 @@
|
|
|
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 { getMoh645PatientList } from '../../../resources/moh-645.resource';
|
|
9
|
+
import { moh645ExportColumns } from './moh-645.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 countValue(...values: unknown[]): string {
|
|
20
|
+
for (const value of values) {
|
|
21
|
+
if (value !== undefined && value !== null && value !== '') {
|
|
22
|
+
const n = Number(value);
|
|
23
|
+
if (!Number.isNaN(n) && n !== 0) {
|
|
24
|
+
return String(n);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return '';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const Moh645Register: React.FC = () => {
|
|
32
|
+
const [searchParams] = useSearchParams();
|
|
33
|
+
|
|
34
|
+
const startDate = searchParams.get('startDate');
|
|
35
|
+
const endDate = searchParams.get('endDate');
|
|
36
|
+
const locationUuids = searchParams.get('locationUuids');
|
|
37
|
+
const indicators = searchParams.get('indicators');
|
|
38
|
+
|
|
39
|
+
const { rows: patientlist, total, isTotalExact, isLoading, page, pageSize, onPageChange, fetchAll } = usePatientList(
|
|
40
|
+
({ startIndex, limit }) =>
|
|
41
|
+
getMoh645PatientList({
|
|
42
|
+
startDate: startDate || '',
|
|
43
|
+
endDate: endDate || '',
|
|
44
|
+
locationUuids: locationUuids || '',
|
|
45
|
+
indicators: indicators || '',
|
|
46
|
+
startIndex,
|
|
47
|
+
limit,
|
|
48
|
+
}),
|
|
49
|
+
[startDate, endDate, locationUuids, indicators],
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<RegisterLayout
|
|
54
|
+
parentLabel="MOH-645 Report"
|
|
55
|
+
parentPath="/moh-645"
|
|
56
|
+
title="MOH 645 Malaria Commodities Register"
|
|
57
|
+
isLoading={isLoading}
|
|
58
|
+
isEmpty={patientlist.length === 0}
|
|
59
|
+
page={page}
|
|
60
|
+
pageSize={pageSize}
|
|
61
|
+
total={total}
|
|
62
|
+
isTotalExact={isTotalExact}
|
|
63
|
+
onPageChange={onPageChange}
|
|
64
|
+
fetchAll={fetchAll}
|
|
65
|
+
columns={moh645ExportColumns}
|
|
66
|
+
>
|
|
67
|
+
<div className={styles.tableContainer}>
|
|
68
|
+
<Table className={classNames(styles.table, styles.tableBordered, styles.tableStriped)}>
|
|
69
|
+
<TableHead>
|
|
70
|
+
<TableRow>
|
|
71
|
+
<TableHeader>No</TableHeader>
|
|
72
|
+
<TableHeader>Visit date</TableHeader>
|
|
73
|
+
<TableHeader>Facility</TableHeader>
|
|
74
|
+
<TableHeader>IP/OP</TableHeader>
|
|
75
|
+
<TableHeader>Patient name</TableHeader>
|
|
76
|
+
<TableHeader>Sex</TableHeader>
|
|
77
|
+
<TableHeader>Age</TableHeader>
|
|
78
|
+
<TableHeader>Identifier</TableHeader>
|
|
79
|
+
<TableHeader>Phone</TableHeader>
|
|
80
|
+
<TableHeader>Drug</TableHeader>
|
|
81
|
+
<TableHeader>Quantity</TableHeader>
|
|
82
|
+
<TableHeader>Microscopy POS</TableHeader>
|
|
83
|
+
<TableHeader>Microscopy NEG</TableHeader>
|
|
84
|
+
<TableHeader>mRDT POS</TableHeader>
|
|
85
|
+
<TableHeader>mRDT NEG</TableHeader>
|
|
86
|
+
<TableHeader>mRDT INV</TableHeader>
|
|
87
|
+
<TableHeader>No test</TableHeader>
|
|
88
|
+
</TableRow>
|
|
89
|
+
</TableHead>
|
|
90
|
+
<TableBody>
|
|
91
|
+
{patientlist.map((patient, index) => (
|
|
92
|
+
<TableRow key={patient.patient_uuid ?? patient.person_id ?? index}>
|
|
93
|
+
<TableCell>{(page - 1) * pageSize + index + 1}</TableCell>
|
|
94
|
+
<TableCell>{formatDateValue(patient.visit_date)}</TableCell>
|
|
95
|
+
<TableCell>{patient.facility ?? ''}</TableCell>
|
|
96
|
+
<TableCell>{patient.ip_op ?? ''}</TableCell>
|
|
97
|
+
<TableCell>
|
|
98
|
+
{patient.patient_uuid ? (
|
|
99
|
+
<Link href={`${window.spaBase}/patient/${patient.patient_uuid}/chart/`}>{patient.person_name}</Link>
|
|
100
|
+
) : (
|
|
101
|
+
patient.person_name
|
|
102
|
+
)}
|
|
103
|
+
</TableCell>
|
|
104
|
+
<TableCell>{patient.gender ?? ''}</TableCell>
|
|
105
|
+
<TableCell>{patient.age_years ?? ''}</TableCell>
|
|
106
|
+
<TableCell>{patient.amrs_universal_id ?? ''}</TableCell>
|
|
107
|
+
<TableCell>{patient.phone_number ?? ''}</TableCell>
|
|
108
|
+
<TableCell>{patient.drug_name ?? ''}</TableCell>
|
|
109
|
+
<TableCell>{patient.quantity ?? ''}</TableCell>
|
|
110
|
+
<TableCell>{countValue(patient.microscopy_pos, patient.microscopy_positive)}</TableCell>
|
|
111
|
+
<TableCell>{countValue(patient.microscopy_neg, patient.microscopy_negative)}</TableCell>
|
|
112
|
+
<TableCell>{countValue(patient.mrdt_pos, patient.rdt_positive)}</TableCell>
|
|
113
|
+
<TableCell>{countValue(patient.mrdt_neg, patient.rdt_negative)}</TableCell>
|
|
114
|
+
<TableCell>{countValue(patient.mrdt_inv, patient.rdt_invalid)}</TableCell>
|
|
115
|
+
<TableCell>{countValue(patient.no_test_done)}</TableCell>
|
|
116
|
+
</TableRow>
|
|
117
|
+
))}
|
|
118
|
+
</TableBody>
|
|
119
|
+
</Table>
|
|
120
|
+
</div>
|
|
121
|
+
</RegisterLayout>
|
|
122
|
+
);
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export default Moh645Register;
|
|
@@ -0,0 +1,40 @@
|
|
|
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 countValue(...values: unknown[]): string {
|
|
12
|
+
for (const value of values) {
|
|
13
|
+
if (value !== undefined && value !== null && value !== '') {
|
|
14
|
+
const n = Number(value);
|
|
15
|
+
if (!Number.isNaN(n) && n !== 0) {
|
|
16
|
+
return String(n);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return '';
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const moh645ExportColumns: RegisterColumn[] = [
|
|
24
|
+
{ header: 'Visit date', value: (row) => formatDateValue(row.visit_date) },
|
|
25
|
+
{ header: 'Facility', value: (row) => row.facility ?? '' },
|
|
26
|
+
{ header: 'IP/OP', value: (row) => row.ip_op ?? '' },
|
|
27
|
+
{ header: 'Patient name', value: (row) => row.person_name ?? '' },
|
|
28
|
+
{ header: 'Sex', value: (row) => row.gender ?? '' },
|
|
29
|
+
{ header: 'Age (years)', value: (row) => row.age_years ?? '' },
|
|
30
|
+
{ header: 'Identifier', value: (row) => row.amrs_universal_id ?? '', text: true },
|
|
31
|
+
{ header: 'Phone', value: (row) => row.phone_number ?? '', text: true },
|
|
32
|
+
{ header: 'Drug', value: (row) => row.drug_name ?? '' },
|
|
33
|
+
{ header: 'Quantity', value: (row) => row.quantity ?? '' },
|
|
34
|
+
{ header: 'Microscopy POS', value: (row) => countValue(row.microscopy_pos, row.microscopy_positive) },
|
|
35
|
+
{ header: 'Microscopy NEG', value: (row) => countValue(row.microscopy_neg, row.microscopy_negative) },
|
|
36
|
+
{ header: 'mRDT POS', value: (row) => countValue(row.mrdt_pos, row.rdt_positive) },
|
|
37
|
+
{ header: 'mRDT NEG', value: (row) => countValue(row.mrdt_neg, row.rdt_negative) },
|
|
38
|
+
{ header: 'mRDT INV', value: (row) => countValue(row.mrdt_inv, row.rdt_invalid) },
|
|
39
|
+
{ header: 'No test done', value: (row) => countValue(row.no_test_done) },
|
|
40
|
+
];
|
|
@@ -49,15 +49,16 @@ const Bacteriology: React.FC<BacteriologyProps> = ({ data, locationUuids, startD
|
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
tableCells: [
|
|
52
|
-
getCell("", "Stool Isolates",
|
|
52
|
+
getCell("", "Stool Isolates", 2, 1, true),
|
|
53
|
+
getCell("", "Total Exam", 1, 1, true),
|
|
53
54
|
getCell("", "Number Positive", 1, 1, true),
|
|
54
55
|
]
|
|
55
56
|
},
|
|
56
|
-
{ tableCells: [getCell("", "5.11 Salmonella typhi",
|
|
57
|
-
{ tableCells: [getCell("", "5.12 Shigella - dysenteriae type1",
|
|
58
|
-
{ tableCells: [getCell("", "5.13 E. coli O157:H7",
|
|
59
|
-
{ tableCells: [getCell("", "5.14 V. cholerae O1",
|
|
60
|
-
{ tableCells: [getCell("", "5.15 V. cholerae O139",
|
|
57
|
+
{ tableCells: [getCell("", "5.11 Salmonella typhi", 2), getCell("total_salmonella"), getCell("positive_salmonella")] },
|
|
58
|
+
{ tableCells: [getCell("", "5.12 Shigella - dysenteriae type1", 2), getCell("total_bact_shigella_dysenteriae1"), getCell("positive_bact_shigella_dysenteriae1")] },
|
|
59
|
+
{ tableCells: [getCell("", "5.13 E. coli O157:H7", 2), getCell("total_bact_ecoli_o157"), getCell("positive_bact_ecoli_o157")] },
|
|
60
|
+
{ tableCells: [getCell("", "5.14 V. cholerae O1", 2), getCell("total_bact_v_cholerae_o1"), getCell("positive_bact_v_cholerae_o1")] },
|
|
61
|
+
{ tableCells: [getCell("", "5.15 V. cholerae O139", 2), getCell(), getCell()] },
|
|
61
62
|
|
|
62
63
|
{
|
|
63
64
|
tableCells: [getCell("", "Bacterial meningitis", 4, 1, true)]
|
|
@@ -81,19 +82,20 @@ const Bacteriology: React.FC<BacteriologyProps> = ({ data, locationUuids, startD
|
|
|
81
82
|
{
|
|
82
83
|
tableCells: [
|
|
83
84
|
getCell("", "Bacterial meningitis Serotypes", 1, 1, true),
|
|
84
|
-
getCell("", "
|
|
85
|
+
getCell("", "Total Exam", 1, 1, true),
|
|
86
|
+
getCell("", "Number Positive", 2, 1, true),
|
|
85
87
|
]
|
|
86
88
|
},
|
|
87
|
-
{ tableCells: [getCell("", "5.17 Neisseria meningitidis A"), getCell("positive_bact_men_a", "",
|
|
88
|
-
{ tableCells: [getCell("", "5.18 Neisseria meningitidis B"), getCell("positive_bact_men_b", "",
|
|
89
|
-
{ tableCells: [getCell("", "5.19 Neisseria meningitidis C"), getCell("positive_bact_men_c", "",
|
|
90
|
-
{ tableCells: [getCell("", "5.20 Neisseria meningitidis W135"), getCell("positive_bact_men_w135", "",
|
|
91
|
-
{ tableCells: [getCell("", "5.21 Neisseria meningitidis X"), getCell("", "",
|
|
92
|
-
{ tableCells: [getCell("", "5.22 Neisseria meningitidis Y"), getCell("positive_bact_men_y", "",
|
|
93
|
-
{ tableCells: [getCell("", "5.23 Neisseria meningitidis (indeterminate)"), getCell("positive_bact_men_indeterminate", "",
|
|
94
|
-
{ tableCells: [getCell("", "5.24 Streptococcus pneumoniae"), getCell("positive_bact_strep_pneumoniae", "",
|
|
95
|
-
{ tableCells: [getCell("", "5.25 Haemophilus influenzae (type b)"), getCell("positive_bact_h_influenzae_b", "",
|
|
96
|
-
{ tableCells: [getCell("", "5.26 Cryptococcal Meningitis"), getCell("", "",
|
|
89
|
+
{ tableCells: [getCell("", "5.17 Neisseria meningitidis A"), getCell("total_bact_men_a"), getCell("positive_bact_men_a", "", 2)] },
|
|
90
|
+
{ tableCells: [getCell("", "5.18 Neisseria meningitidis B"), getCell("total_bact_men_b"), getCell("positive_bact_men_b", "", 2)] },
|
|
91
|
+
{ tableCells: [getCell("", "5.19 Neisseria meningitidis C"), getCell("total_bact_men_c"), getCell("positive_bact_men_c", "", 2)] },
|
|
92
|
+
{ tableCells: [getCell("", "5.20 Neisseria meningitidis W135"), getCell("total_bact_men_w135"), getCell("positive_bact_men_w135", "", 2)] },
|
|
93
|
+
{ tableCells: [getCell("", "5.21 Neisseria meningitidis X"), getCell(), getCell("", "", 2)] },
|
|
94
|
+
{ tableCells: [getCell("", "5.22 Neisseria meningitidis Y"), getCell("total_bact_men_y"), getCell("positive_bact_men_y", "", 2)] },
|
|
95
|
+
{ tableCells: [getCell("", "5.23 Neisseria meningitidis (indeterminate)"), getCell("total_bact_men_indeterminate"), getCell("positive_bact_men_indeterminate", "", 2)] },
|
|
96
|
+
{ tableCells: [getCell("", "5.24 Streptococcus pneumoniae"), getCell("total_bact_strep_pneumoniae"), getCell("positive_bact_strep_pneumoniae", "", 2)] },
|
|
97
|
+
{ tableCells: [getCell("", "5.25 Haemophilus influenzae (type b)"), getCell("total_bact_h_influenzae_b"), getCell("positive_bact_h_influenzae_b", "", 2)] },
|
|
98
|
+
{ tableCells: [getCell("", "5.26 Cryptococcal Meningitis"), getCell("total_crag"), getCell("positive_crag", "", 2)] },
|
|
97
99
|
{
|
|
98
100
|
tableCells: [getCell("", "Bacterial Pathogens from other types of specimen", 4, 1, true)]
|
|
99
101
|
},
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { openmrsFetch } from '@openmrs/esm-framework';
|
|
2
|
+
import { buildEtlUrl } from '../utils/get-base-url';
|
|
3
|
+
import {
|
|
4
|
+
PAGE_SIZE,
|
|
5
|
+
pageParams,
|
|
6
|
+
toPatientListPage,
|
|
7
|
+
type PatientListPage,
|
|
8
|
+
type PatientListParams,
|
|
9
|
+
} from './patient-list-page';
|
|
10
|
+
|
|
11
|
+
interface Moh643Params {
|
|
12
|
+
locationUuids: string;
|
|
13
|
+
startDate?: string;
|
|
14
|
+
endDate?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const WITH_SESSION_COOKIE = { credentials: 'include' as RequestCredentials };
|
|
18
|
+
|
|
19
|
+
export async function getMoh643(params: Moh643Params): Promise<any> {
|
|
20
|
+
const url = await buildEtlUrl('moh-643-report', {
|
|
21
|
+
locationUuids: params.locationUuids || '',
|
|
22
|
+
startDate: params.startDate || '',
|
|
23
|
+
endDate: params.endDate || '',
|
|
24
|
+
});
|
|
25
|
+
try {
|
|
26
|
+
const response = await openmrsFetch(url, WITH_SESSION_COOKIE);
|
|
27
|
+
|
|
28
|
+
if (!response.ok) {
|
|
29
|
+
const errorText = await response.text();
|
|
30
|
+
throw new Error(`Failed to fetch MOH-643 report: ${response.status} - ${errorText}`);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return await response.json();
|
|
34
|
+
} catch (error: any) {
|
|
35
|
+
throw new Error(`An error occurred while fetching the MOH-643 report: ${error.message}`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export async function getMoh643PatientList(params: PatientListParams): Promise<PatientListPage> {
|
|
40
|
+
const url = await buildEtlUrl('moh-643-report/patient-list', {
|
|
41
|
+
locationUuids: params.locationUuids || '',
|
|
42
|
+
startDate: params.startDate || '',
|
|
43
|
+
endDate: params.endDate || '',
|
|
44
|
+
indicators: params.indicators || '',
|
|
45
|
+
...pageParams(params),
|
|
46
|
+
});
|
|
47
|
+
try {
|
|
48
|
+
const response = await openmrsFetch(url, WITH_SESSION_COOKIE);
|
|
49
|
+
|
|
50
|
+
if (!response.ok) {
|
|
51
|
+
const errorText = await response.text();
|
|
52
|
+
throw new Error(`Failed to fetch MOH-643 patient list: ${response.status} - ${errorText}`);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const data = await response.json();
|
|
56
|
+
|
|
57
|
+
return toPatientListPage(data, params.startIndex ?? 0, params.limit ?? PAGE_SIZE);
|
|
58
|
+
} catch (error: any) {
|
|
59
|
+
throw new Error(`An error occurred while fetching the MOH-643 patient list: ${error.message}`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { openmrsFetch } from '@openmrs/esm-framework';
|
|
2
|
+
import { buildEtlUrl } from '../utils/get-base-url';
|
|
3
|
+
import {
|
|
4
|
+
PAGE_SIZE,
|
|
5
|
+
pageParams,
|
|
6
|
+
toPatientListPage,
|
|
7
|
+
type PatientListPage,
|
|
8
|
+
type PatientListParams,
|
|
9
|
+
} from './patient-list-page';
|
|
10
|
+
|
|
11
|
+
interface Moh645Params {
|
|
12
|
+
locationUuids: string;
|
|
13
|
+
startDate?: string;
|
|
14
|
+
endDate?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const WITH_SESSION_COOKIE = { credentials: 'include' as RequestCredentials };
|
|
18
|
+
|
|
19
|
+
export async function getMoh645(params: Moh645Params): Promise<any> {
|
|
20
|
+
const url = await buildEtlUrl('moh-645-report', {
|
|
21
|
+
locationUuids: params.locationUuids || '',
|
|
22
|
+
startDate: params.startDate || '',
|
|
23
|
+
endDate: params.endDate || '',
|
|
24
|
+
});
|
|
25
|
+
try {
|
|
26
|
+
const response = await openmrsFetch(url, WITH_SESSION_COOKIE);
|
|
27
|
+
|
|
28
|
+
if (!response.ok) {
|
|
29
|
+
const errorText = await response.text();
|
|
30
|
+
throw new Error(`Failed to fetch MOH-645 report: ${response.status} - ${errorText}`);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return await response.json();
|
|
34
|
+
} catch (error: any) {
|
|
35
|
+
throw new Error(`An error occurred while fetching the MOH-645 report: ${error.message}`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export async function getMoh645PatientList(params: PatientListParams): Promise<PatientListPage> {
|
|
40
|
+
const url = await buildEtlUrl('moh-645-report/patient-list', {
|
|
41
|
+
locationUuids: params.locationUuids || '',
|
|
42
|
+
startDate: params.startDate || '',
|
|
43
|
+
endDate: params.endDate || '',
|
|
44
|
+
indicators: params.indicators || '',
|
|
45
|
+
...pageParams(params),
|
|
46
|
+
});
|
|
47
|
+
try {
|
|
48
|
+
const response = await openmrsFetch(url, WITH_SESSION_COOKIE);
|
|
49
|
+
|
|
50
|
+
if (!response.ok) {
|
|
51
|
+
const errorText = await response.text();
|
|
52
|
+
throw new Error(`Failed to fetch MOH-645 patient list: ${response.status} - ${errorText}`);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const data = await response.json();
|
|
56
|
+
|
|
57
|
+
return toPatientListPage(data, params.startIndex ?? 0, params.limit ?? PAGE_SIZE);
|
|
58
|
+
} catch (error: any) {
|
|
59
|
+
throw new Error(`An error occurred while fetching the MOH-645 patient list: ${error.message}`);
|
|
60
|
+
}
|
|
61
|
+
}
|
package/src/root.component.tsx
CHANGED
|
@@ -26,6 +26,10 @@ import AcfSummaryLinelist from './reports/acf-summary/acf-summary-linelist.compo
|
|
|
26
26
|
import Moh729bLinelist from './reports/moh-729b/moh-729b-linelist.component';
|
|
27
27
|
import Moh366Register from './reports/moh-731/registers/moh-366.component';
|
|
28
28
|
import PrepRegisterComponent from './reports/moh-731/registers/prep-register.component';
|
|
29
|
+
import Moh645Component from './reports/moh-645/moh-645.component';
|
|
30
|
+
import Moh645Register from './reports/moh-645/registers/moh-645-register.component';
|
|
31
|
+
import Moh643Component from './reports/moh-643/moh-643.component';
|
|
32
|
+
import Moh643Register from './reports/moh-643/registers/moh-643-register.component';
|
|
29
33
|
import Moh731Linelist from './reports/moh-731/linelist/moh-731-linelist.component';
|
|
30
34
|
import Moh362Register from './registers/moh-362/moh-362.component';
|
|
31
35
|
import Moh240LabRegister from './registers/moh-240/moh-240.component';
|
|
@@ -76,6 +80,10 @@ const RootComponent: React.FC = () => {
|
|
|
76
80
|
<Route path="/moh-731-linelist" element={<Moh731Linelist />} />
|
|
77
81
|
<Route path="/moh-366-register" element={<Moh366Register />} />
|
|
78
82
|
<Route path="/prep-register" element={<PrepRegisterComponent />} />
|
|
83
|
+
<Route path="/moh-645" element={<Moh645Component />} />
|
|
84
|
+
<Route path="/moh-645-register" element={<Moh645Register />} />
|
|
85
|
+
<Route path="/moh-643" element={<Moh643Component />} />
|
|
86
|
+
<Route path="/moh-643-register" element={<Moh643Register />} />
|
|
79
87
|
<Route path="/moh-510-register" element={<Moh510RegisterComponent />} />
|
|
80
88
|
<Route path="/moh-362" element={<Moh362Register />} />
|
|
81
89
|
<Route path="/moh-222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IA,6DAIA,+FCNA,sUCnDA,0DAQA,mHAQA,kLAQA,2HAQA,oEAMA,kKAOA,gGAIA,qFAIA,6DAIA","sources":["webpack://@ampath/esm-reports-app/./src/dashboard/reports-dashboard.module.scss","webpack://@ampath/esm-reports-app/./src/common/report-filters/report-filters.scss","webpack://@ampath/esm-reports-app/./src/common/report-placeholder/report-placeholder.scss","webpack://@ampath/esm-reports-app/./src/reports/moh-710/moh-710.scss","webpack://@ampath/esm-reports-app/./src/common/report-skeleton/report-skeleton.scss","webpack://@ampath/esm-reports-app/./src/common/report-page/report-page.scss","webpack://@ampath/esm-reports-app/./src/reports/moh-711/moh711.scss","webpack://@ampath/esm-reports-app/./src/reports/moh-717/moh717.scss","webpack://@ampath/esm-reports-app/./src/reports/table-wrapper/table-wrapper.scss","webpack://@ampath/esm-reports-app/./src/reports/moh-706/moh-706.scss","webpack://@ampath/esm-reports-app/./src/common/report-register/register-table.scss","webpack://@ampath/esm-reports-app/./src/reports/moh-240/moh-240.scss","webpack://@ampath/esm-reports-app/./src/common/report-register/register-layout.scss","webpack://@ampath/esm-reports-app/./src/reports/moh-505/moh-505.scss","webpack://@ampath/esm-reports-app/./src/reports/moh-705B/moh-705b.scss","webpack://@ampath/esm-reports-app/./src/reports/moh-705a/moh-705a.scss","webpack://@ampath/esm-reports-app/./src/reports/moh-745/moh-745.scss","webpack://@ampath/esm-reports-app/./src/reports/moh-740/moh-740.component.scss","webpack://@ampath/esm-reports-app/./src/reports/moh-740/shared/data-cell/data-cell.scss","webpack://@ampath/esm-reports-app/./src/reports/moh-740/registers/moh-270-permanent-register/moh-270-permanent-register.scss","webpack://@ampath/esm-reports-app/./src/reports/moh-740/registers/moh-222-daily-register/moh-222-daily-register.scss","webpack://@ampath/esm-reports-app/./src/reports/moh-731/moh-731.scss","webpack://@ampath/esm-reports-app/./src/reports/moh-731/summary/moh-731-summary.scss","webpack://@ampath/esm-reports-app/./src/reports/moh-729b/moh-729b.scss","webpack://@ampath/esm-reports-app/./src/reports/acf-summary/acf-summary.scss","webpack://@ampath/esm-reports-app/./src/common/linelist-table/linelist-table.scss","webpack://@ampath/esm-reports-app/./src/registers/moh-362/moh-362-lab-register.scss","webpack://@ampath/esm-reports-app/./src/registers/moh-362/moh-362-linkage-register.scss","webpack://@ampath/esm-reports-app/./src/registers/moh-362/moh-362.scss","webpack://@ampath/esm-reports-app/./src/registers/moh-240/moh-240-register.scss","webpack://@ampath/esm-reports-app/./src/registers/tb-lab-register/tb-lab-register-table.scss","webpack://@ampath/esm-reports-app/./src/registers/moh-267/moh-267-register.scss","webpack://@ampath/esm-reports-app/./src/registers/presumptive-tb/presumptive-tb-register.scss","webpack://@ampath/esm-reports-app/./src/registers/tb4/tb4-register.scss","webpack://@ampath/esm-reports-app/./src/root.scss","webpack://@ampath/esm-reports-app/./src/reports/moh-710/registers/moh-510/moh-510.scss","webpack://@ampath/esm-reports-app/./src/reports/moh-711/registers/moh-512.scss","webpack://@ampath/esm-reports-app/./src/reports/moh-711/registers/tb-register.scss","webpack://@ampath/esm-reports-app/./src/reports/moh-710/registers/moh-413/moh-413.scss","webpack://@ampath/esm-reports-app/./node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://@ampath/esm-reports-app/./src/reports/moh-711/registers/moh-407.scss"],"names":[],"sourceRoot":""}
|