tlo.methods.labour module

class Labour(name=None, resourcefilepath=None)[source]

This is module is responsible for the process of labour, birth and the immediate postnatal period (up until 48hrs post birth). This model has a number of core functions including; initiating the onset of labour for women on their pre-determined due date (or prior to this for preterm labour/admission for delivery), applying the incidence

of a core set of maternal complications occurring in the intrapartum period and outcomes such as maternal death or still birth, scheduling birth for women surviving labour and applying risk of complications and outcomes in the postnatal period. Complications explicitly modelled in this module include obstructed labour, antepartum haemorrhage, maternal infection and sepsis, progression of hypertensive disorders, uterine rupture and postpartum

haemorrhage. In addition to the natural history of labour this module manages care seeking for women in labour (for delivery or following onset of complications at a home birth) and includes HSIs which represent Skilled Birth Attendance at either Basic or Comprehensive level emergency obstetric care facilities. Following birth this module manages postnatal care delivered via HSI_Labour_ReceivesPostnatalCheck and schedules PostnatalWeekOneMaternalEvent which represents the start of a womans postnatal period.

Construct a new disease module ready to be included in a simulation.

Initialises an empty parameters dictionary and module-specific random number generator.

Parameters:

name – the name to use for this module. Defaults to the concrete subclass’ name.

Bases: tlo.core.Module, tlo.methods.hsi_generic_first_appts.GenericFirstAppointmentsMixin

PARAMETERS:

Item

Type

Description

intercept_parity_lr2010

LIST

intercept value for linear regression equation predicating womens parity at 2010 baseline

effect_age_parity_lr2010

LIST

effect of an increase in age by 1 year in the linear regression equation predicating womens parity at 2010 baseline

effect_mar_stat_2_parity_lr2010

LIST

effect of a change in marriage status from comparison (level 1) in the linear regression equation predicating womans parity at 2010 baseline

effect_mar_stat_3_parity_lr2010

LIST

effect of a change in marriage status from comparison (level 1) in the linear regression equation predicating womans parity at 2010 baseline

effect_wealth_lev_4_parity_lr2010

LIST

effect of an increase in wealth level in the linear regression equation predicating womans parity at 2010 base line

effect_wealth_lev_3_parity_lr2010

LIST

effect of an increase in wealth level in the linear regression equation predicating womans parity at 2010 base line

effect_wealth_lev_2_parity_lr2010

LIST

effect of an increase in wealth level in the linear regression equation predicating womans parity at 2010 base line

effect_wealth_lev_1_parity_lr2010

LIST

effect of an increase in wealth level in the linear regression equation predicating womans parity at 2010 base line

effect_edu_lev_2_parity_lr2010

LIST

effect of an increase in education level in the linear regression equation predicating womans parity at 2010 base line

effect_edu_lev_3_parity_lr2010

LIST

effect of an increase in education level in the linear regression equation predicating womans parity at 2010 base line

effect_rural_parity_lr2010

LIST

effect of rural living in the linear regression equation predicating womans parity at 2010 base line

prob_previous_caesarean_at_baseline

LIST

probability of previously having delivered via caesarean section at baseline

risk_post_term_labour

LIST

risk of remaining pregnant past 42 weeks

rr_potl_bmi_30_35

LIST

effect of maternal BMI being between 30 and 35 on risk of post term labour

rr_potl_bmi_35+

LIST

effect of maternal BMI being between above 35 on risk of post term labour

list_limits_for_defining_term_status

LIST

List of number of days of gestation used to define term, early preterm, late preterm and post term delivery

allowed_interventions

LIST

list of interventions allowed to run, used in analysis

mean_birth_weights

LIST

list of mean birth weights from gestational age at birth 24-41 weeks

standard_deviation_birth_weights

LIST

list of standard deviations associated with mean birth weights from gestational age at birth 24-41 weeks

residual_prob_of_macrosomia

LIST

probability that those allocated to be normal birth weight and above will be macrosomic (>4kg)

prob_obstruction_cpd

LIST

risk of a woman developing obstructed labour secondary to cephalopelvic disproportion

rr_obstruction_cpd_stunted_mother

LIST

relative risk of obstruction secondary to CPD in mothers who are stunted

rr_obstruction_foetal_macrosomia

LIST

relative risk of obstruction secondary to CPD in mothers who are carrying a macrosomic foetus

prob_obstruction_malpos_malpres

LIST

risk of a woman developing obstructed labour secondary to malposition or malpresentation

prob_obstruction_other

LIST

risk of a woman developing obstructed labour secondary to other causes

prob_placental_abruption_during_labour

LIST

probability of a woman developing placental abruption during labour

prob_aph_placenta_praevia_labour

LIST

probability of a woman with placenta praevia experiencing an APH during labour

prob_aph_placental_abruption_labour

LIST

probability of a woman with placental abruption experiencing an APH during labour

rr_placental_abruption_hypertension

LIST

Relative risk of placental abruption in women with hypertension

rr_placental_abruption_previous_cs

LIST

Relative risk of placental abruption in women who delivered previously via caesarean section

severity_maternal_haemorrhage

LIST

probability a maternal hemorrhage is non-severe (<1000mls) or severe (>1000mls)

cfr_aph

LIST

case fatality rate for antepartum haemorrhage during labour

prob_sepsis_chorioamnionitis

LIST

risk of sepsis following chorioamnionitis infection

rr_sepsis_chorio_prom

LIST

relative risk of chorioamnionitis following PROM

prob_sepsis_endometritis

LIST

risk of sepsis following endometritis

rr_sepsis_endometritis_post_cs

LIST

relative risk of endometritis following caesarean delivery

prob_sepsis_urinary_tract

LIST

risk of sepsis following urinary tract infection

prob_sepsis_skin_soft_tissue

LIST

risk of sepsis following skin or soft tissue infection

rr_sepsis_sst_post_cs

LIST

relative risk of skin/soft tissue sepsis following caesarean delivery

cfr_sepsis

LIST

case fatality rate for sepsis during labour

cfr_pp_sepsis

LIST

case fatality rate for sepsis following delivery

prob_uterine_rupture

LIST

probability of a uterine rupture during labour

rr_ur_parity_2

LIST

relative risk of uterine rupture in women who have delivered 2 times previously

rr_ur_parity_3_or_4

LIST

relative risk of uterine rupture in women who have delivered 3-4 times previously

rr_ur_parity_5+

LIST

relative risk of uterine rupture in women who have delivered > 5 times previously

rr_ur_prev_cs

LIST

