tlo.methods.cardio_metabolic_disorders module

The joint Cardio-Metabolic Disorders model determines onset, outcome and treatment of: * Diabetes * Hypertension * Chronic Kidney Disease * Chronic Ischemic Heart Disease * Stroke * Heart Attack

And: * Chronic Lower Back Pain

class CardioMetabolicDisorders(name=None, resourcefilepath=None, do_log_df: bool = False, do_condition_combos: bool = False)[source]

CardioMetabolicDisorders module covers a subset of cardio-metabolic conditions and events. Conditions are binary and individuals experience a risk of acquiring or losing a condition based on annual probability and demographic/lifestyle risk factors.

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, tlo.methods.hsi_generic_first_appts.GenericFirstAppointmentsMixin

PARAMETERS:

Item

Type

Description

diabetes_onset

DICT

all the parameters that specify the linear models for onset of diabetes

hypertension_onset

DICT

all the parameters that specify the linear models for onset of hypertension

chronic_kidney_disease_onset

DICT

all the parameters that specify the linear models for onset of chronic_kidney_disease

chronic_lower_back_pain_onset

DICT

all the parameters that specify the linear models for onset of chronic_lower_back_pain

chronic_ischemic_hd_onset

DICT

all the parameters that specify the linear models for onset of chronic_ischemic_hd

diabetes_removal

DICT

all the parameters that specify the linear models for removal of diabetes

hypertension_removal

DICT

all the parameters that specify the linear models for removal of hypertension

chronic_kidney_disease_removal

DICT

all the parameters that specify the linear models for removal of chronic_kidney_disease

chronic_lower_back_pain_removal

DICT

all the parameters that specify the linear models for removal of chronic_lower_back_pain

chronic_ischemic_hd_removal

DICT

all the parameters that specify the linear models for removal of chronic_ischemic_hd

diabetes_hsi

DICT

all the parameters that specify diagnostic tests and treatments for diabetes

hypertension_hsi

DICT

all the parameters that specify diagnostic tests and treatments for hypertension

chronic_kidney_disease_hsi

DICT

all the parameters that specify diagnostic tests and treatments for chronic_kidney_disease

chronic_lower_back_pain_hsi

DICT

all the parameters that specify diagnostic tests and treatments for chronic_lower_back_pain

chronic_ischemic_hd_hsi

DICT

all the parameters that specify diagnostic tests and treatments for chronic_ischemic_hd

ever_stroke_onset

DICT

all the parameters that specify the linear models for onset of ever_stroke

ever_heart_attack_onset

DICT

all the parameters that specify the linear models for onset of ever_heart_attack

diabetes_death

DICT

all the parameters that specify the linear models for death from diabetes

hypertension_death

DICT

all the parameters that specify the linear models for death from hypertension

chronic_kidney_disease_death

DICT

all the parameters that specify the linear models for death from chronic_kidney_disease

chronic_lower_back_pain_death

DICT

all the parameters that specify the linear models for death from chronic_lower_back_pain

chronic_ischemic_hd_death

DICT

all the parameters that specify the linear models for death from chronic_ischemic_hd

ever_stroke_death

DICT

all the parameters that specify the linear models for death from ever_stroke

ever_heart_attack_death

DICT

all the parameters that specify the linear models for death from ever_heart_attack

ever_stroke_hsi

DICT

all the parameters that specify diagnostic tests and treatments for ever_stroke

ever_heart_attack_hsi

DICT

all the parameters that specify diagnostic tests and treatments for ever_heart_attack

diabetes_initial_prev

DICT

initial prevalence of condition

hypertension_initial_prev

DICT

initial prevalence of condition

chronic_kidney_disease_initial_prev

DICT

initial prevalence of condition

chronic_lower_back_pain_initial_prev

DICT

initial prevalence of condition

chronic_ischemic_hd_initial_prev

DICT

initial prevalence of condition

interval_between_polls

INT

months between the main polling event

pr_bmi_reduction

INT

probability of an individual having a reduction in BMI following weight loss treatment

prob_care_provided_given_seek_emergency_care

REAL

The probability that correct care is fully provided to persons that have sought emergency care for a Cardio-metabolic disorder.

PROPERTIES:

Item

Type

Description

nc_diabetes

BOOL

Whether or not someone has diabetes

nc_hypertension

BOOL

Whether or not someone has hypertension

nc_chronic_kidney_disease

BOOL

