tlo.methods.cervical_cancer module
Cervical Cancer Disease Module
- class CervicalCancer(name=None, resourcefilepath=None)
Cervical 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_prev_cin_hpv_cc_stage_hiv
LIST
initial proportions in hpv cancer categories in women with hiv
init_prev_cin_hpv_cc_stage_nhiv
LIST
initial proportions in hpv cancer categories in women without hiv
r_hpv
REAL
probability per month of oncogenic hpv infection
r_cin1_hpv
REAL
probability per month of incident cin1 amongst people with hpv
prob_revert_from_cin1
REAL
probability of reverting from cin1 to none
r_cin2_cin1
REAL
probability per month of incident cin2 amongst people with cin1
r_cin3_cin2
REAL
probability per month of incident cin3 amongst people with cin2
r_stage1_cin3
REAL
probability per month of incident stage1 cervical cancer amongst people with cin3
r_stage2a_stage1
REAL
probability per month of incident stage2a cervical cancer amongst people with stage1
r_stage2b_stage2a
REAL
probability per month of incident stage2b cervical cancer amongst people with stage2a
r_stage3_stage2b
REAL
probability per month of incident stage3 cervical cancer amongst people with stage2b
r_stage4_stage3
REAL
probability per month of incident stage4 cervical cancer amongst people with stage3
rr_progress_cc_hiv
REAL
risk ratio for progressing through cin and cervical cancer stages if have unsuppressed hiv
rr_hpv_vaccinated
REAL
risk ratio for hpv if vaccinated - this is combined effect of probability the hpv is vaccine-preventable and vaccine efficacy against vaccine-preventable hpv
rr_hpv_age50plus
REAL
risk ratio for hpv if age 50 plus
prob_cure_stage1
REAL
probability of cure if treated in stage 1 cervical cancer
prob_cure_stage2a
REAL
probability of cure if treated in stage 2a cervical cancer
prob_cure_stage2b
REAL
probability of cure if treated in stage 2b cervical cancer
prob_cure_stage3
REAL
probability of cure if treated in stage 3 cervical cancer
r_death_cervical_cancer
REAL
probability per month of death from cervical cancer amongst people with stage 4 cervical cancer
p_vaginal_bleeding_if_no_cc
REAL
Probability of vaginal bleeding onset if not in stage 1/2/3/4
r_vaginal_bleeding_cc_stage1
REAL
probability of vaginal bleeding if have stage 1 cervical cancer
rr_vaginal_bleeding_cc_stage2a
REAL
risk ratio for vaginal bleeding if have stage 2a cervical cancer
rr_vaginal_bleeding_cc_stage2b
REAL
risk ratio for vaginal bleeding if have stage 2b cervical cancer
rr_vaginal_bleeding_cc_stage3
REAL
risk ratio for vaginal bleeding if have stage 3 cervical cancer
rr_vaginal_bleeding_cc_stage4
REAL
risk ratio for vaginal bleeding if have stage 4 cervical cancer
prob_referral_biopsy_given_vaginal_bleeding
REAL
probability of being referred for a biopsy if presenting with vaginal bleeding
sensitivity_of_biopsy_for_cervical_cancer
REAL
sensitivity of biopsy for diagnosis of cervical cancer
sensitivity_of_xpert_for_hpv_cin_cc
REAL
sensitivity of xpert for presence of hpv, cin or cervical cancer
sensitivity_of_via_for_cin_cc
REAL
sensitivity of via for cin and cervical cancer
prob_xpert_screen
REAL
probability of xpert screening
prob_via_screen
REAL
probability of via screening
prob_thermoabl_successful
REAL
probability of thermoablation treatment successful in removing CIN (ce_hpv_cc_status set to none)
prob_cryotherapy_successful
REAL
probability of cryotherapy treatment successful in removing CIN (ce_hpv_cc_status set to none)
transition_screening_method_year
REAL
year screening method switches from VIA to Xpert
transition_to_thermo_year
REAL
year CIN removal method switches from Cryo to Thermo
screening_min_age_hv_neg
REAL
minimum age individual to be screened if HIV negative
screening_max_age_hv_neg
REAL
maximum age individual to be screened if HIV negative
screening_min_age_hv_pos
REAL
minimum age individual to be screened if HIV positive
screening_max_age_hv_pos
REAL
maximum age individual to be screened if HIV positive
yrs_between_screen_hv_pos
REAL
minimum years between screening if HIV positive
yrs_between_screen_hv_neg
REAL
minimum years between screening if HIV negative
palliative_care_bed_days
REAL
palliative_care_bed_days
stage_1_3_daly_wt
REAL
GBD sequalae code corresponding to stage_1_3_daly_wt
stage_1_3_treated_daly_wt
REAL
GBD sequalae code corresponding to stage_1_3_treated_daly_wt
stage4_daly_wt
REAL
GBD sequalae code corresponding tostage4_daly_wt
min_yrs_between_screening_if_cin_treated
REAL
minimum years between screening if individual has been treated for CIN previously
PROPERTIES:
Item
Type
Description
ce_hpv_cc_status
CATEGORICAL
Current hpv / cervical cancer status - note that hpv means persistent hpv. Possible values are: [none, hpv, cin1, cin2, cin3, stage1, stage2a, stage2b, stage3, stage4, ]
ce_date_diagnosis
DATE
the date of diagnosis of cervical cancer stage (pd.NaT if never diagnosed)
ce_stage_at_diagnosis
CATEGORICAL
the cancer stage at which cancer diagnosis was made. Possible values are: [none, stage1, stage2a, stage2b, stage3, stage4, ]
ce_date_cin_removal
DATE
the date of last cin removal (pd.NaT if never had cin removal)
ce_date_treatment
DATE
date of first receiving attempted curative treatment (pd.NaT if never started treatment)
ce_ever_screened
BOOL
whether ever been screened
ce_ever_treated
BOOL
ever been treated for cc
ce_cured_date_cc
DATE
ever cured of cervical cancer date
ce_cc_ever
BOOL
ever had cc
ce_stage_at_which_treatment_given
CATEGORICAL
the cancer stage at which treatment was given (because the treatment only has an effect during the stageat which it is given). (Note treatment only initiated in stage1/2a/2b/3. Possible values are: [none, hpv, cin1, cin2, cin3, stage1, stage2a, stage2b, stage3, stage4, ]
ce_date_palliative_care
DATE
date of first receiving palliative care (pd.NaT is never had palliative care)
ce_ever_diagnosed
BOOL
ever diagnosed with cervical cancer (even if now cured)
ce_xpert_hpv_ever_pos
BOOL
hpv positive on xpert test ever
ce_via_cin_ever_detected
BOOL
cin ever_detected on via
ce_date_last_screened
DATE
date of last screening
ce_date_thermoabl
DATE
date of thermoablation for CIN
ce_date_cryotherapy
DATE
date of cryotherapy for CIN
ce_date_via
DATE
date of VIA screening
ce_date_xpert
DATE
date of XPERT screening
ce_current_cc_diagnosed
BOOL
currently has diagnosed cervical cancer (which until now has not been cured)
ce_biopsy
BOOL
ce biopsy done ever
Class attributes:
CAUSES_OF_DEATH : {‘CervicalCancer’: <tlo.methods.causes.Cause object at 0x137699f90>}
CAUSES_OF_DISABILITY : {‘CervicalCancer’: <tlo.methods.causes.Cause object at 0x13769ba90>}
INIT_DEPENDENCIES : {‘Hiv’, ‘Lifestyle’, ‘SymptomManager’, ‘Demography’, ‘HealthSystem’}
METADATA : {<Metadata.DISEASE_MODULE: 1>, <Metadata.USES_SYMPTOMMANAGER: 2>, <Metadata.USES_HEALTHBURDEN: 4>, <Metadata.USES_HEALTHSYSTEM: 3>}
OPTIONAL_INIT_DEPENDENCIES : {‘HealthSeekingBehaviour’, ‘HealthBurden’}
__annotations__ : {}
Functions (defined or overridden in class CervicalCancer):
- __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(resourcefilepath: Path | None = None)
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
- build_linear_models() None
Build linear models
- 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
- 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.
- choose_cin_procedure_and_schedule_it(person_id)
Function to decide treatment for individuals with CIN based on year and to schedule the relevant HSI. If year is >= transition-year then Thermoablation, else Cryotherapy :param hsi_event: HSI Event (required to pass in order to register equipment) :param person_id: person of interest
- class CervicalCancerMainPollingEvent(module)
Regular event that updates all cervical cancer properties for population: * Acquisition and progression of hpv, cin, cervical cancer * Symptom Development according to stage of cervical Cancer * Deaths from cervical 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 CervicalCancerMainPollingEvent):
- __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 CervicalCancer_DeathInStage4(module, person_id)
Does a Cervical Cancer death for a person in Stage 4.
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)
Bases:
tlo.events.Event
,tlo.events.IndividualScopeEventMixin
Functions (defined or overridden in class CervicalCancer_DeathInStage4):
- __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.
priority – a keyword-argument to set the priority (see Priority enum)
- apply(person_id)
Apply this event to the given target.
Must be implemented by subclasses.
- Parameters:
target – the target of the event
- class HSI_CervicalCancer_Screening_VIA(module, person_id)
This event is triggered if individual in eligible population is selected for screening based using this method.
CIN HSI is scheduled if individual is diagnosed with CIN2 or CIN3 Biopsy HSI is scheuduled if individual is believed to have severe cervical dysplasia (stage 1 to 4) based on observation of lesions in screening
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_CervicalCancer_Screening_VIA):
- __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_CervicalCancer_Screening_Xpert(module, person_id)
This event is triggered if individual in eligible population is selected for screening based on xpert screening probability
Care recommendation depends on HIV status. If individual does not have HIV, proceed to VIA screening for confirmation. If individual has HIV, then send to CIN treatment regardless of severity (stage of cancer is not as readily detectable in xpert screening, so this step is required). In the CIN treatment appointment, if it is deemed to be severe, then biopsy will occur at this point.
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_CervicalCancer_Screening_Xpert):
- __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_CervicalCancer_Presentation_WithVaginalBleeding(module, person_id)
This event is triggered if individual presents symptom of vaginal bleeding
Patient is sent for follow-up biopsy based on prob_referral_biopsy_given_vaginal_bleeding
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_CervicalCancer_Presentation_WithVaginalBleeding):
- __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_CervicalCancer_CINRemoval_Cryotherapy(module, person_id)
This event is triggered if individual requires CIN Treatment.
Success of treatment is defined by indivdidual’s ce_hpv_cc_status and prob_cryotherapy_successful
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_CervicalCancer_CINRemoval_Cryotherapy):
- __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_CervicalCancer_CINRemoval_Thermoablation(module, person_id)
This event is triggered if individual requires CIN Treatment and year is 2024 or after
Success of treatment is defined by indivdidual’s ce_hpv_cc_status and prob_thermoabl_successful
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_CervicalCancer_CINRemoval_Thermoablation):
- __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_CervicalCancer_Biopsy(module, person_id)
This event is scheduled by HSI_CervicalCancer_Screening_*, HSI_CervicalCancer_Presentation_WithVaginalBleeding, HSI_CervicalCancer_CIN_Cryotherapy, or HSI_CervicalCancer_CIN_Thermoablation
This event begins the investigation that may result in diagnosis of cervical cancer and the scheduling of palliative care if diagnosis is stage 4
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_CervicalCancer_Biopsy):
- __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_CervicalCancer_Treatment_Start(module, person_id)
This event is scheduled by HSI_CervicalCancer_Biopsy following a diagnosis of cervical Cancer. It initiates the treatment of cervical Cancer. It is only for persons with a cancer that is not in stage4 and who have been diagnosed. Successful treatment, put people back in ‘hpv’ stage (from which a progression is not possible)
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_CervicalCancer_Treatment_Start):
- __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_CervicalCancer_Treatment_PostTreatmentCheck(module, person_id)
This event is scheduled by HSI_CervicalCancer_StartTreatment and itself. It is only for those who have undergone treatment for cervical 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_CervicalCancer_Treatment_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_CervicalCancer_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_CervicalCancer_Biopsy following a diagnosis of cervical Cancer at stage4. * HSI_CervicalCancer_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_CervicalCancer_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 CervicalCancerLoggingEvent(module)
The only logging event for this module
schedule logging to repeat every 1 month
Bases:
tlo.events.RegularEvent
,tlo.events.Event
,tlo.events.PopulationScopeEventMixin
Class attributes:
__annotations__ : {}
Functions (defined or overridden in class CervicalCancerLoggingEvent):
- __init__(module)
schedule logging to repeat every 1 month
- apply(population)
Compute statistics regarding the current status of persons and output to the logger