relative risk of uterine rupture in women who have previously delivered via caesarean section

rr_ur_obstructed_labour

LIST

relative risk of uterine rupture in women who have been in obstructed labour

cfr_uterine_rupture

LIST

case fatality rate for uterine rupture in labour

prob_progression_gest_htn

LIST

probability of gestational hypertension progressing to severe gestational hypertensionduring/after labour

prob_progression_severe_gest_htn

LIST

probability of severe gestational hypertension progressing to severe pre-eclampsia during/after labour

prob_progression_mild_pre_eclamp

LIST

probability of mild pre-eclampsia progressing to severe pre-eclampsia during/after labour

prob_progression_severe_pre_eclamp

LIST

probability of severe pre-eclampsia progressing to eclampsia during/after labour

cfr_eclampsia

LIST

case fatality rate for eclampsia during labours

cfr_severe_pre_eclamp

LIST

case fatality rate for severe pre eclampsia during labour

cfr_pp_eclampsia

LIST

case fatality rate for eclampsia following delivery

prob_ip_still_birth

LIST

baseline probability of intrapartum still birth

rr_still_birth_maternal_death

LIST

relative risk of still birth in mothers who have died during labour

rr_still_birth_ur

LIST

relative risk of still birth in mothers experiencing uterine rupture

rr_still_birth_ol

LIST

relative risk of still birth in mothers experiencing obstructed labour

rr_still_birth_aph

LIST

relative risk of still birth in mothers experiencing antepartum haemorrhage

rr_still_birth_hypertension

LIST

relative risk of still birth in mothers experiencing hypertension

rr_still_birth_sepsis

LIST

relative risk of still birth in mothers experiencing intrapartum sepsis

rr_still_birth_multiple_pregnancy

LIST

relative risk of still birth in mothers pregnant with twins

prob_both_twins_ip_still_birth

LIST

probability that if this mother will experience still birth, and she is pregnant with twins, that neither baby will survive

prob_pph_uterine_atony

LIST

risk of pph after experiencing uterine atony

rr_pph_ua_hypertension

LIST

relative risk risk of pph after secondary to uterine atony in hypertensive women

rr_pph_ua_multiple_pregnancy

LIST

relative risk risk of pph after secondary to uterine atony in women pregnant with twins

rr_pph_ua_placental_abruption

LIST

relative risk risk of pph after secondary to uterine atony in women with placental abruption

rr_pph_ua_macrosomia

LIST

relative risk risk of pph after secondary to uterine atony in women with macrosomic foetus

rr_pph_ua_diabetes

LIST

risk of pph after experiencing uterine atony

prob_pph_retained_placenta

LIST

risk of pph after experiencing retained placenta

prob_pph_other_causes

LIST

risk of pph after experiencing other pph causes

cfr_pp_pph

LIST

case fatality rate for postpartum haemorrhage

rr_death_from_haem_with_anaemia

LIST

relative risk increase of death in women who are anaemic at time of PPH

odds_deliver_in_health_centre

LIST

odds of a woman delivering in a health centre compared to a hospital

rrr_hc_delivery_age_20_24

LIST

relative risk ratio for a woman aged 20-24 delivering in a health centre compared to a hospital

rrr_hc_delivery_age_25_29

LIST

relative risk ratio for a woman aged 25-29 delivering in a health centre compared to a hospital

rrr_hc_delivery_age_30_34

LIST

relative risk ratio for a woman aged 30-34 delivering in a health centre compared to a hospital

rrr_hc_delivery_age_35_39

LIST

relative risk ratio for a woman aged 35-39 delivering in a health centre compared to a hospital

rrr_hc_delivery_age_40_44

LIST

relative risk ratio for a woman aged 40-44 delivering in a health centre compared to a hospital

rrr_hc_delivery_age_45_49

LIST

relative risk ratio for a woman aged 45-49 delivering in a health centre compared to a hospital

rrr_hc_delivery_wealth_4

LIST

relative risk ratio of a woman at wealth level 4 delivering at health centre compared to a hospital

rrr_hc_delivery_wealth_3

LIST

relative risk ratio of a woman at wealth level 3 delivering at health centre compared to a hospital

rrr_hc_delivery_wealth_2

LIST

relative risk ratio of a woman at wealth level 2 delivering at health centre compared to a hospital

rrr_hc_delivery_wealth_1

LIST

relative risk ratio of a woman at wealth level 1 delivering at health centre compared to a hospital

rrr_hc_delivery_parity_3_to_4

LIST

relative risk ratio for a woman with a parity of 3-4 delivering in a health centre compared toa hospital

rrr_hc_delivery_parity_>4

LIST

relative risk ratio of a woman with a parity >4 delivering in health centre compared to a hospital

rrr_hc_delivery_rural

LIST

relative risk ratio of a married woman delivering in a health centre compared to a hospital

rrr_hc_delivery_married

LIST

relative risk ratio of a married woman delivering in a health centre compared to a hospital

odds_deliver_at_home

LIST

odds of a woman delivering at home compared to a hospital

rrr_hb_delivery_age_20_24

LIST

relative risk ratio for a woman aged 20-24 delivering at home compared to a hospital

rrr_hb_delivery_age_25_29

LIST

relative risk ratio for a woman aged 25-29 delivering at home compared to a hospital

rrr_hb_delivery_age_30_34

LIST

relative risk ratio for a woman aged 30-34 delivering at home compared to a hospital

rrr_hb_delivery_age_35_39

LIST

relative risk ratio for a woman aged 35-39 delivering at home compared to a hospital

rrr_hb_delivery_age_40_44

LIST

relative risk ratio for a woman aged 40-44 delivering at home compared to a hospital

rrr_hb_delivery_age_45_49

LIST

relative risk ratio for a woman aged 45-49 delivering at home compared to a hospital

rrr_hb_delivery_rural

LIST

relative risk ratio of a rural delivering at home compared to a hospital

rrr_hb_delivery_primary_education

LIST

relative risk ratio of a woman with a primary education delivering at home compared to a hospital

rrr_hb_delivery_secondary_education

LIST

relative risk ratio of a woman with a secondary education delivering at home compared to a hospital

rrr_hb_delivery_wealth_4

LIST

relative risk ratio of a woman at wealth level 4 delivering at home compared to a hospital

rrr_hb_delivery_wealth_3

LIST

relative risk ratio of a woman at wealth level 3 delivering at home compared to a hospital

rrr_hb_delivery_wealth_2

LIST

relative risk ratio of a woman at wealth level 2 delivering at home compared to a hospital

