Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Health Impact of Realistic Consumable Availability Scenarios #1367

Draft
wants to merge 93 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
b632850
add script to prepare HHFA data for regression analysis
May 22, 2024
a1646a5
add scripts to run regression analysis
May 22, 2024
eedb2e8
move file paths to main.R
May 23, 2024
1f2c5b7
Add script to generation regression-based predicted changes to availa…
May 23, 2024
64b2160
add predict.R to workflow
May 23, 2024
33c9039
draft script to generate consumable availability scenarios
May 23, 2024
3f1fdff
update consumable RF to include TLO-HHFA consumable mapping
May 28, 2024
1e46315
updates to imputation
May 29, 2024
6175495
check that the dataframe contains all districts
May 30, 2024
e9a2f51
temporary changes to revert
May 30, 2024
56dc371
update 'regression_application' column
May 31, 2024
e3fc740
update interpolation methodology
Jun 3, 2024
3e287a8
add scenarios 6-8
Jun 4, 2024
ed78828
update test for consumables availability ResourceFile
Jun 4, 2024
31f6ead
update test for consumables availability ResourceFile
Jun 5, 2024
0089527
add script to generate barplots to visualise change in available_prop…
Jun 5, 2024
e3211fd
update the method of generating scenarios 6-8
Jun 6, 2024
19aa36e
minor figure edit
Jun 10, 2024
a85db77
Merge remote-tracking branch 'origin/master' into sakshi/impact_of_co…
Jun 10, 2024
0135a23
allow simulation to import availability estimates based on new scenarios
Jun 10, 2024
f9c7df1
update health system parameter
Jun 10, 2024
2e5ed3f
revert to consumable RFs before master was merged in
Jun 10, 2024
84fdb73
update RF to include availability iunder the 8 realistic improved ava…
Jun 10, 2024
3539397
add the full list of scenario availability columns to consumable and …
Jun 10, 2024
7bf2b07
update assertion to ensure that only consumable availabilility at lev…
Jun 10, 2024
6cbe0ee
update helper function to load consuamable data
Jun 10, 2024
553d0cf
Revert "update helper function to load consuamable data"
Jun 10, 2024
d4fd581
update helper function to load consuamable data
Jun 10, 2024
242503a
update _process_consumables_data
Jun 10, 2024
82cb1b0
update _process_consumables_data
Jun 10, 2024
df28a99
correct _process_consumables_data
Jun 10, 2024
ee9616e
update duration of simulation for local run
Jun 10, 2024
8d2a79f
update _process_consumables_data
Jun 11, 2024
b78d5a1
update scenario for large run
Jun 11, 2024
be63ffc
add scenario analysis script
Jun 13, 2024
37d9b5f
add figures showing mechanisms of impact
Jun 14, 2024
30548ab
update figure legend to show cleaner scneario names
Jun 15, 2024
4d7ae42
minor script cleaning
Jun 15, 2024
db710c7
add heatmap aummarising consumable availability in the RF
Jun 15, 2024
1c68e6b
remove line plots for mechanisms of impact
Jun 22, 2024
998c5ae
update total DALYs averted and total DALYs accrued figures
Jun 22, 2024
c47d771
plot DALYs accrued by cause
Jun 22, 2024
847d4ae
plot DALYs averted by cause
Jun 23, 2024
fc41b9a
plot DALYs averted per person year
Jun 23, 2024
230f1a3
plot DALYs averted per person year by cause
Jun 23, 2024
52d54ca
update scenario names to be more clear
Jun 23, 2024
bd75d63
fix error in calculation of DALYs per person-year
Jun 23, 2024
30682a2
change plot labels from person-year to person
Jun 23, 2024
a96d78e
add bar plots of capacity utilised by cadre and level
Jun 23, 2024
1009734
update names of scenarios
Jun 24, 2024
030083a
update heatmap to only include two levels of care
Jun 24, 2024
0b671c9
fix average to only include 1a and 1b in the heatmap
Jun 25, 2024
2558e5f
update 'status quo' to 'actual'
Jun 28, 2024
18046f4
get heatmaps for all scenarios
Jul 10, 2024
0a3ac87
Merge remote-tracking branch 'origin/master' into sakshi/impact_of_co…
Sep 4, 2024
8dad43a
update paths from dropbox to sharepoint
Sep 4, 2024
d62e086
Clean code for assigning consumable category
Sep 4, 2024
fd106ae
Rename item category column and extract into consumable availability RF
Sep 5, 2024
4c2644c
Add 'item_category' to the function to check format of consumable ava…
Sep 5, 2024
b01904f
remove reindex() line because this is performed earlier in the script
Sep 5, 2024
4ab53e3
removed these scripts which are not being used in the TLO model
Sep 5, 2024
09d8bb2
Drop columns not needed from RF_items_and_packages
Sep 5, 2024
35d6ebe
Merge branch 'sakshi/sharepoint_update_for_consumables_RF' into saksh…
Sep 5, 2024
15aeb98
load 'item_category' directly from the small consumables RF
Sep 5, 2024
e51384a
update df name for readability
Sep 5, 2024
21fd8a8
add HHFA proxies for two more TLO model consumables
Sep 6, 2024
1b63b30
add scenario 9 (level 2 increased to 99th percentile)
Sep 6, 2024
6488940
add parallel supply chain scenarios
Sep 10, 2024
b4dedea
add heatmaps to represent scenarios
Sep 10, 2024
a733a89
add scenarios to simulation file
Sep 10, 2024
2eda2d4
add new scenarios to consumables.py
Sep 10, 2024
5f9b9c4
add new scenarios to healthsystem.py
Sep 10, 2024
106e322
[TEMPORARY] remove item_category
Sep 10, 2024
c8b1431
Revert "Drop columns not needed from RF_items_and_packages"
Sep 10, 2024
c76624a
update scenario for local run
Sep 11, 2024
208fc4e
Remove item_category from RF_small and move to RF_designations
Sep 12, 2024
d1b7d78
add item_category from RF_designations
Sep 12, 2024
7aae87e
update scenario file for local run
Sep 12, 2024
3989c44
add description of scenarios
Sep 12, 2024
fedc2fc
minor update to correct direction of mapping
Sep 12, 2024
82cc7f2
update scenario to submit to Azure
Sep 12, 2024
c9bffa5
minor changes to figures + allow new results to be loaded
Sep 17, 2024
ecaf310
minor changes to figures
Sep 17, 2024
c262452
Explicitly specify colours for each scenario
Sep 17, 2024
3cd31b6
drop the DHO scenario
Sep 17, 2024
f22d845
rename columns for df_for_plot and streamline the choice of scenarios…
Sep 17, 2024
ec338b8
update figures for think tank presentation
Sep 19, 2024
05156d2
Update scenarios 10-12 to apply max conditions as necessary
Sep 26, 2024
52f12bf
update bar plot
Sep 26, 2024
280c753
update bar plot
Sep 26, 2024
a018c3a
update scenarios 6-9 so that availability is max(original availabilit…
Oct 20, 2024
4edcdcf
Merge remote-tracking branch 'origin/master' into sakshi/impact_of_co…
Oct 20, 2024
0f55c9c
add scenarios 9-12 to test_consumables.py
Oct 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
1,014 changes: 1,014 additions & 0 deletions src/scripts/consumables_analyses/analysis_impact_of_consumable_scenarios.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
"""
This file defines a batch run to calculate the health effect of updated consumable availability estimates
as a result of a supply chain intervention. The following scenarios are considered:
1. 'default' : this is the benchmark scenario with 2018 levels of consumable availability
2. 'scenario1' : [Level 1a + 1b] All items perform as well as consumables other than drugs/diagnostic tests
3. 'scenario2' : [Level 1a + 1b] 1 + All items perform as well as consumables classified as 'Vital' in the Essential Medicines List
4. 'scenario3' : [Level 1a + 1b] 2 + All facilities perform as well as those in which consumables stock is managed by pharmacists
5. 'scenario6' : [Level 1a + 1b] All facilities have the same probability of consumable availability as the 75th percentile best performing facility for each individual item
6. 'scenario7' : [Level 1a + 1b] All facilities have the same probability of consumable availability as the 90th percentile best performing facility for each individual item
7. 'scenario8' : [Level 1a + 1b] All facilities have the same probability of consumable availability as the 99th percentile best performing facility for each individual item
8. 'scenario9' : [Level 1a + 1b + 2] All facilities have the same probability of consumable availability as the 99th percentile best performing facility for each individual item
9. 'scenario10' : [Level 1a + 1b] All programs perform as well as HIV
10. 'scenario11' : [Level 1a + 1b] All programs perform as well as EPI
12. 'all': all consumable are always available - provides the theoretical maximum health gains which can be made through improving consumable supply

The batch runs are for a large population for a long time with all disease modules and full use of HSIs.
Run on the batch system using:
```tlo batch-submit src/scripts/consumables_analyses/scenario_impact_of_consumable_scenarios.py```
or locally using:
```tlo scenario-run src/scripts/consumables_analyses/scenario_impact_of_consumable_scenarios.py```
"""

from pathlib import Path
from typing import Dict

from tlo import Date, logging
from tlo.analysis.utils import get_parameters_for_status_quo, mix_scenarios
from tlo.methods.fullmodel import fullmodel
from tlo.scenario import BaseScenario

class ImpactOfConsumablesScenarios(BaseScenario):
def __init__(self):
super().__init__()
self.seed = 99
self.start_date = Date(2010, 1, 1)
self.end_date = Date(2019, 12, 31)
self.pop_size = 100_000 # large population size for final simulation - 100,000
self.number_of_draws = 11 # <- 11 scenarios
self.runs_per_draw = 10 # <- repeated this many times

def log_configuration(self):
return {
'filename': 'impact_of_consumables_scenarios',
'directory': './outputs', # <- (specified only for local running)
'custom_levels': {
'*': logging.WARNING,
'tlo.methods.demography': logging.INFO,
'tlo.methods.healthburden': logging.INFO,
"tlo.methods.healthsystem.summary": logging.INFO,
}
}

def modules(self):
return fullmodel(resourcefilepath=self.resources)

def draw_parameters(self, draw_number, rng):
return {
'HealthSystem': {
'cons_availability': ['default',
'scenario1', 'scenario2', 'scenario3',
'scenario6', 'scenario7', 'scenario8',
'scenario9', 'scenario10', 'scenario11',
'all'][draw_number]
}
}

if __name__ == '__main__':
from tlo.cli import scenario_run

scenario_run([__file__])
Loading
Loading