Skip to content
Merged
Show file tree
Hide file tree
Changes from 147 commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
00e54d7
update recruitment for fsw - capped at 39,000 scaled by initial popul…
tdm32 May 7, 2025
9bdbefc
add hiv self-tests
tdm32 May 7, 2025
3bbee4a
modify death rates for people with HIV and TB, risk is 0.5 if no trea…
tdm32 May 7, 2025
1dd379a
update AGYW - limit to age 25 max
tdm32 May 7, 2025
f1fa557
logger for days on prep - AGYW and FSW
tdm32 May 7, 2025
da694bc
add parameter for selt-testing availability in policy
tdm32 May 7, 2025
6c1432f
update retention on prep to 0.85
tdm32 May 7, 2025
7f4e375
add logger outputs for PY on PrEP and new VMMC
tdm32 May 7, 2025
bf7101e
fix lm argument
tdm32 May 7, 2025
38d4a7a
update lm for lifestyle
tdm32 May 7, 2025
05273ae
linting
tdm32 May 7, 2025
ac51339
fix failing hiv test
tdm32 May 8, 2025
3e1303d
update tolerance of hiv prevalence in test_hiv to match the uncertain…
tdm32 May 12, 2025
a2eb5ba
update test_hiv.py to fix failing test
tdm32 May 12, 2025
4ca66a6
merge in master
tdm32 Jun 25, 2025
76ced6d
incoming changes from master
tdm32 Jun 25, 2025
2ed1de6
Merge remote-tracking branch 'origin/master'
tdm32 Jul 6, 2025
2bc49bb
Merge branch 'master' into tara_update_hiv_May2025
tdm32 Jul 7, 2025
8ebd406
update spectrum projections for treatment cascade
tdm32 Jul 7, 2025
5ca1780
update sheet with prob viral suppression, add adjustment for viral lo…
tdm32 Jul 7, 2025
8d96ede
remove parameter vs_adjustment
tdm32 Jul 7, 2025
3018799
remove parameter treatment_initiation_adjustment
tdm32 Jul 7, 2025
59554e6
remove treatment_initiation_adjustment and vs_adjustment from improve…
tdm32 Jul 7, 2025
f0c1232
remove TB screening from HIV test appt following DHA advice
tdm32 Jul 7, 2025
d62fa89
move HIV test from TB screening appt to TB treatment initiation appt …
tdm32 Jul 7, 2025
6d3c49a
update HIV treatment appt with TB screening appt
tdm32 Jul 7, 2025
401efb6
update childrens program data AIDSInfo
tdm32 Jul 7, 2025
0ec30f0
update UNAIDS data on children, treatment cascade and mortality
tdm32 Jul 7, 2025
0bd6ecf
update plot functions
tdm32 Jul 7, 2025
41cb5ce
add new property for current ARV prescription length
tdm32 Jul 15, 2025
ba40ec7
add logger for multi-month dispensing by age/sex/pregnant/breastfeeding
tdm32 Jul 15, 2025
11d3bdf
update logger for MMD
tdm32 Jul 15, 2025
a9989da
add plot for MMD
tdm32 Jul 15, 2025
31e5fd0
fix to failing test
tdm32 Jul 16, 2025
253a616
Merge remote-tracking branch 'origin/master'
tdm32 Jul 16, 2025
5e05c55
Merge branch 'master' into tara_update_hiv_May2025
tdm32 Jul 16, 2025
37e7656
merge in master
tdm32 Jul 17, 2025
fbe6700
update loggers
tdm32 Jul 21, 2025
27ba8de
reduce prob retained on prep to 0.5 (from 0.85)
tdm32 Jul 21, 2025
b3c751e
give prep to AGYW in status quo, randomly distribute amongst top 50% …
tdm32 Jul 21, 2025
b2e291d
setup new scenarios for program simplification
tdm32 Jul 21, 2025
ec0dea0
prep in AGYW given randomly among 50% highest risk
tdm32 Jul 21, 2025
1477ead
update the scenarios for program simplification
tdm32 Jul 21, 2025
25b68ac
update the scenarios for program simplification
tdm32 Jul 21, 2025
3fbcc18
correct reference to TB HSI for IPT in HIV module
tdm32 Jul 22, 2025
806deab
fix dataframe copy warning
tdm32 Jul 22, 2025
2087385
update division by 0 error
tdm32 Jul 23, 2025
6a87da3
set up scenarios
tdm32 Jul 23, 2025
306b0d9
Cherry-pick parameter_values Enhanced_Lifestyle from MIHPSA branch
tdm32 Jul 24, 2025
0aff7ef
Cherry-pick Enhanced_Lifestyle from MIHPSA branch
tdm32 Jul 24, 2025
63d2968
update enhanced_lifestyle.py
tdm32 Jul 24, 2025
6d83faf
test runs
tdm32 Jul 24, 2025
d4af86d
set up status quo local run
tdm32 Jul 24, 2025
81d43f2
use only essential modules for test runs
tdm32 Jul 24, 2025
5860a77
add new parameters for TDF test
tdm32 Jul 28, 2025
e2a13b1
update IPT length and follow-up
tdm32 Jul 28, 2025
8850f5e
tdf test switch added to scenarios
tdm32 Jul 28, 2025
3dfecd9
check scenarios
tdm32 Jul 29, 2025
2b05ffe
set up scenarios
tdm32 Jul 29, 2025
840690b
update plots
tdm32 Aug 5, 2025
2d0c40d
check prep dispensation period
tdm32 Aug 5, 2025
e1dce3a
update output processing
tdm32 Aug 5, 2025
ad5ef7e
set up scale-up scenario and add to runs
tdm32 Aug 6, 2025
da2d1ff
update scenario file
tdm32 Aug 6, 2025
5223f86
json
tdm32 Aug 6, 2025
1d153b1
correct scaleup scenario which affected all scenarios
tdm32 Aug 19, 2025
4fb9bf8
set up scenarios
tdm32 Aug 19, 2025
5f0796b
update comment
tdm32 Aug 20, 2025
64697f7
new figures for epi outputs and HCW time
tdm32 Aug 26, 2025
da2865c
update figures
tdm32 Aug 29, 2025
4f9248d
update plots
tdm32 Sep 11, 2025
ede3dd9
update hiv.py with VL testing, adherence counselling and oral/inj pre…
tdm32 Sep 30, 2025
3246f52
clean up todo statements
tdm32 Sep 30, 2025
b54b299
update viral suppression probability using new logic for effects of v…
tdm32 Sep 30, 2025
c9a2f6d
remove unneeded loggers
tdm32 Sep 30, 2025
f02aa2d
update adjustments to viral suppression rates by age, weight for ages…
tdm32 Sep 30, 2025
96fa9ca
update the logic around choice of TDF and VL test, check referral to …
tdm32 Oct 1, 2025
5e8ee30
update VL test sensitivity
tdm32 Oct 1, 2025
647c2d9
add HSI event for self-tests, positive result prompts referral for co…
tdm32 Oct 1, 2025
43b74f9
update parameter list
tdm32 Oct 1, 2025
8240fa9
set up scenarios
tdm32 Oct 1, 2025
2aafdc8
edit comment
tdm32 Oct 1, 2025
dc4f510
set up scenarios
tdm32 Oct 1, 2025
a0a7f5c
update scenarios
tdm32 Oct 1, 2025
8828d72
json
tdm32 Oct 2, 2025
c0af27c
update scenarios
tdm32 Oct 6, 2025
fe4b7e1
update scenarios
tdm32 Oct 7, 2025
54c40fd
update output processing
tdm32 Oct 16, 2025
9e4899a
remove hardcoding and param revamp
mmsuarezcosta Oct 29, 2025
51dd8e3
update scenario file to include proper labeling
mmsuarezcosta Oct 30, 2025
0a7d226
update test_htm_scaleup.py to reflect changes in scaleup_parameters.py
mmsuarezcosta Oct 30, 2025
b94c3e7
update param labeling for calibration
mmsuarezcosta Nov 3, 2025
7183e54
remove addt hardcoded params
mmsuarezcosta Nov 9, 2025
efe70b9
bring in changes to hiv.py from mihpsda branch
tdm32 Dec 2, 2025
213430e
replace baseline art coverage file
tdm32 Dec 2, 2025
5ccf2ce
update parameter values
tdm32 Dec 2, 2025
193faef
update oral:inj prep ratio
tdm32 Dec 4, 2025
c2171de
oral prep 90 days dispensation
tdm32 Dec 4, 2025
a5568eb
add scenario switch to injectable prep
tdm32 Dec 10, 2025
740d74e
update adjust_viral_load_suppression_rates_function
tdm32 Dec 10, 2025
3cb3c72
update testing rates in Reduce Testing scenario to match MIHPSA halfHTS
tdm32 Dec 19, 2025
1f2b656
json
tdm32 Dec 19, 2025
17e5589
update spectrum_treatment_cascade.csv
tdm32 Dec 19, 2025
ee602b9
test run
tdm32 Dec 19, 2025
48262d2
fix to prep type
tdm32 Jan 6, 2026
d1a4319
test run setup
tdm32 Jan 6, 2026
ea64daf
comment out schisto person days logging
tdm32 Jan 6, 2026
60b473f
Merge branch 'master' into tara_update_hiv_May2025
tdm32 Jan 6, 2026
e93a664
remove warnings from equipment.py
tdm32 Jan 6, 2026
cc7bdb6
reset scenarios
tdm32 Jan 6, 2026
ef8f2f8
change infant / child cotrim to oral suspension
tdm32 Jan 7, 2026
7842bf6
additional plots for temporal trends
tdm32 Jan 12, 2026
5f334ae
if no HIV test available, set blank footprint
tdm32 Jan 12, 2026
d53ec04
Merge branch 'master' into 1649-hiv
tdm32 Jan 13, 2026
7e64be1
remove scenarios for program simplification runs
tdm32 Jan 13, 2026
94052f2
accept todo statements as completed for updated ART coverage and the …
tdm32 Jan 13, 2026
ba47fa1
clean up todo statements
tdm32 Jan 13, 2026
ad60fa4
remove criteria for TPT in PLHIV requiring residence in high-risk dis…
tdm32 Jan 13, 2026
55eadc9
clean up comments
tdm32 Jan 13, 2026
f2b78b7
Merge branch 'master' into tara_update_hiv_May2025
tdm32 Jan 13, 2026
9e5a349
Merge branch '1649-hiv' into tara_update_hiv_May2025
tdm32 Jan 13, 2026
ef37566
merge in PR #1742 and check conflicts
tdm32 Jan 13, 2026
d4dc1c3
update reference to art coverage data for baseline
tdm32 Jan 13, 2026
b5cb994
fixing low art coverage
tdm32 Jan 13, 2026
83f7b0a
test runs
tdm32 Jan 20, 2026
b7b70ca
Merge branch 'master' into tara_update_hiv_May2025
tdm32 Jan 20, 2026
bbc7064
remove duplicated parameters in malaria for rdt delays
tdm32 Jan 20, 2026
aa685e0
linting
tdm32 Jan 20, 2026
f7a6c48
linting
tdm32 Jan 20, 2026
fa9baba
isort
tdm32 Jan 20, 2026
f488462
replace numbers with parameters
tdm32 Jan 20, 2026
461ffc3
fix remaining todo statements
tdm32 Jan 20, 2026
592b583
remove processing script
tdm32 Jan 20, 2026
d72304f
fix failing tests
tdm32 Jan 20, 2026
28c1088
remove hiv test check from test_tb.py as it no longer occurs during t…
tdm32 Jan 20, 2026
6ceb940
allow warnings for equipment if item not recognised
tdm32 Jan 21, 2026
1b85da7
update improved healthcare seeking parameter names
tdm32 Jan 21, 2026
013835d
update improved healthcare seeking parameter names
tdm32 Jan 21, 2026
c7d1f9d
pull in new fixes from schisto updates PR #1787
tdm32 Jan 22, 2026
0c82752
update schisto parameters to ensure read as floats
tdm32 Jan 26, 2026
0885e7e
fix conflict
tdm32 Jan 26, 2026
9694db1
Merge branch 'master' into tara_update_hiv_May2025
tdm32 Jan 26, 2026
9404dd7
improved_healthsystem_and_healthcare_seeking update the adjusted vira…
tdm32 Jan 26, 2026
78167f3
update param types for test_analysis checks
tdm32 Jan 26, 2026
da5cfae
update treatment_id in priority policies
tdm32 Jan 26, 2026
5393f1f
update treatment_id in priority policies
tdm32 Jan 26, 2026
93e07b3
update treatment ID in priority policies
tdm32 Jan 28, 2026
80960b2
fix fsw parameters
tdm32 Jan 31, 2026
0f0bdb5
replace WASH logging in enhanced_lifestyle.py
tdm32 Jan 31, 2026
c00c7d9
fix typo in comment
tdm32 Jan 31, 2026
7882e48
add comments for test containers
tdm32 Jan 31, 2026
5d40560
rmeove magic numbers for 3hp and ipt dosage
tdm32 Jan 31, 2026
a634bb1
clarify dict for vl testing availability
tdm32 Jan 31, 2026
63d6665
update tdf test results to bool
tdm32 Jan 31, 2026
3db6506
fix error in return statement
tdm32 Jan 31, 2026
45d8e74
remove unneeded logger
tdm32 Jan 31, 2026
63d7b82
remove unneeded logging
tdm32 Jan 31, 2026
3726707
Merge remote-tracking branch 'origin/master' into tara_update_hiv_May…
tdm32 Jan 31, 2026
005b5de
remove unneeded logging
tdm32 Jan 31, 2026
4cfd1c2
fix missing comma
tdm32 Jan 31, 2026
d889bc1
update test_tb to use the updated parameter for length IPT dispensation
tdm32 Jan 31, 2026
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
4 changes: 2 additions & 2 deletions resources/ResourceFile_HIV/MPHIA_incidence2020.csv
Git LFS file not shown
4 changes: 2 additions & 2 deletions resources/ResourceFile_HIV/MPHIA_prevalence_art2020.csv
Git LFS file not shown
4 changes: 2 additions & 2 deletions resources/ResourceFile_HIV/MoH_numbers_tests.csv
Git LFS file not shown
4 changes: 2 additions & 2 deletions resources/ResourceFile_HIV/art_coverage.csv
Git LFS file not shown
3 changes: 3 additions & 0 deletions resources/ResourceFile_HIV/arv_dispensation_schedule.csv
Git LFS file not shown
4 changes: 2 additions & 2 deletions resources/ResourceFile_HIV/calibration_from_aids_info.csv
Git LFS file not shown
4 changes: 2 additions & 2 deletions resources/ResourceFile_HIV/children0_14_prev_AIDSinfo.csv
Git LFS file not shown
4 changes: 2 additions & 2 deletions resources/ResourceFile_HIV/parameters.csv
Git LFS file not shown
4 changes: 2 additions & 2 deletions resources/ResourceFile_HIV/spectrum_treatment_cascade.csv
Git LFS file not shown
3 changes: 0 additions & 3 deletions resources/ResourceFile_HIV/unaids_infections_art2021.csv