rrr_hb_delivery_wealth_1

LIST

relative risk ratio of a woman at wealth level 1 delivering at home compared to a hospital

rrr_hb_delivery_parity_3_to_4

LIST

relative risk ratio for a woman with a parity of 3-4 delivering at home compared toa hospital

rrr_hb_delivery_parity_>4

LIST

relative risk ratio of a woman with a parity >4 delivering at home compared to a hospital

rrr_hb_delivery_married

LIST

relative risk ratio of a married woman delivering in a home compared to a hospital

probability_delivery_hospital

LIST

probability of delivering in a hospital

prob_timings_pnc

LIST

probabilities that a woman who will receive a PNC check will receive care <48hrs post birth or > 48hrs post birth

odds_will_attend_pnc

LIST

baseline odss a woman will seek PNC for her and her newborn following delivery

or_pnc_age_30_35

LIST

odds ratio for women aged 30-35 attending PNC

or_pnc_age_>35

LIST

odds ratio for women aged > 35 attending PNC

or_pnc_rural

LIST

odds ratio for women who live rurally attending PNC

or_pnc_wealth_level_1

LIST

odds ratio for women from the highest wealth level attending PNC

or_pnc_anc4+

LIST

odds ratio for women who attended ANC4+ attending PNC

or_pnc_caesarean_delivery

LIST

odds ratio for women who delivered by caesarean attending PNC

or_pnc_facility_delivery

LIST

odds ratio for women who delivered in a health facility attending PNC

or_pnc_parity_>4

LIST

odds ratio for women with a parity of >4 attending PNC

probs_of_attending_pn_event_by_day

LIST

probabilities used in a weighted random draw to determine when a woman will attend the postnatal event

prob_careseeking_for_complication

LIST

probability of a woman seeking skilled assistance after developing a complication at a home birth

prob_careseeking_for_complication_pn

LIST

probability of a woman seeking skilled assistance after developing a postnatal complication following a home birth

test_care_seeking_probs

LIST

dummy probabilities of delivery care seeking used in testing

prob_delivery_modes_ec

LIST

probabilities that a woman admitted with eclampsia will deliver normally, via caesarean or via assisted vaginal delivery

prob_delivery_modes_spe

LIST

probabilities that a woman admitted with severe pre-eclampsia will deliver normally, via caesarean or via assisted vaginal delivery

residual_prob_avd

LIST

probabilities that a woman will deliver via assisted vaginal delivery for an indication not explicitly modelled

residual_prob_caesarean

LIST

probabilities that a woman will deliver via caesarean section for an indication not explicitly modelled

prob_adherent_ifa

LIST

probability that a woman started on postnatal IFA will be adherent

effect_of_ifa_for_resolving_anaemia

LIST

relative effect of iron and folic acid on anaemia status

number_ifa_tablets_required_postnatally

LIST

total number of iron and folic acid tablets required during postnatal period

treatment_effect_maternal_infection_clean_delivery

LIST

Effect of clean delivery practices on risk of maternal infection

treatment_effect_maternal_chorio_abx_prom

LIST

Relative effect of antibiotics for premature rupture of membranes on maternal risk of chorioamnionitis prior to birth

treatment_effect_amtsl

LIST

relative risk of severe postpartum haemorrhage following active management of the third stage of labour

prob_haemostatis_uterotonics

LIST

probability of uterotonics stopping a postpartum haemorrhage due to uterine atony

prob_successful_manual_removal_placenta

LIST

probability of manual removal of retained products arresting a post partum haemorrhage

success_rate_pph_surgery

LIST

probability of surgery for postpartum haemorrhage being successful

pph_treatment_effect_surg_md

LIST

effect of surgery on maternal death due to postpartum haemorrhage

pph_treatment_effect_hyst_md

LIST

effect of hysterectomy on maternal death due to postpartum haemorrhage

pph_bt_treatment_effect_md

LIST

effect of blood transfusion treatment for postpartum haemorrhage on risk of maternal death

sepsis_treatment_effect_md

LIST

effect of treatment for sepsis on risk of maternal death

success_rate_uterine_repair

LIST

probability repairing a ruptured uterus surgically

prob_successful_assisted_vaginal_delivery

LIST

probability of successful assisted vaginal delivery

ur_repair_treatment_effect_md

LIST

effect of surgical uterine repair treatment for uterine rupture on risk of maternal death

ur_treatment_effect_bt_md

LIST

effect of blood transfusion treatment for uterine rupture on risk of maternal death

ur_hysterectomy_treatment_effect_md

LIST

effect of blood hysterectomy for uterine rupture on risk of maternal death

eclampsia_treatment_effect_severe_pe

LIST

effect of treatment for severe pre eclampsia on risk of eclampsia

eclampsia_treatment_effect_md

LIST

effect of treatment for eclampsia on risk of maternal death

anti_htns_treatment_effect_md

LIST

effect of IV anti hypertensive treatment on risk of death secondary to severe pre-eclampsia/eclampsia stillbirth

anti_htns_treatment_effect_progression

LIST

effect of IV anti hypertensive treatment on risk of progression from mild to severe gestational hypertension

aph_bt_treatment_effect_md

LIST

effect of blood transfusion treatment for antepartum haemorrhage on risk of maternal death

treatment_effect_blood_transfusion_anaemia

LIST

effect of blood transfusion treatment for severe anaemia

aph_cs_treatment_effect_md

LIST

effect of caesarean section for antepartum haemorrhage on risk of maternal death

treatment_effect_avd_still_birth

LIST

effect of assisted vaginal delivery on risk of intrapartum still birth

treatment_effect_cs_still_birth

LIST

effect of caesarean section delivery on risk of intrapartum still birth

prob_hcw_avail_iv_abx

LIST

average probability that a health facility providing EmONC care has a HCW available that can delivery signal function - parenteral antibiotics

prob_hcw_avail_uterotonic

LIST

average probability that a health facility providing EmONC care has a HCW available that can delivery signal function - parenteral uterotonics

prob_hcw_avail_anticonvulsant

LIST

average probability that a health facility providing EmONC care has a HCW available that can delivery signal function - parenteral anticonvulsants

prob_hcw_avail_man_r_placenta

LIST

average probability that a health facility providing EmONC care has a HCW available that can delivery signal function - manual removal of retained placenta

prob_hcw_avail_avd

LIST

average probability that a health facility providing EmONC care has a HCW available that can delivery signal function - assisted vaginal delivery

prob_hcw_avail_blood_tran

LIST