Whether or not someone has chronic_kidney_disease

nc_chronic_lower_back_pain

BOOL

Whether or not someone has chronic_lower_back_pain

nc_chronic_ischemic_hd

BOOL

Whether or not someone has chronic_ischemic_hd

nc_ever_stroke

BOOL

Whether or not someone has had a ever_stroke

nc_ever_heart_attack

BOOL

Whether or not someone has had a ever_heart_attack

nc_diabetes_ever_diagnosed

BOOL

Whether or not someone has ever been diagnosed with diabetes

nc_hypertension_ever_diagnosed

BOOL

Whether or not someone has ever been diagnosed with hypertension

nc_chronic_kidney_disease_ever_diagnosed

BOOL

Whether or not someone has ever been diagnosed with chronic_kidney_disease

nc_chronic_lower_back_pain_ever_diagnosed

BOOL

Whether or not someone has ever been diagnosed with chronic_lower_back_pain

nc_chronic_ischemic_hd_ever_diagnosed

BOOL

Whether or not someone has ever been diagnosed with chronic_ischemic_hd

nc_diabetes_date_diagnosis

DATE

When someone has been diagnosed with diabetes

nc_hypertension_date_diagnosis

DATE

When someone has been diagnosed with hypertension

nc_chronic_kidney_disease_date_diagnosis

DATE

When someone has been diagnosed with chronic_kidney_disease

nc_chronic_lower_back_pain_date_diagnosis

DATE

When someone has been diagnosed with chronic_lower_back_pain

nc_chronic_ischemic_hd_date_diagnosis

DATE

When someone has been diagnosed with chronic_ischemic_hd

nc_diabetes_date_last_test

DATE

When someone has last been tested for diabetes

nc_hypertension_date_last_test

DATE

When someone has last been tested for hypertension

nc_chronic_kidney_disease_date_last_test

DATE

When someone has last been tested for chronic_kidney_disease

nc_chronic_lower_back_pain_date_last_test

DATE

When someone has last been tested for chronic_lower_back_pain

nc_chronic_ischemic_hd_date_last_test

DATE

When someone has last been tested for chronic_ischemic_hd

nc_diabetes_on_medication

BOOL

Whether or not someone is on medication for diabetes

nc_hypertension_on_medication

BOOL

Whether or not someone is on medication for hypertension

nc_chronic_kidney_disease_on_medication

BOOL

Whether or not someone is on medication for chronic_kidney_disease

nc_chronic_lower_back_pain_on_medication

BOOL

Whether or not someone is on medication for chronic_lower_back_pain

nc_chronic_ischemic_hd_on_medication

BOOL

Whether or not someone is on medication for chronic_ischemic_hd

nc_diabetes_medication_prevents_death

BOOL

Whether or not medication (if provided) will prevent death from diabetes

nc_hypertension_medication_prevents_death

BOOL

Whether or not medication (if provided) will prevent death from hypertension

nc_chronic_kidney_disease_medication_prevents_death

BOOL

Whether or not medication (if provided) will prevent death from chronic_kidney_disease

nc_chronic_lower_back_pain_medication_prevents_death

BOOL

Whether or not medication (if provided) will prevent death from chronic_lower_back_pain

nc_chronic_ischemic_hd_medication_prevents_death

BOOL

Whether or not medication (if provided) will prevent death from chronic_ischemic_hd

nc_ever_stroke_date_last_event

DATE

Date of last ever_stroke

nc_ever_heart_attack_date_last_event

DATE

Date of last ever_heart_attack

nc_ever_stroke_ever_diagnosed

BOOL

Whether or not someone has ever been diagnosed with ever_stroke

nc_ever_heart_attack_ever_diagnosed

BOOL

Whether or not someone has ever been diagnosed with ever_heart_attack

nc_ever_stroke_date_diagnosis

DATE

When someone has last been diagnosed with ever_stroke

nc_ever_heart_attack_date_diagnosis

DATE

When someone has last been diagnosed with ever_heart_attack

nc_ever_stroke_on_medication

BOOL

Whether or not someone has ever been diagnosed with ever_stroke

nc_ever_heart_attack_on_medication

BOOL

Whether or not someone has ever been diagnosed with ever_heart_attack

nc_ever_stroke_medication_prevents_death

BOOL

Whether or not medication will prevent death from ever_stroke

nc_ever_heart_attack_medication_prevents_death

BOOL

