Skip to content

Param Revamp - HIV #1742

Merged
marghe-molaro merged 6 commits intomasterfrom
1649-hiv
Jan 13, 2026
Merged

Param Revamp - HIV #1742
marghe-molaro merged 6 commits intomasterfrom
1649-hiv

Conversation

@mmsuarezcosta
Copy link
Collaborator

@mmsuarezcosta mmsuarezcosta commented Oct 30, 2025

Files

Files changes:

  • parameters.csv
  • scaleup_parameters.csv
    • It is important to review the modifications I have made to this file. I have updated to the standard parameters.csv format, thus the column target_value has been renamed value, and the max and mins have been changed to prior_min and prior_max. The logic is that anything within the scale_up file is a target by definition, so it is not required to label the value itself as target.

Files used in hiv module that require refactoring (request for @mnjowe to support in future iterations):

  • hiv_prevalence.csv
  • time_since_infection_at_baselin.csv
  • MoH_numbers_tests.csv, spectrum_treatment_cascade.csv (they contain historical data, so refactoring may not be required)

Calibration Data Files

  • LHC_samples.csv
  • unaids_infections_art2021.csv
  • unaids_mortality_dalys2021.csv
  • children0_14_prev_AIDSinfo.csv
  • unaids_program_perf.csv
  • DHS_prevalence.csv
  • MoH_number_art.csv
  • MPHIA_incidence2020.csv
  • MPHIA_prevalence_art2020.csv
  • MoH_numbers_tests.csv (also used in HIV.py)

