Skip to content

Commit 3348552

Browse files
tdm32tbhallett
andauthored
Reduce the Excessive Demand for TB Appointment Under the 'Max HealthSystem Functionality' Scenario Switch (#1400)
* edit ResourceFile_Improved_Healthsystem_And_Healthcare_Seeking TB: rate_testing_general_pop removed as this refers to general population screening NTP2019 update treatment_coverage to 99.99 for all years Schisto: delay until HSIs repeated was 0.999, should be integer value of 1 day (default is 5 days) HSI_Tb_ScreeningAndRefer added condition if tested within last 2 weeks, do nothing * replace 1 (delays in days) with 1.00001 The parameter type is defined as REAL, so this is the only way I've found to make Excel store it as a float (and not an int of 1 that would get coerned into a bool!). Where this is used (line 944 in schisto.py) there is a coecision to int at the last minute so this should presevre the intended behaviour * Update src/tlo/methods/tb.py --------- Co-authored-by: Tim Hallett <[email protected]>
1 parent f5251b6 commit 3348552

4 files changed

+19
-12
lines changed

resources/ResourceFile_HIV.xlsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:e2345032931c1360046dc7394681cc39669687888f7f8f3e42469d8add067438
3-
size 160376
2+
oid sha256:58978c108515c3762addd18824129b2654f241d94bcc778ab17b27d0d8250593
3+
size 160402
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:da900375dda86f999e744bfb6d6dec7347d5b13f176046ba182740421a43d256
3-
size 48274
2+
oid sha256:1b462c20ca6cbf0ca1f98936416e015fa248289e5bf4f66838e1b9920874f651
3+
size 48142

resources/ResourceFile_TB.xlsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:3fc295cc70b8e86c75e1725a92ceb95bc86a26d3fbe1f680db379726bcab3ab3
2+
oid sha256:3cb13e128d4bcb3b694def108c3bd61b16508b48e389c3e5cdf8155717aab9e9
33
size 55662

src/tlo/methods/tb.py

+14-7
Original file line numberDiff line numberDiff line change
@@ -1467,7 +1467,7 @@ def apply(self, population):
14671467
)
14681468

14691469
# -------- 5) schedule screening for asymptomatic and symptomatic people --------
1470-
# sample from all new active cases (active_idx) and determine whether they will seek a test
1470+
# sample from all NEW active cases (active_idx) and determine whether they will seek a test
14711471
year = min(2019, max(2011, now.year))
14721472

14731473
active_testing_rates = p["rate_testing_active_tb"]
@@ -1610,8 +1610,19 @@ def apply(self, person_id, squeeze_factor):
16101610
p = self.module.parameters
16111611
person = df.loc[person_id]
16121612

1613-
# If the person is dead or already diagnosed, do nothing do not occupy any resources
1614-
if not person["is_alive"] or person["tb_diagnosed"]:
1613+
if not person["is_alive"]:
1614+
return self.sim.modules["HealthSystem"].get_blank_appt_footprint()
1615+
1616+
# If the person is already diagnosed, do nothing do not occupy any resources
1617+
if person["tb_diagnosed"]:
1618+
return self.sim.modules["HealthSystem"].get_blank_appt_footprint()
1619+
1620+
# If the person is already on treatment and not failing, do nothing do not occupy any resources
1621+
if person["tb_on_treatment"] and not person["tb_treatment_failure"]:
1622+
return self.sim.modules["HealthSystem"].get_blank_appt_footprint()
1623+
1624+
# if person has tested within last 14 days, do nothing
1625+
if person["tb_date_tested"] >= (self.sim.date - DateOffset(days=7)):
16151626
return self.sim.modules["HealthSystem"].get_blank_appt_footprint()
16161627

16171628
logger.debug(
@@ -1620,10 +1631,6 @@ def apply(self, person_id, squeeze_factor):
16201631

16211632
smear_status = person["tb_smear"]
16221633

1623-
# If the person is already on treatment and not failing, do nothing do not occupy any resources
1624-
if person["tb_on_treatment"] and not person["tb_treatment_failure"]:
1625-
return self.sim.modules["HealthSystem"].get_blank_appt_footprint()
1626-
16271634
# ------------------------- screening ------------------------- #
16281635

16291636
# check if patient has: cough, fever, night sweat, weight loss

0 commit comments

Comments
 (0)