tlo.methods.copd module¶
- class Copd(name=None, resourcefilepath=None)[source]¶
The module responsible for determining Chronic Obstructive Pulmonary Diseases (COPD) status and outcomes. and initialises parameters and properties associated with COPD plus functions and events related to COPD.
Bases:
tlo.core.Module
PARAMETERS:
Item
Type
Description
prob_progress_to_next_cat
REAL
probability of changing from a lower lung function category to a higher lung function category
prob_mod_exacerb
LIST
probability of moderate exacerbation given lung function, for each lungfunction category.
prob_sev_exacerb
LIST
probability of severe exacerbation given lung function, for each lungfunction category.
prob_will_die_sev_exacerbation
REAL
probability that a person will die of severe exacerbation
prob_will_survive_given_oxygen
REAL
probability that an individual with severe copd will not die when given oxygen
PROPERTIES:
Item
Type
Description
ch_lungfunction
CATEGORICAL
Lung function of the person.NaN for those under 15; on a 7-point scale for others, from 0 (Perfect) to 6 (End-Stage COPD).. Possible values are: [0, 1, 2, 3, 4, 5, 6, ]
ch_will_die_this_episode
BOOL
Whether this person will die during a current severe exacerbation
ch_has_inhaler
BOOL
Whether the person is currently using an inhaler
Class attributes:
ADDITIONAL_DEPENDENCIES : set()
CAUSES_OF_DEATH : {‘COPD’: <tlo.methods.causes.Cause object at 0x7fd214b9e8b0>}
CAUSES_OF_DISABILITY : {‘COPD’: <tlo.methods.causes.Cause object at 0x7fd214b9e910>}
INIT_DEPENDENCIES : {‘SymptomManager’}
METADATA : {<Metadata.DISEASE_MODULE: 1>, <Metadata.USES_HEALTHSYSTEM: 3>, <Metadata.USES_HEALTHBURDEN: 4>, <Metadata.USES_SYMPTOMMANAGER: 2>}
gbd_causes_of_copd_represented_in_this_module : {‘Other chronic respiratory diseases’}
Functions (defined or overridden in class Copd):
- __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.
- pre_initialise_population()[source]¶
Things to do before processing the population: * Generate the models
- initialise_population(population)[source]¶
Set initial values of properties values for all individuals
- initialise_simulation(sim)[source]¶
Get ready for simulation start: * Schedule the main polling event * Look-up item codes for consumables
- report_daly_values()[source]¶
Return disability weight for alive persons, based on the current status of ch_lungfunction.
- lookup_item_codes()[source]¶
Look-up the item-codes for the consumables needed in the HSI Events for this module.
- give_inhaler(person_id: int, hsi_event: HSI_Event)[source]¶
Give inhaler if person does not already have one
- do_when_present_with_breathless(person_id: int, hsi_event: HSI_Event)[source]¶
What to do when a person presents at the generic first appt HSI with a symptom of breathless_severe or breathless_moderate. * If severe –> give the inhaler and schedule the HSI for Treatment * Otherwise –> just give inhaler.
- class CopdPollEvent(module)[source]¶
An event that controls the COPD infection process and logs current states. It repeats every 3 months.
Bases:
tlo.events.RegularEvent
,tlo.events.Event
,tlo.events.PopulationScopeEventMixin
Functions (defined or overridden in class CopdPollEvent):
- __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]¶
Progress persons to higher categories of ch_lungfunction
Schedules Exacerbation (Moderate / Severe) events.
Log current states.
- gen_random_date_in_next_three_months()[source]¶
Returns a datetime for a day that is chosen randomly to be within the next 3 months.
- class CopdExacerbationEvent(module, person_id, severe: bool = False)[source]¶
An Exacerbation, which may be ‘Severe’ (severe=True) or ‘Moderate’ (severe=False). * A Moderate Exacerbation will not cause death but may cause non-emergency healthcare seeking; * A Severe Exacerbation may cause death and may cause emergency healthcare seeking.
Bases:
tlo.events.Event
,tlo.events.IndividualScopeEventMixin
Functions (defined or overridden in class CopdExacerbationEvent):
- __init__(module, person_id, severe: 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.
priority – a keyword-argument to set the priority (see Priority enum)
- class CopdDeath(module, person_id)[source]¶
This event will cause the person to die to ‘COPD’ if the person’s property ch_will_die_this_episode is True. It is scheduled when a Severe Exacerbation is lethal, but can be cancelled if a subsequent treatment is successful.
Bases:
tlo.events.Event
,tlo.events.IndividualScopeEventMixin
Functions (defined or overridden in class CopdDeath):
- __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)
- class HSI_Copd_TreatmentOnSevereExacerbation(module, person_id)[source]¶
Bases:
tlo.methods.healthsystem.HSI_Event
,tlo.events.IndividualScopeEventMixin
Functions (defined or overridden in class HSI_Copd_TreatmentOnSevereExacerbation):
- __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.