Whether or not medication will prevent death from ever_heart_attack

nc_ever_stroke_scheduled_date_death

DATE

Scheduled date of death from ever_stroke

nc_ever_heart_attack_scheduled_date_death

DATE

Scheduled date of death from ever_heart_attack

nc_ever_weight_loss_treatment

BOOL

whether or not the person has ever had weight loss treatment

nc_weight_loss_worked

BOOL

whether or not weight loss treatment worked

nc_risk_score

INT

score to represent number of risk conditions the person has

Class attributes:

ADDITIONAL_DEPENDENCIES : {‘Depression’}

CAUSES_OF_DEATH : {‘diabetes’: <tlo.methods.causes.Cause object at 0x1292a8e50>, ‘chronic_ischemic_hd’: <tlo.methods.causes.Cause object at 0x1292abd50>, ‘ever_heart_attack’: <tlo.methods.causes.Cause object at 0x1292a81d0>, ‘ever_stroke’: <tlo.methods.causes.Cause object at 0x1292aac50>, ‘chronic_kidney_disease’: <tlo.methods.causes.Cause object at 0x1292abf10>}

CAUSES_OF_DISABILITY : {‘diabetes’: <tlo.methods.causes.Cause object at 0x1292aa2d0>, ‘chronic_ischemic_hd’: <tlo.methods.causes.Cause object at 0x1292a92d0>, ‘heart_attack’: <tlo.methods.causes.Cause object at 0x1292ab0d0>, ‘stroke’: <tlo.methods.causes.Cause object at 0x1292a9590>, ‘chronic_kidney_disease’: <tlo.methods.causes.Cause object at 0x1292a8a90>, ‘lower_back_pain’: <tlo.methods.causes.Cause object at 0x1292ab990>}

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

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

OPTIONAL_INIT_DEPENDENCIES : {‘Hiv’, ‘HealthBurden’}

__annotations__ : {}

condition_date_diagnosis_list : {‘nc_diabetes_date_diagnosis’: DATE === When someone has been diagnosed with diabetes, ‘nc_hypertension_date_diagnosis’: DATE === When someone has been diagnosed with hypertension, ‘nc_chronic_kidney_disease_date_diagnosis’: DATE === When someone has been diagnosed with chronic_kidney_disease, ‘nc_chronic_lower_back_pain_date_diagnosis’: DATE === When someone has been diagnosed with chronic_lower_back_pain, ‘nc_chronic_ischemic_hd_date_diagnosis’: DATE === When someone has been diagnosed with chronic_ischemic_hd}

condition_date_of_last_test_list : {‘nc_diabetes_date_last_test’: DATE === When someone has last been tested for diabetes, ‘nc_hypertension_date_last_test’: DATE === When someone has last been tested for hypertension, ‘nc_chronic_kidney_disease_date_last_test’: DATE === When someone has last been tested for chronic_kidney_disease, ‘nc_chronic_lower_back_pain_date_last_test’: DATE === When someone has last been tested for chronic_lower_back_pain, ‘nc_chronic_ischemic_hd_date_last_test’: DATE === When someone has last been tested for chronic_ischemic_hd}

condition_diagnosis_list : {‘nc_diabetes_ever_diagnosed’: BOOL === Whether or not someone has ever been diagnosed with diabetes, ‘nc_hypertension_ever_diagnosed’: BOOL === Whether or not someone has ever been diagnosed with hypertension, ‘nc_chronic_kidney_disease_ever_diagnosed’: BOOL === Whether or not someone has ever been diagnosed with chronic_kidney_disease, ‘nc_chronic_lower_back_pain_ever_diagnosed’: BOOL === Whether or not someone has ever been diagnosed with chronic_lower_back_pain, ‘nc_chronic_ischemic_hd_ever_diagnosed’: BOOL === Whether or not someone has ever been diagnosed with chronic_ischemic_hd}

condition_list : {‘nc_diabetes’: BOOL === Whether or not someone has diabetes, ‘nc_hypertension’: BOOL === Whether or not someone has hypertension, ‘nc_chronic_kidney_disease’: BOOL === Whether or not someone has chronic_kidney_disease, ‘nc_chronic_lower_back_pain’: BOOL === Whether or not someone has chronic_lower_back_pain, ‘nc_chronic_ischemic_hd’: BOOL === Whether or not someone has chronic_ischemic_hd}

