tlo.methods.care_of_women_during_pregnancy module

class CareOfWomenDuringPregnancy(name=None, resourcefilepath=None)[source]
This is the CareOfWomenDuringPregnancy module which contains health system interaction events relevant to

pregnancy and pregnancy loss including:

1.) HSI_CareOfWomenDuringPregnancy_AntenatalCareContact (1-8) representing all 8 routine antenatal care contacts

(ANC) recommended during pregnancy (with sequential scheduling of each event occurring within the HSI)

2.) HSI_CareOfWomenDuringPregnancy_FocusedANCVisit which replicates the pre 2016 structure of ANC (focused ANC)

used in some analysis scripts

3.) HSI_CareOfWomenDuringPregnancy_PostAbortionCaseManagement representing treatment for complications following

abortion (post abortion care of PAC) for women seeking care from the community

4.) HSI_CareOfWomenDuringPregnancy_TreatmentForEctopicPregnancy representing treatment for ectopic pregnancy for

women seeking care from the community

5.) HSI_CareOfWomenDuringPregnancy_AntenatalWardInpatientCare which represents antenatal inpatient care for women

who require admission following complications of pregnancy, detected via ANC or following care seeking from the community including treatment and/or referral for (hypertension, diabetes, antepartum haemorrhage, anaemia, premature of membranes, chorioamnionitis)

Additionally the module stores a number of HSIs which represent follow up for women who are scheduled for additional testing following an admission and initiation of treatment (i.e. anaemia or gestational diabetes). Individual interventions are stored as functions within the module to prevent repetition.

Bases: tlo.core.Module

PARAMETERS:

Item

Type

Description

prob_seek_anc2

LIST

Probability a women who is not predicted to attended four or more ANC visits will attend ANC2

prob_seek_anc3

LIST

Probability a women who is not predicted to attended four or more ANC visits will attend ANC3

prob_seek_anc5

LIST

Probability a women who is predicted to attend four or more ANC visits will attend ANC5

prob_seek_anc6

LIST

Probability a women who is predicted to attend four or more ANC visits will attend ANC6

prob_seek_anc7

LIST

Probability a women who is predicted to attend four or more ANC visits will attend ANC7

prob_seek_anc8

LIST

Probability a women who is predicted to attend four or more ANC visits will attend ANC8

effect_of_ifa_for_resolving_anaemia

LIST

treatment effectiveness of starting iron and folic acid on resolving anaemia

treatment_effect_blood_transfusion_anaemia

LIST

treatment effectiveness of blood transfusion for anaemia in pregnancy

squeeze_factor_threshold_anc

LIST

squeeze factor threshold over which an ANC appointment cannot run

prob_intervention_delivered_urine_ds

LIST

probability a woman will receive the intervention “urine dipstick” given that the HSI has ran and the consumables are available (proxy for clinical quality)

prob_intervention_delivered_bp

LIST

probability a woman will receive the intervention “blood pressure measurement” given that the HSI has ran and the consumables are available (proxy for clinical quality)

prob_intervention_delivered_ifa

LIST

probability a woman will receive the intervention “iron and folic acid” given that the HSI has ran and the consumables are available (proxy for clinical quality)

prob_adherent_ifa

LIST

probability a woman who is given iron and folic acid will adhere to the treatment for their pregnancy

prob_intervention_delivered_poct

LIST

probability a woman will receive the intervention “point of care Hb testing” given that the HSI has ran and the consumables are available (proxy for clinical quality)

prob_intervention_delivered_syph_test

LIST

probability a woman will receive the intervention “Syphilis test” given that the HSI has ran and the consumables are available (proxy for clinical quality)

prob_intervention_delivered_gdm_test

LIST

probability a woman will receive the intervention “GDM screening” given that the HSI has ran and the consumables are available (proxy for clinical quality)

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

sensitivity_bp_monitoring

LIST

sensitivity of blood pressure monitoring to detect hypertension

specificity_bp_monitoring

LIST

specificity of blood pressure monitoring to detect hypertension

sensitivity_urine_protein_1_plus

LIST

sensitivity of a urine dipstick test to detect proteinuria at 1+

specificity_urine_protein_1_plus

LIST

specificity of a urine dipstick test to detect proteinuria at 1+

