Symptom tag
SymptomTag
Bases: IntEnum
A tag for the symptoms exhibited by a person.
Higher numbers are more severe.
Source code in june/epidemiology/infection/symptom_tag.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
|
from_string(string, dynamic_tags=None)
classmethod
Convert a string to a SymptomTag, checking both static and dynamic tags.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
string
|
str
|
The name of the symptom tag. |
required |
dynamic_tags
|
dict
|
A dictionary of dynamically loaded tags. (Default value = None) |
None
|
Returns:
Name | Type | Description |
---|---|---|
SymptomTag |
SymptomTag
|
|
Source code in june/epidemiology/infection/symptom_tag.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
|
load_from_yaml(yaml_path)
classmethod
Dynamically load symptom tags from a YAML file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
yaml_path
|
str
|
Path to the YAML file containing symptom tag definitions. |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
A dictionary mapping symptom tag names to their values. |
Source code in june/epidemiology/infection/symptom_tag.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|