tlo.methods.epi module
- class Epi(name=None, resourcefilepath=None)[source]
This is the expanded programme on immunisation module it sets up the vaccination schedule for all children from birth
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
baseline_coverage
DATA_FRAME
baseline vaccination coverage (all vaccines)
vaccine_schedule
SERIES
vaccination schedule applicable from 2018 onwards
prob_facility_level_for_vaccine
LIST
The probability of going to each facility-level (0 / 1a / 1b / 2) for child having vaccines given through childhood immunisation schedule. The probabilities must sum to 1.0
PROPERTIES:
Item
Type
Description
va_bcg
INT
number of doses of BCG vaccination
va_opv
INT
number of doses of OPV vaccine received
va_dtp
INT
number of doses of DTP vaccine received
va_hib
INT
number of doses of Hib vaccine received
va_hep
INT
number of doses of HepB vaccine received (infant series)
va_pneumo
INT
number of doses of pneumococcal vaccine received
va_rota
INT
number of doses of rotavirus vaccine received
va_measles
INT
number of doses of measles vaccine received
va_rubella
INT
number of doses of rubella vaccine received
va_hpv
INT
number of doses of hpv vaccine received
va_td
INT
number of doses of tetanus/diphtheria vaccine received by pregnant women
va_bcg_all_doses
BOOL
whether all doses have been received of the vaccine bcg
va_opv_all_doses
BOOL
whether all doses have been received of the OPV vaccine
va_dtp_all_doses
BOOL
whether all doses have been received of the DTP vaccine
va_hib_all_doses
BOOL
whether all doses have been received of the Hib vaccine
va_hep_all_doses
BOOL
whether all doses have been received of the HepB vaccine (infant series)
va_pneumo_all_doses
BOOL
whether all doses have been received of the pneumococcal vaccine
va_rota_all_doses
BOOL
whether all doses have been received of the rotavirus vaccine
va_measles_all_doses
BOOL
whether all doses have been received of the measles vaccine
va_rubella_all_doses
BOOL
whether all doses have been received of the rubella vaccine
va_hpv_all_doses
BOOL
whether all doses have been received of the HPV vaccine
va_td_all_doses
BOOL
whether all doses have been received of the tetanus/diphtheria vaccine
Class attributes:
INIT_DEPENDENCIES : {‘Demography’, ‘HealthSystem’}
METADATA : {<Metadata.USES_HEALTHSYSTEM: 3>}
__annotations__ : {}
Functions (defined or overridden in class Epi):
- __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.
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_id, child_id)[source]
Initialise our properties for a newborn individual
birth doses occur within 24 hours of delivery
2012 data is patchy, no record of Hep vaccine but it was used before 2012 assume hepB3 coverage in 2012 same as 2011 same with Hib
Measles - first dose, only one dose pre-2016 and no rubella Measles, rubella - first dose, 2018 onwards
- Parameters:
mother_id – the ID for the mother for this child
child_id – the ID for the new child
- class HpvScheduleEvent(module)[source]
HPV vaccine event - each year sample from 9 year old girls and schedule vaccine stagger vaccine administration across the year coverage estimates dependent on health system capacity average around 85% for 2018 WHO recommends 2 doses schedule doses 1 month apart
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 HpvScheduleEvent):
- class HsiBaseVaccine(module, person_id, facility_level_of_this_hsi='1a', suppress_footprint=False)[source]
This is a base class for all vaccination HSI_Events. Handles initialisation and requesting consumables needed for the vaccination. For custom behaviour, you can override __init__ in subclasses and implemented your own constructors (or inherit directly from HSI_Event) unless specified, default facility level is 1a unless specified, footprint returned in 1 EPI appt if vaccine occurs as part of a treatment package within another appointment, use suppress_footprint=True
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:
EXPECTED_APPT_FOOTPRINT : <property object at 0x117b4bf60>
__annotations__ : {}
Functions (defined or overridden in class HsiBaseVaccine):
- __init__(module, person_id, facility_level_of_this_hsi='1a', suppress_footprint=False)[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 HSI_BcgVaccine(module, person_id, facility_level_of_this_hsi='1a', suppress_footprint=False)[source]
gives bcg vaccine 24 hours after birth or as soon as possible afterwards
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.epi.HsiBaseVaccine
,tlo.methods.hsi_event.HSI_Event
,tlo.events.IndividualScopeEventMixin
Class attributes:
__annotations__ : {}
Functions (defined or overridden in class HSI_BcgVaccine):
- class HSI_opv(module, person_id, facility_level_of_this_hsi='1a', suppress_footprint=False)[source]
gives poliovirus vaccine 24 hours after birth, plus weeks 6, 10, 14 or as soon as possible afterwards
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.epi.HsiBaseVaccine
,tlo.methods.hsi_event.HSI_Event
,tlo.events.IndividualScopeEventMixin
Class attributes:
__annotations__ : {}
Functions (defined or overridden in class HSI_opv):
- class HSI_DtpHibHepVaccine(module, person_id, facility_level_of_this_hsi='1a', suppress_footprint=False)[source]
gives DTP-Hib_HepB vaccine
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.epi.HsiBaseVaccine
,tlo.methods.hsi_event.HSI_Event
,tlo.events.IndividualScopeEventMixin
Class attributes:
__annotations__ : {}
Functions (defined or overridden in class HSI_DtpHibHepVaccine):
- class HSI_RotaVaccine(module, person_id, facility_level_of_this_hsi='1a', suppress_footprint=False)[source]
gives Rotavirus vaccine 6 and 10 weeks after birth
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.epi.HsiBaseVaccine
,tlo.methods.hsi_event.HSI_Event
,tlo.events.IndividualScopeEventMixin
Class attributes:
__annotations__ : {}
Functions (defined or overridden in class HSI_RotaVaccine):
- class HSI_PneumoVaccine(module, person_id, facility_level_of_this_hsi='1a', suppress_footprint=False)[source]
gives Pneumococcal vaccine 6, 10 and 14 weeks after birth
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.epi.HsiBaseVaccine
,tlo.methods.hsi_event.HSI_Event
,tlo.events.IndividualScopeEventMixin
Class attributes:
__annotations__ : {}
Functions (defined or overridden in class HSI_PneumoVaccine):
- class HSI_MeaslesRubellaVaccine(module, person_id, facility_level_of_this_hsi='1a', suppress_footprint=False)[source]
administers measles+rubella vaccine
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.epi.HsiBaseVaccine
,tlo.methods.hsi_event.HSI_Event
,tlo.events.IndividualScopeEventMixin
Class attributes:
__annotations__ : {}
Functions (defined or overridden in class HSI_MeaslesRubellaVaccine):
- class HSI_HpvVaccine(module, person_id, facility_level_of_this_hsi='1a', suppress_footprint=False)[source]
gives HPV vaccine to 9 year old girls; recommended 2 doses (WHO)
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.epi.HsiBaseVaccine
,tlo.methods.hsi_event.HSI_Event
,tlo.events.IndividualScopeEventMixin
Class attributes:
__annotations__ : {}
Functions (defined or overridden in class HSI_HpvVaccine):
- class HSI_TdVaccine(module, person_id, facility_level_of_this_hsi='1a', suppress_footprint=False)[source]
gives tetanus/diphtheria vaccine to pregnant women as part of routine antenatal care recommended 2+ doses (WHO)
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.epi.HsiBaseVaccine
,tlo.methods.hsi_event.HSI_Event
,tlo.events.IndividualScopeEventMixin
Class attributes:
__annotations__ : {}
Functions (defined or overridden in class HSI_TdVaccine):
- class EpiLoggingEvent(module)[source]
output vaccine coverage every year
Bases:
tlo.events.RegularEvent
,tlo.events.Event
,tlo.events.PopulationScopeEventMixin
Class attributes:
__annotations__ : {}
Functions (defined or overridden in class EpiLoggingEvent):