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.

Bases: tlo.core.Module

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

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 0x7ff86ba63130>, ‘chronic_ischemic_hd’: <tlo.methods.causes.Cause object at 0x7ff86ba63190>, ‘ever_heart_attack’: <tlo.methods.causes.Cause object at 0x7ff86ba631f0>, ‘ever_stroke’: <tlo.methods.causes.Cause object at 0x7ff86ba63250>, ‘chronic_kidney_disease’: <tlo.methods.causes.Cause object at 0x7ff86ba632b0>}

CAUSES_OF_DISABILITY : {‘diabetes’: <tlo.methods.causes.Cause object at 0x7ff86ba63310>, ‘chronic_ischemic_hd’: <tlo.methods.causes.Cause object at 0x7ff86ba63370>, ‘heart_attack’: <tlo.methods.causes.Cause object at 0x7ff86ba633d0>, ‘stroke’: <tlo.methods.causes.Cause object at 0x7ff86ba63430>, ‘chronic_kidney_disease’: <tlo.methods.causes.Cause object at 0x7ff86ba63490>, ‘lower_back_pain’: <tlo.methods.causes.Cause object at 0x7ff86ba634f0>}

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

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

OPTIONAL_INIT_DEPENDENCIES : {‘HealthBurden’}

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.

determine_if_will_be_investigated(person_id)[source]

This is called by the HSI generic first appts module whenever a person attends an appointment and determines if the person will be tested for a condition.

determine_if_will_be_investigated_events(person_id)[source]

This is called by the HSI generic first appts module whenever a person attends an emergency appointment and determines if they will receive emergency care based on the duration of time since symptoms have appeared.

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.

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

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

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.

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

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.

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

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

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.

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 CardioMetabolicDisorders_LoggingEvent(module)[source]

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

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

Must be implemented by subclasses.

Parameters

population – the current population

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.

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

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_InvestigationNotFollowingSymptoms(module, person_id, condition)[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. :param condition: the condition being investigated

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

Functions (defined or overridden in class HSI_CardioMetabolicDisorders_InvestigationNotFollowingSymptoms):

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

This event is scheduled by HSI_GenericFirstApptAtFacilityLevel1 following presentation for care with the symptom for each condition. This event begins the investigation that may result in diagnosis and the scheduling of treatment. It is for people with the condition-relevant symptom (e.g. diabetes_symptoms). :param condition: the condition being investigated

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

Functions (defined or overridden in class HSI_CardioMetabolicDisorders_InvestigationFollowingSymptoms):

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

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

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

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

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, ev)[source]

This is a Health System Interaction Event. It is the event when a person with the severe symptoms of chronic syndrome presents for emergency care and is immediately provided with treatment. :param ev: the event for which emergency care / treatment is sought

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

Functions (defined or overridden in class HSI_CardioMetabolicDisorders_SeeksEmergencyCareAndGetsTreatment):

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