tlo.methods.hsi_generic_first_appts module
Events which describes the first interaction with the health system.
This module contains the HSI events that represent the first contact with the health
system, which are triggered by the onset of symptoms. Non-emergency symptoms lead to
HSI_GenericNonEmergencyFirstAppt
and emergency symptoms lead to
HSI_GenericEmergencyFirstAppt
.
- class _BaseHSIGenericFirstAppt(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.
Bases:
tlo.methods.hsi_event.HSI_Event
,tlo.events.IndividualScopeEventMixin
Class attributes:
__annotations__ : {}
Functions (defined or overridden in class _BaseHSIGenericFirstAppt):
- __init__(module, person_id) None [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.
- _diagnosis_function(tests, use_dict: bool = False, report_tried: bool = False) DiagnosisTestReturnType [source]
Passed to modules when determining HSI events to be scheduled based on this generic appointment. Intended as the
diagnosis_function
argument toGenericFirstAppointmentsMixin.do_at_generic_first_appt()
orGenericFirstAppointmentsMixin.do_at_generic_first_appt_emergency()
.Class-level definition avoids the need to redefine this method each time the
apply()
method is called.- Parameters:
tests – The name of the test(s) to run via the diagnosis manager.
use_dict_for_single – If
True
, the return type will be a dictionary even if only one test was requested.report_dxtest_tried – Report if a test was attempted but could not be carried out due to for example lack of consumables, etc.
- Returns:
Test results as dictionary key/value pairs.
- static _do_at_generic_first_appt_for_module(module: Module) Callable [source]
Retrieves relevant do_at_generic_first_appt* method for a module.
Must be implemented by concrete classes derived from this base class.
- apply(person_id: int, squeeze_factor: float = 0.0) None [source]
Run the actions required during the health system interaction (HSI).
TODO: person_id is not needed any more - but would have to go through the whole codebase to manually identify instances of this class to change call syntax, and leave other HSI_Event-derived classes alone.
- class HSI_GenericNonEmergencyFirstAppt(module, person_id, facility_level='0')[source]
This is a health system interaction event that represents the first interaction with the health system following the onset of non-emergency symptom(s).
It is generated by the
HealthSeekingBehaviour
module.By default, it occurs at level ‘0’ but it could occur also at other levels.
It uses the non-emergency generic first appointment methods of the disease modules to determine any follow-up events that need to be scheduled.
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_generic_first_appts._BaseHSIGenericFirstAppt
,tlo.methods.hsi_event.HSI_Event
,tlo.events.IndividualScopeEventMixin
Class attributes:
__annotations__ : {}
Functions (defined or overridden in class HSI_GenericNonEmergencyFirstAppt):
- __init__(module, person_id, facility_level='0')[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_GenericEmergencyFirstAppt(module, person_id)[source]
This is a health system interaction event that represents the generic appointment which is the first interaction with the health system following the onset of emergency symptom(s).
It uses the emergency generic first appointment methods of the disease modules to determine any follow-up events that need to be scheduled.
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_generic_first_appts._BaseHSIGenericFirstAppt
,tlo.methods.hsi_event.HSI_Event
,tlo.events.IndividualScopeEventMixin
Class attributes:
__annotations__ : {}
Functions (defined or overridden in class HSI_GenericEmergencyFirstAppt):
- __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_EmergencyCare_SpuriousSymptom(module, person_id, accepted_facility_level='1a')[source]
HSI event providing accident & emergency care on spurious emergency symptoms.
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_EmergencyCare_SpuriousSymptom):
- __init__(module, person_id, accepted_facility_level='1a')[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.