Infections and Progressions
Overview Structs
Overview Functions
GEMS.critical_offsetGEMS.critical_onsetGEMS.exposureGEMS.infect!GEMS.infectiousness_onsetGEMS.is_asymptomaticGEMS.is_criticalGEMS.is_infectedGEMS.is_infectiousGEMS.is_mildGEMS.is_presymptomaticGEMS.is_recoveredGEMS.is_severeGEMS.is_symptomaticGEMS.recoveryGEMS.severeness_offsetGEMS.severeness_onsetGEMS.symptom_onset
Structs
GEMS.DiseaseProgression — Type
DiseaseProgressionA struct to represent the disease progression of an infectious disease.
Fields
exposure::Int16: Exposure (infection) tick of the disease.infectiousness_onset::Int16: Tick when the individual becomes infectious.symptom_onset::Int16: Tick when the individual develops symptoms.severeness_onset::Int16: Tick when the individual develops severe symptoms.critical_onset::Int16: Tick when the individual develops critical symptoms.critical_offset::Int16: Tick when the individual's critical symptoms subside.severeness_offset::Int16: Tick when the individual's severe symptoms subside.recovery::Int16: Tick when the individual recovers from the disease.
Constraints
exposuremust be non-negative.infectiousness_onsetmust be at least one tick afterexposure.symptom_onsetis optional but must be at least one tick afterexposureif set.severeness_onsetis optional, but if set, requiressymptom_onset, cannot be prior tosymptom_onset, and requiressevereness_offset.severeness_offsetis optional, but if set, requiressevereness_onsetand cannot be prior tosevereness_onset.critical_onsetis optional, but if set, requiressevereness_onset, cannot be prior tosevereness_onset, and requirescritical_offset.critical_offsetis optional, but if set, requirescritical_onsetand cannot be prior tocritical_onset.recoverymust be set, at least one tick afterexposure, and cannot be prior tosymptom_onset,severeness_offset, orcritical_offsetif set.
Examples
The following example represents a mild symptomatic progression. An individual get infected at time 23, becomes infectious at 25, develops symptoms at 26, recovers at 31, and does not die.
julia> DiseaseProgression(exposure = 23, infectiousness_onset = 25, symptom_onset = 26, recovery = 31)Output:
DiseaseProgression(
tick | event
23 | exposure
25 | infectiousness_onset
26 | symptom_onset
31 | recovery
)Functions
GEMS.exposure — Method
exposure(dp::DiseaseProgression)Returns the exposure (infection) tick of the disease progression dp.
GEMS.infect! — Function
infect!(infectee::Individual,
tick::Int16,
pathogen::Pathogen,
sim::Union{Simulation, Nothing},
rng::Xoshiro,
infecter_id::Int32,
setting_id::Int32 ,
lon::Float32,
lat::Float32,
setting_type::Char,
ags::Int32,
source_infection_id::Int32)Infect infectee with the specified pathogen and calculate time to infectiousness and time to recovery. Optional arguments infecter_id. setting_id, and setting_type can be passed for logging. It's not required to calulate the infection. The infection can only be logged, if Simulation object is passed (as this object holds the logger).
Parameters
infectee::Individual: Individual to infecttick::Int16: Infection tickpathogen::Pathogen: Pathogen to infect the individual withsim::Union{Simulation, Nothing}= Simulation object (used to get logger)rng::Xoshiro: RNG to use for stochastic partsinfecter_id::Int32: Infecting individualsetting_id::Int32: ID of setting this infection happens inlon::Float32: Longitude of the infection infection location (setting)lat::Float32: Latitude of the infection infection location (setting)setting_type::Char: Setting type as char (e.g. "h" forHousehold)ags::Int32*: Amtlicher Gemeindeschlüssel (community identification number) of the region this infection happened in as Integer valuesource_infection_id::Int32: Current infection ID of the infecting individual
Returns
Int32: New infection ID, orDEFAULT_INFECTION_IDifinfecteeis already actively infected withpathogen.
infect!(infectee::Individual, sim::Simulation)Infect infectee with the pathogen of the simulation at the current tick of the simulation. Mainly a convenience wrapper around infect! with less parameters. Used for example in test cases.
GEMS.infectiousness_onset — Method
infectiousness_onset(dp::DiseaseProgression)Returns the tick when the individual with disease progression dp becomes infectious.
GEMS.is_asymptomatic — Method
is_asymptomatic(dp::DiseaseProgression, t::Int16)
isasymptomatic(dp::DiseaseProgression, t::Int16)
asymptomatic(dp::DiseaseProgression, t::Int16)Returns true if the individual with disease progression dp is asymptomatic at tick t, otherwise false. Asymptomatic means the individual is infected, does currently not have symptoms and will not develop symptoms in the future.
GEMS.is_critical — Method
is_critical(dp::DiseaseProgression, t::Int16)
iscritical(dp::DiseaseProgression, t::Int16)
critical(dp::DiseaseProgression, t::Int16)Returns true if the individual with disease progression dp has critical symptoms at tick t, otherwise false.
GEMS.is_infected — Method
is_infected(dp::DiseaseProgression, t::Int16)
isinfected(dp::DiseaseProgression, t::Int16)
infected(dp::DiseaseProgression, t::Int16)Returns true if the individual with disease progression dp is infected at tick t, otherwise false.
GEMS.is_infectious — Method
is_infectious(dp::DiseaseProgression, t::Int16)
isinfectious(dp::DiseaseProgression, t::Int16)
infectious(dp::DiseaseProgression, t::Int16)Returns true if the individual with disease progression dp is infectious at tick t, otherwise false.
GEMS.is_mild — Method
is_mild(dp::DiseaseProgression, t::Int16)
ismild(dp::DiseaseProgression, t::Int16)
mild(dp::DiseaseProgression, t::Int16)Returns true if the individual with disease progression dp has mild symptoms at tick t, otherwise false. A mild case is defined as symptomatic but not severe.
GEMS.is_presymptomatic — Method
is_presymptomatic(dp::DiseaseProgression, t::Int16)
ispresymptomatic(dp::DiseaseProgression, t::Int16)
presymptomatic(dp::DiseaseProgression, t::Int16)Returns true if the individual with disease progression dp is presymptomatic at tick t, otherwise false. Presymptomatic means the individual is infected but has not yet developed symptoms (but will in the future).
GEMS.is_recovered — Method
is_recovered(dp::DiseaseProgression, t::Int16)
isrecovered(dp::DiseaseProgression, t::Int16)
recovered(dp::DiseaseProgression, t::Int16)Returns true if the individual with disease progression dp has recovered before tick t, otherwise false.
GEMS.is_severe — Method
is_severe(dp::DiseaseProgression, t::Int16)
issevere(dp::DiseaseProgression, t::Int16)
severe(dp::DiseaseProgression, t::Int16)Returns true if the individual with disease progression dp has severe symptoms at tick t, otherwise false.
GEMS.is_symptomatic — Method
is_symptomatic(dp::DiseaseProgression, t::Int16)
issymptomatic(dp::DiseaseProgression, t::Int16)
symptomatic(dp::DiseaseProgression, t::Int16)Returns true if the individual with disease progression dp is symptomatic at tick t, otherwise false.
GEMS.critical_onset — Method
critical_onset(dp::DiseaseProgression)Returns the tick when the individual with disease progression dp develops critical symptoms. If the individual will not develop critical symptoms, this will return -1.
GEMS.critical_offset — Method
critical_offset(dp::DiseaseProgression)Returns the tick when the individual with disease progression dp's critical symptoms subside. If the individual never has critical symptoms, this will return -1.
GEMS.recovery — Method
recovery(dp::DiseaseProgression)Returns the tick when the individual with disease progression dp recovers from the disease.
GEMS.severeness_onset — Method
severeness_onset(dp::DiseaseProgression)Returns the tick when the individual with disease progression dp develops severe symptoms. If the individual will not develop severe symptoms, this will return -1.
GEMS.severeness_offset — Method
severeness_offset(dp::DiseaseProgression)Returns the tick when the individual with disease progression dp's severeness is reduced (i.e., moves from severe to mild symptoms). If the individual never has severe symptoms, this will return -1.
Missing docstring for spread_infection!(::Setting, ::Simulation, ::Pathogen). Check Documenter's build log for details.
GEMS.symptom_onset — Method
symptom_onset(dp::DiseaseProgression)Returns the tick when the individual with disease progression dp develops symptoms. If the individual is asymptomatic, this will return -1.