average probability that a health facility providing EmONC care has a HCW available that can delivery signal function - blood transfusion

prob_hcw_avail_surg

LIST

average probability that a health facility providing EmONC care has a HCW available that can delivery signal function - obstetric surgery

prob_hcw_avail_retained_prod

LIST

average probability that a health facility providing EmONC care has a HCW available that can delivery signal function - removal of retained products of conception

prob_hcw_avail_neo_resus

LIST

average probability that a health facility providing EmONC care has a HCW available that can delivery signal function - neonatal resuscitation

mean_hcw_competence_hc

LIST

mean competence of HCW at delivering EmONC care at a health centre. A draw below this level prevents intervention delivery

mean_hcw_competence_hp

LIST

mean competence of HCW at delivering EmONC care at a hospital. A draw below this level prevents intervention delivery

prob_intervention_delivered_anaemia_assessment_pnc

LIST

probability a woman will have their Hb levels checked during PNC given that the HSI has ran and the consumables are available (proxy for clinical quality)

analysis_year

INT

Year on which changes in parameters as part of analysis should be enacted (1st day, 1st month)

la_analysis_in_progress

BOOL

Used within the pregnancy_helper_function to signify that labour/postnatal analysis is currently being conducted

alternative_bemonc_availability

BOOL

parameter used in analysis to allow manipulation of coverage of BEmONC interventions

alternative_cemonc_availability

BOOL

parameter used in analysis to allow manipulation of coverage of CEmONC interventions

bemonc_availability

REAL

set probability of BEmONC intervention being delivered during analysis

cemonc_availability

REAL

set probability of CEmONC intervention being delivered during analysis

bemonc_cons_availability

REAL

set probability of BEmONC consumables being available

cemonc_cons_availability

REAL

set probability of CEmONC consumables being available

alternative_pnc_coverage

BOOL

Signals within the analysis event that an alternative level of PNC coverage has been determined following the events run

alternative_pnc_quality

BOOL

Signals within the analysis event that an alternative level of PNC quality has been determined following the events run

pnc_availability_odds

REAL

Target odds of maternal PNC coverage when analysis is being conducted - only applied ifalternative_pnc_coverage is true

pnc_availability_probability

REAL

Target probability of quality/consumables when analysis is being conducted - only applied if alternative_pnc_coverage is true

sba_sens_analysis_max

BOOL

Signals that max coverage of SBA is being forced for sensitivity analysis

pnc_sens_analysis_max

BOOL

Signals that max coverage of PNC is being forced for sensitivity analysis

pnc_sens_analysis_min

BOOL

Signals that min coverage of SBA is being forced for sensitivity analysis

PROPERTIES:

Item

Type

Description

la_due_date_current_pregnancy

DATE

The date on which a newly pregnant woman is scheduled to go into labour

la_currently_in_labour

BOOL

whether this woman is currently in labour

la_intrapartum_still_birth

BOOL

whether this womans most recent pregnancy has ended in a stillbirth

la_parity

REAL

total number of previous deliveries

la_previous_cs_delivery

INT

total number of previous deliveries

la_obstructed_labour

BOOL

Whether this woman is experiencing obstructed labour

la_placental_abruption

BOOL

whether the woman has experienced placental abruption

la_antepartum_haem

CATEGORICAL

whether the woman has experienced an antepartum haemorrhage in this delivery and it severity. Possible values are: [none, mild_moderate, severe, ]

la_uterine_rupture

BOOL

whether the woman has experienced uterine rupture in this delivery

la_uterine_rupture_treatment

BOOL

whether this womans uterine rupture has been treated

la_sepsis

BOOL

whether this woman has developed sepsis due to an intrapartum infection

la_sepsis_pp

BOOL

whether this woman has developed sepsis due to a postpartum infection

la_sepsis_treatment

BOOL

If this woman has received treatment for maternal sepsis

la_eclampsia_treatment

BOOL

whether this womans eclampsia has been treated

la_severe_pre_eclampsia_treatment

BOOL

whether this woman has been treated for severe pre-eclampsia

la_maternal_hypertension_treatment

BOOL

whether this woman has been treated for maternal hypertension

la_gest_htn_on_treatment

BOOL

whether this woman has is receiving regular antihypertensives

la_postpartum_haem

BOOL

whether the woman has experienced an postpartum haemorrhage in thisdelivery

la_postpartum_haem_treatment

BITSET

Treatment for received for postpartum haemorrhage (bitset)

la_has_had_hysterectomy

BOOL

whether this woman has had a hysterectomy as treatment for a complication of labour, and therefore is unable to conceive

la_date_most_recent_delivery

DATE

date of on which this mother last delivered

la_is_postpartum

BOOL

Whether a woman is in the postpartum period, from delivery until day +42 (6 weeks)

la_pn_checks_maternal

INT

Number of postnatal checks this woman has received

la_iron_folic_acid_postnatal

BOOL

Whether a woman is receiving iron and folic acid during the postnatal period

Class attributes:

ADDITIONAL_DEPENDENCIES : {‘Contraception’, ‘Lifestyle’, ‘NewbornOutcomes’, ‘PregnancySupervisor’, ‘HealthSystem’, ‘CareOfWomenDuringPregnancy’, ‘PostnatalSupervisor’}

CAUSES_OF_DEATH : {‘uterine_rupture’: <tlo.methods.causes.Cause object at 0x128fb32d0>, ‘intrapartum_sepsis’: <tlo.methods.causes.Cause object at 0x128fb04d0>, ‘antepartum_haemorrhage’: <tlo.methods.causes.Cause object at 0x128fb1c10>, ‘postpartum_sepsis’: <tlo.methods.causes.Cause object at 0x128fb1110>, ‘postpartum_haemorrhage’: <tlo.methods.causes.Cause object at 0x128fb0190>, ‘secondary_postpartum_haemorrhage’: <tlo.methods.causes.Cause object at 0x128fb0390>, ‘severe_pre_eclampsia’: <tlo.methods.causes.Cause object at 0x128fb1190>, ‘eclampsia’: <tlo.methods.causes.Cause object at 0x128fb0b10>}

CAUSES_OF_DISABILITY : {‘maternal’: <tlo.methods.causes.Cause object at 0x128fb0b50>}

INIT_DEPENDENCIES : {‘Demography’}

METADATA : {<Metadata.USES_HEALTHSYSTEM: 3>, <Metadata.USES_HEALTHBURDEN: 4>, <Metadata.DISEASE_MODULE: 1>}

OPTIONAL_INIT_DEPENDENCIES : {‘Stunting’}

