diff --git a/resources/ResourceFile_HIV.xlsx b/resources/ResourceFile_HIV.xlsx index 00f7b684db..767697a349 100644 --- a/resources/ResourceFile_HIV.xlsx +++ b/resources/ResourceFile_HIV.xlsx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b34a88635b02ee8a465462c8eb67a485d721c9159a5bba1df8e63609b803ebe9 -size 161679 +oid sha256:ac6c8d481b1df585ca3051148367644294252f701069f0c95b6a88f01076753f +size 161691 diff --git a/src/scripts/hiv/projections_jan2023/analysis_logged_deviance.py b/src/scripts/hiv/projections_jan2023/analysis_logged_deviance.py index 7a2af7fbed..564af4629f 100644 --- a/src/scripts/hiv/projections_jan2023/analysis_logged_deviance.py +++ b/src/scripts/hiv/projections_jan2023/analysis_logged_deviance.py @@ -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) diff --git a/src/tlo/methods/hiv.py b/src/tlo/methods/hiv.py index d6455cc861..81a0a3d286 100644 --- a/src/tlo/methods/hiv.py +++ b/src/tlo/methods/hiv.py @@ -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", @@ -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) + .otherwise(p["increase_in_prob_circ_2019"]) ) # Linear model for circumcision for male and aging <15 yrs who spontaneously presents for VMMC @@ -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(