Skip to content

Commit

Permalink
bump to version 0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Drago Plecko authored and Drago Plecko committed Dec 29, 2023
1 parent 5f4291f commit b840813
Show file tree
Hide file tree
Showing 14 changed files with 94 additions and 219 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Description: Focused on (but not exclusive to) data sets hosted on PhysioNet
functions for running arbitrary queries against available data sets, a
system for defining clinical concepts and encoding their representations
in tabular ICU data is presented.
Version: 0.5.5
Version: 0.6.0
Authors@R: c(
person(given = "Nicolas",
family = "Bennett",
Expand All @@ -29,7 +29,7 @@ URL:
https://physionet.org
BugReports: https://github.com/eth-mds/ricu/issues
Depends:
R (>= 3.4.0)
R (>= 3.5.0)
Imports:
data.table,
curl,
Expand Down
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ S3method(id_win_helper,eicu_env)
S3method(id_win_helper,hirid_env)
S3method(id_win_helper,miiv_env)
S3method(id_win_helper,mimic_env)
S3method(id_win_helper,sic_env)
S3method(import_src,aumc_cfg)
S3method(import_src,character)
S3method(import_src,default)
Expand Down Expand Up @@ -185,6 +186,7 @@ S3method(load_difftime,eicu_tbl)
S3method(load_difftime,hirid_tbl)
S3method(load_difftime,miiv_tbl)
S3method(load_difftime,mimic_tbl)
S3method(load_difftime,sic_tbl)
S3method(load_id,character)
S3method(load_id,default)
S3method(load_id,fun_itm)
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# ricu 0.6.0

* Salzburg database (SICdb, `sic` in `ricu`) added as a data source with 64 concepts available
* MIMIC-IV (`miiv` in `ricu`) version bumped to 2.2
* fixed the usage of `round()` and `trunc()`; both replaced by `floor()` throughout

# ricu 0.5.5

* maintenance release: fixes an issue introduced by pillar 1.9.0 via an update
Expand Down
3 changes: 2 additions & 1 deletion R/callback-itm.R
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,8 @@ sic_dur <- function (x, val_var, stop_var, grp_var = NULL, ...) {
sic_rate_kg <- function (x, val_var, stop_var, env, ...) {

res <- add_weight(x, env, "weight")
res[, AmountPerMinute := AmountPerMinute * 10^6 / weight]
wgh_var <- "weight"
res[, c(val_var) := get(val_var) * 10^3 / get(wgh_var)]
expand(res, index_var(x), stop_var, keep_vars = c(id_vars(x), val_var))
}

Expand Down
14 changes: 12 additions & 2 deletions R/data-env.R
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@
#' is spread over 7 tables.
#'
#' @section MIMIC-IV:
#' With the recent v1.0 release of MIMIC-IV, experimental support has been
#' added in `ricu`. Building on the success of MIMIC-III, this next iteration
#' The latest v2.2 release of MIMIC-IV is available in added in `ricu`.
#' Building on the success of MIMIC-III, this next iteration
#' contains data on patients admitted to an ICU or the emergency department
#' between 2008 - 2019 at BIDMC. Therefore, relative to MIMIC-III, patients
#' admitted prior to 2008 (whose data is stored in a CareVue-based system) has
Expand All @@ -142,6 +142,12 @@
#' of the initial v1.0 release and currently is not supported by `ricu`. For
#' further information, please refer to the [MIMIC-III documentation
#' ](https://mimic.mit.edu/docs/iii/).
#'
#' @section SICdb:
#' The Salzburg ICU database (SICdb) originates from the University Hospital of
#' Salzburg. In `ricu`, version v1.0.6 is currently supported. For
#' further information, please refer to the [SICdb documentation
#' ](https://physionet.org/content/sicdb/1.0.6/).
#'
#' @format
#' The exported `data` environment contains all datasets that have been made
Expand Down Expand Up @@ -230,6 +236,10 @@ NULL
#' @rdname data_env
NULL

#' @name sic
#' @rdname data_env
NULL

data_env <- function() get("data", envir = pkg_env(), mode = "environment")

#' Data source environments
Expand Down
2 changes: 1 addition & 1 deletion R/data-load.R
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ load_difftime.sic_tbl <- function(x, rows, cols = colnames(x),
id_hint = id_vars(x),
time_vars = ricu::time_vars(x), ...) {

sec_as_mins <- function(x) ricu:::min_as_mins(as.integer(x / 60))
sec_as_mins <- function(x) min_as_mins(as.integer(x / 60))
warn_dots(...)
load_eiau(x, {{ rows }}, cols, id_hint, time_vars, sec_as_mins)
}
Expand Down
2 changes: 1 addition & 1 deletion R/data-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ id_win_helper.eicu_env <- function(x) {
#' @export
id_win_helper.sic_env <- function(x) {

sec_as_mins <- function(x) ricu:::min_as_mins(as.integer(x / 60))
sec_as_mins <- function(x) min_as_mins(as.integer(x / 60))

cfg <- sort(as_id_cfg(x), decreasing = TRUE)

Expand Down
3 changes: 2 additions & 1 deletion inst/extdata/config/concept-dict.R
Original file line number Diff line number Diff line change
Expand Up @@ -2659,7 +2659,8 @@ cfg <- list(
list(ids = 226512L, table = "chartevents", sub_var = "itemid")
),
sic = list(
list(table = "cases", val_var = "WeightOnAdmission", class = "col_itm")
list(table = "cases", val_var = "WeightOnAdmission", class = "col_itm",
callback = "transform_fun(binary_op(`/`, 1000))")
)
)
),
Expand Down
3 changes: 2 additions & 1 deletion inst/extdata/config/concept-dict.json
Original file line number Diff line number Diff line change
Expand Up @@ -6582,7 +6582,8 @@
{
"table": "cases",
"val_var": "WeightOnAdmission",
"class": "col_itm"
"class": "col_itm",
"callback": "transform_fun(binary_op(`/`, 1000))"
}
]
}
Expand Down
58 changes: 22 additions & 36 deletions man/change_id.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

111 changes: 39 additions & 72 deletions man/data_env.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified man/figures/sofa-sep-3-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b840813

Please sign in to comment.