@ampath/esm-reports-app 1.0.0-next.70 → 1.0.0-next.72
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/{919.css → 500.css} +1 -1
- package/dist/{919.css.map → 500.css.map} +1 -1
- package/dist/500.js +1 -0
- package/dist/500.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/registers/register-catalog.ts +17 -1
- package/src/reports/moh-710/registers/moh-510/moh-510.component.tsx +2 -4
- package/src/reports/moh-711/moh-711.component.tsx +12 -2
- package/src/reports/moh-711/registers/moh-510-register.component.tsx +1 -1
- package/src/reports/moh-711/registers/moh-512-columns.ts +94 -0
- package/src/reports/moh-711/registers/moh-512.component.tsx +141 -0
- package/src/reports/moh-711/registers/moh-512.scss +64 -0
- package/src/reports/moh-711/registers/tb-register-columns.ts +17 -0
- package/src/reports/moh-711/registers/tb-register.component.tsx +93 -0
- package/src/reports/moh-711/registers/tb-register.scss +64 -0
- package/src/reports/moh-711/sections/family-planning.component.tsx +158 -53
- package/src/reports/moh-711/sections/tb-screening.component.tsx +50 -13
- package/src/reports/moh-740/registers/moh-222-daily-register/moh-222-daily-register.tsx +1 -1
- package/src/reports/moh-740/registers/moh-270-permanent-register/moh-270-permanent-register.tsx +1 -1
- package/src/reports/moh-745/registers/moh-412-register.component.tsx +56 -6
- package/src/resources/moh-710.resource.ts +1 -1
- package/src/resources/moh-711.resource.ts +56 -5
- package/src/root.component.tsx +4 -0
- package/dist/919.js +0 -1
- package/dist/919.js.map +0 -1
|
@@ -112,12 +112,38 @@ export async function getMoh333PatientList(params: PatientListParams): Promise<P
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
export async function getMoh510PatientList(params: PatientListParams): Promise<PatientListPage> {
|
|
116
|
-
|
|
115
|
+
// export async function getMoh510PatientList(params: PatientListParams): Promise<PatientListPage> {
|
|
116
|
+
// const url = await buildEtlUrl('moh-510-patient-list', {
|
|
117
|
+
// locationUuids: params.locationUuids || '',
|
|
118
|
+
// startDate: params.startDate || '',
|
|
119
|
+
// endDate: params.endDate || '',
|
|
120
|
+
// indicator: Array.isArray(params.indicator) ? params.indicator.join(',') : params.indicator || '',
|
|
121
|
+
// ...pageParams(params),
|
|
122
|
+
// reportName: params.reportName || '',
|
|
123
|
+
// });
|
|
124
|
+
// try {
|
|
125
|
+
// const response = await openmrsFetch(url);
|
|
126
|
+
|
|
127
|
+
// if (!response.ok) {
|
|
128
|
+
// const errorText = await response.text();
|
|
129
|
+
// throw new Error(`Failed to fetch patient list: ${response.status} - ${errorText}`);
|
|
130
|
+
// }
|
|
131
|
+
|
|
132
|
+
// const data = await response.json();
|
|
133
|
+
|
|
134
|
+
// return toPatientListPage(data, params.startIndex ?? 0, params.limit ?? PAGE_SIZE);
|
|
135
|
+
// } catch (error: any) {
|
|
136
|
+
// throw new Error(`An error occurred while fetching the MOH-705 patient list: ${error.message}`);
|
|
137
|
+
// }
|
|
138
|
+
// }
|
|
139
|
+
|
|
140
|
+
export async function getMoh511PatientList(params: PatientListParams): Promise<PatientListPage> {
|
|
141
|
+
const url = await buildEtlUrl('moh-511-patient-list', {
|
|
117
142
|
locationUuids: params.locationUuids || '',
|
|
118
143
|
startDate: params.startDate || '',
|
|
119
144
|
endDate: params.endDate || '',
|
|
120
145
|
indicator: Array.isArray(params.indicator) ? params.indicator.join(',') : params.indicator || '',
|
|
146
|
+
reportName: params.reportName || '',
|
|
121
147
|
...pageParams(params),
|
|
122
148
|
});
|
|
123
149
|
try {
|
|
@@ -136,13 +162,13 @@ export async function getMoh510PatientList(params: PatientListParams): Promise<P
|
|
|
136
162
|
}
|
|
137
163
|
}
|
|
138
164
|
|
|
139
|
-
export async function
|
|
140
|
-
const url = await buildEtlUrl('
|
|
165
|
+
export async function getTBPatientList(params: PatientListParams): Promise<PatientListPage> {
|
|
166
|
+
const url = await buildEtlUrl('tb-patient-list', {
|
|
141
167
|
locationUuids: params.locationUuids || '',
|
|
142
168
|
startDate: params.startDate || '',
|
|
143
169
|
endDate: params.endDate || '',
|
|
144
170
|
indicator: Array.isArray(params.indicator) ? params.indicator.join(',') : params.indicator || '',
|
|
145
|
-
reportName: params.reportName || '',
|
|
171
|
+
reportName: params.reportName || 'moh711Report',
|
|
146
172
|
...pageParams(params),
|
|
147
173
|
});
|
|
148
174
|
try {
|
|
@@ -160,3 +186,28 @@ export async function getMoh511PatientList(params: PatientListParams): Promise<P
|
|
|
160
186
|
throw new Error(`An error occurred while fetching the MOH-705 patient list: ${error.message}`);
|
|
161
187
|
}
|
|
162
188
|
}
|
|
189
|
+
|
|
190
|
+
export async function getMoh512PatientList(params: PatientListParams): Promise<PatientListPage> {
|
|
191
|
+
const url = await buildEtlUrl('moh-512-patient-list', {
|
|
192
|
+
locationUuids: params.locationUuids || '',
|
|
193
|
+
startDate: params.startDate || '',
|
|
194
|
+
endDate: params.endDate || '',
|
|
195
|
+
indicator: Array.isArray(params.indicator) ? params.indicator.join(',') : params.indicator || '',
|
|
196
|
+
reportName: params.reportName || 'moh711Report',
|
|
197
|
+
...pageParams(params),
|
|
198
|
+
});
|
|
199
|
+
try {
|
|
200
|
+
const response = await openmrsFetch(url);
|
|
201
|
+
|
|
202
|
+
if (!response.ok) {
|
|
203
|
+
const errorText = await response.text();
|
|
204
|
+
throw new Error(`Failed to fetch patient list: ${response.status} - ${errorText}`);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
const data = await response.json();
|
|
208
|
+
|
|
209
|
+
return toPatientListPage(data, params.startIndex ?? 0, params.limit ?? PAGE_SIZE);
|
|
210
|
+
} catch (error: any) {
|
|
211
|
+
throw new Error(`An error occurred while fetching the MOH-512 patient list: ${error.message}`);
|
|
212
|
+
}
|
|
213
|
+
}
|
package/src/root.component.tsx
CHANGED
|
@@ -31,6 +31,8 @@ import styles from './root.scss';
|
|
|
31
31
|
import Moh510RegisterComponent from './reports/moh-710/registers/moh-510/moh-510.component';
|
|
32
32
|
import Moh222DailyRegister from './reports/moh-740/registers/moh-222-daily-register/moh-222-daily-register';
|
|
33
33
|
import Moh270DailyRegister from './reports/moh-740/registers/moh-270-permanent-register/moh-270-permanent-register';
|
|
34
|
+
import Moh512RegisterComponent from './reports/moh-711/registers/moh-512.component';
|
|
35
|
+
import TbRegisterComponent from './reports/moh-711/registers/tb-register.component';
|
|
34
36
|
|
|
35
37
|
const RootComponent: React.FC = () => {
|
|
36
38
|
const baseName = window.getOpenmrsSpaBase() + 'home/reports';
|
|
@@ -69,6 +71,8 @@ const RootComponent: React.FC = () => {
|
|
|
69
71
|
<Route path="/moh-270" element={<Moh270DailyRegister />} />
|
|
70
72
|
<Route path="/moh-240-register" element={<Moh240LabRegister />} />
|
|
71
73
|
<Route path="/tb-lab-register" element={<TbLabRegister />} />
|
|
74
|
+
<Route path="/moh-512-register" element={<Moh512RegisterComponent />} />
|
|
75
|
+
<Route path="/tb-register" element={<TbRegisterComponent />} />
|
|
72
76
|
</Routes>
|
|
73
77
|
</div>
|
|
74
78
|
</BrowserRouter>
|