__annotations__ : {}

Functions (defined or overridden in class Labour):

__init__(name=None, resourcefilepath=None)[source]

Construct a new disease module ready to be included in a simulation.

Initialises an empty parameters dictionary and module-specific random number generator.

Parameters:

name – the name to use for this module. Defaults to the concrete subclass’ name.

read_parameters(data_folder)[source]

Read parameter values from file, if required.

Must be implemented by subclasses.

Parameters:

data_folder – path of a folder supplied to the Simulation containing data files. Typically, modules would read a particular file within here.

initialise_population(population)[source]

Set our property values for the initial population.

This method is called by the simulation when creating the initial population, and is responsible for assigning initial values, for every individual, of those properties ‘owned’ by this module, i.e. those declared in its PROPERTIES dictionary.

By default, all Property``s in ``self.PROPERTIES will have their columns in the population dataframe set to the default value.

Modules that wish to implement this behaviour do not need to implement this method, it will be inherited automatically. Modules that wish to perform additional steps during the initialise_population stage should reimplement this method and call

`python super().initialise_population(population=population) `

at the beginning of the method, then proceed with their additional steps. Modules that do not wish to inherit this default behaviour should re-implement initialise_population without the call to super() above.

TODO: We probably need to declare somehow which properties we ‘read’ here, so the simulation knows what order to initialise modules in!

Parameters:

population – The population of individuals in the simulation.

get_and_store_labour_item_codes()[source]

This function defines the required consumables for each intervention delivered during this module and stores them in a module level dictionary called within HSIs

initialise_simulation(sim)[source]

Get ready for simulation start.

Must be implemented by subclasses.

This method is called just before the main simulation loop begins, and after all modules have read their parameters and the initial population has been created. It is a good place to add initial events to the event queue.

on_birth(mother_id, child_id)[source]

Initialise our properties for a newborn individual.

Must be implemented by subclasses.

This is called by the simulation whenever a new person is born.

Parameters:
  • mother_id – the person id for the mother of this child (can be -1 if the mother is not identified).

  • child_id – the person id of new child

further_on_birth_labour(mother_id)[source]

This function is called by the on_birth function of NewbornOutcomes module. This function contains additional code related to the labour module that should be ran on_birth for all births - it has been parcelled into functions to ensure each modules (pregnancy,antenatal care, labour, newborn, postnatal) on_birth code is ran in the correct sequence (as this can vary depending on how modules are registered) :param mother_id: mothers individual id

on_hsi_alert(person_id, treatment_id)[source]

This is called whenever there is an HSI event commissioned by one of the other disease modules.

report_daly_values()[source]
set_date_of_labour(individual_id)[source]

This function is called by contraception.py within the events ‘PregnancyPoll’ and ‘Fail’ for women who are allocated to become pregnant during a simulation run. This function schedules the onset of labour between 37 and 44 weeks gestational age (not foetal age) to ensure all women who become pregnant will go into labour. Women may enter labour before the due date set in this function either due to pre-term labour or induction/ caesarean section. :param individual_id: individual_id

predict(eq, person_id)[source]

This function compares the result of a specific linear equation with a random draw providing a boolean for the outcome under examination :param eq: Linear model equation :param person_id: individual_id

reset_due_date(id_or_index, new_due_date)[source]

This function is called at various points in the PregnancySupervisor module to reset the due-date of women who may have experience pregnancy loss or will now go into pre-term labour on new due-date :param ind_or_df: (STR) Is this function being use on an individual row or slice of the data frame

‘individual’/’data_frame’

Parameters:
  • id_or_index – The individual id OR dataframe slice that this change will be made for

  • new_due_date – (DATE) the new due-date

check_labour_can_proceed(individual_id)[source]
This function is called by the LabourOnsetEvent to evaluate if labour can proceed for the woman who has arrived

at the event

Parameters:

individual_id – individual_id

:returns True/False if labour can proceed

set_intrapartum_complications(individual_id, complication)[source]

This function is called either during a LabourAtHomeEvent OR HSI_Labour_ReceivesSkilledBirthAttendanceDuring Labour for all women during labour (home birth vs facility delivery). The function is used to apply risk of complications which have been passed ot it including the preceding causes of obstructed labour (malposition, malpresentation and cephalopelvic disproportion), obstructed labour, uterine rupture, placental abruption, antepartum haemorrhage, infections (chorioamnionitis/other) and sepsis. Properties in the dataframe

are set accordingly including properties which map to disability weights to capture DALYs

Parameters:
  • individual_id – individual_id

  • complication – (STR) the complication passed to the function which is being evaluated

[‘obstruction_cpd’, ‘obstruction_malpos_malpres’, ‘obstruction_other’, ‘placental_abruption’, ‘antepartum_haem’, ‘sepsis_chorioamnionitis’, ‘uterine_rupture’]

set_postpartum_complications(individual_id, complication)[source]

This function is called in BirthAndPostnatalOutcomesEvent during for all women following labour and birth (home birth vs facility delivery). The function is used to apply risk of complications which have been passed ot it including the preceding causes of postpartum haemorrhage (uterine atony, retained placenta, lacerations, other), postpartum haemorrhag or sepsis. Properties in the dataframe are set accordingly including properties which map to disability weights to capture DALYs :param individual_id: individual_id :param complication: (STR) the complication passed to the function which is being evaluated [ ‘sepsis_endometritis’, ‘sepsis_skin_soft_tissue’, ‘sepsis_urinary_tract’, ‘pph_uterine_atony’, ‘pph_retained_placenta’, ‘pph_other’]

progression_of_hypertensive_disorders(individual_id, property_prefix)[source]

This function is called during LabourAtHomeEvent/BirthAndPostnatalEvent or HSI_Labour_Receives SkilledBirthAttendanceDuring/HSI_Labour_ReceivesPostnatalCheck to determine if a woman with a hypertensive disorder will experience progression to a more severe state of disease during labour or the immediate

postpartum period. We do not allow for new onset of hypertensive disorders during this module - only

progression of exsisting disease. :param individual_id: individual_id :param property_prefix: (STR) ‘pn’ or ‘ps’

apply_risk_of_early_postpartum_death(individual_id)[source]

This function is called for all women who have survived labour. This function is called at various points in the model depending on a womans pathway through key events/HSI events. The function cycles through each complication to determine if that will contribute to a womans death and then schedules InstantaneousDeathEvent accordingly. For women who survive their properties from the labour module are reset and they are scheduled to PostnatalWeekOneEvent :param individual_id: individual_id

