tlo.methods.measles module

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

This module represents measles infections and disease.

Bases: tlo.core.Module

PARAMETERS:

Item

Type

Description

beta_baseline

REAL

Baseline measles transmission probability

beta_scale

REAL

Scale value for measles transmission probability sinusoidal function

phase_shift

REAL

Phase shift for measles transmission probability sinusoidal function

period

REAL

Period for measles transmission probability sinusoidal function

vaccine_efficacy_1

REAL

Efficacy of first measles vaccine dose against measles infection

vaccine_efficacy_2

REAL

Efficacy of second measles vaccine dose against measles infection

prob_severe

REAL

Probability of severe measles infection, requiring hospitalisation

risk_death_on_treatment

REAL

Risk of scheduled death occurring if on treatment for measles complications

symptom_prob

DATA_FRAME

Probability of each symptom with measles infection

PROPERTIES:

Item

Type

Description

me_has_measles

BOOL

Measles infection status

me_date_measles

DATE

Date of onset of measles

me_on_treatment

BOOL

Currently on treatment for measles complications

Class attributes:

CAUSES_OF_DEATH : {‘Measles’: <tlo.methods.causes.Cause object at 0x7ff86b663ee0>}

CAUSES_OF_DISABILITY : {‘Measles’: <tlo.methods.causes.Cause object at 0x7ff86b663f40>}

INIT_DEPENDENCIES : {‘Demography’, ‘HealthSystem’, ‘SymptomManager’}

METADATA : {<Metadata.DISEASE_MODULE: 1>, <Metadata.USES_SYMPTOMMANAGER: 2>, <Metadata.USES_HEALTHBURDEN: 4>, <Metadata.USES_HEALTHSYSTEM: 3>}

OPTIONAL_INIT_DEPENDENCIES : {‘HealthBurden’}

SYMPTOMS : {‘rash’, ‘encephalitis’, ‘otitis_media’}

Functions (defined or overridden in class Measles):

__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

initialise_population(population)[source]

Set our property values for the initial population. set whole population to measles-free for 1st jan

initialise_simulation(sim)[source]

Schedule measles event to start straight away. Each month it will assign new infections

on_birth(mother_id, child_id)[source]

Initialise our properties for a newborn individual assume all newborns are uninfected

Parameters
  • mother_id – the ID for the mother for this child

  • child_id – the ID for the new child

on_hsi_alert(person_id, treatment_id)[source]

This is called whenever there is an HSI event commissioned by one of the other disease modules.

report_daly_values()[source]
class MeaslesEvent(module)[source]

MeaslesEvent runs every year and creates a number of new infections which are scattered across the year seasonality is captured using a cosine function vaccination lowers an individual’s likelihood of getting the disease assume one dose will be 85% protective and 2 doses will be 99% protective

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

Functions (defined or overridden in class MeaslesEvent):

__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

class MeaslesOnsetEvent(module, person_id)[source]

Bases: tlo.events.Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class MeaslesOnsetEvent):

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

apply(person_id)[source]

Apply this event to the given person.

Must be implemented by subclasses.

Parameters

person_id – the person the event happens to

class MeaslesSymptomResolveEvent(module, person_id)[source]

Bases: tlo.events.Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class MeaslesSymptomResolveEvent):

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

apply(person_id)[source]

this event is called by MeaslesOnsetEvent and HSI_Measles_Treatment

class MeaslesDeathEvent(module, person_id)[source]

Performs the Death operation on an individual and logs it.

Bases: tlo.events.Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class MeaslesDeathEvent):

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

apply(person_id)[source]

Apply this event to the given person.

Must be implemented by subclasses.

Parameters

person_id – the person the event happens to

class HSI_Measles_Treatment(module, person_id)[source]

Health System Interaction Event It is the event when a person with diagnosed measles receives treatment

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

Functions (defined or overridden in class HSI_Measles_Treatment):

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

apply(person_id, squeeze_factor)[source]

Apply this event to the population.

Must be implemented by subclasses.

did_not_run()[source]

Called when this event is due but it is not run. Return False to prevent the event being rescheduled, or True to allow the rescheduling. This is called each time that the event is tried to be run but it cannot be.

class MeaslesLoggingEvent(module)[source]

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

Functions (defined or overridden in class MeaslesLoggingEvent):

__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

class MeaslesLoggingFortnightEvent(module)[source]

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

Functions (defined or overridden in class MeaslesLoggingFortnightEvent):

__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

class MeaslesLoggingAnnualEvent(module)[source]

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

Functions (defined or overridden in class MeaslesLoggingAnnualEvent):

__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