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

Reduce viral load testing for PLHIV on ART #1520

Merged
merged 17 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
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
3 changes: 3 additions & 0 deletions resources/ResourceFile_HIV.xlsx
Git LFS file not shown
4 changes: 2 additions & 2 deletions resources/ResourceFile_HIV/parameters.csv
Git LFS file not shown
3 changes: 3 additions & 0 deletions resources/~$ResourceFile_HIV.xlsx
Git LFS file not shown
20 changes: 18 additions & 2 deletions src/tlo/methods/hiv.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,11 @@ def __init__(self, name=None, resourcefilepath=None, run_with_checks=False):
Types.REAL,
"Probability that a male will be circumcised, if HIV-negative, following testing",
),
"increase_in_prob_circ_2019": Parameter(
Types.REAL,
"increase in probability that a male will be circumcised, if HIV-negative, following testing"
"from 2019 onwards",
),
"prob_circ_for_child_before_2020": Parameter(
Types.REAL,
"Probability that a male aging <15 yrs will be circumcised before year 2020",
Expand Down Expand Up @@ -409,6 +414,10 @@ def __init__(self, name=None, resourcefilepath=None, run_with_checks=False):
Types.DATA_FRAME,
"the parameters and values changed in scenario analysis"
),
"interval_for_viral_load_measurement_months": Parameter(
Types.REAL,
" the interval for viral load monitoring in months"
),
}

def read_parameters(self, data_folder):
Expand Down Expand Up @@ -593,6 +602,10 @@ def _build_linear_models(self):
p["prob_circ_after_hiv_test"],
Predictor("hv_inf").when(False, 1.0).otherwise(0.0),
Predictor("sex").when("M", 1.0).otherwise(0.0),
Predictor("year",
external=True,
conditions_are_mutually_exclusive=True).when("<2019", 1)
.otherwise(p["increase_in_prob_circ_2019"])
)

# Linear model for circumcision for male and aging <15 yrs who spontaneously presents for VMMC
Expand Down Expand Up @@ -2414,7 +2427,8 @@ def apply(self, person_id, squeeze_factor):
# If person is a man, and not circumcised, then consider referring to VMMC
if (person["sex"] == "M") & (~person["li_is_circ"]):
x = self.module.lm["lm_circ"].predict(
df.loc[[person_id]], self.module.rng
df.loc[[person_id]], self.module.rng,
year=self.sim.date.year,
)
if x:
self.sim.modules["HealthSystem"].schedule_hsi_event(
Expand Down Expand Up @@ -2873,13 +2887,15 @@ def do_at_continuation(self, person_id):

df = self.sim.population.props
person = df.loc[person_id]
p = self.module.parameters

# default to person stopping cotrimoxazole
df.at[person_id, "hv_on_cotrimoxazole"] = False

# Viral Load Monitoring
# NB. This does not have a direct effect on outcomes for the person.
_ = self.get_consumables(item_codes=self.module.item_codes_for_consumables_required['vl_measurement'])
if self.module.rng.random_sample(size=1) < p['dispensation_period_months'] / p['interval_for_viral_load_measurement_months']:
_ = self.get_consumables(item_codes=self.module.item_codes_for_consumables_required['vl_measurement'])

# Check if drugs are available, and provide drugs:
drugs_available = self.get_drugs(age_of_person=person["age_years"])
Expand Down
Loading