sensitivity_poc_hb_test

LIST

sensitivity of a point of care Hb test to detect anaemia

specificity_poc_hb_test

LIST

specificity of a point of care Hb test to detect anaemia

sensitivity_fbc_hb_test

LIST

sensitivity of a Full Blood Count test to detect anaemia

specificity_fbc_hb_test

LIST

specificity of a Full Blood Count test to detect anaemia

sensitivity_blood_test_glucose

LIST

sensitivity of a blood test to detect raised blood glucose

specificity_blood_test_glucose

LIST

specificity of a blood test to detect raised blood glucose

sensitivity_blood_test_syphilis

LIST

sensitivity of a blood test to detect syphilis

specificity_blood_test_syphilis

LIST

specificity of a blood test to detect syphilis

squeeze_threshold_for_delay_three_an

LIST

squeeze factor value over which an individual within a antenatal HSI is said to experience type 3 delay i.e. delay in receiving appropriate care

PROPERTIES:

Item

Type

Description

ac_total_anc_visits_current_pregnancy

INT

rolling total of antenatal visits this woman has attended during her pregnancy

ac_date_next_contact

DATE

Date on which this woman is scheduled to return for her next ANC contact

ac_to_be_admitted

BOOL

Whether this woman requires admission following an ANC visit

ac_receiving_iron_folic_acid

BOOL

whether this woman is receiving daily iron & folic acid supplementation

ac_receiving_bep_supplements

BOOL

whether this woman is receiving daily balanced energy and protein supplementation

ac_receiving_calcium_supplements

BOOL

whether this woman is receiving daily calcium supplementation

ac_gest_htn_on_treatment

BOOL

Whether this woman has been initiated on treatment for gestational hypertension

ac_gest_diab_on_treatment

CATEGORICAL

Treatment this woman is receiving for gestational diabetes. Possible values are: [none, diet_exercise, orals, insulin, ]

ac_ectopic_pregnancy_treated

BOOL

Whether this woman has received treatment for an ectopic pregnancy

ac_received_post_abortion_care

BOOL

bitset list of interventions delivered to a woman undergoing post abortion care

ac_received_abx_for_prom

BOOL

Whether this woman has received antibiotics as treatment for premature rupture of membranes

ac_mag_sulph_treatment

BOOL

Whether this woman has received magnesium sulphate for treatment of severe pre-eclampsia/eclampsia

ac_iv_anti_htn_treatment

BOOL

Whether this woman has received intravenous antihypertensive drugs for treatment of severe hypertension

ac_admitted_for_immediate_delivery

CATEGORICAL

Admission type for women needing urgent delivery in the antenatal period. Possible values are: [none, induction_now, induction_future, caesarean_now, caesarean_future, avd_now, ]

Class attributes:

ADDITIONAL_DEPENDENCIES : {‘Labour’, ‘Lifestyle’, ‘Contraception’}

INIT_DEPENDENCIES : {‘Demography’, ‘HealthSystem’, ‘PregnancySupervisor’}

METADATA : {<Metadata.USES_HEALTHSYSTEM: 3>}

Functions (defined or overridden in class CareOfWomenDuringPregnancy):

__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.

Must be implemented by subclasses.

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.

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

get_and_store_pregnancy_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.

care_of_women_in_pregnancy_property_reset(id_or_index)[source]

This function is called following birth/pregnancy loss to reset the variables stored in this module. This prevents women experiencing the effects of these properties in future pregnancies :param id_or_index: individual id OR set of indexes to change the properties :return:

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 – the mother for this child (can be -1 if the mother is not identified).

  • child – the new child

further_on_birth_care_of_women_in_pregnancy(mother_id)[source]
This function is called by the on_birth function of NewbornOutcomes module following a live birth or the Labour

module following an intrapartum stillbirth . This function contains additional code related to the antenatal care module that should be ran following all births/late stillbirths - this is to ensure each modules (pregnancy,antenatal care, labour, newborn, postnatal) on_birth code is ran in the correct sequence

Parameters

mother_id – mothers individual id

on_hsi_alert(person_id, treatment_id)[source]
get_approx_days_of_pregnancy(person_id)[source]
This function calculates the approximate number of days remaining in a womans pregnancy- assuming all