labour_characteristics_checker(individual_id)[source]

This function is called at multiples points in the module to ensure women of the right characteristics are in labour. This function doesnt check for a woman being pregnant or alive, as some events will still run despite those variables being set to false :param individual_id: individual_id

postpartum_characteristics_checker(individual_id)[source]

This function is called at multiples points in the module to ensure women of the right characteristics are in the period following labour. This function doesnt check for a woman being pregnant or alive, as some events will still run despite those variables being set to false :param individual_id: individual_id

prophylactic_labour_interventions(hsi_event)[source]

This function houses prophylactic interventions delivered by a Skilled Birth Attendant to women in labour. It is called by HSI_Labour_PresentsForSkilledBirthAttendanceInLabour :param hsi_event: HSI event in which the function has been called:

determine_delivery_mode_in_spe_or_ec(person_id, hsi_event, complication)[source]

This function is called following treatment for either severe pre-eclampsia or eclampsia during labour and determines if women with these conditions will undergo vaginal, assisted vaginal or caesarean section due to

their complication

Parameters:
  • person_id – mothers individual id

  • hsi_event – HSI event

  • complication – (STR) severe_pre_eclamp OR eclampsia

assessment_and_treatment_of_severe_pre_eclampsia_mgso4(hsi_event, labour_stage)[source]

This function represents the diagnosis and management of severe pre-eclampsia during labour. This function defines the required consumables and administers the intervention if available. The intervention is intravenous magnesium sulphate. It is called by HSI_Labour_PresentsForSkilledBirthAttendanceInLabour or HSI_Labour_ReceivesPostnatalCheck :param hsi_event: HSI event in which the function has been called: (STR) ‘hc’ == health centre, ‘hp’ == hospital :param labour_stage: intrapartum or postpartum period of labour (STR) ‘ip’ or ‘pp’:

assessment_and_treatment_of_hypertension(hsi_event, labour_stage)[source]

This function represents the diagnosis and management of hypertension during labour. This function defines the required consumable and administers the intervention if available. The intervention is intravenous magnesium sulphate. It is called by HSI_Labour_PresentsForSkilledBirthAttendanceInLabour or HSI_Labour_ReceivesPostnatalCheck :param hsi_event: HSI event in which the function has been called

assessment_and_treatment_of_eclampsia(hsi_event, labour_stage)[source]

This function represents the diagnosis and management of eclampsia during or following labour. This function defines the required consumables and administers the intervention if available. The intervention is intravenous magnesium sulphate. It is called by HSI_Labour_PresentsForSkilledBirthAttendanceInLabour or HSI_Labour_ReceivesPostnatalCheck :param hsi_event: HSI event in which the function has been called: (STR) ‘hc’ == health centre, ‘hp’ == hospital :param labour_stage: intrapartum or postpartum period of labour (STR) ‘ip’ or ‘pp’:

assessment_for_assisted_vaginal_delivery(hsi_event, indication)[source]

This function represents the diagnosis and management of obstructed labour during labour. This function defines the required consumables and administers the intervention if available. The intervention in this function is assisted vaginal delivery. It is called by HSI_Labour_PresentsForSkilledBirthAttendanceInLabour :param hsi_event: HSI event in which the function has been called: :param indication: STR indication for assessment and delivery of AVD (STR) ‘hc’ == health centre, ‘hp’ == hospital

assessment_and_treatment_of_maternal_sepsis(hsi_event, labour_stage)[source]

This function represents the diagnosis and management of maternal sepsis during or following labour. This function defines the required consumables and administers the intervention if they are available. The intervention in this function is maternal sepsis case management. It is called by either

HSI_Labour_PresentsForSkilledBirthAttendanceInLabour OR HSI_Labour_ReceivesPostnatalCheck

Parameters:

hsi_event – HSI event in which the function has been called:

(STR) ‘hc’ == health centre, ‘hp’ == hospital :param labour_stage: intrapartum or postpartum period of labour (STR) ‘ip’ or ‘pp’:

assessment_and_plan_for_antepartum_haemorrhage(hsi_event)[source]

This function represents the diagnosis of antepartum haemorrhage during labour. This function ensures that woman is referred for comprehensive care via caesarean section and blood transfusion. It is called by HSI_Labour_PresentsForSkilledBirthAttendanceInLabour :param hsi_event: HSI event in which the function has been called: (STR) ‘hc’ == health centre, ‘hp’ == hospital

assessment_for_referral_uterine_rupture(hsi_event)[source]

This function represents the diagnosis of uterine rupture during labour and ensures that a woman is referred for comprehensive care via caesarean section, surgical repair and blood transfusion. It is called by HSI_Labour_PresentsForSkilledBirthAttendanceInLabour. :param hsi_event: HSI event in which the function has been called: (STR) ‘hc’ == health centre, ‘hp’ == hospital

active_management_of_the_third_stage_of_labour(hsi_event)[source]

This function represents the administration of active management of the third stage of labour. This function checks the availability of consumables and delivers the intervention accordingly. It is called by HSI_Labour_PresentsForSkilledBirthAttendanceFollowingLabour :param hsi_event: HSI event in which the function has been called:

assessment_and_treatment_of_pph_uterine_atony(hsi_event)[source]

This function represents the diagnosis and management of postpartum haemorrhage secondary to uterine atony following labour. This function defines the required consumables and administers the intervention if they are available. The intervention in this function is intravenous uterotonics followed by referral for further care in the event of continued haemorrhage. It is called by HSI_Labour_ReceivesPostnatalCheck :param hsi_event: HSI event in which the function has been called

assessment_and_treatment_of_pph_retained_placenta(hsi_event)[source]

This function represents the diagnosis and management of postpartum haemorrhage secondary to retained placenta following labour. This function defines the required consumables and administers the intervention if they are available. The intervention in this function is manual removal of placenta (bedside) followed by referral for further care in the event of continued haemorrhage. It is called by HSI_Labour_ReceivesPostnatalCheck :param hsi_event: HSI event in which the function has been called:

surgical_management_of_pph(hsi_event)[source]

This function represents the surgical management of postpartum haemorrhage (all-cause) following labour. This function is called during HSI_Labour_ReceivesComprehensiveEmergencyObstetricCare for women who have PPH and medical management has failed. :param hsi_event: HSI event in which the function has been called

blood_transfusion(hsi_event)[source]

This function represents the blood transfusion during or after labour. This function is called during HSI_Labour_ReceivesComprehensiveEmergencyObstetricCare for women who have experience blood loss due to antepartum haemorrhage, postpartum haemorrhage or uterine rupture :param hsi_event: HSI event in which the function has been called