This file was deleted.

3 changes: 3 additions & 0 deletions resources/ResourceFile_HIV/unaids_infections_art2023.csv
Git LFS file not shown
3 changes: 0 additions & 3 deletions resources/ResourceFile_HIV/unaids_mortality_dalys2021.csv

This file was deleted.

3 changes: 3 additions & 0 deletions resources/ResourceFile_HIV/unaids_mortality_dalys2023.csv
Git LFS file not shown
4 changes: 2 additions & 2 deletions resources/ResourceFile_HIV/unaids_program_perf.csv
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
4 changes: 2 additions & 2 deletions resources/ResourceFile_Schisto/parameter_values.csv
Git LFS file not shown
4 changes: 2 additions & 2 deletions resources/ResourceFile_TB/ipt_coverage.csv
Git LFS file not shown
4 changes: 2 additions & 2 deletions resources/ResourceFile_TB/parameters.csv
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
4 changes: 2 additions & 2 deletions resources/malaria/ResourceFile_malaria/parameters.csv
Git LFS file not shown
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
"""This Scenario file runs the model under different assumptions for the HIV program simplification


check the batch configuration gets generated without error:
tlo scenario-run --draw-only src/scripts/hiv/program_simplification/analysis_hiv_program_simplification.py

Test the scenario starts running without problems:
tlo scenario-run src/scripts/hiv/program_simplification/analysis_hiv_program_simplification.py

or execute a single run:
tlo scenario-run src/scripts/hiv/program_simplification/analysis_hiv_program_simplification.py --draw 1 0

Run on the batch system using:
tlo batch-submit src/scripts/hiv/program_simplification/analysis_hiv_program_simplification.py

Display information about a job:
tlo batch-job tlo_q1_demo-123 --tasks

Download result files for a completed job:
tlo batch-download calibration_script-2022-04-12T190518Z

if running locally need to parse each folder
tlo parse-log /Users/tmangal/PycharmProjects/TLOmodel/outputs/hiv_program_simplification-2025-07-24T160218Z/0/0

"""