pregnancies go to full term (40 weeks gestational age)

Parameters

person_id – Mothers individual id

Returns

Approximate number of days left in a term pregnancy

determine_gestational_age_for_next_contact(person_id)[source]

This function is called by each of the ANC HSIs to determine the number of weeks before a woman is required to return for her next ANC contact in the schedule :param person_id: individual_id

antenatal_care_scheduler(individual_id, visit_to_be_scheduled, recommended_gestation_next_anc)[source]

This function is responsible for scheduling a womans next ANC contact in the schedule if she chooses to seek care again. It is called by each of the ANC HSIs. :param individual_id: individual_id :param visit_to_be_scheduled: Number if next visit in the schedule (2-8) :param recommended_gestation_next_anc: Gestational age in weeks a woman should be for the next visit in her schedule

schedule_admission(individual_id)[source]

This function is called within each of the ANC HSIs for women who require admission due to a complication detected during ANC :param individual_id: individual_id

call_if_maternal_emergency_assessment_cant_run(hsi_event)[source]
This function is called if HSI_CareOfWomenDuringPregnancy_MaternalEmergencyAssessment is unable to run to ensure

women still experience risk of death associated with the complication they had sought treatment for (as risk of

death is applied following treatment within the HSI) :param hsi_event: HSI event in which the function has been called:

check_intervention_should_run_and_update_mni(person_id, int_1, int2)[source]

This function is called to check if specific interventions within the ANC matrix should run for an individual. If the individual has received the intervention the appropriate amount of times per pregnancy then the intervention wont run again :param person_id: individual id :param int_1: first intervention (i.e. first tetanus vaccine) :param int2: second intervention (i.e. second tetanus vaccine) :return BOOL (should the intervention be delivered)

screening_interventions_delivered_at_every_contact(hsi_event)[source]

This function contains the screening interventions which are delivered at every ANC contact regardless of the womans gestational age and include blood pressure measurement and urine dipstick testing :param hsi_event: HSI event in which the function has been called:

iron_and_folic_acid_supplementation(hsi_event)[source]

This function contains the intervention iron and folic acid supplementation delivered during ANC. :param hsi_event: HSI event in which the function has been called

balance_energy_and_protein_supplementation(hsi_event)[source]

This function contains the intervention balance energy and protein supplementation delivered during ANC. :param hsi_event: HSI event in which the function has been called

insecticide_treated_bed_net(hsi_event)[source]

This function simply logs a consumable request for insecticide treated bed nets. Coverage of ITN and its effect is managed through the malaria module’s calculation of malaria incidence. :param hsi_event: HSI event in which the function has been called

tb_screening(hsi_event)[source]

This function schedules HSI_TbScreening which represents screening for TB. Screening is only scheduled if if the TB module is registered. :param hsi_event: HSI event in which the function has been called

tetanus_vaccination(hsi_event)[source]
This function contains the intervention tetanus vaccination. A booster dose of the vaccine is given to all women

during ANC. Effect of vaccination is managed by the EPI module and therefore here we just capture consumables and number of doses

Parameters

hsi_event – HSI event in which the function has been called

calcium_supplementation(hsi_event)[source]

This function contains the intervention calcium supplementation delivered during ANC. :param hsi_event: HSI event in which the function has been called

point_of_care_hb_testing(hsi_event)[source]

This function contains the intervention point of care haemoglobin testing provided to women during ANC1/ANC6 to detect anaemia during pregnancy :param hsi_event: HSI event in which the function has been called

albendazole_administration(hsi_event)[source]
This function contains the intervention albendazole administration (de-worming) and is provided to women during

ANC

Parameters

hsi_event – HSI event in which the function has been called

hep_b_testing(hsi_event)[source]

This function contains the intervention Hepatitis B testing and is provided to women during ANC. As Hepatitis B is not modelled currently this intervention just maps consumables used during ANC :param hsi_event: HSI event in which the function has been called

syphilis_screening_and_treatment(hsi_event)[source]

This function contains the intervention Syphilis testing and is provided to women during ANC. As Syphilis is not modelled currently this intervention just maps consumables used during ANC :param hsi_event: HSI event in which the function has been called

hiv_testing(hsi_event)[source]