Files Not Used in Code (May be legacy - consider deleting)

  • calibration_from_aids_info.csv
  • MoH_CPT_IPT2020.csv
  • unaids_pmtct2021.csv
  • MPHIA_incidence2020.csv (output_plots.py references 2015 version that doesn't exist, consider updating reference)
  • MPHIA_prevalence_art2020.csv (output_plots.py references 2015 version that doesn't exist, consider updating reference)

Parameters

Assumptions

  • mean_months_between_aids_and_death
  • mean_months_between_aids_and_death_infant
  • rr_fsw (discrepancy in write-up value 20 and parameter.csv value of 25)
  • rr_behaviour_change
  • proportion_reduction_in_risk_of_hiv_aq_if_on_prep
  • mean_months_between_aids_and_death_infant

Undetermined, calibration

I cross-checked the write-up and notes in the parameter CSV file to determine which I believed to be calibrated.

  • hiv_testing_rate_adjustment, treatment_initiation_adjustment,vs_adjustment: believe all these are calibrated based on write-up and parameter documentation in code
  • Circumcision parameters (prob_circ_after_hiv_test, increase_in_prob_circ_2019, prob_circ_for_child_before_2020, prob_circ_for_child_from_2020): Based on write-up, vmc was calibrated to national rates, so I have labeled all these as calibrated
  • aids_tb_treatment_adjustment: believe it is calibrated because of adjustment label
  • Other testing rate probabilities (e.g. prob_hiv_test_at_anc_or_delivery) I have marked as local, but they may have been adjusted for calibration.

Hard-Coding

  • Any values the LinearModels I have left hard-coded. Example:
        predictors = [
            Predictor("age_years").when("<15", 0.0).when("<49", 1.0).otherwise(0.0),
            Predictor("sex").when("F", p["rr_sex_f"]),
  • Consumables and equipment

Notes (Future development)

  • More thoroughly review designation of local and universal (I did not have time to exhaustively review)

@mmsuarezcosta mmsuarezcosta linked an issue Oct 30, 2025 that may be closed by this pull request
@mmsuarezcosta mmsuarezcosta requested review from joehcollins, marghe-molaro, mnjowe, tbhallett and tdm32 and removed request for joehcollins October 30, 2025 13:04
@mmsuarezcosta mmsuarezcosta changed the title remove hardcoding and param revamp Param Revamp - HIV Oct 30, 2025
@mmsuarezcosta mmsuarezcosta marked this pull request as ready for review November 3, 2025 13:00
@marghe-molaro
Copy link
Collaborator

Thanks @mmsuarezcosta, this looks good to me, and I think is ready for @tdm32's review!


# check still eligible, person must be <30 years old or a fsw
if (person["age_years"] > 30) or not person["li_is_sexworker"]:
if (person["age_years"] > p['age_max_prep']) or not person["li_is_sexworker"]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be the max age of AGYW (age_max_agyw)

self,
priority=1,
topen=self.sim.date + pd.DateOffset(days=7),
topen=self.sim.date + pd.DateOffset(days=p['prep_cons_notavailable_retry_days']),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prep_cons_notavailable_retry_days - should these parameters which describe repeat healthcare seeking behaviour if no cons available be standardised? One param for repeat ARV/PrEP/VMMC etc if no consumables on the day?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @tdm32 , I think you are in the best position to decide how disaggregated these should be. If currently there is one single assumption around repeated tries, regardless of the consumable type, then we could definitely standardise/unify it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the way it's done here is right, seeking PrEP and seeking VMMC are two very different processes so fine as it is. Thanks.

@tdm32
Copy link
Collaborator

tdm32 commented Dec 1, 2025

On the sheet scaleup_parameters.csv columns max and min have been changed to prior_min and prior_max. This is not quite right, these values are hypothetical values for reducing program to min performance and scaling up to max performance for scenario analyses.

@marghe-molaro
Copy link
Collaborator

On the sheet scaleup_parameters.csv columns max and min have been changed to prior_min and prior_max. This is not quite right, these values are hypothetical values for reducing program to min performance and scaling up to max performance for scenario analyses.

Thanks @tdm32 , absolutely prior_min and prior_max should be N/A for scenario parameters so I will correct this.

@marghe-molaro marghe-molaro merged commit 77b6467 into master Jan 13, 2026
66 checks passed
@marghe-molaro marghe-molaro deleted the 1649-hiv branch January 13, 2026 17:31
tdm32 added a commit that referenced this pull request Jan 20, 2026
tbhallett pushed a commit that referenced this pull request Feb 9, 2026
* update recruitment for fsw - capped at 39,000 scaled by initial population size
reduce RR for HIV for FSW

* add hiv self-tests
update prep for agyw poll
add prep for fsw poll

* modify death rates for people with HIV and TB, risk is 0.5 if no treatment, risk falls to 0.15 if on treatment

* update AGYW - limit to age 25 max

* logger for days on prep - AGYW and FSW
VL logger

* add parameter for selt-testing availability in policy

* update retention on prep to 0.85

* add logger outputs for PY on PrEP and new VMMC

* fix lm argument

* update lm for lifestyle

* linting

* fix failing hiv test

* update tolerance of hiv prevalence in test_hiv to match the uncertainty around the calibration targets

* update test_hiv.py to fix failing test

* merge in master

* incoming changes from master

* update spectrum projections for treatment cascade

* update sheet with prob viral suppression, add adjustment for viral load testing starting in 2016.
update prob_viral_suppression() with adjusted values
allow 0.1% default each 3 months

* remove parameter vs_adjustment

* remove parameter treatment_initiation_adjustment

* remove treatment_initiation_adjustment and vs_adjustment from improved healthcare seeking sheet

* remove TB screening from HIV test appt following DHA advice

* move HIV test from TB screening appt to TB treatment initiation appt following advice from DHA

* update HIV treatment appt with TB screening appt

* update childrens program data AIDSInfo
update figures to use MPHIA 2020

* update UNAIDS data on children, treatment cascade and mortality

fix failing assert

* update plot functions

* add new property for current ARV prescription length
add ARV dispensation schedule varying by year, age, sex, pregnancy / BF
adapt consumables checks for varying dispensation schedules
check follow-up appt for tx and prep

* add logger for multi-month dispensing by age/sex/pregnant/breastfeeding

* update logger for MMD

* add plot for MMD

* fix to failing test

* merge in master

* update loggers

* reduce prob retained on prep to 0.5 (from 0.85)

* give prep to AGYW in status quo, randomly distribute amongst top 50% of high-risk AGYW

* setup new scenarios for program simplification

* prep in AGYW given randomly among 50% highest risk
remove commented out code

* update the scenarios for program simplification

* update the scenarios for program simplification

* correct reference to TB HSI for IPT in HIV module

* fix dataframe copy warning

* update division by 0 error

* set up scenarios

* Cherry-pick parameter_values Enhanced_Lifestyle from MIHPSA branch

* Cherry-pick Enhanced_Lifestyle from MIHPSA branch

* update enhanced_lifestyle.py

* test runs

* set up status quo local run

* use only essential modules for test runs

* add new parameters for TDF test

* update IPT length and follow-up

* tdf test switch added to scenarios

* check scenarios

* set up scenarios

* update plots

* check prep dispensation period

* update output processing

* set up scale-up scenario and add to runs

* update scenario file

* json

* correct scaleup scenario which affected all scenarios

* set up scenarios

* update comment

* new figures for epi outputs and HCW time

* update figures

* update plots

* update hiv.py with VL testing, adherence counselling and oral/inj prep choice

* clean up todo statements

* update viral suppression probability using new logic for effects of viral load tests
add adjustment for young adults having lower viral suppression rates

* remove unneeded loggers

* update adjustments to viral suppression rates by age, weight for ages 30+ to get average correct

* update the logic around choice of TDF and VL test, check referral to adherence counselling and add delay

* update VL test sensitivity

* add HSI event for self-tests, positive result prompts referral for confirmatory testing at facility

* update parameter list

* set up scenarios

* edit comment

* set up scenarios

* update scenarios

* json

* update scenarios
update outputs

* update scenarios
update outputs

* update output processing

* remove hardcoding and param revamp

* update scenario file to include proper labeling

* update test_htm_scaleup.py to reflect changes in scaleup_parameters.py

* update param labeling for calibration

* remove addt hardcoded params

* bring in changes to hiv.py from mihpsda branch

* replace baseline art coverage file

* update parameter values

* update oral:inj prep ratio

* oral prep 90 days dispensation

* add scenario switch to injectable prep

* update adjust_viral_load_suppression_rates_function

* update testing rates in Reduce Testing scenario to match MIHPSA halfHTS

* json

* update spectrum_treatment_cascade.csv

* test run

* fix to prep type

* test run setup

* comment out schisto person days logging

* remove warnings from equipment.py
check tb logger for int to float conversion warnings

* reset scenarios

* change infant / child cotrim to oral suspension

* additional plots for temporal trends

* if no HIV test available, set blank footprint

* remove scenarios for program simplification runs

* accept todo statements as completed for updated ART coverage and the revised coverage estimates which incorporate viral load monitoring effect

* clean up todo statements

* remove criteria for TPT in PLHIV requiring residence in high-risk district

* clean up comments

* merge in PR #1742 and check conflicts

* update reference to art coverage data for baseline

* fixing low art coverage

* test runs

* remove duplicated parameters in malaria for rdt delays

* linting

* linting

* isort

* replace numbers with parameters

* fix remaining todo statements

* remove processing script

* fix failing tests

* remove hiv test check from test_tb.py as it no longer occurs during tb screening

* allow warnings for equipment if item not recognised
add hiv self test to priority policies

* update improved healthcare seeking parameter names

* update improved healthcare seeking parameter names

* pull in new fixes from schisto updates PR #1787

* update schisto parameters to ensure read as floats
pull in updates from master

* fix conflict

* improved_healthsystem_and_healthcare_seeking update the adjusted viral suppression on art column label

* update param types for test_analysis checks

* update treatment_id in priority policies

* update treatment_id in priority policies

* update treatment ID in priority policies

* fix fsw parameters
remove json

* replace WASH logging in enhanced_lifestyle.py

* fix typo in comment

* add comments for test containers

* rmeove magic numbers for 3hp and ipt dosage

* clarify dict for vl testing availability

* update tdf test results to bool

* fix error in return statement

* remove unneeded logger

* remove unneeded logging

* remove unneeded logging

* fix missing comma

* update test_tb to use the updated parameter for length IPT dispensation

---------

Co-authored-by: mmsuarezcosta <mmsuarezcosta@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HIV Module

3 participants