from pathlib import Path
from typing import Dict

from scripts.hiv.program_simplification.scenario_definitions import ScenarioDefinitions
from tlo import Date, logging
from tlo.methods.fullmodel import fullmodel
from tlo.scenario import BaseScenario


class HIV_Progam_Elements(BaseScenario):
def __init__(self):
super().__init__()
self.seed = 10
self.start_date = Date(2010, 1, 1)
self.end_date = Date(2051, 1, 1)
self.pop_size = 100_000
self._scenarios = self._get_scenarios()
self.number_of_draws = len(self._scenarios)
self.runs_per_draw = 10

def log_configuration(self):
return {
'filename': 'hiv_program_simplification',
'directory': Path('./outputs'),
'custom_levels': {
'*': logging.WARNING,
'tlo.methods.demography': logging.INFO,
'tlo.methods.demography.detail': logging.WARNING,
'tlo.methods.healthburden': logging.INFO,
'tlo.methods.healthsystem': logging.WARNING,
'tlo.methods.healthsystem.summary': logging.INFO,
'tlo.methods.hiv': logging.INFO,
'tlo.methods.tb': logging.INFO,
}
}

def modules(self):
return (
fullmodel(use_simplified_births=True,
module_kwargs={"HealthSystem": {"equip_availability": 'all'}})
)

