tlo.methods.mockitis module
- class Mockitis(name=None, resourcefilepath=None)[source]
This is a dummy infectious disease.
It demonstrates the following behaviours in respect of the healthsystem module:
Registration of the disease module with healthsystem
Reading DALY weights and reporting daly values related to this disease
Health care seeking
Usual HSI behaviour
Restrictive requirements on the facility_level for the HSI_event
Use of the SymptomManager
Bases:
tlo.core.Module
,tlo.methods.hsi_generic_first_appts.GenericFirstAppointmentsMixin
PARAMETERS:
Item
Type
Description
p_infection
REAL
Probability that an uninfected individual becomes infected
level_of_symptoms
CATEGORICAL
Level of symptoms that the individual will have. Possible values are: [low, high, ]
p_cure
REAL
Probability that a treatment is successful in curing the individual
initial_prevalence
REAL
Prevalence of the disease in the initial population
daly_wts
DICT
DALY weights for conditions
PROPERTIES:
Item
Type
Description
mi_is_infected
BOOL
Current status of mockitis
mi_status
CATEGORICAL
Historical status: N=never; C=currently; P=previously. Possible values are: [N, C, P, ]
mi_date_infected
DATE
Date of latest infection
mi_scheduled_date_death
DATE
Date of scheduled death of infected individual
mi_date_cure
DATE
Date an infected individual was cured
Class attributes:
CAUSES_OF_DEATH : {‘Mockitis’: <tlo.methods.causes.Cause object at 0x119333510>}
CAUSES_OF_DISABILITY : {‘Mockitis’: <tlo.methods.causes.Cause object at 0x119332ad0>}
INIT_DEPENDENCIES : {‘Demography’, ‘SymptomManager’}
METADATA : {<Metadata.DISEASE_MODULE: 1>, <Metadata.USES_HEALTHBURDEN: 4>, <Metadata.USES_HEALTHSYSTEM: 3>, <Metadata.USES_SYMPTOMMANAGER: 2>}
OPTIONAL_INIT_DEPENDENCIES : {‘HealthBurden’}
Functions (defined or overridden in class Mockitis):
- __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]
Read in parameters and do the registration of this module and its symptoms
- initialise_population(population)[source]
Set our property values for the initial population.
This method is called by the simulation when creating the initial population, and is responsible for assigning initial values, for every individual, of those properties ‘owned’ by this module, i.e. those declared in the PROPERTIES dictionary above.
- Parameters:
population – the population of individuals
- initialise_simulation(sim)[source]
Get ready for simulation start.
This method is called just before the main simulation loop begins, and after all modules have read their parameters and the initial population has been created. It is a good place to add initial events to the event queue.
- on_birth(mother_id, child_id)[source]
Initialise our properties for a newborn individual.
This is called by the simulation whenever a new person is born.
- Parameters:
mother_id – the ID for the mother for this child
child_id – the ID for the new child
- on_hsi_alert(person_id, treatment_id)[source]
This is called whenever there is an HSI event commissioned by one of the other disease modules.
- do_at_generic_first_appt_emergency(person_id: int, symptoms: List[str], schedule_hsi_event: HSIEventScheduler, **kwargs) None [source]
Actions to take during an emergency generic health system interaction (HSI).
Call signature is identical to the
do_at_generic_first_appt()
method.Derived classes should overwrite this method so that they are compatible with the :py:class`~.HealthSystem` module, and can schedule HSI events when a individual presents symptoms indicative of the corresponding illness or condition.
- class MockitisEvent(module)[source]
This event is occurring regularly at one monthly intervals and controls the infection process and onset of symptoms of Mockitis.
Bases:
tlo.events.RegularEvent
,tlo.events.Event
,tlo.events.PopulationScopeEventMixin
Class attributes:
__annotations__ : {}
Functions (defined or overridden in class MockitisEvent):
- class MockitisDeathEvent(module, person_id)[source]
This is the death event for mockitis
Bases:
tlo.events.Event
,tlo.events.IndividualScopeEventMixin
Functions (defined or overridden in class MockitisDeathEvent):
- __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_Mockitis_PresentsForCareWithSevereSymptoms(module, person_id)[source]
This is a Health System Interaction Event. It is first appointment that someone has when they present to the healthcare system with the severe symptoms of Mockitis. If they are aged over 15, then a decision is taken to start treatment at the next appointment. If they are younger than 15, then another initial appointment is scheduled for then are 15 years old.
Bases:
tlo.methods.hsi_event.HSI_Event
,tlo.events.IndividualScopeEventMixin
Class attributes:
__annotations__ : {}
Functions (defined or overridden in class HSI_Mockitis_PresentsForCareWithSevereSymptoms):
- __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.
- class HSI_Mockitis_StartTreatment(module, person_id)[source]
This is a Health System Interaction Event.
It is appointment at which treatment for mockitiis is inititaed.
Bases:
tlo.methods.hsi_event.HSI_Event
,tlo.events.IndividualScopeEventMixin
Class attributes:
__annotations__ : {}
Functions (defined or overridden in class HSI_Mockitis_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.
- class HSI_Mockitis_TreatmentMonitoring(module, person_id)[source]
This is a Health System Interaction Event.
It is appointment at which treatment for mockitis is monitored. (In practise, nothing happens!)
Bases:
tlo.methods.hsi_event.HSI_Event
,tlo.events.IndividualScopeEventMixin
Class attributes:
__annotations__ : {}
Functions (defined or overridden in class HSI_Mockitis_TreatmentMonitoring):
- __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.
- class MockitisLoggingEvent(module)[source]
Bases:
tlo.events.RegularEvent
,tlo.events.Event
,tlo.events.PopulationScopeEventMixin
Class attributes:
__annotations__ : {}
Functions (defined or overridden in class MockitisLoggingEvent):