tlo.methods.stunting module
Stunting Module
Overview
The Stunting module determines the prevalence of stunting for children under 5 years old. A polling event runs every month and determines the risk of onset of non-severe stunting, progression to severe stunting or natural recovery. The Generic HSI calls do_at_generic_first_appt for any HSI with a child under 5 years old: if they have any stunting they are provided with an intervention - HSI_Stunting_ComplementaryFeeding.
- class Stunting(name=None, resourcefilepath=None)[source]
This is the disease module for Stunting
Construct a new disease module ready to be included in a simulation.
Initialises an empty parameters dictionary and module-specific random number generator.
- Parameters:
name – the name to use for this module. Defaults to the concrete subclass’ name.
Bases:
tlo.core.Module
,tlo.methods.hsi_generic_first_appts.GenericFirstAppointmentsMixin
PARAMETERS:
Item
Type
Description
prev_HAZ_distribution_age_0_5mo
LIST
Distribution of HAZ among less than 6 months of age in 2015 (mean, standard deviation)
prev_HAZ_distribution_age_6_11mo
LIST
Distribution of HAZ among 6 months and 1 year of age in 2015 (mean, standard deviation)
prev_HAZ_distribution_age_12_23mo
LIST
Distribution of HAZ among 1 year olds in 2015 (mean, standard deviation)
prev_HAZ_distribution_age_24_35mo
LIST
Distribution of HAZ among 2 year olds in 2015 (mean, standard deviation)
prev_HAZ_distribution_age_36_47mo
LIST
Distribution of HAZ among 3 year olds in 2015 (mean, standard deviation)
prev_HAZ_distribution_age_48_59mo
LIST
Distribution of HAZ among 4 year olds in 2015 (mean, standard deviation)
or_stunting_male
REAL
Odds ratio of stunting if male gender
or_stunting_preterm_and_AGA
REAL
Odds ratio of stunting if born preterm and adequate for gestational age
or_stunting_SGA_and_term
REAL
Odds ratio of stunting if born term and small for geatational age
or_stunting_SGA_and_preterm
REAL
Odds ratio of stunting if born preterm and small for gestational age
or_stunting_hhwealth_Q5
REAL
Odds ratio of stunting if household wealth is poorest Q5, ref group Q1
or_stunting_hhwealth_Q4
REAL
Odds ratio of stunting if household wealth is poorer Q4, ref group Q1
or_stunting_hhwealth_Q3
REAL
Odds ratio of stunting if household wealth is middle Q3, ref group Q1
or_stunting_hhwealth_Q2
REAL
Odds ratio of stunting if household wealth is richer Q2, ref group Q1
base_inc_rate_stunting_by_agegp
LIST
Baseline incidence rate per year of stunting by age group (1-5, 6-11, 12-23, 24-35, 36-47, 48-59mo
rr_stunting_preterm_and_AGA
REAL
Relative risk of stunting if born preterm and adequate for gestational age
rr_stunting_SGA_and_term
REAL
Relative risk of stunting if born term and small for gestational age
rr_stunting_SGA_and_preterm
REAL
Relative risk of stunting if born preterm and small for gestational age
rr_stunting_prior_wasting
REAL
Relative risk of stunting if prior wasting in the last 3 months
rr_stunting_untreated_HIV
REAL
Relative risk of stunting for untreated HIV+
rr_stunting_wealth_level
REAL
Relative risk of stunting if wealth-level is greater than 1 compared 1
rr_stunting_no_exclusive_breastfeeding
REAL
Relative risk of stunting for not exclusively breastfed babies < 6 months
rr_stunting_no_continued_breastfeeding
REAL
Relative risk of stunting for not continued breastfed infants 6-24 months
rr_stunting_per_diarrhoeal_episode
REAL
Relative risk of stunting for recent diarrhoea episode
r_progression_severe_stunting_by_agegp
LIST
Rates per year of progression to severe stunting by age group (1-5, 6-11, 12-23, 24-35, 36-47, 48-59mo
rr_progress_severe_stunting_if_prior_wasting
REAL
Relative risk of severe stunting if previously wasted
rr_progress_severe_stunting_untreated_HIV
REAL
Relative risk of severe stunting for untreated HIV+
mean_years_to_1stdev_natural_improvement_in_stunting
REAL
Mean time (in years) to a one standard deviation improvement in stunting without any treatment.
effectiveness_of_complementary_feeding_education_in_stunting_reduction
REAL
Probability of stunting being reduced by one standard deviation (category) by education about supplementary feeding (but not supplying supplementary feeding consmables).
effectiveness_of_food_supplementation_in_stunting_reduction
REAL
Probability of stunting being reduced by one standard deviation (category) by supplementary feeding.
prob_stunting_diagnosed_at_generic_appt
REAL
Probability of a stunted or severely stunted person being checked and correctly diagnosed
PROPERTIES:
Item
Type
Description
un_HAZ_category
CATEGORICAL
Indicator of current stunting status - the height-for-age z-score category:”HAZ>=-2” == No Stunting (within 2 standard deviations of mean); “-3<=HAZ<-2” == Non-Severe Stunting (2-3 standard deviations from mean); “HAZ<-3 == Severe Stunting (more than 3 standard deviations from mean). Possible values are: [HAZ<-3, -3<=HAZ<-2, HAZ>=-2, ]
Class attributes:
INIT_DEPENDENCIES : {‘Hiv’, ‘NewbornOutcomes’, ‘Diarrhoea’, ‘Demography’, ‘Wasting’}
METADATA : {<Metadata.USES_HEALTHSYSTEM: 3>, <Metadata.DISEASE_MODULE: 1>}
__annotations__ : {}
Functions (defined or overridden in class Stunting):
- __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 initial prevalence of stunting according to distributions provided in parameters
- do_progression(idx: Index)[source]
Represent the progression to severe stunting for the person_id given in idx
- do_recovery(idx: list | Index)[source]
Represent the recovery from stunting for the person_id given in idx. Recovery causes the person to move ‘up’ one level: i.e. ‘HAZ<-3’ –> ‘-3<=HAZ<-2’ or ‘-3<=HAZ<-2’ –> ‘HAZ>=-2’
- do_treatment(person_id, prob_success)[source]
Represent the treatment with supplementary feeding. If treatment is successful, effect the recovery of the person immediately.
- do_at_generic_first_appt(person_id: int, individual_properties: IndividualProperties, schedule_hsi_event: HSIEventScheduler, **kwargs) None [source]
Actions to take during a non-emergency generic health system interaction (HSI).
Derived classes should overwrite this method so that they are compatible with the
HealthSystem
module, and can schedule HSI events when a individual presents symptoms indicative of the corresponding illness or condition.When overwriting, arguments that are not required can be left out of the definition. If done so, the method must take a
**kwargs
input to avoid errors when looping over all disease modules and running their generic HSI methods.HSI events should be scheduled by the
Module
subclass implementing this method using theschedule_hsi_event
argument.Implementations of this method should not make any updates to the population dataframe directly - if the target individuals properties need to be updated this should be performed by updating the
individual_properties
argument.- Parameters:
person_id – Row index (ID) of the individual target of the HSI event in the population dataframe.
individual_properties – Properties of individual target as provided in the population dataframe. Updates to individual properties may be written to this object.
symptoms – List of symptoms the patient is experiencing.
schedule_hsi_event – A function that can schedule subsequent HSI events.
diagnosis_function – A function that can run diagnosis tests based on the patient’s symptoms.
consumables_checker – A function that can query the health system to check for available consumables.
facility_level – The level of the facility that the patient presented at.
treatment_id – The treatment id of the HSI event triggering the generic appointment.
- class StuntingPollingEvent(module)[source]
Regular event that controls the onset of stunting, progression to severe stunting and natural recovery.
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 StuntingPollingEvent):
- __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]
Determine who will be onset for stunting (among those not stunted) and effect that change;
Determine who will be onset for recovery (among those stunted) and effect that change.
Determine who will be onset for progression (among those stunted but not severely) and effect that change;
- apply_model(model, mask, days_exposed_to_risk)[source]
Return the person_ids selected for an event of occur to in a given period (in days), as specified by a LinearModel that provides the annual risk of the event. * Looks-up annual probability of the event using a linear model supplied in model to a population masked with
mask
Converts the annual probability to a probability of the event occurring during the number of
days_exposed_to_risk * Randomly selects which individuals will have the events
- class StuntingLoggingEvent(module)[source]
Logging event occurring every year
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 StuntingLoggingEvent):
- class HSI_Stunting_ComplementaryFeeding(module, person_id)[source]
HSI for complementary feeding, either with the provision of supplementary foods or with education only.
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_Stunting_ComplementaryFeeding):
- __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.
- class StuntingPropertiesOfOtherModules(name=None)[source]
For the purpose of the testing, this module generates the properties upon which the Stunting module relies
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
PROPERTIES:
Item
Type
Description
hv_inf
BOOL
temporary property
hv_art
CATEGORICAL
temporary property. Possible values are: [not, on_VL_suppressed, on_not_VL_suppressed, ]
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, ]
nb_size_for_gestational_age
CATEGORICAL
temporary property. Possible values are: [small_for_gestational_age, average_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, ]
un_ever_wasted
BOOL
temporary property
gi_number_of_episodes
INT
temporary property
Class attributes:
ALTERNATIVE_TO : {‘Hiv’, ‘Wasting’, ‘Diarrhoea’}
INIT_DEPENDENCIES : {‘Demography’}
__annotations__ : {}
Functions (defined or overridden in class StuntingPropertiesOfOtherModules):
- __init__(name=None)[source]
Construct a new disease module ready to be included in a simulation.
Initialises an empty parameters dictionary and module-specific random number generator.
- Parameters:
name – the name to use for this module. Defaults to the concrete subclass’ name.
- read_parameters(data_folder)[source]
Read parameter values from file, if required.
Must be implemented by subclasses.
- Parameters:
data_folder – path of a folder supplied to the Simulation containing data files. Typically, modules would read a particular file within here.
- initialise_population(population)[source]
Set our property values for the initial population.
This method is called by the simulation when creating the initial population, and is responsible for assigning initial values, for every individual, of those properties ‘owned’ by this module, i.e. those declared in its PROPERTIES dictionary.
By default, all
Property``s in ``self.PROPERTIES
will have their columns in the population dataframe set to the default value.Modules that wish to implement this behaviour do not need to implement this method, it will be inherited automatically. Modules that wish to perform additional steps during the initialise_population stage should reimplement this method and call
`python super().initialise_population(population=population) `
at the beginning of the method, then proceed with their additional steps. Modules that do not wish to inherit this default behaviour should re-implement initialise_population without the call to
super()
above.TODO: We probably need to declare somehow which properties we ‘read’ here, so the simulation knows what order to initialise modules in!
- Parameters:
population – The population of individuals in the simulation.
- initialise_simulation(sim)[source]
Get ready for simulation start.
Must be implemented by subclasses.
This method is called just before the main simulation loop begins, and after all modules have read their parameters and the initial population has been created. It is a good place to add initial events to the event queue.
- on_birth(mother, child)[source]
Initialise our properties for a newborn individual.
Must be implemented by subclasses.
This is called by the simulation whenever a new person is born.
- Parameters:
mother_id – the person id for the mother of this child (can be -1 if the mother is not identified).
child_id – the person id of new child