ICU
eds-scikit provides a function to tag care sites as being Intensive Care Units. It also provides a higher-level function to directly tag visits.
from eds_scikit.io import HiveData
data = HiveData(DBNAME)
Tagging care sites
Tagging is done using the tag_icu_care_site
function:
from eds_scikit.icu import tag_icu_care_site
Tag care sites that correspond to ICU units.
The tagging is done by adding a "IS_ICU"
column to the provided DataFrame.
PARAMETER | DESCRIPTION |
---|---|
care_site |
TYPE:
|
algo |
Possible values are:
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
care_site
|
Dataframe with 1 added column corresponding to the following concept:
TYPE:
|
Simply call the function by providing the necessary data (see below) and by picking the algo
care_site = tag_icu_care_site(
care_site=data.care_site,
algo="from_authorisation_type",
)
Availables algorithms (values for "algo"
)
This algo uses the care_site.place_of_service_source_value
columns
to retrieve Intensive Care Units.
The following values are used to tag a care site as ICU:
"REA PED"
"REA"
"REA ADULTE"
"REA NEONAT"
"USI"
"USI ADULTE"
"USI NEONAT"
"SC PED"
"SC"
"SC ADULTE"
PARAMETER | DESCRIPTION |
---|---|
care_site |
Should at least contains the
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
care_site
|
Dataframe with 1 added column corresponding to the following concepts:
TYPE:
|
Use regular expressions on care_site_name
to decide if it an ICU care site.
This relies on this function.
The regular expression used to detect ICU is
r"USI|REA[N\s]|REA|USC|SOINS.*INTENSIF|SURV.{0,15}CONT|SI|SC"
.
Keeping only 'UDS'
At AP-HP, all ICU are UDS (Unité De Soins). Therefore, this function filters care sites by default to only keep UDS.
PARAMETER | DESCRIPTION |
---|---|
care_site |
Should at least contains the
TYPE:
|
subset_care_site_type_source_value |
Acceptable values for
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
care_site
|
Dataframe with 1 added column corresponding to the following concept:
TYPE:
|
Tagging visits
Tagging is done using the tag_icu_visit
function:
from eds_scikit.icu import tag_icu_visit
Tag care_sites that correspond to ICU units.
The tagging is done by adding a "IS_ICU"
column to the provided DataFrame.
It works by tagging each visit detail's care site.
PARAMETER | DESCRIPTION |
---|---|
visit_detail |
TYPE:
|
care_site |
TYPE:
|
algo |
Possible values are:
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
visit_detail
|
Dataframe with 1 added column corresponding to the following concept:
TYPE:
|
Simply call the function by providing the necessary data (see below) and by picking the algo
visit_detail = tag_icu_visit(
visit_detail=data.visit_detail,
algo="from_mapping",
)
Availables algorithms (values for "algo"
)
Those are the same as tag_icu_care_site