This function contains the scheduling for HIV testing and is provided to women during ANC. :param hsi_event: HSI event in which the function has been called

iptp_administration(hsi_event)[source]

This function schedules HSI_MalariaIPTp for women who should receive IPTp during pregnancy (if the malaria module is registered) :param hsi_event: HSI event in which the function has been called

gdm_screening(hsi_event)[source]
This function contains intervention of gestational diabetes screening during ANC. Screening is only conducted

on women with pre-specified risk factors for the disease.

Parameters

hsi_event – HSI event in which the function has been called

interventions_delivered_each_visit_from_anc2(hsi_event)[source]

This function contains a collection of interventions that are delivered to women every time they attend ANC from ANC visit 2 :param hsi_event: HSI event in which the function has been called

check_anc1_can_run(individual_id, squeeze_factor, gest_age_next_contact)[source]

This function is called by the first ANC contact and runs a series of checks to determine if the HSI should run on the date it has been scheduled for :param individual_id: individual id :param squeeze_factor: squeeze_factor of the HSI calling this function :param gest_age_next_contact: gestational age, in weeks, this woman is due to return for her next ANC :returns True/False as to whether the event can run

check_subsequent_anc_can_run(individual_id, this_contact, this_visit_number, squeeze_factor, gest_age_next_contact)[source]

This function is called by the subsequent ANC contacts and runs a series of checks to determine if the HSI should run on the date it has been scheduled for :param individual_id: individual id :param this_contact: HSI object of the current ANC contact that needs to be rebooked :param this_visit_number: Number of the next ANC contact in the schedule :param squeeze_factor: squeeze_factor of the HSI calling this function :param gest_age_next_contact: gestational age, in weeks, this woman is due to return for her next ANC :returns True/False as to whether the event can run

full_blood_count_testing(hsi_event)[source]

This function contains the intervention ‘full blood count testing’ and represents blood testing requiring a laboratory. It is called by HSI_CareOfWomenDuringPregnancy_AntenatalWardInpatientCare for women admitted due to anaemia :param hsi_event: HSI event in which the function has been called :returns: result of the FBC [‘none’, ‘mild_mod’, ‘severe’] (STR)

antenatal_blood_transfusion(individual_id, hsi_event)[source]

This function contains the intervention ‘blood transfusion’. It is called by either HSI_CareOfWomenDuringPregnancy_AntenatalWardInpatientCare or HSI_CareOfWomenDuringPregnancy_PostAbortionCase Management for women requiring blood for either haemorrhage or severe anaemia. given iron and folic acid supplements during ANC :param individual_id: individual_id :param hsi_event: HSI event in which the function has been called

initiate_maintenance_anti_hypertensive_treatment(individual_id, hsi_event)[source]

This function contains initiation of oral antihypertensive medication for women with high blood pressure. It is called by HSI_CareOfWomenDuringPregnancy_AntenatalWardInpatientCare for women who have been identified as having

high blood pressure in pregnancy but are not yet receiving treatment

Parameters
  • individual_id – individual_id

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

initiate_treatment_for_severe_hypertension(individual_id, hsi_event)[source]

This function contains initiation of intravenous antihypertensive medication for women with severely high blood pressure. It is called by HSI_CareOfWomenDuringPregnancy_AntenatalWardInpatientCare for women who have been admitted due to severely high blood pressure (severe gestational hypertension, severe pre-eclampsia or eclampsia) :param individual_id: individual_id :param hsi_event: HSI event in which the function has been called

treatment_for_severe_pre_eclampsia_or_eclampsia(individual_id, hsi_event)[source]

This function contains initiation of intravenous magnesium sulphate medication for women with severely pre-eclampsia/eclampsia It is called by HSI_CareOfWomenDuringPregnancy_AntenatalWardInpatientCare for women who have been admitted with those conditions :param individual_id: individual_id :param hsi_event: HSI event in which the function has been called

antibiotics_for_prom(individual_id, hsi_event)[source]

This function contains initiation of antibiotics for women with who have been admitted following premature rupture of membranes .It is called by HSI_CareOfWomenDuringPregnancy_AntenatalWardInpatientCare :param individual_id: individual_id :param hsi_event: HSI event in which the function has been called

