-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Symptom categories, such as those used to categorize viral load titers in datasets used for the duration of isolation guidance analysis, can be useful for sorting people and more readily assigning morbidity and mortality risk values. However, we shouldn't necessarily hard code category values without understanding underlying origin of those cateogries.
For example, symptoms do not all appear at once and people are not necessarily pre-destined to join particular symptom categories at earliest symptom onset. We also do not have a convenient data structure for accessing this detailed information.
A hyper-detailed alternative approach may be altering specific symptoms of an individual's symptom data and associating categories through a derived property defined for particular disease systems.
pub struct SymptomsPresenceData {
shortness_of_breath: bool,
coughing: bool,
fatigue: bool,
earliest_symptom_onset: f64,
}
pub enum SymptomCategoryValues {
Category1,
Category2,
Category3,
}
define_person_property_with_default!(Symptoms, Some(SymptomsPresenceData), None)
define_derived_property!(
SymptomCategory,
Some(SymptomCategoryValues),
[Symptoms],
|data| match data {
None => None,
Some(symptom_data) => {
if symptom_data.shortness_of_breath && symptom_data.coughing {
Some(SymptomCategoryValues::Category1)
} else if symptom_data.fatigue && !sympomt_data.coughing {
Some(SymptomCategoryValues::Category2)
} else {
Some(SymptomCategoryValues::Category3)
}
}
}
);