tlo.methods.contraception module ================================ .. automodule:: tlo.methods.contraception .. autoclass:: Contraception Bases: :class:`tlo.core.Module` **PARAMETERS:** .. list-table:: :widths: 25 25 50 :header-rows: 1 * - Item - Type - Description * - Method_Use_In_2010 - DATA_FRAME - Proportion of women using each method in 2010, by age. * - Pregnancy_NotUsing_In_2010 - DATA_FRAME - Probability per year of a women not on contraceptive becoming pregnant, by age. * - Pregnancy_NotUsing_HIVeffect - DATA_FRAME - Relative probability of becoming pregnant whilst not using a a contraceptive for HIV-positive women compared to HIV-negative women. * - Failure_ByMethod - DATA_FRAME - Probability per month of a women on a contraceptive becoming pregnant, by method. * - rr_fail_under25 - REAL - The relative risk of becoming pregnant whilst using a contraceptive for woman younger than 25 years compared to older women. * - Initiation_ByMethod - DATA_FRAME - Probability per month of a women who is not using any contraceptive method of starting use of a method, by method. * - Interventions_Pop - DATA_FRAME - Pop (population scale contraception intervention) intervention multiplier. * - Interventions_PPFP - DATA_FRAME - PPFP (post-partum family planning) intervention multiplier. * - Initiation_ByAge - DATA_FRAME - The effect of age on the probability of starting use of contraceptive (add one for multiplicative effect). * - Initiation_AfterBirth - DATA_FRAME - The probability of a woman starting a contraceptive immidiately after birth, by method. * - Discontinuation_ByMethod - DATA_FRAME - The probability per month of discontinuing use of a method, by method. * - Discontinuation_ByAge - DATA_FRAME - The effect of age on the probability of discontinuing use of contraceptive (add one for multiplicative effect). * - Prob_Switch_From - DATA_FRAME - The probability per month that a women switches from one form of contraceptive to another, conditional that she will not discontinue use of the method. * - Prob_Switch_From_And_To - DATA_FRAME - The probability of switching to a new method, by method, conditional that the woman will switch to a new method. * - days_between_appts_for_maintenance - LIST - The number of days between successive family planning appointments for women that are maintaining the use of a method (for each method insorted(self.states_that_may_require_HSI_to_maintain_on), i.e.[IUD, implant, injections, other_modern, pill]). * - age_specific_fertility_rates - DATA_FRAME - Data table from official source (WPP) for age-specific fertility rates and calendar period. * - scaling_factor_on_monthly_risk_of_pregnancy - LIST - Scaling factor (by age-group: 15-19, 20-24, ..., 45-49) on the monthly risk of pregnancy and contraceptive failure rate. This value is found through calibration so that, at the beginning of the simulation, the age-specific monthly probability of a woman having a live birth matches the WPP age-specific fertility rate value for the same year. * - max_number_of_runs_of_hsi_if_consumable_not_available - INT - The maximum number of time an HSI can run (repeats occur if the consumables are not available). * - max_days_delay_between_decision_to_change_method_and_hsi_scheduled - INT - The maximum delay (in days) between the decision for a contraceptive to change and the `topen` date of the HSI that is scheduled to effect the change (when using the healthsystem). * - use_interventions - BOOL - if True: FP interventions (pop & ppfp) are simulated from the date 'interventions_start_date', if False: FP interventions (pop & ppfp) are not simulated. * - interventions_start_date - DATE - The date since which the FP interventions (pop & ppfp) are implemented, if at all (ie, if use_interventions==True **PROPERTIES:** .. list-table:: :widths: 25 25 50 :header-rows: 1 * - Item - Type - Description * - co_contraception - CATEGORICAL - Current contraceptive method. Possible values are: [IUD, female_sterilization, implant, injections, male_condom, not_using, other_modern, other_traditional, periodic_abstinence, pill, withdrawal, ] * - is_pregnant - BOOL - Whether this individual is currently pregnant * - date_of_last_pregnancy - DATE - Date that the most recent or current pregnancy began. * - co_unintended_preg - BOOL - Whether the most recent or current pregnancy was unintended. * - co_date_of_last_fp_appt - DATE - The date of the most recent Family Planning appointment. This is used to determine if a Family Planning appointment is needed to maintain the person on their current contraceptive. If the person is to maintain use of the current contraceptive, they will have an HSI only if the days elapsed since this value exceeds the method-specific parameter `days_between_appts_for_maintenance`. **Class attributes:** ADDITIONAL_DEPENDENCIES : {'Labour', 'Hiv'} INIT_DEPENDENCIES : {'Demography'} METADATA : {} OPTIONAL_INIT_DEPENDENCIES : {'HealthSystem'} all_contraception_states : {'male_condom', 'other_modern', 'IUD', 'female_sterilization', 'other_traditional', 'injections', 'not_using', 'implant', 'withdrawal', 'periodic_abstinence', 'pill'} contraceptives_initiated_with_additional_items : {'implant', 'pill', 'IUD', 'female_sterilization', 'injections'} **Functions (defined or overridden in class Contraception):** .. automethod:: __init__ .. automethod:: read_parameters .. automethod:: pre_initialise_population .. automethod:: initialise_population .. automethod:: initialise_simulation .. automethod:: on_birth .. automethod:: end_pregnancy .. automethod:: process_params .. automethod:: update_params_for_interventions .. automethod:: select_contraceptive_following_birth .. automethod:: get_item_code_for_each_contraceptive .. automethod:: schedule_batch_of_contraceptive_changes .. automethod:: do_and_log_individual_contraception_change .. automethod:: schedule_births_for_first_9_months .. automethod:: on_simulation_end .. autoclass:: DirectBirth Bases: :class:`tlo.events.Event`, :class:`tlo.events.IndividualScopeEventMixin` **Functions (defined or overridden in class DirectBirth):** .. automethod:: __init__ .. automethod:: apply .. autoclass:: ContraceptionPoll Bases: :class:`tlo.events.RegularEvent`, :class:`tlo.events.Event`, :class:`tlo.events.PopulationScopeEventMixin` **Class attributes:** __annotations__ : {} **Functions (defined or overridden in class ContraceptionPoll):** .. automethod:: __init__ .. automethod:: apply .. automethod:: update_contraceptive .. automethod:: initiate .. automethod:: discontinue_switch_or_continue .. automethod:: update_pregnancy .. automethod:: pregnancy_for_those_on_contraceptive .. automethod:: pregnancy_for_those_not_on_contraceptive .. automethod:: set_new_pregnancy .. autoclass:: ContraceptionLoggingEvent Bases: :class:`tlo.events.RegularEvent`, :class:`tlo.events.Event`, :class:`tlo.events.PopulationScopeEventMixin` **Class attributes:** __annotations__ : {} **Functions (defined or overridden in class ContraceptionLoggingEvent):** .. automethod:: __init__ .. automethod:: apply .. autoclass:: HSI_Contraception_FamilyPlanningAppt Bases: :class:`tlo.methods.healthsystem.HSI_Event`, :class:`tlo.events.IndividualScopeEventMixin` **Class attributes:** EXPECTED_APPT_FOOTPRINT : **Functions (defined or overridden in class HSI_Contraception_FamilyPlanningAppt):** .. automethod:: __init__ .. automethod:: apply .. automethod:: post_apply_hook .. automethod:: reschedule .. automethod:: never_ran .. autoclass:: StartInterventions Bases: :class:`tlo.events.Event`, :class:`tlo.events.PopulationScopeEventMixin` **Class attributes:** __annotations__ : {} **Functions (defined or overridden in class StartInterventions):** .. automethod:: __init__ .. automethod:: apply .. autoclass:: SimplifiedPregnancyAndLabour Bases: :class:`tlo.core.Module` **PARAMETERS:** .. list-table:: :widths: 25 25 50 :header-rows: 1 * - Item - Type - Description * - prob_live_birth - REAL - Probability that a pregnancy results in a live birth. **PROPERTIES:** .. list-table:: :widths: 25 25 50 :header-rows: 1 * - Item - Type - Description * - la_currently_in_labour - BOOL - whether this woman is currently in labour * - la_has_had_hysterectomy - BOOL - whether this woman has had a hysterectomy as treatment for a complication of labour, and therefore is unable to conceive * - la_is_postpartum - BOOL - Whether a woman is in the postpartum period, from delivery until day +42 (6 weeks) * - ps_ectopic_pregnancy - CATEGORICAL - Whether a woman is experiencing ectopic pregnancy and its current state. Possible values are: [none, not_ruptured, ruptured, ] **Class attributes:** ALTERNATIVE_TO : {'Labour'} INIT_DEPENDENCIES : {'Contraception'} METADATA : {} **Functions (defined or overridden in class SimplifiedPregnancyAndLabour):** .. automethod:: __init__ .. automethod:: read_parameters .. automethod:: initialise_population .. automethod:: initialise_simulation .. automethod:: on_birth .. automethod:: set_date_of_labour .. autoclass:: EndOfPregnancyEvent Bases: :class:`tlo.events.Event`, :class:`tlo.events.IndividualScopeEventMixin` **Functions (defined or overridden in class EndOfPregnancyEvent):** .. automethod:: __init__ .. automethod:: apply