ectopic_pregnancy_treatment_doesnt_run(hsi_event)[source]

This function is called within HSI_CareOfWomenDuringPregnancy_TreatmentForEctopicPregnancy if the event cannot run/the intervention cannot be delivered. This ensures that women with ectopic pregnancies that haven’t ruptured will experience rupture and risk of death without treatment :param hsi_event: HSI event in which the function has been called

calculate_beddays(individual_id)[source]

This function is called by HSI_CareOfWomenDuringPregnancy_AntenatalWardInpatientCare to calculate the number of beddays required by a women following admission. This is determined according to the reason for her admission and her gestation :param individual_id: individual_id :return:

class HSI_CareOfWomenDuringPregnancy_FirstAntenatalCareContact(module, person_id)[source]

This is the HSI_CareOfWomenDuringPregnancy_FirstAntenatalCareContact which represents the first routine antenatal care contact (ANC1). It is scheduled by the PregnancySupervisor Event for women who choose to seek routine antenatal care during their pregnancy. It is recommended that this visit occur before 12 weeks gestation. This event delivers the interventions to women which are part of ANC1. Additionally interventions that should be offered in the early ANC contacts are provided to women who present to ANC1 later in their pregnancy. Scheduling the next ANC contact in the occurs during this HSI along with admission to antenatal inpatient ward in the case of complications

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

Functions (defined or overridden in class HSI_CareOfWomenDuringPregnancy_FirstAntenatalCareContact):

__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.

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_CareOfWomenDuringPregnancy_SecondAntenatalCareContact(module, person_id)[source]

This is the HSI_CareOfWomenDuringPregnancy_SecondAntenatalCareContact which represents the second routine antenatal care contact (ANC2). It is scheduled by the HSI_CareOfWomenDuringPregnancy_FirstAntenatalCareContact for women who choose to seek additional ANC after their previous visit. It is recommended that this visit occur at 20 weeks gestation. This event delivers the interventions to women which are part of ANC2. Additionally interventions that should be delivered according to a womans gestational age and position in her ANC schedule are delivered. Finally scheduling the next ANC contact in the occurs during this HSI along with admission to antenatal inpatient ward in the case of complications

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

Functions (defined or overridden in class HSI_CareOfWomenDuringPregnancy_SecondAntenatalCareContact):

__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.

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_CareOfWomenDuringPregnancy_ThirdAntenatalCareContact(module, person_id)[source]

This is the HSI_CareOfWomenDuringPregnancy_ThirdAntenatalCareContact which represents the third routine antenatal care contact (ANC3). It is scheduled by the HSI_CareOfWomenDuringPregnancy_SecondAntenatalCareContact for women who choose to seek additional ANC after their previous visit. It is recommended that this visit occur at 26 weeks gestation. This event delivers the interventions to women which are part of ANC3. Additionally interventions that should be delivered according to a womans gestational age and position in her ANC schedule are delivered. Finally scheduling the next ANC contact in the occurs during this HSI along with admission to antenatal inpatient ward in the case of complications

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

Functions (defined or overridden in class HSI_CareOfWomenDuringPregnancy_ThirdAntenatalCareContact):

__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.

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_CareOfWomenDuringPregnancy_FourthAntenatalCareContact(module, person_id)[source]

This is the HSI_CareOfWomenDuringPregnancy_FourthAntenatalCareContact which represents the fourth routine antenatal care contact (ANC4). It is scheduled by the HSI_CareOfWomenDuringPregnancy_ThirdAntenatalCareContact for women who choose to seek additional ANC after their previous visit. It is recommended that this visit occur at 30 weeks gestation. This event delivers the interventions to women which are part of ANC4. Additionally interventions that should be delivered according to a womans gestational age and position in her ANC schedule are delivered. Finally scheduling the next ANC contact in the occurs during this HSI along with admission to antenatal inpatient ward in the case of complications

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

Functions (defined or overridden in class HSI_CareOfWomenDuringPregnancy_FourthAntenatalCareContact):

__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.

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_CareOfWomenDuringPregnancy_FifthAntenatalCareContact(module, person_id)[source]

