You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When combining databases (say MIMIC III and eICU), the names of the ID variables and the time variable depend on the order in which sources are passed to load_concepts. See the following reprex inspired by the quick start guide:
As you can see, although the information is exactly the same, the names depend on the order of src. This prevents me for example from simply appending two concepts from different databases:
bind_rows(
load_concepts("alb", "mimic_demo", verbose=FALSE),
load_concepts("alb", "eicu_demo", verbose=FALSE)
)
#> # A `ts_tbl`: 6,657 ✖ 5#> # Id var: `icustay_id`#> # Index var: `charttime` (1 hours)#> icustay_id charttime alb patientunitstayid labresultoffset#> <int> <drtn> <dbl> <int> <drtn>#> 1 NA NA hours 3.4 3352333 2 hours#> 2 NA NA hours 3.3 3352333 11 hours#> 3 NA NA hours 3.1 3352333 36 hours#> 4 NA NA hours 3.4 3353113 -36 hours#> 5 NA NA hours 3.6 3353113 10 hours#> …#> 6,653 201006 0 hours 2.4 NA NA hours#> 6,654 203766 -18 hours 2 NA NA hours#> 6,655 203766 4 hours 1.7 NA NA hours#> 6,656 204132 7 hours 3.6 NA NA hours#> 6,657 204201 9 hours 2.3 NA NA hours#> # … with 6,647 more rows
Question
Am I missing something obvious here and am I supposed to do something differently? I did find the helper function id_vars and index_var that can help me recover what the names are but this seems cumbersome and does not allow me to only merge on a specific ID level (e.g. admissions) without remembering what this colum was called in the first database I passed to load_concept.
What was the reasoning underlying this design choice and would it be more practical to rename them directly to patient, hadm, and icustay, as returned e.g. by as_id_cfg(mimic_demo)?
The text was updated successfully, but these errors were encountered:
Problem
When combining databases (say MIMIC III and eICU), the names of the ID variables and the time variable depend on the order in which sources are passed to
load_concepts
. See the following reprex inspired by the quick start guide:As you can see, although the information is exactly the same, the names depend on the order of
src
. This prevents me for example from simply appending two concepts from different databases:Question
Am I missing something obvious here and am I supposed to do something differently? I did find the helper function
id_vars
andindex_var
that can help me recover what the names are but this seems cumbersome and does not allow me to only merge on a specific ID level (e.g. admissions) without remembering what this colum was called in the first database I passed toload_concept
.What was the reasoning underlying this design choice and would it be more practical to rename them directly to patient, hadm, and icustay, as returned e.g. by
as_id_cfg(mimic_demo)
?The text was updated successfully, but these errors were encountered: