Skip to content

Commit

Permalink
Replace LTP_HIV_STATUS dummy column with LTP_STATUS column
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcleod89 committed Nov 26, 2024
1 parent 0319779 commit 872c9c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/hivpy/column_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
LONG_TERM_PARTNER = "long_term_partner" # bool: True if the subject has a long term condomless partner
LTP_NEW = "ltp_new" # bool: True if condomless sex with ltp is new this timestep
LTP_LONGEVITY = "ltp_longevity" # int: categorises longevity of long term partnerships (higher => more stable)
LTP_HIV_STATUS = "ltp_HIV_status" # bool: True if an individual's long term partner is infected with HIV (DUMMY)
LTP_HIV_DIAGNOSED = "ltp_HIV_diagnosed" # bool: True if an individual's long term partner is diagnosed with HIV (DUMMY)
LTP_ON_ART = "ltp_on_art" # bool: True if an individual's long term partner is on ART (DUMMY)
LTP_MONOGAMOUS = "ltp_monogamous" # bool: True if a person's long term partner has no short term partners o/w False
Expand Down
7 changes: 3 additions & 4 deletions src/hivpy/prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ def init_prep_variables(self, pop: Population):
pop.init_variable(col.PREP_CAB_TESTED, False)
pop.init_variable(col.PREP_LEN_TESTED, False)
pop.init_variable(col.PREP_VR_TESTED, False)
pop.init_variable(col.LTP_HIV_STATUS, False)
pop.init_variable(col.LTP_HIV_DIAGNOSED, False)
pop.init_variable(col.LTP_ON_ART, False)

Expand All @@ -117,7 +116,7 @@ def get_risk_informed_pop(self, pop: Population, prob_risk_informed_prep):
"""
return pop.get_sub_pop(AND(COND(col.LONG_TERM_PARTNER, op.eq, True),
COND(col.LTP_ON_ART, op.eq, False),
COND(col.LTP_HIV_STATUS, op.eq, False),
COND(col.LTP_STATUS, op.eq, False),
COND(col.R_PREP, op.lt, prob_risk_informed_prep)))

def get_suspect_risk_pop(self, pop: Population):
Expand All @@ -127,7 +126,7 @@ def get_suspect_risk_pop(self, pop: Population):
"""
return pop.get_sub_pop(AND(COND(col.LONG_TERM_PARTNER, op.eq, True),
COND(col.LTP_ON_ART, op.eq, False),
COND(col.LTP_HIV_STATUS, op.eq, True),
COND(col.LTP_STATUS, op.eq, True),
COND(col.R_PREP, op.lt, self.prob_suspect_risk_prep)))

# FIXME: this function may be removed if there are no issues with
Expand Down Expand Up @@ -398,7 +397,7 @@ def prep_eligibility(self, pop: Population):
COND(col.AGE, op.lt, 50),
OR(COND(col.R_PREP, op.lt, 0.01), # (alt) risk informed
AND(COND(col.R_PREP, op.lt, self.prob_suspect_risk_prep),
COND(col.LTP_HIV_STATUS, op.eq, True))))) # (alt) suspect risk
COND(col.LTP_STATUS, op.eq, True))))) # (alt) suspect risk
at_risk_ltp_pop = pop.get_sub_pop(AND(COND(col.HIV_DIAGNOSED, op.eq, False),
COND(col.LTP_HIV_DIAGNOSED, op.eq, True),
COND(col.LTP_ON_ART, op.eq, False)))
Expand Down

0 comments on commit 872c9c5

Please sign in to comment.