tlo.methods.care_of_women_during_pregnancy module
- class CareOfWomenDuringPregnancy(name=None, resourcefilepath=None)
- 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.
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
PARAMETERS:
Item
Type
Description
prob_seek_anc2
LIST
Probability a woman who is not predicted to attended four or more ANC visits will attend ANC2
prob_seek_anc3
LIST
Probability a woman who is not predicted to attended four or more ANC visits will attend ANC3
prob_seek_anc5
LIST
Probability a woman who is predicted to attend four or more ANC visits will attend ANC5
prob_seek_anc6
LIST
Probability a woman who is predicted to attend four or more ANC visits will attend ANC6
prob_seek_anc7
LIST
Probability a woman who is predicted to attend four or more ANC visits will attend ANC7
prob_seek_anc8
LIST
Probability a woman 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
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_adherent_ifa
LIST
probability a woman who is given iron and folic acid will adhere to the treatment for their pregnancy
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
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 : {‘Lifestyle’, ‘Contraception’, ‘Labour’}
INIT_DEPENDENCIES : {‘HealthSystem’, ‘PregnancySupervisor’, ‘Demography’}
METADATA : {<Metadata.USES_HEALTHSYSTEM: 3>}
__annotations__ : {}
Functions (defined or overridden in class CareOfWomenDuringPregnancy):
- __init__(name=None, resourcefilepath=None)
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)
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)
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_pregnancy_item_codes()
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)
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)
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)
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_care_of_women_in_pregnancy(mother_id)
- 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)
- get_approx_days_of_pregnancy(person_id)
- This function calculates the approximate number of days remaining in a woman’s 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)
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)
This function is responsible for scheduling a woman’s 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)
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)
- 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)
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)
This function contains the screening interventions which are delivered at every ANC contact regardless of the woman’s 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)
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)
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)
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)
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)
- 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)
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)
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)
- 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)
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)
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)
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)
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)
- 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)
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, gest_age_next_contact)
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 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_visit_number, gest_age_next_contact)
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_visit_number: Number of the next ANC contact in the schedule :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)
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)
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)
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)
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)
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)
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)
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)
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)
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
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_CareOfWomenDuringPregnancy_FirstAntenatalCareContact):
- __init__(module, person_id)
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)
Apply this event to the population.
Must be implemented by subclasses.
- did_not_run()
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()
- class HSI_CareOfWomenDuringPregnancy_SecondAntenatalCareContact(module, person_id)
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 woman’s 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
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_CareOfWomenDuringPregnancy_SecondAntenatalCareContact):
- __init__(module, person_id)
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)
Apply this event to the population.
Must be implemented by subclasses.
- did_not_run()
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()
- class HSI_CareOfWomenDuringPregnancy_ThirdAntenatalCareContact(module, person_id)
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 woman’s 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
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_CareOfWomenDuringPregnancy_ThirdAntenatalCareContact):
- __init__(module, person_id)
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)
Apply this event to the population.
Must be implemented by subclasses.
- did_not_run()
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()
- class HSI_CareOfWomenDuringPregnancy_FourthAntenatalCareContact(module, person_id)
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 woman’s 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
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_CareOfWomenDuringPregnancy_FourthAntenatalCareContact):
- __init__(module, person_id)
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)
Apply this event to the population.
Must be implemented by subclasses.
- did_not_run()
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()
- class HSI_CareOfWomenDuringPregnancy_FifthAntenatalCareContact(module, person_id)
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 woman’s 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
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_CareOfWomenDuringPregnancy_FifthAntenatalCareContact):
- __init__(module, person_id)
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)
Apply this event to the population.
Must be implemented by subclasses.
- did_not_run()
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()
- class HSI_CareOfWomenDuringPregnancy_SixthAntenatalCareContact(module, person_id)
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 woman’s 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
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_CareOfWomenDuringPregnancy_SixthAntenatalCareContact):
- __init__(module, person_id)
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)
Apply this event to the population.
Must be implemented by subclasses.
- did_not_run()
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()
- class HSI_CareOfWomenDuringPregnancy_SeventhAntenatalCareContact(module, person_id)
“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 woman’s 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
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_CareOfWomenDuringPregnancy_SeventhAntenatalCareContact):
- __init__(module, person_id)
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)
Apply this event to the population.
Must be implemented by subclasses.
- did_not_run()
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()
- class HSI_CareOfWomenDuringPregnancy_EighthAntenatalCareContact(module, person_id)
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 woman’s 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.
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_CareOfWomenDuringPregnancy_EighthAntenatalCareContact):
- __init__(module, person_id)
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)
Apply this event to the population.
Must be implemented by subclasses.
- did_not_run()
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()
- class HSI_CareOfWomenDuringPregnancy_FocusedANCVisit(module, person_id, visit_number)
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.
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_CareOfWomenDuringPregnancy_FocusedANCVisit):
- __init__(module, person_id, visit_number)
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)
Apply this event to the population.
Must be implemented by subclasses.
- class HSI_CareOfWomenDuringPregnancy_PresentsForInductionOfLabour(module, person_id)
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.
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_CareOfWomenDuringPregnancy_PresentsForInductionOfLabour):
- __init__(module, person_id)
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)
Apply this event to the population.
Must be implemented by subclasses.
- class HSI_CareOfWomenDuringPregnancy_AntenatalWardInpatientCare(module, person_id)
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
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_CareOfWomenDuringPregnancy_AntenatalWardInpatientCare):
- __init__(module, person_id)
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)
Apply this event to the population.
Must be implemented by subclasses.
- did_not_run()
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()
- class HSI_CareOfWomenDuringPregnancy_AntenatalOutpatientManagementOfAnaemia(module, person_id)
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.
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_CareOfWomenDuringPregnancy_AntenatalOutpatientManagementOfAnaemia):
- __init__(module, person_id)
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)
Apply this event to the population.
Must be implemented by subclasses.
- did_not_run()
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()
- class HSI_CareOfWomenDuringPregnancy_AntenatalOutpatientManagementOfGestationalDiabetes(module, person_id)
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.
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_CareOfWomenDuringPregnancy_AntenatalOutpatientManagementOfGestationalDiabetes):
- __init__(module, person_id)
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)
Apply this event to the population.
Must be implemented by subclasses.
- did_not_run()
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()
- class HSI_CareOfWomenDuringPregnancy_PostAbortionCaseManagement(module, person_id)
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.
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_CareOfWomenDuringPregnancy_PostAbortionCaseManagement):
- __init__(module, person_id)
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)
Apply this event to the population.
Must be implemented by subclasses.
- did_not_run()
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()
- class HSI_CareOfWomenDuringPregnancy_TreatmentForEctopicPregnancy(module, person_id)
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
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_CareOfWomenDuringPregnancy_TreatmentForEctopicPregnancy):
- __init__(module, person_id)
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)
Apply this event to the population.
Must be implemented by subclasses.
- never_ran()
Called when this event is was entered to the HSI Event Queue, but was never run.
- did_not_run()
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()
- class CareOfWomenDuringPregnancyLoggingEvent(module)
This is CareOfWomenDuringPregnancyLoggingEvent. It runs yearly to capture the number of ANC visits which have ran (and interventions are delivered) for women during pregnancy.
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 CareOfWomenDuringPregnancyLoggingEvent):
- __init__(module)
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)
Apply this event to the given target.
This is a no-op; subclasses should override this method.
- Parameters:
target – the target of the event