@kenyaemr/esm-facility-dashboard-app 5.4.1-pre.1867
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/.turbo/turbo-build.log +79 -0
- package/README.md +7 -0
- package/dist/1.js +1 -0
- package/dist/1.js.map +1 -0
- package/dist/144.js +2 -0
- package/dist/144.js.LICENSE.txt +19 -0
- package/dist/144.js.map +1 -0
- package/dist/225.js +1 -0
- package/dist/225.js.map +1 -0
- package/dist/300.js +1 -0
- package/dist/372.js +1 -0
- package/dist/372.js.map +1 -0
- package/dist/405.js +1 -0
- package/dist/405.js.map +1 -0
- package/dist/41.js +2 -0
- package/dist/41.js.LICENSE.txt +9 -0
- package/dist/41.js.map +1 -0
- package/dist/507.js +2 -0
- package/dist/507.js.LICENSE.txt +30 -0
- package/dist/507.js.map +1 -0
- package/dist/831.js +2 -0
- package/dist/831.js.LICENSE.txt +5 -0
- package/dist/831.js.map +1 -0
- package/dist/909.js +2 -0
- package/dist/909.js.LICENSE.txt +9 -0
- package/dist/909.js.map +1 -0
- package/dist/913.js +2 -0
- package/dist/913.js.LICENSE.txt +32 -0
- package/dist/913.js.map +1 -0
- package/dist/kenyaemr-esm-facility-dashboard-app.js +1 -0
- package/dist/kenyaemr-esm-facility-dashboard-app.js.buildmanifest.json +365 -0
- package/dist/kenyaemr-esm-facility-dashboard-app.js.map +1 -0
- package/dist/main.js +2 -0
- package/dist/main.js.LICENSE.txt +9 -0
- package/dist/main.js.map +1 -0
- package/dist/routes.json +1 -0
- package/jest.config.js +8 -0
- package/package.json +55 -0
- package/src/above-site/above-site-dashboard.component.tsx +32 -0
- package/src/above-site/above-site.scss +13 -0
- package/src/components/empty-state/empty-state-log.components.tsx +20 -0
- package/src/components/empty-state/empty-state-log.scss +28 -0
- package/src/components/empty-state/empty-state-log.test.tsx +24 -0
- package/src/components/header/header-illustration.component.tsx +13 -0
- package/src/components/header/header.component.tsx +34 -0
- package/src/components/header/header.scss +72 -0
- package/src/components/side-menu/left-panel.scss +42 -0
- package/src/components/side-menu/left-pannel.component.tsx +25 -0
- package/src/config-schema.ts +16 -0
- package/src/constants.ts +15 -0
- package/src/declarations.d.ts +6 -0
- package/src/facility-dashboard.resource.ts +0 -0
- package/src/hooks/useFacilityDashboardSurveillance.ts +29 -0
- package/src/index.ts +28 -0
- package/src/left-pannel-link.component.tsx +47 -0
- package/src/root.component.tsx +34 -0
- package/src/root.scss +12 -0
- package/src/routes.json +26 -0
- package/src/setup-tests.ts +1 -0
- package/src/surveillance/summary-cards/summary-card.component.tsx +30 -0
- package/src/surveillance/summary-cards/summary-card.scss +49 -0
- package/src/surveillance/summary-cards/surveillance-summary-cards.component.tsx +78 -0
- package/src/surveillance/surveillance-dashboard.component.tsx +17 -0
- package/src/surveillance/surveillance-filters.component.tsx +22 -0
- package/src/surveillance/surveillance.scss +16 -0
- package/src/types/index.ts +13 -0
- package/translations/en.json +22 -0
- package/tsconfig.json +5 -0
- package/webpack.config.js +1 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
@use '@carbon/layout';
|
|
2
|
+
@use '@carbon/type';
|
|
3
|
+
@use '@carbon/colors';
|
|
4
|
+
|
|
5
|
+
.cardcontainer {
|
|
6
|
+
display: grid;
|
|
7
|
+
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
|
|
8
|
+
gap: layout.$spacing-05;
|
|
9
|
+
padding: 0 layout.$spacing-05;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.summaryCard {
|
|
13
|
+
position: relative;
|
|
14
|
+
border: colors.$gray-20 solid 1px;
|
|
15
|
+
width: 100%;
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
gap: layout.$spacing-05;
|
|
19
|
+
|
|
20
|
+
& > h4 {
|
|
21
|
+
font-weight: bold;
|
|
22
|
+
color: colors.$gray-80;
|
|
23
|
+
margin-bottom: layout.$spacing-03;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
& > p {
|
|
27
|
+
color: colors.$gray-60;
|
|
28
|
+
font-size: small;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
& > strong {
|
|
32
|
+
color: colors.$gray-60;
|
|
33
|
+
text-transform: uppercase;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
& > span {
|
|
37
|
+
position: absolute;
|
|
38
|
+
right: layout.$spacing-05;
|
|
39
|
+
top: layout.$spacing-05;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.upIcon {
|
|
44
|
+
color: colors.$red-50;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.downIcon {
|
|
48
|
+
color: colors.$green-50;
|
|
49
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Layer, SkeletonPlaceholder } from '@carbon/react';
|
|
2
|
+
import { ErrorState } from '@openmrs/esm-framework';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import useFacilityDashboardSurveillance from '../../hooks/useFacilityDashboardSurveillance';
|
|
6
|
+
import SummaryCard from './summary-card.component';
|
|
7
|
+
import styles from './summary-card.scss';
|
|
8
|
+
const SurveillanceSummaryCards = () => {
|
|
9
|
+
const { t } = useTranslation();
|
|
10
|
+
const { error, isLoading, surveillanceSummary, getIndication } = useFacilityDashboardSurveillance();
|
|
11
|
+
|
|
12
|
+
if (isLoading) {
|
|
13
|
+
return (
|
|
14
|
+
<Layer className={styles.cardcontainer}>
|
|
15
|
+
{Array.from({ length: 6 }).map((_, index) => (
|
|
16
|
+
<SkeletonPlaceholder className={styles.summaryCard} key={index} />
|
|
17
|
+
))}
|
|
18
|
+
</Layer>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (error) {
|
|
23
|
+
return <ErrorState error={error} headerTitle={t('surveillanceSummary', 'Surveillance Summary')} />;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<Layer className={styles.cardcontainer}>
|
|
28
|
+
<SummaryCard
|
|
29
|
+
header={t('hivNotlinked', 'HIV Not linked')}
|
|
30
|
+
title={t('hivPositiveClientsnotLinkedToArt', 'HIV Positive Clients not linked to ART')}
|
|
31
|
+
value={`${surveillanceSummary?.getHivPositiveNotLinked}`}
|
|
32
|
+
mode={getIndication(
|
|
33
|
+
surveillanceSummary?.getHivPositiveNotLinked,
|
|
34
|
+
surveillanceSummary?.getHivTestedPositive,
|
|
35
|
+
surveillanceSummary?.fivePercentThreshhold,
|
|
36
|
+
)}
|
|
37
|
+
/>
|
|
38
|
+
<SummaryCard
|
|
39
|
+
header={t('prepNotlinked', 'PREP Not linked')}
|
|
40
|
+
title={t(
|
|
41
|
+
'pregnantPostPartumWomenNotLinkedToPREP',
|
|
42
|
+
'Pregnant / postpartum women at high risk not linked to PREP',
|
|
43
|
+
)}
|
|
44
|
+
value={`${surveillanceSummary?.getPregnantPostpartumNotInPrep}`}
|
|
45
|
+
mode={'decreasing'}
|
|
46
|
+
/>
|
|
47
|
+
<SummaryCard
|
|
48
|
+
header={t('eacPending', 'EAC Pending')}
|
|
49
|
+
title={t(
|
|
50
|
+
'virallyUnSuppressedWithoutAdherenceCounselingFor2Weeks',
|
|
51
|
+
'Virally Unsuppressed clients without enhanced adherence counseling (EAC) within 2 weeks',
|
|
52
|
+
)}
|
|
53
|
+
value={`${surveillanceSummary?.getVirallySuppressedWithoutEAC}`}
|
|
54
|
+
mode="decreasing"
|
|
55
|
+
/>
|
|
56
|
+
<SummaryCard
|
|
57
|
+
header={t('vlDelayed', 'VL Delayed')}
|
|
58
|
+
title={t('delayedVLTesting', 'Delayed Viral Load (VL) testing')}
|
|
59
|
+
value={`${surveillanceSummary?.getEligibleForVlSampleNotTaken}`}
|
|
60
|
+
mode="decreasing"
|
|
61
|
+
/>
|
|
62
|
+
<SummaryCard
|
|
63
|
+
header={t('dnapcrPending', 'DNA-PCR Pending')}
|
|
64
|
+
title={t('HEIWithoutDNAPCR', 'HEI (6-8 WEEKS) without DNA PCR Results')}
|
|
65
|
+
value={`${surveillanceSummary?.getHeiSixToEightWeeksWithoutPCRResults}`}
|
|
66
|
+
mode="decreasing"
|
|
67
|
+
/>
|
|
68
|
+
<SummaryCard
|
|
69
|
+
header={t('heiIncomplete', 'HEI Incomplete')}
|
|
70
|
+
title={t('HEIWithoutFinalDocumentedOutcome', 'HEI (24 months) without final documented outcomes')}
|
|
71
|
+
value={`${surveillanceSummary?.getHei24MonthsWithoutDocumentedOutcome}`}
|
|
72
|
+
mode="increasing"
|
|
73
|
+
/>
|
|
74
|
+
</Layer>
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export default SurveillanceSummaryCards;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import SurveillanceSummaryCards from './summary-cards/surveillance-summary-cards.component';
|
|
4
|
+
import SurveillanceFilters from './surveillance-filters.component';
|
|
5
|
+
import FacilityDashboardHeader from '../components/header/header.component';
|
|
6
|
+
const SurveillancelanceDashboard = () => {
|
|
7
|
+
const { t } = useTranslation();
|
|
8
|
+
return (
|
|
9
|
+
<div>
|
|
10
|
+
<FacilityDashboardHeader title={t('surveillance', 'Surveillance')} />
|
|
11
|
+
<SurveillanceFilters />
|
|
12
|
+
<SurveillanceSummaryCards />
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default SurveillancelanceDashboard;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Dropdown } from '@carbon/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import styles from './surveillance.scss';
|
|
5
|
+
|
|
6
|
+
const SurveillanceFilters = () => {
|
|
7
|
+
const { t } = useTranslation();
|
|
8
|
+
return (
|
|
9
|
+
<div className={styles.filtersContainer}>
|
|
10
|
+
<Dropdown
|
|
11
|
+
className={styles.viewToggler}
|
|
12
|
+
autoAlign
|
|
13
|
+
id="filters"
|
|
14
|
+
itemToString={(item) => item?.label ?? ''}
|
|
15
|
+
items={[{ label: 'Last day view' }, { label: 'Last 1 week view' }]}
|
|
16
|
+
label={t('reportingPeriod', 'Reporting Period')}
|
|
17
|
+
/>
|
|
18
|
+
</div>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default SurveillanceFilters;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@use '@carbon/layout';
|
|
2
|
+
@use '@carbon/type';
|
|
3
|
+
@use '@carbon/colors';
|
|
4
|
+
|
|
5
|
+
.filtersContainer {
|
|
6
|
+
margin: 0 layout.$spacing-05 layout.$spacing-05 layout.$spacing-05;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: row;
|
|
9
|
+
gap: layout.$spacing-05;
|
|
10
|
+
justify-content: flex-end;
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.viewToggler {
|
|
15
|
+
width: 330px;
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type SurveillanceSummary = {
|
|
2
|
+
getHivPositiveNotLinked: number;
|
|
3
|
+
getHivTestedPositive: number;
|
|
4
|
+
getPregnantPostpartumNotInPrep: number;
|
|
5
|
+
getEligibleForVlSampleNotTaken: number;
|
|
6
|
+
getVirallySuppressedWithoutEAC: number;
|
|
7
|
+
getHeiSixToEightWeeksWithoutPCRResults: number;
|
|
8
|
+
getHei24MonthsWithoutDocumentedOutcome: number;
|
|
9
|
+
fivePercentThreshhold: number;
|
|
10
|
+
onePercentThreshhold: number;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type IndicationMode = 'decreasing' | 'increasing';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"aboveSiteDashboard": "Above site facility Dashboard",
|
|
3
|
+
"aboveSiteFacilityDashboard": "Above site facility Dashboard",
|
|
4
|
+
"delayedVLTesting": "Delayed Viral Load (VL) testing",
|
|
5
|
+
"dnapcrPending": "DNA-PCR Pending",
|
|
6
|
+
"eacPending": "EAC Pending",
|
|
7
|
+
"facilitydashboard": "Facility Dashboard",
|
|
8
|
+
"facilitydashboardLeftPannel": "facility Dashboard Left Panel",
|
|
9
|
+
"heiIncomplete": "HEI Incomplete",
|
|
10
|
+
"HEIWithoutDNAPCR": "HEI (6-8 WEEKS) without DNA PCR Results",
|
|
11
|
+
"HEIWithoutFinalDocumentedOutcome": "HEI (24 months) without final documented outcomes",
|
|
12
|
+
"hivNotlinked": "HIV Not linked",
|
|
13
|
+
"hivPositiveClientsnotLinkedToArt": "HIV Positive Clients not linked to ART",
|
|
14
|
+
"pregnantPostPartumWomenNotLinkedToPREP": "Pregnant / postpartum women at high risk not linked to PREP",
|
|
15
|
+
"prepNotlinked": "PREP Not linked",
|
|
16
|
+
"reportingPeriod": "Reporting Period",
|
|
17
|
+
"surveillance": "Surveillance",
|
|
18
|
+
"surveillanceSummary": "Surveillance Summary",
|
|
19
|
+
"viewOnSuperset": "View on Superset",
|
|
20
|
+
"virallyUnSuppressedWithoutAdherenceCounselingFor2Weeks": "Virally Unsuppressed clients without enhanced adherence counseling (EAC) within 2 weeks",
|
|
21
|
+
"vlDelayed": "VL Delayed"
|
|
22
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('openmrs/default-webpack-config');
|