Skip to content

Commit dd0d816

Browse files
New analysis functionality for the maternal and newborn health modules (intervention analysis) (#1531)
Co-authored-by: Tim Hallett <[email protected]>
1 parent 79faf00 commit dd0d816

File tree

14 files changed

+539
-682
lines changed

14 files changed

+539
-682
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:5ed51ce9c98bd7c9203894d14c40d6311d4f1ed27259651e597d45731b2170ac
3-
size 10804
2+
oid sha256:254e87bdc9b5839dee01df0477d468f7373c2208f5bee8b07f15cd6991a2559e
3+
size 10776
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:be621298177fff272051d8b519dd890f812c427603f24e70a66386e528157047
3-
size 11243
2+
oid sha256:572e3e4f91cdbf0aa74360233e0a8478dfb70aa545aa477c112ee1175ca1597d
3+
size 10058
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:702d26f19582a9fc603265da9f0b61f89fede8aa3582ab8cee551cf4109a49b1
3-
size 12966
2+
oid sha256:b4d6e0147ff710cc5eedd4882ec5db84ecdca4f76938617cace8e44a12d4f9d5
3+
size 13738

src/tlo/methods/care_of_women_during_pregnancy.py

Lines changed: 135 additions & 222 deletions
Large diffs are not rendered by default.

src/tlo/methods/labour.py

Lines changed: 115 additions & 225 deletions
Large diffs are not rendered by default.

src/tlo/methods/newborn_outcomes.py

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -900,8 +900,11 @@ def kangaroo_mother_care(self, hsi_event):
900900
if (df.at[person_id, 'nb_low_birth_weight_status'] != 'normal_birth_weight') or \
901901
(df.at[person_id, 'nb_low_birth_weight_status'] != 'macrosomia'):
902902

903+
kmc_delivered = pregnancy_helper_functions.check_int_deliverable(
904+
self, int_name='kmc', hsi_event=hsi_event, q_param=[params['prob_kmc_available']])
905+
903906
# Check KMC can be delivered
904-
if self.rng.random_sample() < params['prob_kmc_available']:
907+
if kmc_delivered:
905908
# Store treatment as a property of the newborn used to apply treatment effect
906909
df.at[person_id, 'nb_kangaroo_mother_care'] = True
907910

@@ -952,42 +955,38 @@ def assessment_and_treatment_newborn_sepsis(self, hsi_event, facility_type):
952955
"""
953956
df = self.sim.population.props
954957
person_id = int(hsi_event.target)
958+
l_params = self.sim.modules['Labour'].current_parameters
959+
pnc_location = 'hc' if facility_type == '1a' else 'hp'
955960

956961
# We assume that only hospitals are able to deliver full supportive care for neonatal sepsis, full supportive
957962
# care evokes a stronger treatment effect than injectable antibiotics alone
958963

959964
if df.at[person_id, 'nb_early_onset_neonatal_sepsis'] or df.at[person_id, 'pn_sepsis_late_neonatal'] or\
960965
df.at[person_id, 'pn_sepsis_early_neonatal']:
961966

962-
# Run HCW check
963-
sf_check = pregnancy_helper_functions.check_emonc_signal_function_will_run(self.sim.modules['Labour'],
964-
sf='iv_abx',
965-
hsi_event=hsi_event)
966967
if facility_type != '1a':
967968

968-
# check consumables
969-
avail = pregnancy_helper_functions.return_cons_avail(
970-
self, hsi_event,
969+
neo_sepsis_treatment_delivered = pregnancy_helper_functions.check_int_deliverable(
970+
self, int_name='neo_sepsis_treatment_supp_care', hsi_event=hsi_event,
971+
q_param=[l_params['prob_hcw_avail_iv_abx'], l_params[f'mean_hcw_competence_{pnc_location}']],
971972
cons=self.item_codes_nb_consumables['sepsis_supportive_care_core'],
972-
opt_cons=self.item_codes_nb_consumables['sepsis_supportive_care_optional'])
973+
opt_cons=self.item_codes_nb_consumables['sepsis_supportive_care_optional'],
974+
equipment={'Drip stand', 'Infusion pump'})
973975

974-
# Then, if the consumables are available, treatment for sepsis is delivered
975-
if avail and sf_check:
976+
if neo_sepsis_treatment_delivered:
976977
df.at[person_id, 'nb_supp_care_neonatal_sepsis'] = True
977-
pregnancy_helper_functions.log_met_need(self, 'neo_sep_supportive_care', hsi_event)
978-
hsi_event.add_equipment({'Drip stand', 'Infusion pump'})
979978

980979
# The same pattern is then followed for health centre care
981980
else:
982-
avail = pregnancy_helper_functions.return_cons_avail(
983-
self, hsi_event,
981+
neo_sepsis_treatment_delivered = pregnancy_helper_functions.check_int_deliverable(
982+
self, int_name='neo_sepsis_treatment_abx', hsi_event=hsi_event,
983+
q_param=[l_params['prob_hcw_avail_iv_abx'], l_params[f'mean_hcw_competence_{pnc_location}']],
984984
cons=self.item_codes_nb_consumables['sepsis_abx'],
985-
opt_cons=self.item_codes_nb_consumables['iv_drug_equipment'])
985+
opt_cons=self.item_codes_nb_consumables['iv_drug_equipment'],
986+
equipment={'Drip stand', 'Infusion pump'})
986987

987-
if avail and sf_check:
988+
if neo_sepsis_treatment_delivered:
988989
df.at[person_id, 'nb_inj_abx_neonatal_sepsis'] = True
989-
pregnancy_helper_functions.log_met_need(self, 'neo_sep_abx', hsi_event)
990-
hsi_event.add_equipment({'Drip stand', 'Infusion pump', 'Oxygen cylinder, with regulator'})
991990

992991
def link_twins(self, child_one, child_two, mother_id):
993992
"""

src/tlo/methods/postnatal_supervisor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ def log_new_progressed_cases(disease):
656656
del self.sim.modules['PregnancySupervisor'].mother_and_newborn_info[person]
657657

658658
# ----------------------------------------- CARE SEEKING ------------------------------------------------------
659-
# We now use the the pn_emergency_event_mother property that has just been set for women who are experiencing
659+
# We now use the pn_emergency_event_mother property that has just been set for women who are experiencing
660660
# severe complications to select a subset of women who may choose to seek care
661661
can_seek_care = df.loc[df['is_alive'] & df['la_is_postpartum'] & (df['pn_postnatal_period_in_weeks'] == week) &
662662
df['pn_emergency_event_mother'] & ~df['hs_is_inpatient']]

0 commit comments

Comments
 (0)