@ampath/esm-reports-app 1.0.0-next.39 → 1.0.0-next.40
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/110.js +1 -1
- package/dist/110.js.map +1 -1
- package/dist/ampath-esm-reports-app.js.buildmanifest.json +3 -3
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/reports/moh-710/moh-710.component.tsx +162 -59
- package/src/reports/moh-711/registers/moh-333-register.component.tsx +7 -4
- package/src/reports/moh-711/registers/moh-405-register.component.tsx +5 -2
- package/src/reports/moh-711/registers/moh-406-register.component.tsx +5 -2
- package/src/reports/moh-711/registers/moh-511-register.component.tsx +16 -8
- package/src/reports/moh-711/registers/type.ts +2 -1
- package/src/reports/moh-711/sections/anc.component.tsx +8 -2
- package/src/reports/moh-711/sections/maternity.component.tsx +8 -1
- package/src/reports/moh-711/sections/pnc.component.tsx +8 -1
- package/src/reports/moh-717/sections/maternity.component.tsx +9 -2
- package/src/reports/moh-717/sections/outpatient.component.tsx +52 -10
- package/src/resources/moh-711.resource.ts +5 -0
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"initial": false,
|
|
71
71
|
"entry": false,
|
|
72
72
|
"recorded": false,
|
|
73
|
-
"size":
|
|
73
|
+
"size": 1236019,
|
|
74
74
|
"sizes": {
|
|
75
|
-
"javascript":
|
|
75
|
+
"javascript": 1236019
|
|
76
76
|
},
|
|
77
77
|
"names": [],
|
|
78
78
|
"idHints": [],
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"auxiliaryFiles": [
|
|
87
87
|
"110.js.map"
|
|
88
88
|
],
|
|
89
|
-
"hash": "
|
|
89
|
+
"hash": "0d0d426b5375a264",
|
|
90
90
|
"childrenByOrder": {}
|
|
91
91
|
},
|
|
92
92
|
{
|
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":">=2.2.0"},"extensions":[{"name":"ampath-reports-dashboard-link","component":"reportsDashboardLink","slot":"homepage-dashboard-slot","privileges":["O3 View Reports Dashboard"],"meta":{"name":"reports","slot":"ampath-reports-dashboard-slot","title":"Reports"},"online":true,"offline":true},{"component":"root","name":"ampath-reports-dashboard-root","slot":"ampath-reports-dashboard-slot","privileges":["O3 View Reports Dashboard"]}],"pages":[],"version":"1.0.0-next.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":">=2.2.0"},"extensions":[{"name":"ampath-reports-dashboard-link","component":"reportsDashboardLink","slot":"homepage-dashboard-slot","privileges":["O3 View Reports Dashboard"],"meta":{"name":"reports","slot":"ampath-reports-dashboard-slot","title":"Reports"},"online":true,"offline":true},{"component":"root","name":"ampath-reports-dashboard-root","slot":"ampath-reports-dashboard-slot","privileges":["O3 View Reports Dashboard"]}],"pages":[],"version":"1.0.0-next.40"}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { useNavigate } from 'react-router-dom';
|
|
2
|
+
import { useLocation, useNavigate } from 'react-router-dom';
|
|
3
3
|
import ReportFiltersComponent from '../../common/report-filters/report-filters.component';
|
|
4
4
|
|
|
5
5
|
import styles from './moh-710.scss';
|
|
@@ -39,6 +39,7 @@ const Moh710Report: React.FC = () => {
|
|
|
39
39
|
|
|
40
40
|
const session = useSession();
|
|
41
41
|
const locationUuids = session?.sessionLocation?.uuid;
|
|
42
|
+
const location = useLocation();
|
|
42
43
|
|
|
43
44
|
const getReportParams = (filters: ReportFilters) => {
|
|
44
45
|
let { startDate: sDate, endDate: eDate } = filters;
|
|
@@ -90,7 +91,13 @@ const Moh710Report: React.FC = () => {
|
|
|
90
91
|
|
|
91
92
|
const navigateToRegister = (indicator: string) => {
|
|
92
93
|
navigate(
|
|
93
|
-
`/moh-
|
|
94
|
+
`/moh-511-register?startDate=${startDate}&endDate=${endDate}&locationUuids=${locationUuids}&indicator=${indicator}`,
|
|
95
|
+
{
|
|
96
|
+
state: {
|
|
97
|
+
from: location.pathname,
|
|
98
|
+
reportName: 'moh710Report',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
94
101
|
);
|
|
95
102
|
};
|
|
96
103
|
return (
|
|
@@ -133,103 +140,183 @@ const Moh710Report: React.FC = () => {
|
|
|
133
140
|
<tbody>
|
|
134
141
|
<tr>
|
|
135
142
|
<td>BCG doses Administered</td>
|
|
136
|
-
<td onClick={() =>
|
|
137
|
-
|
|
143
|
+
<td onClick={() => navigateToRegister('bcg_vaccine_age_less_than_1yr')}>
|
|
144
|
+
{moh710Data.bcg_vaccine_age_less_than_1yr}
|
|
145
|
+
</td>
|
|
146
|
+
<td onClick={() => navigateToRegister('bcg_vaccine_age_greater_than_1yr')}>
|
|
147
|
+
{moh710Data.bcg_vaccine_age_greater_than_1yr}
|
|
148
|
+
</td>
|
|
138
149
|
</tr>
|
|
139
150
|
<tr>
|
|
140
151
|
<td>OPV Birth doses Administered</td>
|
|
141
|
-
<td
|
|
142
|
-
|
|
152
|
+
<td onClick={() => navigateToRegister('opv_vaccine_age_less_than_1yr')}>
|
|
153
|
+
{moh710Data.opv_vaccine_age_less_than_1yr}
|
|
154
|
+
</td>
|
|
155
|
+
<td onClick={() => navigateToRegister('opv_vaccine_age_greater_than_1yr')}>
|
|
156
|
+
{moh710Data.opv_vaccine_age_greater_than_1yr}
|
|
157
|
+
</td>
|
|
143
158
|
</tr>
|
|
144
159
|
<tr>
|
|
145
160
|
<td>OPV1 doses Administered</td>
|
|
146
|
-
<td
|
|
147
|
-
|
|
161
|
+
<td onClick={() => navigateToRegister('opv1_vaccine_age_less_than_1yr')}>
|
|
162
|
+
{moh710Data.opv1_vaccine_age_less_than_1yr}
|
|
163
|
+
</td>
|
|
164
|
+
<td onClick={() => navigateToRegister('opv1_vaccine_age_greater_than_1yr')}>
|
|
165
|
+
{moh710Data.opv1_vaccine_age_greater_than_1yr}
|
|
166
|
+
</td>
|
|
148
167
|
</tr>
|
|
149
168
|
<tr>
|
|
150
169
|
<td>OPV2 doses Administered</td>
|
|
151
|
-
<td
|
|
152
|
-
|
|
170
|
+
<td onClick={() => navigateToRegister('opv2_vaccine_age_less_than_1yr')}>
|
|
171
|
+
{moh710Data.opv2_vaccine_age_less_than_1yr}
|
|
172
|
+
</td>
|
|
173
|
+
<td onClick={() => navigateToRegister('opv2_vaccine_age_greater_than_1yr')}>
|
|
174
|
+
{moh710Data.opv2_vaccine_age_greater_than_1yr}
|
|
175
|
+
</td>
|
|
153
176
|
</tr>
|
|
154
177
|
<tr>
|
|
155
178
|
<td>OPV3 doses Administered</td>
|
|
156
|
-
<td
|
|
157
|
-
|
|
179
|
+
<td onClick={() => navigateToRegister('opv3_vaccine_age_less_than_1yr')}>
|
|
180
|
+
{moh710Data.opv3_vaccine_age_less_than_1yr}
|
|
181
|
+
</td>
|
|
182
|
+
<td onClick={() => navigateToRegister('opv3_vaccine_age_greater_than_1yr')}>
|
|
183
|
+
{moh710Data.opv3_vaccine_age_greater_than_1yr}
|
|
184
|
+
</td>
|
|
158
185
|
</tr>
|
|
159
186
|
<tr>
|
|
160
187
|
<td>IPV 1 doses Administered</td>
|
|
161
|
-
<td
|
|
162
|
-
|
|
188
|
+
<td onClick={() => navigateToRegister('ipv1_vaccine_age_less_than_1yr')}>
|
|
189
|
+
{moh710Data.ipv1_vaccine_age_less_than_1yr}
|
|
190
|
+
</td>
|
|
191
|
+
<td onClick={() => navigateToRegister('ipv1_vaccine_age_greater_than_1yr')}>
|
|
192
|
+
{moh710Data.ipv1_vaccine_age_greater_than_1yr}
|
|
193
|
+
</td>
|
|
163
194
|
</tr>
|
|
164
195
|
<tr>
|
|
165
196
|
<td>IPV 2 doses Administered</td>
|
|
166
|
-
<td
|
|
167
|
-
|
|
197
|
+
<td onClick={() => navigateToRegister('ipv2_vaccine_age_less_than_1yr')}>
|
|
198
|
+
{moh710Data.ipv2_vaccine_age_less_than_1yr}
|
|
199
|
+
</td>
|
|
200
|
+
<td onClick={() => navigateToRegister('ipv2_vaccine_age_greater_than_1yr')}>
|
|
201
|
+
{moh710Data.ipv2_vaccine_age_greater_than_1yr}
|
|
202
|
+
</td>
|
|
168
203
|
</tr>
|
|
169
204
|
<tr>
|
|
170
205
|
<td>DPT/Hep+HiB 1 doses Administered</td>
|
|
171
|
-
<td
|
|
172
|
-
|
|
206
|
+
<td onClick={() => navigateToRegister('dpt_hep_vaccine1_age_less_than_1yr')}>
|
|
207
|
+
{moh710Data.dpt_hep_vaccine1_age_less_than_1yr}
|
|
208
|
+
</td>
|
|
209
|
+
<td onClick={() => navigateToRegister('dpt_hep_vaccine1_age_greater_than_1yr')}>
|
|
210
|
+
{moh710Data.dpt_hep_vaccine1_age_greater_than_1yr}
|
|
211
|
+
</td>
|
|
173
212
|
</tr>
|
|
174
213
|
<tr>
|
|
175
214
|
<td>DPT/Hep+HiB2 doses Administered</td>
|
|
176
|
-
<td
|
|
177
|
-
|
|
215
|
+
<td onClick={() => navigateToRegister('dpt_hep_vaccine2_age_less_than_1yr')}>
|
|
216
|
+
{moh710Data.dpt_hep_vaccine2_age_less_than_1yr}
|
|
217
|
+
</td>
|
|
218
|
+
<td onClick={() => navigateToRegister('dpt_hep_vaccine2_age_greater_than_1yr')}>
|
|
219
|
+
{moh710Data.dpt_hep_vaccine2_age_greater_than_1yr}
|
|
220
|
+
</td>
|
|
178
221
|
</tr>
|
|
179
222
|
<tr>
|
|
180
223
|
<td>DPT/Hep+HiB3 doses Administered</td>
|
|
181
|
-
<td
|
|
182
|
-
|
|
224
|
+
<td onClick={() => navigateToRegister('dpt_hep_vaccine3_age_less_than_1yr')}>
|
|
225
|
+
{moh710Data.dpt_hep_vaccine3_age_less_than_1yr}
|
|
226
|
+
</td>
|
|
227
|
+
<td onClick={() => navigateToRegister('dpt_hep_vaccine3_age_greater_than_1yr')}>
|
|
228
|
+
{moh710Data.dpt_hep_vaccine3_age_greater_than_1yr}
|
|
229
|
+
</td>
|
|
183
230
|
</tr>
|
|
184
231
|
<tr>
|
|
185
232
|
<td>Pneumococal 1 doses Administered</td>
|
|
186
|
-
<td
|
|
187
|
-
|
|
233
|
+
<td onClick={() => navigateToRegister('pneumococal_vaccine1_age_less_than_1yr')}>
|
|
234
|
+
{moh710Data.pneumococal_vaccine1_age_less_than_1yr}
|
|
235
|
+
</td>
|
|
236
|
+
<td onClick={() => navigateToRegister('pneumococal_vaccine1_age_greater_than_1yr')}>
|
|
237
|
+
{moh710Data.pneumococal_vaccine1_age_greater_than_1yr}
|
|
238
|
+
</td>
|
|
188
239
|
</tr>
|
|
189
240
|
<tr>
|
|
190
241
|
<td>Pneumococal 2 doses Administered</td>
|
|
191
|
-
<td
|
|
192
|
-
|
|
242
|
+
<td onClick={() => navigateToRegister('pneumococal_vaccine2_age_less_than_1yr')}>
|
|
243
|
+
{moh710Data.pneumococal_vaccine2_age_less_than_1yr}
|
|
244
|
+
</td>
|
|
245
|
+
<td onClick={() => navigateToRegister('pneumococal_vaccine2_age_greater_than_1yr')}>
|
|
246
|
+
{moh710Data.pneumococal_vaccine2_age_greater_than_1yr}
|
|
247
|
+
</td>
|
|
193
248
|
</tr>
|
|
194
249
|
<tr>
|
|
195
250
|
<td>Pneumococal 3 doses Administered</td>
|
|
196
|
-
<td
|
|
197
|
-
|
|
251
|
+
<td onClick={() => navigateToRegister('pneumococal_vaccine3_age_less_than_1yr')}>
|
|
252
|
+
{moh710Data.pneumococal_vaccine3_age_less_than_1yr}
|
|
253
|
+
</td>
|
|
254
|
+
<td onClick={() => navigateToRegister('pneumococal_vaccine3_age_greater_than_1yr')}>
|
|
255
|
+
{moh710Data.pneumococal_vaccine3_age_greater_than_1yr}
|
|
256
|
+
</td>
|
|
198
257
|
</tr>
|
|
199
258
|
<tr>
|
|
200
259
|
<td>Rotavirus 1 doses Administered</td>
|
|
201
|
-
<td
|
|
202
|
-
|
|
260
|
+
<td onClick={() => navigateToRegister('rotavirus_vaccine1_age_less_than_1yr')}>
|
|
261
|
+
{moh710Data.rotavirus_vaccine1_age_less_than_1yr}
|
|
262
|
+
</td>
|
|
263
|
+
<td onClick={() => navigateToRegister('rotavirus_vaccine1_age_greater_than_1yr')}>
|
|
264
|
+
{moh710Data.rotavirus_vaccine1_age_greater_than_1yr}
|
|
265
|
+
</td>
|
|
203
266
|
</tr>
|
|
204
267
|
<tr>
|
|
205
268
|
<td>Rotavirus 2 doses Administered</td>
|
|
206
|
-
<td
|
|
207
|
-
|
|
269
|
+
<td onClick={() => navigateToRegister('rotavirus_vaccine2_age_less_than_1yr')}>
|
|
270
|
+
{moh710Data.rotavirus_vaccine2_age_less_than_1yr}
|
|
271
|
+
</td>
|
|
272
|
+
<td onClick={() => navigateToRegister('rotavirus_vaccine2_age_greater_than_1yr')}>
|
|
273
|
+
{moh710Data.rotavirus_vaccine2_age_greater_than_1yr}
|
|
274
|
+
</td>
|
|
208
275
|
</tr>
|
|
209
276
|
<tr>
|
|
210
277
|
<td>Rotavirus 3 doses Administered</td>
|
|
211
|
-
<td
|
|
212
|
-
|
|
278
|
+
<td onClick={() => navigateToRegister('rotavirus_vaccine3_age_less_than_1yr')}>
|
|
279
|
+
{moh710Data.rotavirus_vaccine3_age_less_than_1yr}
|
|
280
|
+
</td>
|
|
281
|
+
<td onClick={() => navigateToRegister('rotavirus_vaccine3_age_greater_than_1yr')}>
|
|
282
|
+
{moh710Data.rotavirus_vaccine3_age_greater_than_1yr}
|
|
283
|
+
</td>
|
|
213
284
|
</tr>
|
|
214
285
|
<tr>
|
|
215
286
|
<td>Vitamin A at 6 - 11 months(100, 000 IU)</td>
|
|
216
|
-
<td
|
|
217
|
-
|
|
287
|
+
<td onClick={() => navigateToRegister('vitaminA_vaccine_age_less_than_1yr')}>
|
|
288
|
+
{moh710Data.vitaminA_vaccine_age_less_than_1yr}
|
|
289
|
+
</td>
|
|
290
|
+
<td onClick={() => navigateToRegister('vitaminA_vaccine_age_greater_than_1yr')}>
|
|
291
|
+
{moh710Data.vitaminA_vaccine_age_greater_than_1yr}
|
|
292
|
+
</td>
|
|
218
293
|
</tr>
|
|
219
294
|
<tr>
|
|
220
295
|
<td>Yellow fever doses Administered</td>
|
|
221
|
-
<td
|
|
222
|
-
|
|
296
|
+
<td onClick={() => navigateToRegister('yellow_fever_vaccine_age_greater_than_1yr')}>
|
|
297
|
+
{moh710Data.yellow_fever_vaccine_age_greater_than_1yr}
|
|
298
|
+
</td>
|
|
299
|
+
<td onClick={() => navigateToRegister('yellow_fever_vaccine_age_less_than_1yr')}>
|
|
300
|
+
{moh710Data.yellow_fever_vaccine_age_less_than_1yr}
|
|
301
|
+
</td>
|
|
223
302
|
</tr>
|
|
224
303
|
<tr>
|
|
225
304
|
<td>Measles-Rubella 1 doses Administered</td>
|
|
226
|
-
<td
|
|
227
|
-
|
|
305
|
+
<td onClick={() => navigateToRegister('measles_vaccine_age_greater_than_1yr')}>
|
|
306
|
+
{moh710Data.measles_vaccine_age_greater_than_1yr}
|
|
307
|
+
</td>
|
|
308
|
+
<td onClick={() => navigateToRegister('measles_vaccine_age_less_than_1yr')}>
|
|
309
|
+
{moh710Data.measles_vaccine_age_less_than_1yr}
|
|
310
|
+
</td>
|
|
228
311
|
</tr>
|
|
229
312
|
<tr>
|
|
230
313
|
<td>Typhoid Conjugate Vaccine (TCV) doses Administered</td>
|
|
231
|
-
<td
|
|
232
|
-
|
|
314
|
+
<td onClick={() => navigateToRegister('typhoid_conjugate_vaccine_age_greater_than_1yr')}>
|
|
315
|
+
{moh710Data.typhoid_conjugate_vaccine_age_greater_than_1yr}
|
|
316
|
+
</td>
|
|
317
|
+
<td onClick={() => navigateToRegister('typhoid_conjugate_vaccine_age_less_than_1yr')}>
|
|
318
|
+
{moh710Data.typhoid_conjugate_vaccine_age_less_than_1yr}
|
|
319
|
+
</td>
|
|
233
320
|
</tr>
|
|
234
321
|
<tr>
|
|
235
322
|
<td>Fully Immunized Children(FIC) under 1 year</td>
|
|
@@ -253,15 +340,19 @@ const Moh710Report: React.FC = () => {
|
|
|
253
340
|
<tbody>
|
|
254
341
|
<tr>
|
|
255
342
|
<td>Vitamin A at 12 to 59 months (200, 000 IU)</td>
|
|
256
|
-
<td>{moh710Data.vitaminA_12_59_months}</td>
|
|
343
|
+
<td onClick={() => navigateToRegister('vitaminA_12_59_months')}>{moh710Data.vitaminA_12_59_months}</td>
|
|
257
344
|
</tr>
|
|
258
345
|
<tr>
|
|
259
346
|
<td>Measles-Rubella 2 DoseAdm (at 1 1/2-2years)</td>
|
|
260
|
-
<td
|
|
347
|
+
<td onClick={() => navigateToRegister('measles_rubella_1_2_years')}>
|
|
348
|
+
{moh710Data.measles_rubella_1_2_years}
|
|
349
|
+
</td>
|
|
261
350
|
</tr>
|
|
262
351
|
<tr>
|
|
263
352
|
<td>Measles-Rubella 2 Dose Administered >2 yrs</td>
|
|
264
|
-
<td
|
|
353
|
+
<td onClick={() => navigateToRegister('measles_rubella_greater_2_years')}>
|
|
354
|
+
{moh710Data.measles_rubella_greater_2_years}
|
|
355
|
+
</td>
|
|
265
356
|
</tr>
|
|
266
357
|
</tbody>
|
|
267
358
|
</table>
|
|
@@ -300,11 +391,11 @@ const Moh710Report: React.FC = () => {
|
|
|
300
391
|
<tbody>
|
|
301
392
|
<tr>
|
|
302
393
|
<td>Tetanus Toxoid for Pregnant women</td>
|
|
303
|
-
<td>{moh710Data.tetanus_toxoid1}</td>
|
|
304
|
-
<td>{moh710Data.tetanus_toxoid2}</td>
|
|
305
|
-
<td>{moh710Data.tetanus_toxoid3}</td>
|
|
306
|
-
<td>{moh710Data.tetanus_toxoid4}</td>
|
|
307
|
-
<td>{moh710Data.tetanus_toxoid5}</td>
|
|
394
|
+
<td onClick={() => navigateToRegister('tetanus_toxoid1')}>{moh710Data.tetanus_toxoid1}</td>
|
|
395
|
+
<td onClick={() => navigateToRegister('tetanus_toxoid2')}>{moh710Data.tetanus_toxoid2}</td>
|
|
396
|
+
<td onClick={() => navigateToRegister('tetanus_toxoid3')}>{moh710Data.tetanus_toxoid3}</td>
|
|
397
|
+
<td onClick={() => navigateToRegister('tetanus_toxoid4')}>{moh710Data.tetanus_toxoid4}</td>
|
|
398
|
+
<td onClick={() => navigateToRegister('tetanus_toxoid5')}>{moh710Data.tetanus_toxoid5}</td>
|
|
308
399
|
</tr>
|
|
309
400
|
</tbody>
|
|
310
401
|
</table>
|
|
@@ -323,11 +414,13 @@ const Moh710Report: React.FC = () => {
|
|
|
323
414
|
<tbody>
|
|
324
415
|
<tr>
|
|
325
416
|
<td>HPV Vaccine Dose1(10-14years)</td>
|
|
326
|
-
<td
|
|
417
|
+
<td onClick={() => navigateToRegister('hpv_vaccine1_10_14_years')}>
|
|
418
|
+
{moh710Data.hpv_vaccine1_10_14_years}
|
|
419
|
+
</td>
|
|
327
420
|
</tr>
|
|
328
421
|
<tr>
|
|
329
422
|
<td>HPV Vaccine Dose 2</td>
|
|
330
|
-
<td>{moh710Data.hpv_vaccine2}</td>
|
|
423
|
+
<td onClick={() => navigateToRegister('hpv_vaccine2')}>{moh710Data.hpv_vaccine2}</td>
|
|
331
424
|
</tr>
|
|
332
425
|
</tbody>
|
|
333
426
|
</table>
|
|
@@ -344,13 +437,17 @@ const Moh710Report: React.FC = () => {
|
|
|
344
437
|
<tbody>
|
|
345
438
|
<tr>
|
|
346
439
|
<td>HPV Vaccine 1</td>
|
|
347
|
-
<td>{moh710Data.hpv_vaccine1_10_years}</td>
|
|
348
|
-
<td
|
|
440
|
+
<td onClick={() => navigateToRegister('hpv_vaccine1_10_years')}>{moh710Data.hpv_vaccine1_10_years}</td>
|
|
441
|
+
<td onClick={() => navigateToRegister('hpv_vaccine1_greater_10_years')}>
|
|
442
|
+
{moh710Data.hpv_vaccine1_greater_10_years}
|
|
443
|
+
</td>
|
|
349
444
|
</tr>
|
|
350
445
|
<tr>
|
|
351
446
|
<td>HPV Vaccine 2</td>
|
|
352
|
-
<td>{moh710Data.hpv_vaccine2_10_years}</td>
|
|
353
|
-
<td
|
|
447
|
+
<td onClick={() => navigateToRegister('hpv_vaccine2_10_years')}>{moh710Data.hpv_vaccine2_10_years}</td>
|
|
448
|
+
<td onClick={() => navigateToRegister('hpv_vaccine2_greater_10_years')}>
|
|
449
|
+
{moh710Data.hpv_vaccine2_greater_10_years}
|
|
450
|
+
</td>
|
|
354
451
|
</tr>
|
|
355
452
|
</tbody>
|
|
356
453
|
</table>
|
|
@@ -408,9 +505,15 @@ const Moh710Report: React.FC = () => {
|
|
|
408
505
|
<tbody>
|
|
409
506
|
<tr>
|
|
410
507
|
<td>COVID 19 Reporting</td>
|
|
411
|
-
<td
|
|
412
|
-
|
|
413
|
-
|
|
508
|
+
<td onClick={() => navigateToRegister('covid_19_vaccine_12_17')}>
|
|
509
|
+
{moh710Data.covid_19_vaccine_12_17}
|
|
510
|
+
</td>
|
|
511
|
+
<td onClick={() => navigateToRegister('covid_19_vaccine_18_59')}>
|
|
512
|
+
{moh710Data.covid_19_vaccine_18_59}
|
|
513
|
+
</td>
|
|
514
|
+
<td onClick={() => navigateToRegister('covid_19_vaccine_60_above')}>
|
|
515
|
+
{moh710Data.covid_19_vaccine_60_above}
|
|
516
|
+
</td>
|
|
414
517
|
</tr>
|
|
415
518
|
</tbody>
|
|
416
519
|
</table>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Button, Loading } from '@carbon/react';
|
|
2
2
|
import React, { useEffect, useState } from 'react';
|
|
3
|
-
import { useNavigate, useSearchParams } from 'react-router-dom';
|
|
3
|
+
import { useLocation, useNavigate, useSearchParams } from 'react-router-dom';
|
|
4
4
|
|
|
5
5
|
import styles from '../moh711.scss';
|
|
6
6
|
import classNames from 'classnames';
|
|
@@ -13,15 +13,17 @@ const Moh333Register: React.FC = () => {
|
|
|
13
13
|
const [isLoading, setIsLoading] = useState(false);
|
|
14
14
|
|
|
15
15
|
const [searchParams] = useSearchParams();
|
|
16
|
+
const location = useLocation();
|
|
16
17
|
|
|
17
18
|
const startDate = searchParams.get('startDate');
|
|
18
19
|
const endDate = searchParams.get('endDate');
|
|
19
20
|
const locationUuids = searchParams.get('locationUuids');
|
|
20
21
|
const indicator = searchParams.get('indicator');
|
|
22
|
+
const reportName = location.state?.reportName || '';
|
|
21
23
|
|
|
22
24
|
useEffect(() => {
|
|
23
25
|
const fetchData = async () => {
|
|
24
|
-
if (!startDate || !endDate || !locationUuids || !indicator) return;
|
|
26
|
+
if (!startDate || !endDate || !locationUuids || !indicator || !reportName) return;
|
|
25
27
|
|
|
26
28
|
setIsLoading(true);
|
|
27
29
|
|
|
@@ -31,6 +33,7 @@ const Moh333Register: React.FC = () => {
|
|
|
31
33
|
endDate,
|
|
32
34
|
locationUuids,
|
|
33
35
|
indicator,
|
|
36
|
+
reportName,
|
|
34
37
|
};
|
|
35
38
|
|
|
36
39
|
const data = await getMoh333PatientList(params);
|
|
@@ -44,10 +47,10 @@ const Moh333Register: React.FC = () => {
|
|
|
44
47
|
};
|
|
45
48
|
|
|
46
49
|
fetchData();
|
|
47
|
-
}, [startDate, endDate, locationUuids, indicator]);
|
|
50
|
+
}, [startDate, endDate, locationUuids, indicator, reportName]);
|
|
48
51
|
|
|
49
52
|
function navigateBack() {
|
|
50
|
-
navigate('
|
|
53
|
+
navigate(location.state?.from || '//moh-711');
|
|
51
54
|
}
|
|
52
55
|
return (
|
|
53
56
|
<>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Button, Loading, TableCell, TableRow } from '@carbon/react';
|
|
2
2
|
import React, { useEffect, useState } from 'react';
|
|
3
|
-
import { useNavigate, useSearchParams } from 'react-router-dom';
|
|
3
|
+
import { useLocation, useNavigate, useSearchParams } from 'react-router-dom';
|
|
4
4
|
|
|
5
5
|
import styles from '../moh711.scss';
|
|
6
6
|
import classNames from 'classnames';
|
|
@@ -13,11 +13,13 @@ const Moh405Register: React.FC = () => {
|
|
|
13
13
|
const [isLoading, setIsLoading] = useState(false);
|
|
14
14
|
|
|
15
15
|
const [searchParams] = useSearchParams();
|
|
16
|
+
const location = useLocation();
|
|
16
17
|
|
|
17
18
|
const startDate = searchParams.get('startDate');
|
|
18
19
|
const endDate = searchParams.get('endDate');
|
|
19
20
|
const locationUuids = searchParams.get('locationUuids');
|
|
20
21
|
const indicator = searchParams.get('indicator');
|
|
22
|
+
const reportName = location.state?.reportName || '';
|
|
21
23
|
|
|
22
24
|
useEffect(() => {
|
|
23
25
|
const fetchData = async () => {
|
|
@@ -31,6 +33,7 @@ const Moh405Register: React.FC = () => {
|
|
|
31
33
|
endDate,
|
|
32
34
|
locationUuids,
|
|
33
35
|
indicator,
|
|
36
|
+
reportName,
|
|
34
37
|
};
|
|
35
38
|
|
|
36
39
|
const data = await getMoh405PatientList(params);
|
|
@@ -44,7 +47,7 @@ const Moh405Register: React.FC = () => {
|
|
|
44
47
|
};
|
|
45
48
|
|
|
46
49
|
fetchData();
|
|
47
|
-
}, [startDate, endDate, locationUuids, indicator]);
|
|
50
|
+
}, [startDate, endDate, locationUuids, indicator, reportName]);
|
|
48
51
|
function navigateBack() {
|
|
49
52
|
navigate('/moh-711');
|
|
50
53
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Button, Loading } from '@carbon/react';
|
|
2
2
|
import React, { useEffect, useState } from 'react';
|
|
3
|
-
import { useNavigate, useSearchParams } from 'react-router-dom';
|
|
3
|
+
import { useLocation, useNavigate, useSearchParams } from 'react-router-dom';
|
|
4
4
|
|
|
5
5
|
import styles from '../moh711.scss';
|
|
6
6
|
import classNames from 'classnames';
|
|
@@ -14,11 +14,13 @@ const Moh406Register: React.FC = () => {
|
|
|
14
14
|
const [isLoading, setIsLoading] = useState(false);
|
|
15
15
|
|
|
16
16
|
const [searchParams] = useSearchParams();
|
|
17
|
+
const location = useLocation();
|
|
17
18
|
|
|
18
19
|
const startDate = searchParams.get('startDate');
|
|
19
20
|
const endDate = searchParams.get('endDate');
|
|
20
21
|
const locationUuids = searchParams.get('locationUuids');
|
|
21
22
|
const indicator = searchParams.get('indicator');
|
|
23
|
+
const reportName = location.state?.reportName || '';
|
|
22
24
|
|
|
23
25
|
useEffect(() => {
|
|
24
26
|
const fetchData = async () => {
|
|
@@ -32,6 +34,7 @@ const Moh406Register: React.FC = () => {
|
|
|
32
34
|
endDate,
|
|
33
35
|
locationUuids,
|
|
34
36
|
indicator,
|
|
37
|
+
reportName,
|
|
35
38
|
};
|
|
36
39
|
|
|
37
40
|
const data = await getMoh406PatientList(params);
|
|
@@ -45,7 +48,7 @@ const Moh406Register: React.FC = () => {
|
|
|
45
48
|
};
|
|
46
49
|
|
|
47
50
|
fetchData();
|
|
48
|
-
}, [startDate, endDate, locationUuids, indicator]);
|
|
51
|
+
}, [startDate, endDate, locationUuids, indicator, reportName]);
|
|
49
52
|
function navigateBack() {
|
|
50
53
|
navigate('/moh-711');
|
|
51
54
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Button, Loading, Table, TableBody, TableHead, TableHeader, TableRow } from '@carbon/react';
|
|
2
2
|
import React, { useEffect, useState } from 'react';
|
|
3
|
-
import { useNavigate, useSearchParams } from 'react-router-dom';
|
|
3
|
+
import { useLocation, useNavigate, useSearchParams } from 'react-router-dom';
|
|
4
4
|
|
|
5
5
|
import styles from '../moh711.scss';
|
|
6
6
|
import { getMoh511PatientList } from '../../../resources/moh-711.resource';
|
|
7
7
|
import { moh511Columns } from './type';
|
|
8
|
+
import classNames from 'classnames';
|
|
8
9
|
|
|
9
10
|
const Moh511Register: React.FC = () => {
|
|
10
11
|
const navigate = useNavigate();
|
|
@@ -12,15 +13,17 @@ const Moh511Register: React.FC = () => {
|
|
|
12
13
|
const [isLoading, setIsLoading] = useState(false);
|
|
13
14
|
|
|
14
15
|
const [searchParams] = useSearchParams();
|
|
16
|
+
const location = useLocation();
|
|
15
17
|
|
|
16
18
|
const startDate = searchParams.get('startDate');
|
|
17
19
|
const endDate = searchParams.get('endDate');
|
|
18
20
|
const locationUuids = searchParams.get('locationUuids');
|
|
19
21
|
const indicator = searchParams.get('indicator');
|
|
22
|
+
const reportName = location.state?.reportName || '';
|
|
20
23
|
|
|
21
24
|
useEffect(() => {
|
|
22
25
|
const fetchData = async () => {
|
|
23
|
-
if (!startDate || !endDate || !locationUuids || !indicator) return;
|
|
26
|
+
if (!startDate || !endDate || !locationUuids || !indicator || !reportName) return;
|
|
24
27
|
|
|
25
28
|
setIsLoading(true);
|
|
26
29
|
|
|
@@ -30,6 +33,7 @@ const Moh511Register: React.FC = () => {
|
|
|
30
33
|
endDate,
|
|
31
34
|
locationUuids,
|
|
32
35
|
indicator,
|
|
36
|
+
reportName,
|
|
33
37
|
};
|
|
34
38
|
|
|
35
39
|
const data = await getMoh511PatientList(params);
|
|
@@ -43,10 +47,10 @@ const Moh511Register: React.FC = () => {
|
|
|
43
47
|
};
|
|
44
48
|
|
|
45
49
|
fetchData();
|
|
46
|
-
}, [startDate, endDate, locationUuids, indicator]);
|
|
50
|
+
}, [startDate, endDate, locationUuids, indicator, reportName]);
|
|
47
51
|
|
|
48
52
|
function navigateBack() {
|
|
49
|
-
navigate('/moh-711');
|
|
53
|
+
navigate(location.state?.from || '/moh-711');
|
|
50
54
|
}
|
|
51
55
|
return (
|
|
52
56
|
<>
|
|
@@ -54,7 +58,7 @@ const Moh511Register: React.FC = () => {
|
|
|
54
58
|
<Button onClick={navigateBack}>Back</Button>
|
|
55
59
|
</div>
|
|
56
60
|
<div>{isLoading && <Loading />}</div>
|
|
57
|
-
<Table>
|
|
61
|
+
<Table className={classNames(`${styles.table}`, `${styles.tableBordered}`, `${styles.tableStriped}`)}>
|
|
58
62
|
<TableHead>
|
|
59
63
|
<TableRow>
|
|
60
64
|
<TableHeader>Serial No.</TableHeader>
|
|
@@ -94,8 +98,6 @@ const Moh511Register: React.FC = () => {
|
|
|
94
98
|
<br />
|
|
95
99
|
number
|
|
96
100
|
</TableHeader>
|
|
97
|
-
<TableHeader>Weight</TableHeader>
|
|
98
|
-
<TableHeader>Height</TableHeader>
|
|
99
101
|
<TableHeader>Weight in Kgs</TableHeader>
|
|
100
102
|
<TableHeader>
|
|
101
103
|
Weight
|
|
@@ -245,7 +247,13 @@ const Moh511Register: React.FC = () => {
|
|
|
245
247
|
patientlist.map((patient, index) => (
|
|
246
248
|
<TableRow key={index}>
|
|
247
249
|
{moh511Columns.map((col) => (
|
|
248
|
-
<td key={col}>
|
|
250
|
+
<td key={col}>
|
|
251
|
+
{col === 'serial_no'
|
|
252
|
+
? index + 1
|
|
253
|
+
: col === 'visit_date'
|
|
254
|
+
? new Date(patient?.[col]).toLocaleDateString('en-GB')
|
|
255
|
+
: (patient?.[col] ?? '')}
|
|
256
|
+
</td>
|
|
249
257
|
))}
|
|
250
258
|
</TableRow>
|
|
251
259
|
))
|
|
@@ -55,9 +55,9 @@ export const moh511Columns = [
|
|
|
55
55
|
'county_sub_county',
|
|
56
56
|
'village_estate_landmark',
|
|
57
57
|
'phone_number',
|
|
58
|
-
'height',
|
|
59
58
|
'weight_kg',
|
|
60
59
|
'weight_category',
|
|
60
|
+
'height',
|
|
61
61
|
'height_category',
|
|
62
62
|
'muac',
|
|
63
63
|
'exclusive_breastfeeding_less_6_months',
|
|
@@ -72,6 +72,7 @@ export const moh511Columns = [
|
|
|
72
72
|
'follow_up',
|
|
73
73
|
'referred_from',
|
|
74
74
|
'referred_to',
|
|
75
|
+
'reason_for_referral',
|
|
75
76
|
'remarks',
|
|
76
77
|
];
|
|
77
78
|
export const moh405Columns = [
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import styles from '../moh711.scss';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
|
-
import { useNavigate } from 'react-router-dom';
|
|
5
|
+
import { useLocation, useNavigate } from 'react-router-dom';
|
|
6
6
|
|
|
7
7
|
interface ANCComponentProps {
|
|
8
8
|
moh711Data: any;
|
|
@@ -13,10 +13,16 @@ interface ANCComponentProps {
|
|
|
13
13
|
|
|
14
14
|
const ANCComponent: React.FC<ANCComponentProps> = ({ moh711Data, startDate, endDate, locationUuids }) => {
|
|
15
15
|
const navigate = useNavigate();
|
|
16
|
-
|
|
16
|
+
const location = useLocation();
|
|
17
17
|
const navigateToRegister = (indicator: string) => {
|
|
18
18
|
navigate(
|
|
19
19
|
`/moh-405-register?startDate=${startDate}&endDate=${endDate}&locationUuids=${locationUuids}&indicator=${indicator}`,
|
|
20
|
+
{
|
|
21
|
+
state: {
|
|
22
|
+
from: location.pathname,
|
|
23
|
+
reportName: 'moh711Report',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
20
26
|
);
|
|
21
27
|
};
|
|
22
28
|
return (
|