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

scale-up VMMC from 2019 onwards to match data #1456

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions resources/ResourceFile_HIV.xlsx
Git LFS file not shown
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
)

# set the scenario
sim.modules["Hiv"].parameters["do_scaleup"] = True
sim.modules["Hiv"].parameters["do_scaleup"] = False
sim.modules["Hiv"].parameters["scaleup_start_year"] = 2019
# sim.modules["Tb"].parameters["scenario"] = scenario
# sim.modules["Tb"].parameters["scenario_start_date"] = Date(2010, 1, 1)
Expand Down
13 changes: 12 additions & 1 deletion src/tlo/methods/hiv.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,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 @@ -597,6 +602,11 @@ 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,
conditions_are_exhaustive=True).when("<2019", 1)
Copy link
Collaborator

Choose a reason for hiding this comment

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

as we're using otherwise, I don't think the we can say that the (when) conditions are exhaustive

Suggested change
conditions_are_exhaustive=True).when("<2019", 1)
).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 @@ -2418,7 +2428,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