def draw_parameters(self, draw_number, rng):
if draw_number < len(self._scenarios):
return list(self._scenarios.values())[draw_number]

def _get_scenarios(self) -> Dict[str, Dict]:
"""Return the Dict with values for the parameters that are changed, keyed by a name for the scenario."""

scenario_definitions = ScenarioDefinitions()

return {
"Status Quo": scenario_definitions.status_quo(),

"Reduce HIV testing": scenario_definitions.reduce_HIV_test(),

"Remove Viral Load Testing": scenario_definitions.remove_VL(),

"Target Viral Load Testing": scenario_definitions.target_VL(),

"Replace Viral Load Testing": scenario_definitions.replace_VL_with_TDF(),

"Remove PrEP for FSW": scenario_definitions.remove_prep_fsw(),

"Remove PrEP for AGYW": scenario_definitions.remove_prep_agyw(),

"Switch to injectable PrEP": scenario_definitions.switch_to_injectable_prep(),

"Remove TPT for PLHIV": scenario_definitions.remove_TPT(),

"Targeted TPT": scenario_definitions.target_TPT(),

"Remove VMMC": scenario_definitions.remove_vmmc(),

"Target All Elements": scenario_definitions.target_all(),

"Reduce All Elements": scenario_definitions.remove_all(),

"Program Scale-up": scenario_definitions.scaleup(),
}


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

scenario_run([__file__])
Loading