assessment_and_treatment_of_anaemia(hsi_event)[source]

This function represents the management of postnatal anaemia including iron and folic acid administration and blood testing. Women with severe anaemia are scheduled to receive blood. It is called during HSI_Labour_ReceivesPostnatalCheck :param hsi_event: HSI event in which the function has been called

assessment_for_depression(hsi_event)[source]

This function schedules depression screening for women who attend postnatal care via the Depression module. It is called within HSI_Labour_ReceivesPostnatalCheck. :param hsi_event: HSI event in which the function has been called

interventions_delivered_pre_discharge(hsi_event)[source]

This function contains the interventions that are delivered to women prior to discharge. This are considered part of essential postnatal care and currently include testing for HIV and postnatal iron and folic acid supplementation. It is called by HSI_Labour_ReceivesPostnatalCheck :param hsi_event: HSI event in which the function has been called:

run_if_receives_skilled_birth_attendance_cant_run(hsi_event)[source]

This function is called by HSI_Labour_PresentsForSkilledBirthAttendanceFollowingLabour if the HSI is unable to run on the date it has been scheduled for. For these women who cannot deliver in a facility despite presenting

for care, they will be scheduled to undergo a home birth via LabourAtHomeEvent and will continue with the correct schedule of labour events

Parameters:

hsi_event – HSI event in which the function has been called:

run_if_receives_postnatal_check_cant_run(hsi_event)[source]

This function is called by HSI_Labour_ReceivesPostnatalCheck if the HSI is unable to run on the date it has been scheduled for. For these women who have may have experienced life threatening complications we apply risk of death in this function, as it would have been applied in the HSI which can not run :param hsi_event: HSI event in which the function has been called:

run_if_receives_comprehensive_emergency_obstetric_care_cant_run(hsi_event)[source]

This function is called by HSI_Labour_ReceivesComprehensiveEmergencyObstetricCare if the HSI is unable to run on the date it has been scheduled for. For these women who have may have experienced life threatening complications we apply risk of death in this function, as it would have been applied in the HSI which can not run :param hsi_event: HSI event in which the function has been called:

do_at_generic_first_appt_emergency(person_id: int, individual_properties: IndividualProperties, schedule_hsi_event: HSIEventScheduler, **kwargs) None[source]

Actions to take during an emergency generic health system interaction (HSI).

Call signature is identical to the do_at_generic_first_appt() method.

Derived classes should overwrite this method so that they are compatible with the :py:class`~.HealthSystem` module, and can schedule HSI events when a individual presents symptoms indicative of the corresponding illness or condition.

class LabourOnsetEvent(module, individual_id)[source]

This is the LabourOnsetEvent. It is scheduled by the set_date_of_labour function for all women who are newly pregnant. In addition it is scheduled via the Pregnancy Supervisor module for women who are going into preterm labour and by the Care of Women During Pregnancy module for women who require emergency delivery as an intervention to treat a pregnancy-threatening complication.

It represents the start of a womans labour and is the first event all woman who are going to give birth pass through - regardless of mode of delivery or if they are already an inpatient. This event performs a number of different functions including populating the mni dictionary to store additional variables important to labour and HSIs, determining if and where a woman will seek care for delivery, schedules the LabourAtHome event and the HSI_Labour_PresentsForSkilledAttendance at birth (depending on care seeking), the BirthAndPostnatalEvent and the LabourDeathAndStillBirthEvent.

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:
  • module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

  • priority – a keyword-argument to set the priority (see Priority enum)

Bases: tlo.events.Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class LabourOnsetEvent):

__init__(module, individual_id)[source]

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:
  • module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

  • priority – a keyword-argument to set the priority (see Priority enum)

apply(individual_id)[source]

Apply this event to the given target.

Must be implemented by subclasses.

Parameters:

target – the target of the event

class LabourAtHomeEvent(module, individual_id)[source]

This is the LabourAtHomeEvent. It is scheduled by the LabourOnsetEvent for women who will not seek delivery care at a health facility. This event applies the probability that women delivering at home will experience complications associated with the intrapartum phase of labour and makes the appropriate changes to the data frame.

Additionally, this event applies a probability that women who develop complications during a home birth may choose to seek care from at a health facility. In that case the appropriate HSI is scheduled.

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:
  • module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

  • priority – a keyword-argument to set the priority (see Priority enum)

Bases: tlo.events.Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class LabourAtHomeEvent):

__init__(module, individual_id)[source]

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:
  • module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

  • priority – a keyword-argument to set the priority (see Priority enum)

apply(individual_id)[source]

Apply this event to the given target.

Must be implemented by subclasses.

Parameters:

target – the target of the event

class LabourDeathAndStillBirthEvent(module, individual_id)[source]

This is the LabourDeathAndStillBirthEvent. It is scheduled by the LabourOnsetEvent for all women in the labour module following the application of complications (and possibly treatment) for women who have given birth at home OR in a facility . This event determines if women who have experienced complications in labour will die or experience an intrapartum stillbirth.

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:
  • module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

  • priority – a keyword-argument to set the priority (see Priority enum)

Bases: tlo.events.Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class LabourDeathAndStillBirthEvent):

__init__(module, individual_id)[source]

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:
  • module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

  • priority – a keyword-argument to set the priority (see Priority enum)

apply(individual_id)[source]

Apply this event to the given target.

Must be implemented by subclasses.

Parameters:

target – the target of the event

class BirthAndPostnatalOutcomesEvent(module, mother_id)[source]

This is BirthAndPostnatalOutcomesEvent. It is scheduled by LabourOnsetEvent when women go into labour. This event calls the do_birth function for all women who have gone into labour to generate a newborn within the simulation. Additionally, this event applies the incidence of complications immediately following birth and determines if each woman will receive a full postnatal check-up and when.

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:
  • module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

  • priority – a keyword-argument to set the priority (see Priority enum)

Bases: tlo.events.Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class BirthAndPostnatalOutcomesEvent):

__init__(module, mother_id)[source]

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:
  • module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

  • priority – a keyword-argument to set the priority (see Priority enum)

apply(mother_id)[source]

Apply this event to the given target.

Must be implemented by subclasses.

Parameters:

target – the target of the event

class HSI_Labour_ReceivesSkilledBirthAttendanceDuringLabour(module, person_id, facility_level_of_this_hsi)[source]

This is the HSI_Labour_ReceivesSkilledBirthAttendanceDuringLabour. This event is the first HSI for women who have chosen to deliver in a health care facility. Broadly this HSI represents care provided by a skilled birth attendant during labour. This event…

