tlo.methods.schisto module

class Schisto(name=None, resourcefilepath=None, mda_execute=True)[source]

Schistosomiasis module. Two species of worm that cause Schistosomiasis are modelled independently. Worms are acquired by persons via the

environment. There is a delay between the acquisition of worms and the maturation to ‘adults’ worms; and a long period before the adult worms die. The number of worms in a person (whether a high-intensity infection or not) determines the symptoms they experience. These symptoms are associated with disability weights. There is no risk of death. Treatment can be provided to persons who present following the onset of symptoms. Mass Drug Administrations also give treatment to the general population, which clears any worm burden they have.

N.B. Formal fitting has only been undertaken for: (‘Blantyre’, ‘Chiradzulu’, ‘Mulanje’, ‘Nsanje’, ‘Nkhotakota’, ‘Phalombe’).

Bases: tlo.core.Module

PARAMETERS:

Item

Type

Description

prob_sent_to_lab_test_children

REAL

Probability that infected child gets sent to lab test

prob_sent_to_lab_test_adults

REAL

Probability that an infected adults gets sent to lab test

delay_till_hsi_a_repeated

REAL

Time till seeking healthcare again after not being sent to schisto test: start

delay_till_hsi_b_repeated

REAL

Time till seeking healthcare again after not being sent to schisto test: end

PZQ_efficacy

REAL

The efficacy of Praziquantel in clearing burden of any Schistosomiasis worm species

MDA_coverage_historical

DATA_FRAME

Probability of getting PZQ in the MDA for PSAC, SAC and Adults in historic rounds

MDA_coverage_prognosed

DATA_FRAME

Probability of getting PZQ in the MDA for PSAC, SAC and Adults in future rounds, with the frequency given in months

PROPERTIES:

Item

Type

Description

ss_last_PZQ_date

DATE

Day of the most recent treatment with PZQ

Class attributes:

CAUSES_OF_DEATH : {}

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

INIT_DEPENDENCIES : {‘Demography’, ‘SymptomManager’}

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

OPTIONAL_INIT_DEPENDENCIES : {‘HealthBurden’, ‘HealthSystem’}

module_prefix : ss

Functions (defined or overridden in class Schisto):