condition_medication_death_list : {‘nc_diabetes_medication_prevents_death’: BOOL === Whether or not medication (if provided) will prevent death from diabetes, ‘nc_hypertension_medication_prevents_death’: BOOL === Whether or not medication (if provided) will prevent death from hypertension, ‘nc_chronic_kidney_disease_medication_prevents_death’: BOOL === Whether or not medication (if provided) will prevent death from chronic_kidney_disease, ‘nc_chronic_lower_back_pain_medication_prevents_death’: BOOL === Whether or not medication (if provided) will prevent death from chronic_lower_back_pain, ‘nc_chronic_ischemic_hd_medication_prevents_death’: BOOL === Whether or not medication (if provided) will prevent death from chronic_ischemic_hd}

condition_medication_list : {‘nc_diabetes_on_medication’: BOOL === Whether or not someone is on medication for diabetes, ‘nc_hypertension_on_medication’: BOOL === Whether or not someone is on medication for hypertension, ‘nc_chronic_kidney_disease_on_medication’: BOOL === Whether or not someone is on medication for chronic_kidney_disease, ‘nc_chronic_lower_back_pain_on_medication’: BOOL === Whether or not someone is on medication for chronic_lower_back_pain, ‘nc_chronic_ischemic_hd_on_medication’: BOOL === Whether or not someone is on medication for chronic_ischemic_hd}

conditions : [‘diabetes’, ‘hypertension’, ‘chronic_kidney_disease’, ‘chronic_lower_back_pain’, ‘chronic_ischemic_hd’]

death_conditions_param_dicts : {‘diabetes_death’: DICT === all the parameters that specify the linear models for death from diabetes, ‘hypertension_death’: DICT === all the parameters that specify the linear models for death from hypertension, ‘chronic_kidney_disease_death’: DICT === all the parameters that specify the linear models for death from chronic_kidney_disease, ‘chronic_lower_back_pain_death’: DICT === all the parameters that specify the linear models for death from chronic_lower_back_pain, ‘chronic_ischemic_hd_death’: DICT === all the parameters that specify the linear models for death from chronic_ischemic_hd}

death_events_param_dicts : {‘ever_stroke_death’: DICT === all the parameters that specify the linear models for death from ever_stroke, ‘ever_heart_attack_death’: DICT === all the parameters that specify the linear models for death from ever_heart_attack}

event_date_diagnosis_list : {‘nc_ever_stroke_date_diagnosis’: DATE === When someone has last been diagnosed with ever_stroke, ‘nc_ever_heart_attack_date_diagnosis’: DATE === When someone has last been diagnosed with ever_heart_attack}

event_date_last_list : {‘nc_ever_stroke_date_last_event’: DATE === Date of last ever_stroke, ‘nc_ever_heart_attack_date_last_event’: DATE === Date of last ever_heart_attack}

event_diagnosis_list : {‘nc_ever_stroke_ever_diagnosed’: BOOL === Whether or not someone has ever been diagnosed with ever_stroke, ‘nc_ever_heart_attack_ever_diagnosed’: BOOL === Whether or not someone has ever been diagnosed with ever_heart_attack}

event_list : {‘nc_ever_stroke’: BOOL === Whether or not someone has had a ever_stroke, ‘nc_ever_heart_attack’: BOOL === Whether or not someone has had a ever_heart_attack}

event_medication_death_list : {‘nc_ever_stroke_medication_prevents_death’: BOOL === Whether or not medication will prevent death from ever_stroke, ‘nc_ever_heart_attack_medication_prevents_death’: BOOL === Whether or not medication will prevent death from ever_heart_attack}

event_medication_list : {‘nc_ever_stroke_on_medication’: BOOL === Whether or not someone has ever been diagnosed with ever_stroke, ‘nc_ever_heart_attack_on_medication’: BOOL === Whether or not someone has ever been diagnosed with ever_heart_attack}

event_scheduled_date_death_list : {‘nc_ever_stroke_scheduled_date_death’: DATE === Scheduled date of death from ever_stroke, ‘nc_ever_heart_attack_scheduled_date_death’: DATE === Scheduled date of death from ever_heart_attack}

events : [‘ever_stroke’, ‘ever_heart_attack’]