1.) Determines if women will benefit from prophylactic interventions and delivers the interventions 2.) Applies risk of intrapartum complications 3.) Determines if women who have experience complications will benefit from treatment interventions and delivers

the interventions

4.) Schedules additional comprehensive emergency obstetric care for women who need it. (Comprehensive

interventions (blood transfusion, caeasarean section and surgery) are housed within a different HSI.)

Only interventions that can be delivered in BEmONC facilities are delivered in this HSI. These include intravenous antibiotics, intravenous anticonvulsants and assisted vaginal delivery. Additionally women may receive antihypertensives in line with Malawi’s EHP. Interventions will only be attempted to be delivered if the squeeze factor of the HSI is below a predetermined threshold of each intervention. CEmONC level interventions are managed within HSI_Labour_ReceivesComprehensiveEmergencyObstetricCare

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

Bases: tlo.methods.hsi_event.HSI_Event, tlo.events.IndividualScopeEventMixin

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class HSI_Labour_ReceivesSkilledBirthAttendanceDuringLabour):

__init__(module, person_id, facility_level_of_this_hsi)[source]

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id, squeeze_factor)[source]

Apply this event to the population.

Must be implemented by subclasses.

never_ran()[source]

Called when this event is was entered to the HSI Event Queue, but was never run.

did_not_run()[source]

Called when this event is due but it is not run. Return False to prevent the event being rescheduled, or True to allow the rescheduling. This is called each time that the event is tried to be run but it cannot be.

not_available()[source]
class HSI_Labour_ReceivesPostnatalCheck(module, person_id)[source]

This is HSI_Labour_ReceivesPostnatalCheck. It is scheduled by BirthAndPostnatalOutcomesEvent for all women who will receive full postnatal checkup after birth. Additionally, this event is scheduled by the PostnatalSupervisorEvent for women who require PNC later in the postnatal period. This event represents the postpartum care contact after delivery and includes assessment and treatment of severe pre-eclampsia, hypertension, sepsis and postpartum bleeding. In addition woman are scheduled HIV screening if appropriate and started on postnatal iron tablets

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

Bases: tlo.methods.hsi_event.HSI_Event, tlo.events.IndividualScopeEventMixin

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class HSI_Labour_ReceivesPostnatalCheck):

__init__(module, person_id)[source]

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id, squeeze_factor)[source]

Apply this event to the population.

Must be implemented by subclasses.

never_ran()[source]

Called when this event is was entered to the HSI Event Queue, but was never run.

did_not_run()[source]

Called when this event is due but it is not run. Return False to prevent the event being rescheduled, or True to allow the rescheduling. This is called each time that the event is tried to be run but it cannot be.

not_available()[source]
_get_facility_level_for_pnc(person_id)[source]
class HSI_Labour_ReceivesComprehensiveEmergencyObstetricCare(module, person_id, timing, facility_level_of_this_hsi)[source]

This is HSI_Labour_ReceivesComprehensiveEmergencyObstetricCare. This event houses all the interventions that are required to be delivered at a CEmONC level facility including caesarean section, blood transfusion and surgery during or following labour Currently we assume that if this even runs and the consumables are available then the intervention is delivered i.e. we dont apply squeeze factor threshold.

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

Bases: tlo.methods.hsi_event.HSI_Event, tlo.events.IndividualScopeEventMixin

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class HSI_Labour_ReceivesComprehensiveEmergencyObstetricCare):

__init__(module, person_id, timing, facility_level_of_this_hsi)[source]

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id, squeeze_factor)[source]

Apply this event to the population.

Must be implemented by subclasses.

never_ran()[source]

Called when this event is was entered to the HSI Event Queue, but was never run.

did_not_run()[source]

Called when this event is due but it is not run. Return False to prevent the event being rescheduled, or True to allow the rescheduling. This is called each time that the event is tried to be run but it cannot be.

not_available()[source]
class HSI_Labour_PostnatalWardInpatientCare(module, person_id, facility_level_of_this_hsi)[source]

This is HSI_Labour_PostnatalWardInpatientCare. It is scheduled by HSI_Labour_ReceivesPostnatalCheck for all women require treatment as inpatients after delivery. The primary function of this event is to capture inpatient bed days

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

Bases: tlo.methods.hsi_event.HSI_Event, tlo.events.IndividualScopeEventMixin

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class HSI_Labour_PostnatalWardInpatientCare):

__init__(module, person_id, facility_level_of_this_hsi)[source]

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id, squeeze_factor)[source]

Apply this event to the population.

Must be implemented by subclasses.

did_not_run()[source]

Called when this event is due but it is not run. Return False to prevent the event being rescheduled, or True to allow the rescheduling. This is called each time that the event is tried to be run but it cannot be.

not_available()[source]
class LabourAndPostnatalCareAnalysisEvent(module)[source]
This is LabourAndPostnatalCareAnalysisEvent. This event is scheduled in initialise_simulation. When this event runs,

and if any of the module parameters the signify analysis is being conducted are set to True, then key parameters

are overridden to alter the coverage and/or quality of either B/CEmONC interventions or Postnatal Care for mothers and newborns.

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:
  • module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

  • priority – a keyword-argument to set the priority (see Priority enum)

Bases: tlo.events.Event, tlo.events.PopulationScopeEventMixin

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class LabourAndPostnatalCareAnalysisEvent):

__init__(module)[source]

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:
  • module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

  • priority – a keyword-argument to set the priority (see Priority enum)

apply(population)[source]

Apply this event to the given target.

Must be implemented by subclasses.

Parameters:

target – the target of the event

class LabourLoggingEvent(module)[source]

This is the LabourLoggingEvent. It uses the data frame and the labour_tracker to produce summary statistics which are processed and presented by different analysis scripts

Create a new regular event.

Parameters:
  • module – the module that created this event

  • frequency (pandas.tseries.offsets.DateOffset) – the interval from one occurrence to the next (must be supplied as a keyword argument)

Bases: tlo.events.RegularEvent, tlo.events.Event, tlo.events.PopulationScopeEventMixin

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class LabourLoggingEvent):

__init__(module)[source]

Create a new regular event.

Parameters:
  • module – the module that created this event

  • frequency (pandas.tseries.offsets.DateOffset) – the interval from one occurrence to the next (must be supplied as a keyword argument)

apply(population)[source]

Apply this event to the given target.

This is a no-op; subclasses should override this method.

Parameters:

target – the target of the event