@ampath/esm-reports-app 1.0.0-next.103 → 1.0.0-next.105
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/329.css +1 -1
- package/dist/329.css.map +1 -1
- package/dist/329.js +1 -1
- package/dist/329.js.map +1 -1
- package/dist/600.js +1 -1
- package/dist/600.js.map +1 -1
- package/dist/ampath-esm-reports-app.js +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/dashboard/report-catalog.ts +46 -1
- package/src/dashboard/reports-dasboard.tsx +116 -52
- package/src/dashboard/reports-dashboard.module.scss +297 -141
- package/src/registers/register-catalog.ts +9 -0
- package/src/reports/moh-710/registers/moh-510/moh-510.component.tsx +1 -1
- package/src/reports/moh-710/registers/moh-511/moh-511-register.component.tsx +2 -2
- package/src/reports/moh-711/registers/moh-333-register.component.tsx +1 -1
- package/src/reports/moh-711/registers/moh-405-register.component.tsx +1 -1
- package/src/reports/moh-711/registers/moh-406-register.component.tsx +1 -1
- package/src/reports/moh-711/registers/moh-407-register.component.tsx +1 -1
- package/src/reports/moh-711/registers/moh-512.component.tsx +1 -1
- package/src/reports/moh-711/registers/tb-register.component.tsx +1 -1
- package/src/resources/moh-710.resource.ts +9 -3
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { openmrsFetch } from '@openmrs/esm-framework';
|
|
2
2
|
import { buildEtlUrl } from '../utils/get-base-url';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
PAGE_SIZE,
|
|
5
|
+
toPatientListPage,
|
|
6
|
+
pageParams,
|
|
7
|
+
type PatientListPage,
|
|
8
|
+
type PatientListParams,
|
|
9
|
+
} from './patient-list-page';
|
|
4
10
|
|
|
5
11
|
interface Moh710Params {
|
|
6
12
|
locationUuids: string;
|
|
@@ -84,7 +90,7 @@ export async function getMoh413PatientList(params: PatientListParams): Promise<a
|
|
|
84
90
|
}
|
|
85
91
|
}
|
|
86
92
|
|
|
87
|
-
export async function getMoh511Register(params: PatientListParams): Promise<
|
|
93
|
+
export async function getMoh511Register(params: PatientListParams): Promise<PatientListPage> {
|
|
88
94
|
const url = await buildEtlUrl('moh-511-register', {
|
|
89
95
|
locationUuids: params.locationUuids || '',
|
|
90
96
|
startDate: params.startDate || '',
|
|
@@ -104,7 +110,7 @@ export async function getMoh511Register(params: PatientListParams): Promise<any>
|
|
|
104
110
|
}
|
|
105
111
|
|
|
106
112
|
const data = await response.json();
|
|
107
|
-
return data;
|
|
113
|
+
return toPatientListPage(data?.data, params.startIndex ?? 0, params.limit ?? PAGE_SIZE);
|
|
108
114
|
} catch (error: any) {
|
|
109
115
|
throw new Error(`An error occurred while fetching the MOH-511 Register: ${error.message}`);
|
|
110
116
|
}
|