hsi_conditions_param_dicts : {‘diabetes_hsi’: DICT === all the parameters that specify diagnostic tests and treatments for diabetes, ‘hypertension_hsi’: DICT === all the parameters that specify diagnostic tests and treatments for hypertension, ‘chronic_kidney_disease_hsi’: DICT === all the parameters that specify diagnostic tests and treatments for chronic_kidney_disease, ‘chronic_lower_back_pain_hsi’: DICT === all the parameters that specify diagnostic tests and treatments for chronic_lower_back_pain, ‘chronic_ischemic_hd_hsi’: DICT === all the parameters that specify diagnostic tests and treatments for chronic_ischemic_hd}

hsi_events_param_dicts : {‘ever_stroke_hsi’: DICT === all the parameters that specify diagnostic tests and treatments for ever_stroke, ‘ever_heart_attack_hsi’: DICT === all the parameters that specify diagnostic tests and treatments for ever_heart_attack}

initial_prev_param_dicts : {‘diabetes_initial_prev’: DICT === initial prevalence of condition, ‘hypertension_initial_prev’: DICT === initial prevalence of condition, ‘chronic_kidney_disease_initial_prev’: DICT === initial prevalence of condition, ‘chronic_lower_back_pain_initial_prev’: DICT === initial prevalence of condition, ‘chronic_ischemic_hd_initial_prev’: DICT === initial prevalence of condition}

onset_conditions_param_dicts : {‘diabetes_onset’: DICT === all the parameters that specify the linear models for onset of diabetes, ‘hypertension_onset’: DICT === all the parameters that specify the linear models for onset of hypertension, ‘chronic_kidney_disease_onset’: DICT === all the parameters that specify the linear models for onset of chronic_kidney_disease, ‘chronic_lower_back_pain_onset’: DICT === all the parameters that specify the linear models for onset of chronic_lower_back_pain, ‘chronic_ischemic_hd_onset’: DICT === all the parameters that specify the linear models for onset of chronic_ischemic_hd}

onset_events_param_dicts : {‘ever_stroke_onset’: DICT === all the parameters that specify the linear models for onset of ever_stroke, ‘ever_heart_attack_onset’: DICT === all the parameters that specify the linear models for onset of ever_heart_attack}

other_params_dict : {‘interval_between_polls’: INT === months between the main polling event, ‘pr_bmi_reduction’: INT === probability of an individual having a reduction in BMI following weight loss treatment}

removal_conditions_param_dicts : {‘diabetes_removal’: DICT === all the parameters that specify the linear models for removal of diabetes, ‘hypertension_removal’: DICT === all the parameters that specify the linear models for removal of hypertension, ‘chronic_kidney_disease_removal’: DICT === all the parameters that specify the linear models for removal of chronic_kidney_disease, ‘chronic_lower_back_pain_removal’: DICT === all the parameters that specify the linear models for removal of chronic_lower_back_pain, ‘chronic_ischemic_hd_removal’: DICT === all the parameters that specify the linear models for removal of chronic_ischemic_hd}

Functions (defined or overridden in class CardioMetabolicDisorders):

