Some callbacks rely on additional arguments depending on the database. For example, eICU does not contain reliable fluid sampling so sepsis definitions may need to be based on antibiotics alone. susp_inf allows to specify the si_mode parameter to do so.
library(ricu)
so <- load_concepts("sofa", "eicu_demo", verbose = FALSE)
si <- load_concepts("susp_inf", "eicu_demo", si_mode = "abx", verbose = FALSE)
se <- sep3(sofa = so, susp_inf = si)
This will lead to a different result than the default sepsis-3 calculation:
se_std <- load_concepts("sep3", "eicu_demo", verbose = FALSE)
setequal(se, se_std)
#> [1] FALSE
Problem
Currently, the above cannot be loaded directly
se_std <- load_concepts("sep3", "eicu_demo", verbose = FALSE)
setequal(se, se_std)
#> Error in `assert_that()`:
#> ! setequal(x = names(dots), y = concepts) is not TRUE
The reason for this is twofold:
collect_dots currently only allows for concepts to be passed via ..., which leads to the above error when the sep3 callback is executed. I may be missing something here but to me this seems unnecessarily restrictive.
- Even if
collect_dots accepted other parameters, those parameters would not be be passed down to the lower-level concepts.
|
ext <- list(patient_ids = patient_ids, id_type = id_type, |
|
interval = coalesce(x[["interval"]], interval), |
|
progress = progress) |
(Potential) Solution
Change the behaviour of collect_dots and add ... to ext.
Some callbacks rely on additional arguments depending on the database. For example, eICU does not contain reliable fluid sampling so sepsis definitions may need to be based on antibiotics alone.
susp_infallows to specify thesi_modeparameter to do so.This will lead to a different result than the default sepsis-3 calculation:
Problem
Currently, the above cannot be loaded directly
The reason for this is twofold:
collect_dotscurrently only allows for concepts to be passed via..., which leads to the above error when thesep3callback is executed. I may be missing something here but to me this seems unnecessarily restrictive.collect_dotsaccepted other parameters, those parameters would not be be passed down to the lower-level concepts.ricu/R/concept-load.R
Lines 496 to 498 in 4a64d6b
(Potential) Solution
Change the behaviour of
collect_dotsand add...toext.