Disease Models

This module contains tools for modeling diseases in multi-state lifetable simulations.

class vivarium_public_health.mslt.disease.AcuteDisease(disease)[source]

An acute disease has a sufficiently short duration, relative to the time-step size, that it is not meaningful to talk about prevalence. Instead, it simply contributes an excess mortality rate, and/or a disability rate.

Interventions may affect these rates:

  • <disease>_intervention.excess_mortality

  • <disease>_intervention.yld_rate

where <disease> is the name as provided to the constructor.

Parameters:

disease (str) – The disease name (referred to as <disease> here).

setup(builder)[source]

Load the morbidity and mortality data.

Parameters:

builder (Builder) –

Return type:

None

mortality_adjustment(index, mortality_rate)[source]

Adjust the all-cause mortality rate in the intervention scenario, to account for any change in prevalence (relative to the BAU scenario).

disability_adjustment(index, yld_rate)[source]

Adjust the years lost due to disability (YLD) rate in the intervention scenario, to account for any change in prevalence (relative to the BAU scenario).

class vivarium_public_health.mslt.disease.Disease(disease)[source]

This component characterises a chronic disease.

It defines the following rates, which may be affected by interventions:

  • <disease>_intervention.incidence

  • <disease>_intervention.remission

  • <disease>_intervention.mortality

  • <disease>_intervention.morbidity

where <disease> is the name as provided to the constructor.

Parameters:

disease (str) – The disease name (referred to as <disease> here).

property configuration_defaults: Dict[str, Any]

Provides a dictionary containing the defaults for any configurations managed by this component.

These default values will be stored at the component_configs layer of the simulation’s ConfigTree.

Returns:

A dictionary containing the defaults for any configurations managed by this component.

Return type:

Dict[str, Any]

property columns_created: List[str]

Provides names of columns created by the component.

Returns:

Names of the columns created by this component, or an empty list if none.

Return type:

List[str]

property columns_required: List[str] | None

Provides names of columns required by the component.

Returns:

Names of required columns not created by this component. An empty list means all available columns are needed. None means no additional columns are necessary.

Return type:

Optional[List[str]]

property initialization_requirements: Dict[str, List[str]]

Provides the names of all values required by this component during simulant initialization.

Returns:

A dictionary containing the additional requirements of this component during simulant initialization. An omitted key or an empty list for a key implies no requirements for that key during initialization.

Return type:

Dict[str, List[str]]

setup(builder)[source]

Load the disease prevalence and rates data.

Parameters:

builder (Builder) –

Return type:

None

on_initialize_simulants(pop_data)[source]

Initialize the test population for which this disease is modeled.

Parameters:

pop_data (SimulantData) –

Return type:

None

on_time_step_prepare(event)[source]

Update the disease status for both the BAU and intervention scenarios.

Parameters:

event (Event) –

Return type:

None

mortality_adjustment(index, mortality_rate)[source]

Adjust the all-cause mortality rate in the intervention scenario, to account for any change in disease prevalence (relative to the BAU scenario).

disability_adjustment(index, yld_rate)[source]

Adjust the years lost due to disability (YLD) rate in the intervention scenario, to account for any change in disease prevalence (relative to the BAU scenario).