This is the HSI_CareOfWomenDuringPregnancy_FifthAntenatalCareContact which represents the fifth routine antenatal care contact (ANC5). It is scheduled by the HSI_CareOfWomenDuringPregnancy_FourthAntenatalCareContact for women who choose to seek additional ANC after their previous visit. It is recommended that this visit occur at 34 weeks gestation. This event delivers the interventions to women which are part of ANC5. Additionally interventions that should be delivered according to a womans gestational age and position in her ANC schedule are delivered. Finally scheduling the next ANC contact in the occurs during this HSI along with admission to antenatal inpatient ward in the case of complications

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

Functions (defined or overridden in class HSI_CareOfWomenDuringPregnancy_FifthAntenatalCareContact):

__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.

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_CareOfWomenDuringPregnancy_SixthAntenatalCareContact(module, person_id)[source]

This is the HSI_CareOfWomenDuringPregnancy_SixthAntenatalCareContact which represents the sixth routine antenatal care contact (ANC6). It is scheduled by the HSI_CareOfWomenDuringPregnancy_FifthAntenatalCareContact for women who choose to seek additional ANC after their previous visit. It is recommended that this visit occur at 36 weeks gestation. This event delivers the interventions to women which are part of ANC6. Additionally interventions that should be delivered according to a womans gestational age and position in her ANC schedule are delivered. Finally scheduling the next ANC contact in the occurs during this HSI along with admission to antenatal inpatient ward in the case of complications

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

Functions (defined or overridden in class HSI_CareOfWomenDuringPregnancy_SixthAntenatalCareContact):

__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.

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_CareOfWomenDuringPregnancy_SeventhAntenatalCareContact(module, person_id)[source]

“This is the HSI_CareOfWomenDuringPregnancy_SeventhAntenatalCareContact which represents the seventh routine antenatal care contact (ANC7). It is scheduled by the HSI_CareOfWomenDuringPregnancy_SixthAntenatalCareContact for women who choose to seek additional ANC after their previous visit. It is recommended that this visit occur at 36 weeks gestation. This event delivers the interventions to women which are part of ANC7. Additionally interventions that should be delivered according to a womans gestational age and position in her ANC schedule are delivered. Finally scheduling the next ANC contact in the occurs during this HSI along with admission to antenatal inpatient ward in the case of complications

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

Functions (defined or overridden in class HSI_CareOfWomenDuringPregnancy_SeventhAntenatalCareContact):

__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.

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_CareOfWomenDuringPregnancy_EighthAntenatalCareContact(module, person_id)[source]

“This is the HSI_CareOfWomenDuringPregnancy_EighthAntenatalCareContact which represents the eighth routine antenatal care contact (ANC8). It is scheduled by the HSI_CareOfWomenDuringPregnancy_SeventhAntenatalCareContact for women who choose to seek additional ANC after their previous visit. It is recommended that this visit occur at 36 weeks gestation. This event delivers the interventions to women which are part of ANC8. Additionally interventions that should be delivered according to a womans gestational age and position in her ANC schedule are delivered. Finally scheduling the next ANC contact in the occurs during this HSI along with admission to antenatal inpatient ward in the case of complications

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

Functions (defined or overridden in class HSI_CareOfWomenDuringPregnancy_EighthAntenatalCareContact):

__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.

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_CareOfWomenDuringPregnancy_FocusedANCVisit(module, person_id, visit_number)[source]

This is HSI_CareOfWomenDuringPregnancy_FocusedANCVisit which is scheduled by the PregnancySupervisor if the parameter ‘anc_service_structure’ == 4. This HSI replicates the ANC service structured used within Malawi prior to 2016. We use this HSI to replicate the Focused ANC service structure (4 visits at approx 16, 22, 30, 36 weeks) within some analyses as the scheduled of interventions per visit is different from the ANC8 structure. This event represents all four ANC visits.

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

Functions (defined or overridden in class HSI_CareOfWomenDuringPregnancy_FocusedANCVisit):

