eds_scikit.emergency.emergency_care_site
tag_emergency_care_site
tag_emergency_care_site(care_site: DataFrame, algo: str = 'from_mapping') -> DataFrame
Tag care sites that correspond to medical emergency units.
The tagging is done by adding a "IS_EMERGENCY"
column to the provided DataFrame.
Some algos can add an additional "EMERGENCY_TYPE"
column to the provided DataFrame,
providing a more detailled classification.
PARAMETER | DESCRIPTION |
---|---|
care_site |
TYPE:
|
algo |
Possible values are:
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
care_site
|
Dataframe with 1 to 2 added columns corresponding to the following concepts:
TYPE:
|
Source code in eds_scikit/emergency/emergency_care_site.py
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 57 58 59 |
|
from_mapping
from_mapping(care_site: DataFrame, version: Optional[str] = None) -> DataFrame
This algo uses a labelled list of 201 emergency care sites.
Those care sites were extracted and verified by Ariel COHEN, Judith LEBLANC, and an ER doctor validated them.
Those emergency care sites are further divised into different categories, as defined in the concept 'EMERGENCY_TYPE'. The different categories are:
- Urgences spécialisées
- UHCD + Post-urgences
- Urgences pédiatriques
- Urgences générales adulte
- Consultation urgences
- SAMU / SMUR
See the dataset here
PARAMETER | DESCRIPTION |
---|---|
care_site |
Should at least contains the
TYPE:
|
version |
Optional version string for the mapping
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
care_site
|
Dataframe with 2 added columns corresponding to the following concepts:
TYPE:
|
Source code in eds_scikit/emergency/emergency_care_site.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
|
from_regex_on_care_site_description
from_regex_on_care_site_description(care_site: DataFrame) -> DataFrame
Use regular expressions on care_site_name
to decide if it an emergency care site.
This relies on this function.
The regular expression used to detect emergency status is r"URG|SAU|UHCDb|ZHTCD"
PARAMETER | DESCRIPTION |
---|---|
care_site |
Should at least contains the
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
care_site
|
Dataframe with 1 added column corresponding to the following concept:
TYPE:
|
Source code in eds_scikit/emergency/emergency_care_site.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
|
from_regex_on_parent_UF
from_regex_on_parent_UF(care_site: DataFrame) -> DataFrame
Use regular expressions on parent UF (Unité Fonctionnelle) to classify emergency care site.
This relies on this function.
The regular expression used to detect emergency status is r"URG|SAU|UHCD|ZHTCD"
PARAMETER | DESCRIPTION |
---|---|
care_site |
Should at least contains the
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
care_site
|
Dataframe with 1 added column corresponding to the following concept:
TYPE:
|
Source code in eds_scikit/emergency/emergency_care_site.py
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
|