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

Tara hiv cons fix dec2024 #1543

Merged
merged 7 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
resourcefilepath=resourcefilepath,
service_availability=["*"], # all treatment allowed
mode_appt_constraints=1, # mode of constraints to do with officer numbers and time
cons_availability="all", # mode for consumable constraints (if ignored, all consumables available)
cons_availability="default", # mode for consumable constraints (if ignored, all consumables available)
ignore_priority=False, # do not use the priority information in HSI event to schedule
capabilities_coefficient=1.0, # multiplier for the capabilities of health officers
use_funded_or_actual_staffing="actual", # actual: use numbers/distribution of staff available currently
Expand Down
17 changes: 17 additions & 0 deletions src/tlo/methods/hiv.py
Original file line number Diff line number Diff line change
Expand Up @@ -2493,6 +2493,14 @@ def apply(self, person_id, squeeze_factor):
if not person["is_alive"]:
return

# get confirmatory test
test_result = self.sim.modules["HealthSystem"].dx_manager.run_dx_test(
dx_tests_to_run="hiv_rapid_test", hsi_event=self
)
if test_result is not None:
df.at[person_id, "hv_number_tests"] += 1
df.at[person_id, "hv_last_test_date"] = self.sim.date

# if person not circumcised, perform the procedure
if not person["li_is_circ"]:
# Check/log use of consumables, if materials available, do circumcision and schedule follow-up appts
Expand Down Expand Up @@ -2830,6 +2838,15 @@ def do_at_initiation(self, person_id):

# ART is first item in drugs_available dict
if drugs_available.get('art', False):

# get confirmatory test
test_result = self.sim.modules["HealthSystem"].dx_manager.run_dx_test(
dx_tests_to_run="hiv_rapid_test", hsi_event=self
)
if test_result is not None:
df.at[person_id, "hv_number_tests"] += 1
df.at[person_id, "hv_last_test_date"] = self.sim.date

# Assign person to be suppressed or un-suppressed viral load
# (If person is VL suppressed This will prevent the Onset of AIDS, or an AIDS death if AIDS has already
# onset)
Expand Down
14 changes: 14 additions & 0 deletions src/tlo/methods/tb.py
Original file line number Diff line number Diff line change
Expand Up @@ -2483,6 +2483,7 @@ def apply(self, person_id, squeeze_factor):
self.number_of_occurrences += 1

df = self.sim.population.props # shortcut to the dataframe
now = self.sim.date

person = df.loc[person_id]

Expand All @@ -2494,6 +2495,19 @@ def apply(self, person_id, squeeze_factor):
):
return

# refer for HIV testing: all ages
# do not run if already HIV diagnosed or had test in last week
if not person["hv_diagnosed"] or (person["hv_last_test_date"] >= (now - DateOffset(days=7))):
self.sim.modules["HealthSystem"].schedule_hsi_event(
hsi_event=hiv.HSI_Hiv_TestAndRefer(
person_id=person_id,
module=self.sim.modules["Hiv"],
referred_from="Tb",
),
priority=1,
topen=now,
tclose=None,
)
# if currently have symptoms of TB, refer for screening/testing
persons_symptoms = self.sim.modules["SymptomManager"].has_what(person_id=person_id)
if any(x in self.module.symptom_list for x in persons_symptoms):
Expand Down
Loading