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

Prostate Cancer Disease Module

Bases: tlo.core.Module

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 0x136217810>}

CAUSES_OF_DISABILITY : {‘ProstateCancer’: <tlo.methods.causes.Cause object at 0x136216b50>}

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

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

OPTIONAL_INIT_DEPENDENCIES : {‘HealthBurden’}

Functions (defined or overridden in class ProstateCancer):

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

read_parameters(data_folder)[source]

Setup parameters used by the module, now including disability weights

initialise_population(population)[source]

Set property values for the initial population.

initialise_simulation(sim)[source]
  • 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)[source]

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)[source]
report_daly_values()[source]
do_at_generic_first_appt(patient_id: int, patient_details: PatientDetails, symptoms: List[str], **kwargs) IndividualPropertyUpdates[source]

Actions to be take during a NON-emergency generic HSI.

Derived classes should overwrite this method so that they are compatible with the HealthSystem module, and can schedule HSI events when a patient 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 implementing this method using the Module.healthsystem.schedule_hsi() method. However, they should not write updates back to the population DataFrame in this method - these values should be returned as a dictionary as described below:

The return value of this function should be a dictionary containing any changes that need to be made to the individual’s row in the population DataFrame. Key/value pairs should be the column name and the new value to assign to the patient. In the event no updates are required; return an object that evaluates to False when cast to a bool. Your options are: - Omit a return statement and value (preferred). - Return an empty dictionary. Use this case when patient details might need updating conditionally, on EG patient symptoms or consumable availability. In which case, an empty dictionary should be created and key-value pairs added to this dictionary as such conditionals are checked. If no conditionals are met, the empty dictionary will be returned. - Use a return statement with no values (use if the logic of your module-specific method necessitates the explicit return). - Return None (not recommended, use “return” on its own, as above).

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

  • patient_details – Patient details as provided in the population DataFrame.

  • symptoms – List of symptoms the patient is experiencing.

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

  • consumables_checker – A function that can query the HealthSystem 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.

  • random_state – Random number generator to be used when making random choices during event creation.

class ProstateCancerMainPollingEvent(module)[source]

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

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

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class ProstateCancerMainPollingEvent):

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

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

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.

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

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

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

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.

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

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.

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

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

The only logging event for this module

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

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class ProstateCancerLoggingEvent):

__init__(module)[source]

schedule logging to repeat every 1 months

apply(population)[source]

Compute statistics regarding the current status of persons and output to the logger