tlo.methods.prostate_cancer module
Prostate Cancer Disease Module
Limitations to note: * Footprints of HSI – pending input from expert on resources required.
- class ProstateCancer(name=None, resourcefilepath=None)
Prostate 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_prostate_ca_stage
LIST
initial proportions in prostate cancer stages for men aged 35-49
init_prop_urinary_symptoms_by_stage
LIST
initial proportions of those in prostate ca stages that have urinary symptoms
init_prop_pelvic_pain_symptoms_by_stage
LIST
initial proportions of those in prostate ca stages that have pelvic pain symptoms
init_prop_with_urinary_symptoms_diagnosed_prostate_ca_by_stage
LIST
initial proportions of people with prostate ca and urinary symptoms that have been diagnosed
init_prop_with_pelvic_pain_symptoms_diagnosed_prostate_ca_by_stage
LIST
initial proportions of people with prostate ca and pelvic pain symptoms that have been diagnosed
init_prop_treatment_status_prostate_ca
LIST
initial proportions of people with prostate ca that had received treatment
init_prob_palliative_care
REAL
initial probability of being under palliative care if at metastatic stage
r_prostate_confined_prostate_ca_none
REAL
probabilty per 3 months of incident (prostate confined) prostate cancer amongst people with no prostate ca (men, age35-49)
rr_prostate_confined_prostate_ca_age5069
REAL
rate ratio for incident (prostate confined) prostate cancer amongst men aged 50-69
rr_prostate_confined_prostate_ca_agege70
REAL
rate ratio for incident (prostate confined) prostate cancer amongst men aged ge 70
r_local_ln_prostate_ca_prostate_confined
REAL
probabilty per 3 months of local lymph node involved prostate ca amongst people with prostate confined prostate ca
rr_local_ln_prostate_ca_undergone_curative_treatment
REAL
rate ratio for local lymph node involved prostate ca for people with prostate confined prostate cadue to undergoing curative treatment
r_metastatic_prostate_ca_local_ln
REAL
probabilty per 3 months of metastatic prostate cancer amongst people with local lymph nodeinvolved prostate ca
rr_metastatic_prostate_ca_undergone_curative_treatment
REAL
rate ratio for metastatic prostate cancer stage 1 for people with lymph node involved prostate ca due toundergoing curative treatment
rate_palliative_care_metastatic_prostate_ca
REAL
prob palliative care this 3 month period if metastatic prostate ca
r_death_metastatic_prostate_cancer
REAL
probabilty per 3 months of death from prostate cancer mongst people with metastatic prostate cancer
r_urinary_symptoms_prostate_ca
REAL
rate of urinary symptoms if have prostate confined prostate ca
rr_urinary_symptoms_local_ln_or_metastatic_prostate_cancer
REAL
rate ratio of urinary symptoms in a person with local lymph node or metastatuc prostate cancer compared with prostate confined prostate ca
r_pelvic_pain_symptoms_local_ln_prostate_ca
REAL
rate of pelvic pain or numbness symptoms if have local lymph node involved prostate cancer
rr_pelvic_pain_metastatic_prostate_cancer
REAL
rate ratio of pelvic pain or numbness in a person with metastatic prostate cancer compared with lymph node involved prostate cancer
rp_prostate_cancer_age5069
REAL
stage-specific relative prevalence at baseline of prostate cancer for age 50-69
rp_prostate_cancer_agege70
REAL
stage-specific relative prevalence at baseline of prostate cancer for age 70+
sensitivity_of_psa_test_for_prostate_ca
REAL
sensitivity of psa test for prostate cancer
sensitivity_of_biopsy_for_prostate_ca
REAL
sensitivity of biopsy for prostate cancer
PROPERTIES:
Item
Type
Description
pc_status
CATEGORICAL
Current status of the health condition, prostate cancer. Possible values are: [none, prostate_confined, local_ln, metastatic, ]
pc_date_psa_test
DATE
the date of psa test in response to symptoms
pc_date_biopsy
DATE
the date of biopsy in response to symptoms and positive psa test
pc_date_diagnosis
DATE
the date of diagnosis of the prostate cancer (pd.NaT if never diagnosed)
pc_date_treatment
DATE
date of first receiving attempted curative treatment (pd.NaT if never started treatment)
pc_stage_at_which_treatment_given
CATEGORICAL
the cancer stage at which treatment is given (because the treatment only has an effect during the stageat which it is given.. Possible values are: [none, prostate_confined, local_ln, metastatic, ]
pc_date_palliative_care
DATE
date of first receiving palliative care (pd.NaT is never had palliative care)
pc_date_death
DATE
date pc death
Class attributes:
CAUSES_OF_DEATH : {‘ProstateCancer’: <tlo.methods.causes.Cause object at 0x30d810890>}
CAUSES_OF_DISABILITY : {‘ProstateCancer’: <tlo.methods.causes.Cause object at 0x30d811890>}
INIT_DEPENDENCIES : {‘SymptomManager’, ‘HealthSystem’, ‘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 ProstateCancer):
- __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, now including disability weights
- 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 ProstateCancerMainPollingEvent(module)
Regular event that updates all prostate cancer properties for population: * Acquisition and progression of prostate cancer * Symptom Development according to stage of prostate cancer * Deaths from prostate cancer for those in metastatic
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 ProstateCancerMainPollingEvent):
- __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_ProstateCancer_Investigation_Following_Urinary_Symptoms(module, person_id)
This event is scheduled by HSI_GenericFirstApptAtFacilityLevel1 following presentation for care with the symptom urinary symptoms. This event begins the investigation that may result in diagnosis of prostate cancer and the scheduling of treatment or palliative care. It is for men with the symptom urinary.
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_ProstateCancer_Investigation_Following_Urinary_Symptoms):
- __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_ProstateCancer_Investigation_Following_Pelvic_Pain(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.
Bases:
tlo.methods.hsi_event.HSI_Event
,tlo.events.IndividualScopeEventMixin
Class attributes:
__annotations__ : {}
Functions (defined or overridden in class HSI_ProstateCancer_Investigation_Following_Pelvic_Pain):
- __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_ProstateCancer_Investigation_Following_psa_positive(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.
Bases:
tlo.methods.hsi_event.HSI_Event
,tlo.events.IndividualScopeEventMixin
Class attributes:
__annotations__ : {}
Functions (defined or overridden in class HSI_ProstateCancer_Investigation_Following_psa_positive):
- __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_ProstateCancer_StartTreatment(module, person_id)
This event is scheduled by HSI_ProstateOesophagealCancer_Investigation_Following_Urinary_Symptoms. It initiates the treatment of prostate cancer. It is only for persons with a cancer that is not in metastatic 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_ProstateCancer_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_ProstateCancer_PostTreatmentCheck(module, person_id)
This event is scheduled by HSI_ProstateCancer_StartTreatment and itself. It is only for those who have undergone treatment for prostate cancer. If the person has developed cancer to metastatic, 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_ProstateCancer_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_ProstateCancer_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_ProstateCancer_Investigation_Following_Urinary_Symptoms following a diagnosis of metastatic Prostate Cancer . * HSI_ProstateCancer_PostTreatmentCheck following progression to metastatic cancer during treatment. * Itself for the continuance of care. It is only for persons with metastatic cancer.
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_ProstateCancer_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 ProstateCancerLoggingEvent(module)
The only logging event for this module
schedule logging to repeat every 1 months
Bases:
tlo.events.RegularEvent
,tlo.events.Event
,tlo.events.PopulationScopeEventMixin
Class attributes:
__annotations__ : {}
Functions (defined or overridden in class ProstateCancerLoggingEvent):
- __init__(module)
schedule logging to repeat every 1 months
- apply(population)
Compute statistics regarding the current status of persons and output to the logger