__init__(name=None, resourcefilepath=None, do_log_df: bool = False, do_condition_combos: bool = False)[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 files for condition onset, removal, deaths, and initial prevalence.

ResourceFile_cmd_condition_onset.xlsx = parameters for onset of conditions ResourceFile_cmd_condition_removal.xlsx = parameters for removal of conditions ResourceFile_cmd_condition_death.xlsx = parameters for death rate from conditions ResourceFile_cmd_condition_prevalence.xlsx = initial and target prevalence for conditions ResourceFile_cmd_condition_symptoms.xlsx = symptoms for conditions ResourceFile_cmd_condition_hsi.xlsx = HSI parameters for conditions ResourceFile_cmd_condition_testing.xlsx = community testing parameters for conditions (currently only hypertension) ResourceFile_cmd_events.xlsx = parameters for occurrence of events ResourceFile_cmd_events_death.xlsx = parameters for death rate from events ResourceFile_cmd_events_symptoms.xlsx = symptoms for events ResourceFile_cmd_events_hsi.xlsx = HSI parameters for events

initialise_population(population)[source]

Set property values for the initial population.

initialise_simulation(sim)[source]

Schedule: * Main Polling Event * Main Logging Event * Build the LinearModels for the onset/removal of each condition:

build_linear_model(condition, interval_between_polls, lm_type)[source]

Build a linear model for the risk of onset, removal, or death from a condition, occurrence or death from an event, and community-based testing for hypertension. :param condition: the condition or event to build the linear model for :param interval_between_polls: the duration (in months) between the polls :param lm_type: whether or not the lm is for onset, removal, death, or event in order to select the correct parameter set below :return: a linear model

build_linear_model_symptoms(condition, interval_between_polls)[source]

Build a linear model for the risk of symptoms from a condition. :param condition: the condition to build the linear model for :param interval_between_polls: the duration (in months) between the polls :return: a linear model

on_birth(mother_id, child_id)[source]

Initialise our properties for a newborn individual. :param mother_id: the mother for this child :param child_id: the new child

update_risk_score()[source]

Generates or updates the risk score for individuals at initialisation of population or at each polling event

report_daly_values()[source]

Report disability weight (average values for the last month) to the HealthBurden module

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.

do_at_generic_first_appt(person_id: int, individual_properties: IndividualProperties, symptoms: List[str], schedule_hsi_event: HSIEventScheduler, **kwargs) None[source]

Actions to take during a non-emergency generic health system interaction (HSI).

Derived classes should overwrite this method so that they are compatible with the HealthSystem module, and can schedule HSI events when a individual presents symptoms indicative of the corresponding illness or condition.

When overwriting, arguments that are not required can be left out of the definition. If done so, the method must take a **kwargs input to avoid errors when looping over all disease modules and running their generic HSI methods.

HSI events should be scheduled by the Module subclass implementing this method using the schedule_hsi_event argument.

Implementations of this method should not make any updates to the population dataframe directly - if the target individuals properties need to be updated this should be performed by updating the individual_properties argument.

Parameters:
  • person_id – Row index (ID) of the individual target of the HSI event in the population dataframe.

  • individual_properties – Properties of individual target as provided in the population dataframe. Updates to individual properties may be written to this object.

  • symptoms – List of symptoms the patient is experiencing.

  • schedule_hsi_event – A function that can schedule subsequent HSI events.

  • diagnosis_function – A function that can run diagnosis tests based on the patient’s symptoms.

  • consumables_checker – A function that can query the health system to check for available consumables.

  • facility_level – The level of the facility that the patient presented at.

  • treatment_id – The treatment id of the HSI event triggering the generic appointment.

do_at_generic_first_appt_emergency(person_id: int, individual_properties: IndividualProperties, symptoms: List[str], schedule_hsi_event: HSIEventScheduler, **kwargs) None[source]

Actions to take during an emergency generic health system interaction (HSI).

Call signature is identical to the do_at_generic_first_appt() method.

Derived classes should overwrite this method so that they are compatible with the :py:class`~.HealthSystem` module, and can schedule HSI events when a individual presents symptoms indicative of the corresponding illness or condition.

class CardioMetabolicDisorders_MainPollingEvent(module, interval_between_polls)[source]

The Main Polling Event. * Establishes onset of each condition * Establishes removal of each condition * Schedules events that arise, according the condition.

The Main Polling Event of the CardioMetabolicDisorders Module

Parameters:

module – the module that created this event

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

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class CardioMetabolicDisorders_MainPollingEvent):

__init__(module, interval_between_polls)[source]

The Main Polling Event of the CardioMetabolicDisorders Module

Parameters:

module – the module that created this event

apply(population)[source]

Apply this event to the population.

Parameters:

population – the current population

class CardioMetabolicDisordersEvent(module, person_id, event)[source]

This is an Cardio Metabolic Disorders event (indicating an emergency occurrence of stroke or heart attack). It has been scheduled to occur by the CardioMetabolicDisorders_MainPollingEvent. :param event: the event occurring

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.

  • priority – a keyword-argument to set the priority (see Priority enum)

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

Functions (defined or overridden in class CardioMetabolicDisordersEvent):

