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

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 : {‘HealthSystem’, ‘Demography’}

METADATA : {<Metadata.USES_HEALTHSYSTEM: 3>}

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.

Must be implemented by subclasses.

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.

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

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

report_daly_values()[source]

epi module returns dalys=0 for all persons alive

increment_dose(person_id, vaccine)[source]
get_item_codes()[source]

Look-up the item-codes for each vaccine and update self.cons_item_codes

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

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

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class HpvScheduleEvent):

__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 given target.

This is a no-op; subclasses should override this method.

Parameters:

target – the target of the event

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

Bases: tlo.methods.healthsystem.HSI_Event, tlo.events.IndividualScopeEventMixin

Class attributes:

EXPECTED_APPT_FOOTPRINT : <property object at 0x11fa4b510>

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.

treatment_id()[source]

subclasses should implement this method to return the TREATMENT_ID

apply(*args, **kwargs)[source]

must be implemented by subclasses

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

Bases: tlo.methods.epi.HsiBaseVaccine, tlo.methods.healthsystem.HSI_Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class HSI_BcgVaccine):

treatment_id()[source]

subclasses should implement this method to return the TREATMENT_ID

apply(person_id, squeeze_factor)[source]

must be implemented by subclasses

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

Bases: tlo.methods.epi.HsiBaseVaccine, tlo.methods.healthsystem.HSI_Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class HSI_opv):

treatment_id()[source]

subclasses should implement this method to return the TREATMENT_ID

apply(person_id, squeeze_factor)[source]

must be implemented by subclasses

class HSI_DtpHibHepVaccine(module, person_id, facility_level_of_this_hsi='1a', suppress_footprint=False)[source]

gives DTP-Hib_HepB vaccine

Bases: tlo.methods.epi.HsiBaseVaccine, tlo.methods.healthsystem.HSI_Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class HSI_DtpHibHepVaccine):

treatment_id()[source]

subclasses should implement this method to return the TREATMENT_ID

apply(person_id, squeeze_factor)[source]

must be implemented by subclasses

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

Bases: tlo.methods.epi.HsiBaseVaccine, tlo.methods.healthsystem.HSI_Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class HSI_RotaVaccine):

treatment_id()[source]

subclasses should implement this method to return the TREATMENT_ID

apply(person_id, squeeze_factor)[source]

must be implemented by subclasses

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

Bases: tlo.methods.epi.HsiBaseVaccine, tlo.methods.healthsystem.HSI_Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class HSI_PneumoVaccine):

treatment_id()[source]

subclasses should implement this method to return the TREATMENT_ID

apply(person_id, squeeze_factor)[source]

must be implemented by subclasses

class HSI_MeaslesRubellaVaccine(module, person_id, facility_level_of_this_hsi='1a', suppress_footprint=False)[source]

administers measles+rubella vaccine

Bases: tlo.methods.epi.HsiBaseVaccine, tlo.methods.healthsystem.HSI_Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class HSI_MeaslesRubellaVaccine):

treatment_id()[source]

subclasses should implement this method to return the TREATMENT_ID

apply(person_id, squeeze_factor)[source]

must be implemented by subclasses

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)

Bases: tlo.methods.epi.HsiBaseVaccine, tlo.methods.healthsystem.HSI_Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class HSI_HpvVaccine):

treatment_id()[source]

subclasses should implement this method to return the TREATMENT_ID

apply(person_id, squeeze_factor)[source]

must be implemented by subclasses

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)

Bases: tlo.methods.epi.HsiBaseVaccine, tlo.methods.healthsystem.HSI_Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class HSI_TdVaccine):

treatment_id()[source]

subclasses should implement this method to return the TREATMENT_ID

apply(person_id, squeeze_factor)[source]

must be implemented by subclasses

class EpiLoggingEvent(module)[source]

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

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class EpiLoggingEvent):

__init__(module)[source]

output vaccine coverage every year

apply(population)[source]

Apply this event to the given target.

This is a no-op; subclasses should override this method.

Parameters:

target – the target of the event