Skip to content

Commit

Permalink
Fix bug in inpatient_care_doesnt_run function in care_of_women_during…
Browse files Browse the repository at this point in the history
…_pregnancy.py
  • Loading branch information
marghe-molaro committed Sep 5, 2023
1 parent aace4d1 commit 7547c9f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/tlo/methods/care_of_women_during_pregnancy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1350,13 +1350,12 @@ def ectopic_pregnancy_treatment_doesnt_run(self, hsi_event):
self.sim.schedule_event(EctopicPregnancyRuptureEvent(
self.sim.modules['PregnancySupervisor'], individual_id), self.sim.date + DateOffset(days=7))

def inpatient_care_doesnt_run(self, hsi_event):
def inpatient_care_doesnt_run(self, individual_id):
"""
This function is called within HSI_CareOfWomenDuringPregnancy_AntenatalWardInpatientCare if the event cannot
run/the intervention cannot be delivered.
:param hsi_event: HSI event in which the function has been called
:param individual_id: target of HSI event in which the function has been called
"""
individual_id = hsi_event.target
df = self.sim.population.props
mni = self.sim.modules['PregnancySupervisor'].mother_and_newborn_info

Expand Down Expand Up @@ -2378,7 +2377,7 @@ def apply(self, person_id, squeeze_factor):
mni[person_id]['delay_three'] = False

def never_ran(self):
self.module.inpatient_care_doesnt_run(self)
self.module.inpatient_care_doesnt_run(self.target)

def did_not_run(self):
pass
Expand Down

0 comments on commit 7547c9f

Please sign in to comment.