tlo.methods.oesophagealcancer module
Oesophageal Cancer Disease Module
Limitations to note: * Needs to represent the the DxTest ‘endoscopy_dysphagia_oes_cancer’ requires use of an endoscope * Perhaps need to add (i) wood burning fire / indoor pollution (ii) white maize flour in diet (both risk factors) * Footprints of HSI – pending input from expert on resources required.
- class OesophagealCancer(name=None, resourcefilepath=None)
Oesophageal Cancer Disease Module
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
init_prop_oes_cancer_stage
LIST
initial proportions in dysplasia/cancer categories for man aged 20 with no excess alcohol and no tobacco
init_prop_dysphagia_oes_cancer_by_stage
LIST
initial proportions of those with dysplasia/cancer categories that have the symptom dysphagia
init_prop_with_dysphagia_diagnosed_oes_cancer_by_stage
LIST
initial proportions of people that have symptom of dysphagia that have been diagnosed
init_prop_treatment_status_oes_cancer
LIST
initial proportions of people with oesophageal dysplasia/cancer that had initiated treatment
init_prob_palliative_care
REAL
initial probability of being under palliative care if in stage 4
r_low_grade_dysplasia_none
REAL
probabilty per 3 months of incident low grade oesophageal dysplasia, amongst people with no oesophageal dysplasia (men, age20, no excess alcohol, no tobacco)
rr_low_grade_dysplasia_none_female
REAL
rate ratio for low grade oesophageal dysplasia for females
rr_low_grade_dysplasia_none_per_year_older
REAL
rate ratio for low grade oesophageal dysplasia per year older from age 20
rr_low_grade_dysplasia_none_tobacco
REAL
rate ratio for low grade oesophageal dysplasia for tobacco smokers
rr_low_grade_dysplasia_none_ex_alc
REAL
rate ratio for low grade oesophageal dysplasia for no excess alcohol
r_high_grade_dysplasia_low_grade_dysp
REAL
probabilty per 3 months of high grade oesophageal dysplasia, amongst people with low grade dysplasia
rr_high_grade_dysp_undergone_curative_treatment
REAL
rate ratio for high grade dysplasia for people with low grade dysplasia if had curative treatment at low grade dysplasia stage
r_stage1_high_grade_dysp
REAL
probabilty per 3 months of stage 1 oesophageal cancer amongst people with high grade dysplasia
rr_stage1_undergone_curative_treatment
REAL
rate ratio for stage 1 oesophageal cancer for people with high grade dysplasia if had curative treatment at high grade dysplasia stage
r_stage2_stage1
REAL
probabilty per 3 months of stage 2 oesophageal cancer amongst people with stage 1
rr_stage2_undergone_curative_treatment
REAL
rate ratio for stage 2 oesophageal cancer for people with stage 1 oesophageal cancer if had curative treatment at stage 1
r_stage3_stage2
REAL
probabilty per 3 months of stage 3 oesophageal cancer amongst people with stage 2
rr_stage3_undergone_curative_treatment
REAL
rate ratio for stage 3 oesophageal cancer for people with stage 2 oesophageal cancer if had curative treatment at stage 2
r_stage4_stage3
REAL
probabilty per 3 months of stage 4 oesophageal cancer amongst people with stage 3
rr_stage4_undergone_curative_treatment
REAL
rate ratio for stage 4 oesophageal cancer for people with stage 3 oesophageal cancer if had curative treatment at stage 3
rate_palliative_care_stage4
REAL
prob palliative care this 3 month period if stage4
r_death_oesoph_cancer
REAL
probabilty per 3 months of death from oesophageal cancer mongst people with stage 4 oesophageal cancer
rr_dysphagia_low_grade_dysp
REAL
probability per 3 months of dysphagia in a person with low grade oesophageal dysplasia
rr_dysphagia_high_grade_dysp
REAL
rate ratio for dysphagia if have high grade oesophageal dysplasia
r_dysphagia_stage1
REAL
rate ratio for dysphagia if have stage 1 oesophageal cancer
rr_dysphagia_stage2
REAL
rate ratio for dysphagia if have stage 2 oesophageal cancer
rr_dysphagia_stage3
REAL
rate ratio for dysphagia if have stage 3 oesophageal cancer
rr_dysphagia_stage4
REAL
rate ratio for dysphagia if have stage 4 oesophageal cancer
rp_oes_cancer_female
REAL
relative prevalence at baseline of oesophageal dysplasia/cancer if female
rp_oes_cancer_per_year_older
REAL
relative prevalence at baseline of oesophageal dysplasia/cancer per year older than 20
rp_oes_cancer_tobacco
REAL
relative prevalence at baseline of oesophageal dysplasia/cancer if tobacco
rp_oes_cancer_ex_alc
REAL
relative prevalence at baseline of oesophageal dysplasia/cancer
sensitivity_of_endoscopy_for_oes_cancer_with_dysphagia
REAL
sensitivity of endoscopy_for diagnosis of oesophageal cancer for those with dysphagia
PROPERTIES:
Item
Type
Description
oc_status
CATEGORICAL
Current status of the health condition, oesophageal dysplasia. Possible values are: [none, low_grade_dysplasia, high_grade_dysplasia, stage1, stage2, stage3, stage4, ]
oc_date_diagnosis
DATE
the date of diagnsosis of the oes_cancer (pd.NaT if never diagnosed)
oc_date_treatment
DATE
date of first receiving attempted curative treatment (pd.NaT if never started treatment)
oc_stage_at_which_treatment_applied
CATEGORICAL
the cancer stage at which treatment is applied (because the treatment only has an effect during the stageat which it is applied.. Possible values are: [none, low_grade_dysplasia, high_grade_dysplasia, stage1, stage2, stage3, stage4, ]
oc_date_palliative_care
DATE
date of first receiving palliative care (pd.NaT is never had palliative care)
Class attributes:
CAUSES_OF_DEATH : {‘OesophagealCancer’: <tlo.methods.causes.Cause object at 0x30da41c50>}
CAUSES_OF_DISABILITY : {‘OesophagealCancer’: <tlo.methods.causes.Cause object at 0x30da43450>}
INIT_DEPENDENCIES : {‘SymptomManager’, ‘HealthSystem’, ‘Lifestyle’, ‘Demography’}
METADATA : {<Metadata.USES_HEALTHBURDEN: 4>, <Metadata.DISEASE_MODULE: 1>, <Metadata.USES_SYMPTOMMANAGER: 2>, <Metadata.USES_HEALTHSYSTEM: 3>}
OPTIONAL_INIT_DEPENDENCIES : {‘HealthBurden’}
__annotations__ : {}
Functions (defined or overridden in class OesophagealCancer):
- __init__(name=None, resourcefilepath=None)
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)
Setup parameters used by the module, register it with healthsystem and register symptoms
- initialise_population(population)
Set property values for the initial population.
- initialise_simulation(sim)
Schedule the main polling event
Schedule the main logging event
Define the LinearModels
Define the Diagnostic used
Define the Disability-weights
Schedule the palliative care appointments for those that are on palliative care at initiation
- on_birth(mother_id, child_id)
Initialise properties for a newborn individual. :param mother_id: the mother for this child :param child_id: the new child
- on_hsi_alert(person_id, treatment_id)
- report_daly_values()
- do_at_generic_first_appt(person_id: int, individual_properties: IndividualProperties, symptoms: List[str], schedule_hsi_event: HSIEventScheduler, **kwargs) None
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 theschedule_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.
- class OesCancerMainPollingEvent(module)
Regular event that updates all Oesophageal cancer properties for population: * Acquisition and progression of Oesophageal Cancer * Symptom Development according to stage of Oesophageal Cancer * Deaths from Oesophageal Cancer for those in stage4
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)
Bases:
tlo.events.RegularEvent
,tlo.events.Event
,tlo.events.PopulationScopeEventMixin
Class attributes:
__annotations__ : {}
Functions (defined or overridden in class OesCancerMainPollingEvent):
- __init__(module)
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)
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_OesophagealCancer_Investigation_Following_Dysphagia(module, person_id)
This event is scheduled by HSI_GenericFirstApptAtFacilityLevel1 following presentation for care with the symptom dysphagia. This event begins the investigation that may result in diagnosis of Oesophageal Cancer and the scheduling of treatment or palliative care. It is for people with the symptom dysphagia.
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_OesophagealCancer_Investigation_Following_Dysphagia):
- __init__(module, person_id)
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)
Apply this event to the population.
Must be implemented by subclasses.
- class HSI_OesophagealCancer_StartTreatment(module, person_id)
This event is scheduled by HSI_OesophagealCancer_Investigation_Following_Dysphagia following a diagnosis of Oesophageal Cancer. It initiates the treatment of Oesophageal Cancer. It is only for persons with a cancer that is not in stage4 and who have been diagnosed.
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_OesophagealCancer_StartTreatment):
- __init__(module, person_id)
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)
Apply this event to the population.
Must be implemented by subclasses.
- class HSI_OesophagealCancer_PostTreatmentCheck(module, person_id)
This event is scheduled by HSI_OesophagealCancer_StartTreatment and itself. It is only for those who have undergone treatment for Oesophageal Cancer. If the person has developed cancer to stage4, the patient is initiated on palliative care; otherwise a further appointment is scheduled for one year.
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_OesophagealCancer_PostTreatmentCheck):
- __init__(module, person_id)
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)
Apply this event to the population.
Must be implemented by subclasses.
- class HSI_OesophagealCancer_PalliativeCare(module, person_id)
- This is the event for palliative care. It does not affect the patients progress but does affect the disability
weight and takes resources from the healthsystem.
This event is scheduled by either: * HSI_OesophagealCancer_Investigation_Following_Dysphagia following a diagnosis of Oesophageal Cancer at stage4. * HSI_OesophagealCancer_PostTreatmentCheck following progression to stage4 during treatment. * Itself for the continuance of care. It is only for persons with a cancer in stage4.
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_OesophagealCancer_PalliativeCare):
- __init__(module, person_id)
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)
Apply this event to the population.
Must be implemented by subclasses.
- class OesCancerLoggingEvent(module)
The only logging event for this module
schedule logging to repeat every 3 months
Bases:
tlo.events.RegularEvent
,tlo.events.Event
,tlo.events.PopulationScopeEventMixin
Class attributes:
__annotations__ : {}
Functions (defined or overridden in class OesCancerLoggingEvent):
- __init__(module)
schedule logging to repeat every 3 months
- apply(population)
Compute statistics regarding the current status of persons and output to the logger