@ampath/esm-reports-app 1.0.0-next.37 → 1.0.0-next.39
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 +23 -4
- package/src/reports/moh-711/moh-711.component.tsx +23 -4
- package/src/reports/moh-717/moh-717.component.tsx +23 -4
- package/src/reports/moh-731/moh-731.component.tsx +23 -4
- package/src/reports/moh-731/registers/moh-366.component.tsx +1 -1
- package/src/reports/moh-731/sections/pmtct.component.tsx +2 -2
- package/src/resources/moh-731.resource.ts +1 -1
- package/src/routes.json +3 -1
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"initial": false,
|
|
71
71
|
"entry": false,
|
|
72
72
|
"recorded": false,
|
|
73
|
-
"size":
|
|
73
|
+
"size": 1223778,
|
|
74
74
|
"sizes": {
|
|
75
|
-
"javascript":
|
|
75
|
+
"javascript": 1223778
|
|
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": "915431fff70a251d",
|
|
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","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"}],"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.39"}
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { useNavigate } from 'react-router-dom';
|
|
3
3
|
import ReportFiltersComponent from '../../common/report-filters/report-filters.component';
|
|
4
4
|
|
|
@@ -11,12 +11,31 @@ import { type ReportFilters } from '../moh-705a/type';
|
|
|
11
11
|
|
|
12
12
|
const Moh710Report: React.FC = () => {
|
|
13
13
|
let errorMessage: string = '';
|
|
14
|
-
const [moh710Data, setMoh710Data] = useState<any>(
|
|
14
|
+
const [moh710Data, setMoh710Data] = useState<any>(() => {
|
|
15
|
+
const saved = sessionStorage.getItem('moh710Data');
|
|
16
|
+
return saved ? JSON.parse(saved) : [];
|
|
17
|
+
});
|
|
15
18
|
const [isLoading, setIsLoading] = useState<boolean>(false);
|
|
16
19
|
const navigate = useNavigate();
|
|
17
20
|
|
|
18
|
-
const [startDate, setStartDate] = useState<string>(
|
|
19
|
-
|
|
21
|
+
const [startDate, setStartDate] = useState<string>(() => {
|
|
22
|
+
return sessionStorage.getItem('moh710StartDate') || '';
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const [endDate, setEndDate] = useState<string>(() => {
|
|
26
|
+
return sessionStorage.getItem('moh710EndDate') || '';
|
|
27
|
+
});
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
sessionStorage.setItem('moh710Data', JSON.stringify(moh710Data));
|
|
30
|
+
}, [moh710Data]);
|
|
31
|
+
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
sessionStorage.setItem('moh710StartDate', startDate);
|
|
34
|
+
}, [startDate]);
|
|
35
|
+
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
sessionStorage.setItem('moh710EndDate', endDate);
|
|
38
|
+
}, [endDate]);
|
|
20
39
|
|
|
21
40
|
const session = useSession();
|
|
22
41
|
const locationUuids = session?.sessionLocation?.uuid;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import ReportFiltersComponent from '../../common/report-filters/report-filters.component';
|
|
3
3
|
|
|
4
4
|
import styles from './moh711.scss';
|
|
@@ -24,10 +24,29 @@ import { type ReportFilters } from '../moh-705a/type';
|
|
|
24
24
|
|
|
25
25
|
const Moh711Report: React.FC = () => {
|
|
26
26
|
let errorMessage: string = '';
|
|
27
|
-
const [moh711Data, setMoh711Data] = useState<any>(
|
|
27
|
+
const [moh711Data, setMoh711Data] = useState<any>(() => {
|
|
28
|
+
const saved = sessionStorage.getItem('moh711Data');
|
|
29
|
+
return saved ? JSON.parse(saved) : [];
|
|
30
|
+
});
|
|
28
31
|
const [isLoading, setIsLoading] = useState<boolean>(false);
|
|
29
|
-
const [startDate, setStartDate] = useState<string>(
|
|
30
|
-
|
|
32
|
+
const [startDate, setStartDate] = useState<string>(() => {
|
|
33
|
+
return sessionStorage.getItem('moh711StartDate') || '';
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const [endDate, setEndDate] = useState<string>(() => {
|
|
37
|
+
return sessionStorage.getItem('moh711EndDate') || '';
|
|
38
|
+
});
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
sessionStorage.setItem('moh711Data', JSON.stringify(moh711Data));
|
|
41
|
+
}, [moh711Data]);
|
|
42
|
+
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
sessionStorage.setItem('moh711StartDate', startDate);
|
|
45
|
+
}, [startDate]);
|
|
46
|
+
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
sessionStorage.setItem('moh711EndDate', endDate);
|
|
49
|
+
}, [endDate]);
|
|
31
50
|
|
|
32
51
|
const session = useSession();
|
|
33
52
|
const locationUuid = session?.sessionLocation?.uuid;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import ReportFiltersComponent from '../../common/report-filters/report-filters.component';
|
|
3
3
|
|
|
4
4
|
import styles from './moh717.scss';
|
|
@@ -21,10 +21,29 @@ import { type ReportFilters } from '../moh-705a/type';
|
|
|
21
21
|
|
|
22
22
|
const Moh717Report: React.FC = () => {
|
|
23
23
|
let errorMessage: string = '';
|
|
24
|
-
const [moh717ReportData, setMoh717ReportData] = useState<any>(
|
|
24
|
+
const [moh717ReportData, setMoh717ReportData] = useState<any>(() => {
|
|
25
|
+
const saved = sessionStorage.getItem('moh717ReportData');
|
|
26
|
+
return saved ? JSON.parse(saved) : [];
|
|
27
|
+
});
|
|
25
28
|
const [isLoading, setIsLoading] = useState<boolean>(false);
|
|
26
|
-
const [startDate, setStartDate] = useState<string>(
|
|
27
|
-
|
|
29
|
+
const [startDate, setStartDate] = useState<string>(() => {
|
|
30
|
+
return sessionStorage.getItem('moh717StartDate') || '';
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const [endDate, setEndDate] = useState<string>(() => {
|
|
34
|
+
return sessionStorage.getItem('moh717EndDate') || '';
|
|
35
|
+
});
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
sessionStorage.setItem('moh717ReportData', JSON.stringify(moh717ReportData));
|
|
38
|
+
}, [moh717ReportData]);
|
|
39
|
+
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
sessionStorage.setItem('moh717StartDate', startDate);
|
|
42
|
+
}, [startDate]);
|
|
43
|
+
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
sessionStorage.setItem('moh717EndDate', endDate);
|
|
46
|
+
}, [endDate]);
|
|
28
47
|
|
|
29
48
|
const session = useSession();
|
|
30
49
|
const locationUuid = session?.sessionLocation?.uuid;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
2
|
|
|
3
3
|
import styles from './moh-731.scss';
|
|
4
4
|
import ReportFiltersComponent from '../../common/report-filters/report-filters.component';
|
|
@@ -15,10 +15,29 @@ import { Loading } from '@carbon/react';
|
|
|
15
15
|
interface Moh731Props {}
|
|
16
16
|
|
|
17
17
|
const Moh731Report: React.FC<Moh731Props> = () => {
|
|
18
|
-
const [moh731Data, setMoh731Data] = useState<any>(
|
|
18
|
+
const [moh731Data, setMoh731Data] = useState<any>(() => {
|
|
19
|
+
const saved = sessionStorage.getItem('moh731Data');
|
|
20
|
+
return saved ? JSON.parse(saved) : [];
|
|
21
|
+
});
|
|
19
22
|
const [isLoading, setIsLoading] = useState<boolean>(false);
|
|
20
|
-
const [startDate, setStartDate] = useState<string>(
|
|
21
|
-
|
|
23
|
+
const [startDate, setStartDate] = useState<string>(() => {
|
|
24
|
+
return sessionStorage.getItem('moh731StartDate') || '';
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const [endDate, setEndDate] = useState<string>(() => {
|
|
28
|
+
return sessionStorage.getItem('moh731EndDate') || '';
|
|
29
|
+
});
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
sessionStorage.setItem('moh731Data', JSON.stringify(moh731Data));
|
|
32
|
+
}, [moh731Data]);
|
|
33
|
+
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
sessionStorage.setItem('moh731StartDate', startDate);
|
|
36
|
+
}, [startDate]);
|
|
37
|
+
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
sessionStorage.setItem('moh731EndDate', endDate);
|
|
40
|
+
}, [endDate]);
|
|
22
41
|
const [errorMessage, setErrorMessage] = useState<any>();
|
|
23
42
|
|
|
24
43
|
const session = useSession();
|
|
@@ -42,8 +42,8 @@ const PmtctComponent: React.FC<PmtctComponentProps> = ({ MOH731Data, startDate,
|
|
|
42
42
|
</tr>
|
|
43
43
|
<tr>
|
|
44
44
|
<td></td>
|
|
45
|
-
<td>Initial</td>
|
|
46
|
-
<td style={{ paddingLeft: '60px' }}>Retest</td>
|
|
45
|
+
<td style={{ fontWeight: 'bold' }}>Initial</td>
|
|
46
|
+
<td style={{ paddingLeft: '60px', fontWeight: 'bold' }}>Retest</td>
|
|
47
47
|
</tr>
|
|
48
48
|
<tr>
|
|
49
49
|
<td>Tested at ANC</td>
|
|
@@ -67,7 +67,7 @@ export async function getMoh366PatientList(params: Moh745Params): Promise<any> {
|
|
|
67
67
|
|
|
68
68
|
export async function getPrepPatientList(params: Moh745Params): Promise<any> {
|
|
69
69
|
const etlBaseUrl = await getEtlBaseUrl();
|
|
70
|
-
const url =
|
|
70
|
+
const url = `${etlBaseUrl}/prep-patient-list`;
|
|
71
71
|
const queryparams = {
|
|
72
72
|
locationUuids: params.locationUuids || '',
|
|
73
73
|
startDate: params.startDate || '',
|
package/src/routes.json
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"name": "ampath-reports-dashboard-link",
|
|
10
10
|
"component": "reportsDashboardLink",
|
|
11
11
|
"slot": "homepage-dashboard-slot",
|
|
12
|
+
"privileges": ["O3 View Reports Dashboard"],
|
|
12
13
|
"meta": {
|
|
13
14
|
"name": "reports",
|
|
14
15
|
"slot": "ampath-reports-dashboard-slot",
|
|
@@ -20,7 +21,8 @@
|
|
|
20
21
|
{
|
|
21
22
|
"component": "root",
|
|
22
23
|
"name": "ampath-reports-dashboard-root",
|
|
23
|
-
"slot": "ampath-reports-dashboard-slot"
|
|
24
|
+
"slot": "ampath-reports-dashboard-slot",
|
|
25
|
+
"privileges": ["O3 View Reports Dashboard"]
|
|
24
26
|
}
|
|
25
27
|
],
|
|
26
28
|
"pages": []
|