__init__(module, person_id, event)[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.

  • priority – a keyword-argument to set the priority (see Priority enum)

apply(person_id)[source]

Apply this event to the given target.

Must be implemented by subclasses.

Parameters:

target – the target of the event

class CardioMetabolicDisordersDeathEvent(module, person_id, originating_cause)[source]

Performs the Death operation on an individual and logs it. :param originating_cause: the originating cause of the death, which can be a condition or an event

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.

  • priority – a keyword-argument to set the priority (see Priority enum)

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

Functions (defined or overridden in class CardioMetabolicDisordersDeathEvent):

__init__(module, person_id, originating_cause)[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.

  • priority – a keyword-argument to set the priority (see Priority enum)

apply(person_id)[source]

Apply this event to the given target.

Must be implemented by subclasses.

Parameters:

target – the target of the event

check_if_event_and_do_death(person_id)[source]

Helper function to perform do_death if person dies of a condition or event. If person dies of an event, this will only perform do_death if the scheduled date of death matches the current date (to allow for the possibility that treatment will intercede in an prevent death from the event).

class CardioMetabolicDisordersWeightLossEvent(module, person_id)[source]

Gives an individual a probability of losing weight (via a reduction in li_bmi) and records the change in population.props

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.

  • priority – a keyword-argument to set the priority (see Priority enum)

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

Functions (defined or overridden in class CardioMetabolicDisordersWeightLossEvent):

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

  • priority – a keyword-argument to set the priority (see Priority enum)

apply(person_id)[source]

Apply this event to the given target.

Must be implemented by subclasses.

Parameters:

target – the target of the event

class CardioMetabolicDisorders_LoggingEvent(module)[source]

Produce a summary of the numbers of people with respect to the action of this module.

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

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class CardioMetabolicDisorders_LoggingEvent):

__init__(module)[source]

Produce a summary of the numbers of people with respect to the action of this module.

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 HSI_CardioMetabolicDisorders_CommunityTestingForHypertension(module, person_id)[source]

This event is scheduled by HSI_GenericFirstApptAtFacilityLevel1 following presentation for care with any symptoms. This event results in a blood pressure measurement being taken that may result in diagnosis and the scheduling of treatment for a condition.

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:

__annotations__ : {}

Functions (defined or overridden in class HSI_CardioMetabolicDisorders_CommunityTestingForHypertension):

__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_CardioMetabolicDisorders_Investigations(module, person_id, conditions_to_investigate: List, has_any_cmd_symptom: bool = False)[source]

This event is scheduled following presentation for care and a determination having been made about which conditions should be investigated for this person (either due to presentation with symptoms or a routine check). NB. If a treatment is needed, this does lead to multiple HSI to be scheduled for the person (relevant to each condition). :param conditions_to_investigate: list of the condition to investigate. :param has_any_cmd_symptom: bool to indicate whether the person has any symptoms that prompted the investigation

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:

__annotations__ : {}

Functions (defined or overridden in class HSI_CardioMetabolicDisorders_Investigations):

__init__(module, person_id, conditions_to_investigate: List, has_any_cmd_symptom: bool = 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.

do_for_each_condition(_c) bool[source]

What to do for each condition that will be investigated. Returns bool signalling whether a follow-up HSI has been scheduled.

apply(person_id, squeeze_factor)[source]

Apply this event to the population.

Must be implemented by subclasses.

class HSI_CardioMetabolicDisorders_StartWeightLossAndMedication(module, person_id, condition)[source]

This is a Health System Interaction Event in which a person receives a recommendation of weight loss. This results in an individual having a probability of reducing their BMI by one category in the next 6-12 months. :param condition: the condition to start medication for

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:

__annotations__ : {}

Functions (defined or overridden in class HSI_CardioMetabolicDisorders_StartWeightLossAndMedication):

__init__(module, person_id, condition)[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_CardioMetabolicDisorders_Refill_Medication(module, person_id, condition)[source]

This is a Health System Interaction Event in which a person seeks a refill prescription of medication. The next refill of medication is also scheduled. If the person is flagged as not being on medication, then the event does nothing and returns a blank footprint. If it does not run, then person ceases to be on medication and no further refill HSI are scheduled. :param condition: the condition to refill medication for

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:

__annotations__ : {}

Functions (defined or overridden in class HSI_CardioMetabolicDisorders_Refill_Medication):

__init__(module, person_id, condition)[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 HSI_CardioMetabolicDisorders_SeeksEmergencyCareAndGetsTreatment(module, person_id, events_to_investigate: List)[source]

This is a Health System Interaction Event. It is the event when a person is investigated for certain condition following and emergency presentation. Treatment may be scheduled from this event, and this may take the form of multiple streams of HSI event if more than one condition is to be treated. :param events_to_investigate: list of the events for which emergency care is sought

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:

__annotations__ : {}

Functions (defined or overridden in class HSI_CardioMetabolicDisorders_SeeksEmergencyCareAndGetsTreatment):

__init__(module, person_id, events_to_investigate: List)[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.

do_for_each_event_to_be_investigated(_ev)[source]

Do what is required to be done for each event that is being investigated.

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.