Skip to content

Commit

Permalink
Adding the FTE calculation (#296)
Browse files Browse the repository at this point in the history
* Adding the FTE calculation

Per user request. This change includes a new column in the scenarios tab, additions to the analysis pipeline, and updates to documentation.

* Update model_inputs_demo.xlsx

Each scenario requires a set of specification in "CadreRoles" sheet. Added cadre roles specifications for scenario "StepCoverage".

* Revert "Update model_inputs_demo.xlsx"

This reverts commit bbb79f3.

* Update model_inputs_demo.xlsx

Added cadre roles for the scenario "StepCoverage". Each scenario is required to have a set of specified cadre roles in the "CadreRoles" sheet.

* Update Analysis_pipeline_demo

Updated labels on FTE plots to include MaxUtilization values.

* Update minor version

update minor version as we introduce a input sheet change for FTE analysis which is backward compatible.

---------

Co-authored-by: Rui Han <[email protected]>
Co-authored-by: MeWu-IDM <[email protected]>
  • Loading branch information
3 people authored Sep 22, 2023
1 parent 3e4da7d commit 25a809c
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 1 deletion.
34 changes: 34 additions & 0 deletions Analysis_pipeline_demo.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ library(readxl)
library(plyr)
library(dplyr)
library(ggplot2)
library(tidyr)
library(stringr)
library(reshape2)
library(viridis)
Expand All @@ -21,6 +22,7 @@ Mean_ServiceCat <- read.csv(paste("results/Mean_ServiceCat_",usefuldescription,"
Stats_TotClin <- read.csv(paste("results/Stats_TotClin_",usefuldescription,"_",date,".csv",sep=""))
Mean_ClinCat <- read.csv(paste("results/Mean_ClinCat_",usefuldescription,"_",date,".csv",sep=""))
Mean_Total <- read.csv(paste("results/Mean_Total_",usefuldescription,"_",date,".csv",sep=""))
ByRun_ClinMonth <- read.csv(paste("results/ByRun_ClinMonth_",usefuldescription,"_",date,".csv",sep=""))
Stats_ClinMonth <- read.csv(paste("results/Stats_ClinMonth_",usefuldescription,"_",date,".csv",sep=""))
Mean_Alloc <- read.csv(paste("results/Mean_Alloc_",usefuldescription,"_",date,".csv",sep=""))

Expand Down Expand Up @@ -133,6 +135,38 @@ ggplot(data=Cadre_labelled)+

####################################################################################################

# FTE calculation by Cadre
ymax = max(ceiling(Cadre_labelled$CI50/Cadre_labelled$WeeksPerYr/(Cadre_labelled$HrsPerWeek*Cadre_labelled$MaxUtilization))) + 1
Cadre_labelled$ScenarioLabel = paste(Cadre_labelled$Scenario_ID,":", Cadre_labelled$MaxUtilization, "MaxUtil")
unique(Cadre_labelled$ScenarioLabel)

ggplot(data=Cadre_labelled)+
geom_bar(aes(x=Year,y=ceiling(CI50/WeeksPerYr/(HrsPerWeek*MaxUtilization))),stat="identity",position="stack")+
theme_bw()+
scale_x_continuous(breaks = c(2021,2025,2030,2035))+
ylim(0,ymax)+
facet_grid(~ScenarioLabel)+
labs(x="Year",y="Total required staff count",title="Required staff count (total)")

ggplot(data=Cadre_labelled)+
geom_bar(aes(x=Year,y=ceiling(CI50/WeeksPerYr/(HrsPerWeek*MaxUtilization)),fill=RoleDescription),stat="identity",position="stack")+
theme_bw()+
scale_x_continuous(breaks = c(2021,2025,2030,2035))+
ylim(0,ymax)+
facet_grid(~ScenarioLabel)+
labs(x="Year",y="Minimum staff count",fill="Cadre",title="Minimum staff count by cadre")

ggplot(data=Cadre_labelled)+
geom_bar(aes(x=Year,y=ceiling(CI50/WeeksPerYr/(HrsPerWeek*MaxUtilization)),fill=RoleDescription),stat="identity")+
theme_bw()+
scale_x_continuous(breaks = c(2021,2025,2030,2035))+
ylim(0,ymax)+
facet_grid(RoleDescription~ScenarioLabel)+
labs(x="Year",y="Minimum staff count",fill="Cadre",title="Minimum staff count by cadre")


####################################################################################################

# service mix change over time, Line Plot

ServiceCat_Clinical <- Mean_ServiceCat %>%
Expand Down
Binary file modified config/model_inputs.xlsx
Binary file not shown.
Binary file modified config/model_inputs_demo.xlsx
Binary file not shown.
2 changes: 1 addition & 1 deletion pacehrh/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: pacehrh
Title: Population-Aware Capacity Estimator for Human Resources for Health
Version: 1.0.9
Version: 1.1.0
Author: Charles Eliot, Brittany Hagedorn
Maintainer: Charles Eliot <[email protected]>
Description: This package models the healthcare needs of a given population so you
Expand Down
1 change: 1 addition & 0 deletions pacehrh/vignettes/pacehrh.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ The **Scenarios** sheet is the primary sheet that controls inputs to the model.
* **UniqueID**: The name of the scenario to model. The name must be unique and will be used to name the results output files after the simulation runs. This can be any useful description, but should not include special characters.
* **WeeksPerYr**: The number of working weeks in the year, excluding time off and absenteeism. For example, if a typical worker has 2 weeks of vacation and is absent 3 weeks per year, then this value would be 52-2-3=47.
* **HrsPerWeek**: The number of hours each week a typical healthcare worker is expected to work, excluding breaks and on-call time. This should typically be less than 40.
* **MaxUtilization**: The maximum percentage of the hours per week that a healthcare worker is able to be productive. Range 0% to 100%, entered as a decimal with a max value of 1. This should typically be less than 0.85, which is a commonly accepted threshold for a 'busy' staff member in a clinical context.
* **BaselinePop**: The number of people in a typical healthcare catchment. Usually, these values are
set as targets by a government healthcare program, such as the size of the population each
primary healthcare facility is expected to serve. Value typically range from 5,000 to 20,000.
Expand Down

0 comments on commit 25a809c

Please sign in to comment.