tlo.methods.simplified_births module

This is the SimplifiedBirths Module. It aims causes pregnancy, deliveries and births to occur to match WPP estimates of total births. It subsumes the functions of several other modules (contraception, labour, pregnant supervisor, postnatal supervisor, newborn outcomes) , allowing for faster runnning when these are not required. The main assumption is that every pregnancy results in a birth.

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

A simplified births module responsible for generating births in a simplified way and assign mother ids to newborns.

Bases: tlo.core.Module

PARAMETERS:

Item

Type

Description

age_specific_fertility_rates

DATA_FRAME

Data table from official source (WPP) for age-specific fertility rates and calendar period

months_between_pregnancy_and_delivery

INT

number of whole months that elapase betweeen pregnancy and delivery

prob_breastfeeding_type

LIST

probabilities that a woman is: 1) not breastfeeding (none); 2) non-exclusively breastfeeding (non_exclusive); 3)exclusively breastfeeding at birth (until 6 months) (exclusive)

PROPERTIES:

Item

Type

Description

si_date_of_last_delivery

DATE

Date of delivery for the most recent pregnancy for this individual (if has ever been pregnant). Maybe in the future if is currently pregnant.

si_breastfeeding_status_6mo_to_23mo

CATEGORICAL

How this neonate is breastfeed during ages 6mo to 23 months. Possible values are: [none, non_exclusive, exclusive, ]

is_pregnant

BOOL

Whether this individual is currently pregnant

date_of_last_pregnancy

DATE

Date of the onset of the last pregnancy of this individual (if has ever been pregnant).

nb_low_birth_weight_status

CATEGORICAL

temporary property. Possible values are: [extremely_low_birth_weight, very_low_birth_weight, low_birth_weight, normal_birth_weight, macrosomia, ]

nb_size_for_gestational_age

CATEGORICAL

temporary property. Possible values are: [small_for_gestational_age, average_for_gestational_age, large_for_gestational_age, ]

nb_late_preterm

BOOL

temporary property

nb_early_preterm

BOOL

temporary property

nb_breastfeeding_status

CATEGORICAL

temporary property. Possible values are: [none, non_exclusive, exclusive, ]

Class attributes:

ALTERNATIVE_TO : {‘NewbornOutcomes’, ‘Labour’, ‘Contraception’, ‘PregnancySupervisor’, ‘PostnatalSupervisor’}

INIT_DEPENDENCIES : {‘Demography’}

METADATA : {}

Functions (defined or overridden in class SimplifiedBirths):

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

Load parameters for probability of pregnancy/birth and breastfeeding status for newborns

initialise_population(population)[source]

Set property values to their defaults for the initial population.

initialise_simulation(sim)[source]

Schedule the SimplifiedBirthsPoll and the SimplifiedBirthEvent to occur every month.

on_birth(mother_id, child_id)[source]

Initialise properties for a newborn individual to their defaults.

class SimplifiedBirthsPoll(module)[source]

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

Functions (defined or overridden in class SimplifiedBirthsPoll):

__init__(module)[source]

Create a new regular event.

Parameters
  • module – the module that created this event

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

apply(population)[source]

Apply this event to the population.

Must be implemented by subclasses.

Parameters

population – the current population

set_new_pregnancies()[source]

Making women pregnant. Rate of doing so is based on age-specific fertility rates under assumption that every pregnancy results in a birth.

do_deliveries()[source]

Checks to see if the date-of-delivery for pregnant women has been reached and implement births where appropriate.

update_breastfed_status()[source]

Update the bread_fed status of newborns, mirroing the functionality provided by the Newborn module