__init__(module, person_id, visit_number)[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.

class HSI_CareOfWomenDuringPregnancy_PresentsForInductionOfLabour(module, person_id)[source]

This is HSI_CareOfWomenDuringPregnancy_PresentsForInductionOfLabour. It is schedule by the PregnancySupervisor Event for women who present to the health system for induction as their labour has progressed longer than expected.

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

Functions (defined or overridden in class HSI_CareOfWomenDuringPregnancy_PresentsForInductionOfLabour):

__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.

class HSI_CareOfWomenDuringPregnancy_MaternalEmergencyAssessment(module, person_id)[source]

This is HSI_CareOfWomenDuringPregnancy_MaternalEmergencyAssessment. It is schedule by the PregnancySupervisor Event for women who choose to seek care for emergency treatment in pregnancy (due to severe pre-eclampsia/eclampsia, antepartum haemorrhage, premature rupture of membranes or chorioamnionitis). It is assumed women present to this event as their first point of contact for an emergency in pregnancy, and therefore circumnavigate regular A&E.

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

Functions (defined or overridden in class HSI_CareOfWomenDuringPregnancy_MaternalEmergencyAssessment):

__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]
class HSI_CareOfWomenDuringPregnancy_AntenatalWardInpatientCare(module, person_id)[source]

This is HSI_CareOfWomenDuringPregnancy_AntenatalWardInpatientCare. This HSI can be scheduled by any of the ANC HSIs for women who have been identified as having complications or by HSI_CareOfWomenDuringPregnancy_ MaternalEmergencyAssessment or HSI_CareOfWomenDuringPregnancy_AntenatalOutpatientFollowUp.This HSI represents the antenatal ward which would deliver care to women experiencing complications associated with their pregnancy including anaemia, hypertension, gestational diabetes, antepartum haemorrhage, premature rupture of membranes or chorioamnionitis. For women whom delivery is indicated as part of treatment for a complications they are scheduled to the LabourOnset Event

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

Functions (defined or overridden in class HSI_CareOfWomenDuringPregnancy_AntenatalWardInpatientCare):

__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.

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_CareOfWomenDuringPregnancy_AntenatalOutpatientManagementOfAnaemia(module, person_id)[source]

HSI_CareOfWomenDuringPregnancy_AntenatalManagementOfAnaemia. It is scheduled by HSI_CareOfWomenDuringPregnancy_ AntenatalWardInpatientCare for women who have developed anaemia during pregnancy. This event manages repeat blood testing for women who were found to be anaemic and treated. If the woman remains anaemic she is readmitted to the inpatient ward for further care.

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

Functions (defined or overridden in class HSI_CareOfWomenDuringPregnancy_AntenatalOutpatientManagementOfAnaemia):

__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.

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_CareOfWomenDuringPregnancy_AntenatalOutpatientManagementOfGestationalDiabetes(module, person_id)[source]

This is HSI_CareOfWomenDuringPregnancy_AntenatalOutpatientManagementOfGestationalDiabetes. It is scheduled by HSI_CareOfWomenDuringPregnancy_AntenatalWardInpatientCare for women who have developed gestational diabetes during pregnancy. This event manages repeat blood testing for women who were found to have GDM and treated. If the woman remains hyperglycaemic she is moved to the next line treatment and scheduled to return for follow up.

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

Functions (defined or overridden in class HSI_CareOfWomenDuringPregnancy_AntenatalOutpatientManagementOfGestationalDiabetes):

__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.

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_CareOfWomenDuringPregnancy_PostAbortionCaseManagement(module, person_id)[source]

This is HSI_CareOfWomenDuringPregnancy_PostAbortionCaseManagement. It is scheduled by HSI_GenericEmergencyFirstApptAtFacilityLevel1 for women who have presented to hospital due to the complications of either induced or spontaneous abortion. This event manages interventions delivered for women who are experiencing either sepsis, haemorrhage or injury post-abortion.

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

Functions (defined or overridden in class HSI_CareOfWomenDuringPregnancy_PostAbortionCaseManagement):

__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.

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_CareOfWomenDuringPregnancy_TreatmentForEctopicPregnancy(module, person_id)[source]

This is HSI_CareOfWomenDuringPregnancy_TreatmentForEctopicPregnancy. It is scheduled by HSI_GenericEmergencyFirstApptAtFacilityLevel1 for women who have presented to hospital due to ectopic pregnancy. This event manages interventions delivered as part of the case management of ectopic pregnancy

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

Functions (defined or overridden in class HSI_CareOfWomenDuringPregnancy_TreatmentForEctopicPregnancy):

__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]