-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
644 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import HisDeploymentsOverview from './HisDeploymentsOverview'; | ||
import HisDeploymentsEMRStatusByPartner from './HisDeploymentsEMRStatusByPartner'; | ||
import HisDeploymentsFacilityLevelByOwnershipPartner from './HisDeploymentsFacilityLevelByOwnershipPartner'; | ||
import HisDeploymentsFacilityLevelByOwnershipCounty from './HisDeploymentsFacilityLevelByOwnershipCounty'; | ||
import HisDeploymentsFacilityByInfrastructure from './HisDeploymentsFacilityByInfrastructure'; | ||
import HisDeploymentsLinelist from './HisDeploymentsLinelist'; | ||
import SectionHeader from '../Shared/SectionHeader'; | ||
import React from 'react'; | ||
import moment from 'moment'; | ||
import VisibilitySensor from 'react-visibility-sensor'; | ||
import UniversalFilter from '../Shared/UniversalFilter'; | ||
import { disableStickyFilter, enableStickyFilter } from '../../actions/Shared/uiActions'; | ||
import { useDispatch } from 'react-redux'; | ||
|
||
const HisDeployments = () =>{ | ||
const dispatch = useDispatch(); | ||
const onVisibilityChange = (isVisible) => { | ||
if (isVisible) { | ||
dispatch(disableStickyFilter()); | ||
} else { | ||
dispatch(enableStickyFilter()); | ||
} | ||
}; | ||
return ( | ||
<> | ||
<SectionHeader title="HIS Deployments" description={`Year ${moment().format('YYYY')}`}/> | ||
<VisibilitySensor onChange={onVisibilityChange}> | ||
<UniversalFilter/> | ||
</VisibilitySensor> | ||
<HisDeploymentsOverview /> | ||
<HisDeploymentsEMRStatusByPartner /> | ||
<HisDeploymentsFacilityLevelByOwnershipPartner /> | ||
<HisDeploymentsFacilityLevelByOwnershipCounty /> | ||
<HisDeploymentsFacilityByInfrastructure /> | ||
<HisDeploymentsLinelist /> | ||
</> | ||
) | ||
} | ||
|
||
|
||
export default HisDeployments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
import React, { useEffect, useState, useCallback } from 'react'; | ||
import Highcharts from 'highcharts'; | ||
import { Card, CardBody, CardHeader } from 'reactstrap'; | ||
import HighchartsReact from 'highcharts-react-official';; | ||
|
||
const HISDeploymentsByPartner = () => { | ||
const [hisDeployments, setHisDeployments] = useState({}); | ||
|
||
const loadNewOnArtBySex = useCallback(async () => { | ||
setHisDeployments({ | ||
chart: { | ||
type: 'column', | ||
}, | ||
title: { | ||
text: '', | ||
align: 'left', | ||
}, | ||
xAxis: { | ||
title: { | ||
text: 'SERVICE DELIVERY PARTNER', | ||
}, | ||
categories: ['ampath', 'afh', 'edarp', 'wrp', 'CHAK', 'AFYA NYOTA', 'AMREF'], | ||
}, | ||
yAxis: { | ||
min: 0, | ||
title: { | ||
text: 'NUMBER OF FACILITIES', | ||
}, | ||
reversedStacks: false, | ||
stackLabels: { | ||
enabled: false, | ||
style: { | ||
fontWeight: 'bold', | ||
color: | ||
// theme | ||
(Highcharts.defaultOptions.title.style && | ||
Highcharts.defaultOptions.title.style.color) || | ||
'gray', | ||
textOutline: 'none', | ||
}, | ||
}, | ||
}, | ||
legend: { | ||
align: 'left', | ||
verticalAlign: 'top', | ||
floating: false, | ||
shadow: false, | ||
y: 0, | ||
x: 80, | ||
}, | ||
tooltip: { | ||
headerFormat: '<b>{point.x}</b><br/>', | ||
pointFormat: | ||
'{series.name}: {point.y}<br/>Total: {point.stackTotal}', | ||
}, | ||
plotOptions: { | ||
column: { | ||
stacking: 'percent', | ||
dataLabels: { | ||
enabled: false, | ||
}, | ||
}, | ||
}, | ||
series: [ | ||
{ | ||
name: 'ACTIVE', | ||
data: [10, 70, 34, 90, 43,324,210], | ||
color: '#00AD30', | ||
}, | ||
{ | ||
name: 'DISCONTINUED', | ||
data: [90,23,54,77,2, 60,63], | ||
color: '#152459', | ||
}, | ||
{ | ||
name: 'STALLED/INACTIVE', | ||
data: [10,3,1,18,2, 0,6], | ||
color: '#F6941C', | ||
} | ||
], | ||
}); | ||
}, []); | ||
|
||
useEffect(() => { | ||
loadNewOnArtBySex(); | ||
}, [loadNewOnArtBySex]); | ||
|
||
return ( | ||
<div className="row"> | ||
<div className="col-12"> | ||
<Card className="trends-card"> | ||
<CardHeader className="trends-header"> | ||
EMR STATUS BY PARTNER | ||
</CardHeader> | ||
<CardBody className="trends-body"> | ||
<div className="col-12"> | ||
<HighchartsReact | ||
highcharts={Highcharts} | ||
options={hisDeployments} | ||
/> | ||
</div> | ||
</CardBody> | ||
</Card> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default HISDeploymentsByPartner; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
import React, { useEffect, useState, useCallback } from 'react'; | ||
import Highcharts from 'highcharts'; | ||
import { Card, CardBody, CardHeader } from 'reactstrap'; | ||
import HighchartsReact from 'highcharts-react-official';; | ||
|
||
const HisDeploymentsFacilityByInfrastructure = () => { | ||
const [hisDeployments, setHisDeployments] = useState({}); | ||
|
||
const loadNewOnArtBySex = useCallback(async () => { | ||
setHisDeployments({ | ||
chart: { | ||
type: 'column', | ||
}, | ||
title: { | ||
text: '', | ||
align: 'left', | ||
}, | ||
xAxis: { | ||
title: { | ||
text: 'SERVICE DELIVERY PARTNER', | ||
}, | ||
categories: ['ampath', 'afh', 'edarp', 'wrp', 'CHAK', 'AFYA NYOTA', 'AMREF'], | ||
}, | ||
yAxis: { | ||
min: 0, | ||
title: { | ||
text: 'NUMBER OF FACILITIES', | ||
}, | ||
reversedStacks: false, | ||
stackLabels: { | ||
enabled: false, | ||
style: { | ||
fontWeight: 'bold', | ||
color: | ||
// theme | ||
(Highcharts.defaultOptions.title.style && | ||
Highcharts.defaultOptions.title.style.color) || | ||
'gray', | ||
textOutline: 'none', | ||
}, | ||
}, | ||
}, | ||
legend: { | ||
align: 'left', | ||
verticalAlign: 'top', | ||
floating: false, | ||
shadow: false, | ||
y: 0, | ||
x: 80, | ||
}, | ||
tooltip: { | ||
headerFormat: '<b>{point.x}</b><br/>', | ||
pointFormat: | ||
'{series.name}: {point.y}<br/>Total: {point.stackTotal}', | ||
}, | ||
plotOptions: { | ||
column: { | ||
stacking: 'percent', | ||
dataLabels: { | ||
enabled: false, | ||
}, | ||
}, | ||
}, | ||
series: [ | ||
{ | ||
name: 'ON PREMISES', | ||
data: [80, 70, 34, 90, 43,24,110], | ||
color: '#00AD30', | ||
}, | ||
{ | ||
name: 'ON CLOUD', | ||
data: [9,23,54,77,2, 60,63], | ||
color: '#152459', | ||
} | ||
], | ||
}); | ||
}, []); | ||
|
||
useEffect(() => { | ||
loadNewOnArtBySex(); | ||
}, [loadNewOnArtBySex]); | ||
|
||
return ( | ||
<div className="row"> | ||
<div className="col-12"> | ||
<Card className="trends-card"> | ||
<CardHeader className="trends-header"> | ||
FACILITY BY INFRASTRUCTURE DEPLOYMENT | ||
</CardHeader> | ||
<CardBody className="trends-body"> | ||
<div className="col-12"> | ||
<HighchartsReact | ||
highcharts={Highcharts} | ||
options={hisDeployments} | ||
/> | ||
</div> | ||
</CardBody> | ||
</Card> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default HisDeploymentsFacilityByInfrastructure; |
124 changes: 124 additions & 0 deletions
124
src/views/RR/HisDeploymentsFacilityLevelByOwnershipCounty.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
import React, { useEffect, useState, useCallback } from 'react'; | ||
import Highcharts from 'highcharts'; | ||
import { Card, CardBody, CardHeader } from 'reactstrap'; | ||
import HighchartsReact from 'highcharts-react-official';; | ||
|
||
const HisDeploymentsFacilityLevelByOwnershipCounty = () => { | ||
const [hisDeployments, setHisDeployments] = useState({}); | ||
|
||
const loadNewOnArtBySex = useCallback(async () => { | ||
setHisDeployments({ | ||
chart: { | ||
type: 'column', | ||
}, | ||
title: { | ||
text: '', | ||
align: 'left', | ||
}, | ||
xAxis: { | ||
title: { | ||
text: 'COUNTY', | ||
}, | ||
categories: ['ampath', 'afh', 'edarp', 'wrp', 'CHAK', 'AFYA NYOTA', 'AMREF'], | ||
}, | ||
yAxis: { | ||
min: 0, | ||
title: { | ||
text: 'NUMBER OF FACILITIES', | ||
}, | ||
reversedStacks: false, | ||
stackLabels: { | ||
enabled: false, | ||
style: { | ||
fontWeight: 'bold', | ||
color: | ||
// theme | ||
(Highcharts.defaultOptions.title.style && | ||
Highcharts.defaultOptions.title.style.color) || | ||
'gray', | ||
textOutline: 'none', | ||
}, | ||
}, | ||
}, | ||
legend: { | ||
align: 'left', | ||
verticalAlign: 'top', | ||
floating: false, | ||
shadow: false, | ||
y: 0, | ||
x: 80, | ||
}, | ||
tooltip: { | ||
headerFormat: '<b>{point.x}</b><br/>', | ||
pointFormat: | ||
'{series.name}: {point.y}<br/>Total: {point.stackTotal}', | ||
}, | ||
plotOptions: { | ||
column: { | ||
stacking: 'percent', | ||
dataLabels: { | ||
enabled: false, | ||
}, | ||
}, | ||
}, | ||
series: [ | ||
{ | ||
name: 'LEVEL 1', | ||
data: [10, 70, 34, 90, 43,324,210], | ||
color: '#00AD30', | ||
}, | ||
{ | ||
name: 'LEVEL 2', | ||
data: [90,23,54,77,2, 60,63], | ||
color: '#152459', | ||
}, | ||
{ | ||
name: 'LEVEL 3', | ||
data: [10,3,1,18,2, 0,6], | ||
color: '#F6941C', | ||
}, | ||
{ | ||
name: 'LEVEL 4', | ||
data: [0,3,4,27,7, 0,6], | ||
color: '#D21D7F', | ||
}, | ||
{ | ||
name: 'LEVEL 5', | ||
data: [9,3,0,7,2, 0,3], | ||
color: '#8E2C16', | ||
}, | ||
{ | ||
name: 'LEVEL 6', | ||
data: [1,2,1,3, 1, 0, 3], | ||
color: '#5FA5E6', | ||
}, | ||
], | ||
}); | ||
}, []); | ||
|
||
useEffect(() => { | ||
loadNewOnArtBySex(); | ||
}, [loadNewOnArtBySex]); | ||
|
||
return ( | ||
<div className="row"> | ||
<div className="col-12"> | ||
<Card className="trends-card"> | ||
<CardHeader className="trends-header"> | ||
FACILITY LEVEL BY OWNERSHIP (COUNTY) | ||
</CardHeader> | ||
<CardBody className="trends-body"> | ||
<div className="col-12"> | ||
<HighchartsReact | ||
highcharts={Highcharts} | ||
options={hisDeployments} | ||
/> | ||
</div> | ||
</CardBody> | ||
</Card> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default HisDeploymentsFacilityLevelByOwnershipCounty; |
Oops, something went wrong.