__init__(name=None, resourcefilepath=None, mda_execute=True)[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 parameters and register symptoms.

pre_initialise_population()[source]

Do things before generating the population (but after read_parameters and any parameter updating).

initialise_population(population)[source]

Set the property values for the initial population.

initialise_simulation(sim)[source]

Get ready for simulation start.

on_birth(mother_id, child_id)[source]

Initialise our properties for a newborn individual. All children are born without an infection, even if the mother is infected.

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

  • child_id – the new child

report_daly_values()[source]

Report the daly values, as the sum of the disability weight associated with each symptom caused by this module.

do_on_presentation_with_symptoms(person_id: int, symptoms: Union[list, set, tuple]) None[source]

Do when person presents to the GenericFirstAppt. If the person has certain set of symptoms, refer ta HSI for testing.

do_effect_of_treatment(person_id: Union[int, Sequence[int]]) None[source]

Do the effects of a treatment administered to a person or persons. This can be called for a person who is infected and receiving treatment following a diagnosis, or for a person who is receiving treatment as part of a

Mass Drug Administration. The burden and effects of any species are alleviated by a successful treatment.

_load_parameters_from_workbook(workbook) dict[source]

Load parameters from ResourceFile (loaded by pd.read_excel as workbook) that are general (i.e., not specific to a particular species).

_register_symptoms(symptoms: dict) None[source]

Register the symptoms with the SymptomManager. :params symptoms: The symptoms that are used by this module in a dictionary of the form, {<symptom>: <generic_symptom_similar>}. Each symptom is associated with the average healthcare seeking behaviour.

_get_disability_weight() dict[source]

Return dict containing the disability weight (value) of each symptom (key).

_get_item_code_for_praziquantel() int[source]

Look-up the item code for Praziquantel

_schedule_mda_events() None[source]

Schedule MDA events, historical and prognosed.

class SchistoInfectionWormBurdenEvent(module: tlo.core.Module, species: tlo.methods.schisto.SchistoSpecies)[source]

A recurring event that causes infection of people with this species. * Determines who becomes infected (using worm burden and reservoir of infectious material. * Schedules SchistoMatureWorms for when the worms mature to adult worms.

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

Functions (defined or overridden in class SchistoInfectionWormBurdenEvent):

__init__(module: tlo.core.Module, species: tlo.methods.schisto.SchistoSpecies)[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 SchistoMatureWorms(module: tlo.core.Module, species: tlo.methods.schisto.SchistoSpecies, person_id: int, number_of_worms_that_mature: int)[source]

Represents the maturation of worms to adult worms. * Increases the aggregate worm burden of an individual upon maturation of the worms * Schedules the natural death of worms and symptoms development if High-infection * Updates the infection status and symptoms of the person accordingly.

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

Functions (defined or overridden in class SchistoMatureWorms):

__init__(module: tlo.core.Module, species: tlo.methods.schisto.SchistoSpecies, person_id: int, number_of_worms_that_mature: int)[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 SchistoWormsNatDeath(module: tlo.core.Module, species: tlo.methods.schisto.SchistoSpecies, person_id: int, number_of_worms_that_die: int)[source]
Represents the death of adult worms.
  • Decreases the aggregate worm burden of an individual upon natural death of the adult worm.

  • Updates the infection status and the symtoms of the person accordingly.

Nb. This event checks the last day of PZQ treatment and if has been less than the lifespan of the worm it doesn’t do anything (because the worms for which this event was raised will since have been killed by the PZQ).

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

Functions (defined or overridden in class SchistoWormsNatDeath):

__init__(module: tlo.core.Module, species: tlo.methods.schisto.SchistoSpecies, person_id: int, number_of_worms_that_die: int)[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 SchistoMDAEvent(module: tlo.core.Module, district: str, coverage: dict, months_between_repeats: Optional[int])[source]

Mass-Drug administration scheduled for the population. This event schedules the occurrence of the individual-level HSIs for the administration of drugs to each individual. :param district: The district in which the MDA occurs. :param coverage: A dictionary of the form {<age_group>: <coverage>}, where <age_group> is one of (‘PSAC’, ‘SAC’,

‘Adults’).

Params months_between_repeat

The number of months between repeated occurrences of this event. (None for no repeats).

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

Functions (defined or overridden in class SchistoMDAEvent):

__init__(module: tlo.core.Module, district: str, coverage: dict, months_between_repeats: Optional[int])[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(population)[source]

Represents the occurence of an MDA, in a particular year and district, which achieves a particular coverage (by age-group). * Schedules the MDA HSI for each person that is reached in the MDA. * Schedules the recurrence of this event, if the MDA is to be repeated in the future.

_select_recipients(district, age_group, coverage) list[source]

Determine persons to receive MDA, based on a specified target age-group and coverage.

class HSI_Schisto_TestingFollowingSymptoms(module, person_id)[source]

This is a Health System Interaction Event for a person with symptoms who has been referred from the FirstAppt for testing at the clinic.

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

Functions (defined or overridden in class HSI_Schisto_TestingFollowingSymptoms):

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

class HSI_Schisto_TreatmentFollowingDiagnosis(module, person_id)[source]

This is a Health System Interaction Event for a person being provided with PZQ treatment after having been diagnosed.

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

Functions (defined or overridden in class HSI_Schisto_TreatmentFollowingDiagnosis):

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

Do the treatment for this person.

class HSI_Schisto_MDA(module, person_id, beneficiaries_ids: Optional[Sequence] = None)[source]

This is a Health System Interaction Event for providing one or more persons with PZQ as part of a Mass Drug Administration (MDA). Note that the person_id declared as the target of this HSI_Event is only one of the beneficiaries. This is in, effect, a “batch job” of individual HSI being handled within one HSI, for the sake of computational efficiency.

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

Functions (defined or overridden in class HSI_Schisto_MDA):

__init__(module, person_id, beneficiaries_ids: Optional[Sequence] = None)[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]

Provide the treatment to the beneficiaries of this HSI.

class SchistoLoggingEvent(module)[source]

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

Functions (defined or overridden in class SchistoLoggingEvent):

__init__(module)[source]

This is a regular event (every month) that causes the logging for each species.

apply(population)[source]

Call log_infection_status for each species.