From b8408130d0415808d309258c09303b95104e1cf3 Mon Sep 17 00:00:00 2001 From: Drago Plecko Date: Fri, 29 Dec 2023 18:12:08 +0100 Subject: [PATCH] bump to version 0.6.0 --- DESCRIPTION | 4 +- NAMESPACE | 2 + NEWS.md | 6 ++ R/callback-itm.R | 3 +- R/data-env.R | 14 +++- R/data-load.R | 2 +- R/data-utils.R | 2 +- inst/extdata/config/concept-dict.R | 3 +- inst/extdata/config/concept-dict.json | 3 +- man/change_id.Rd | 58 +++++--------- man/data_env.Rd | 111 +++++++++----------------- man/figures/sofa-sep-3-1.png | Bin 39727 -> 39711 bytes man/label_sep3.Rd | 85 +------------------- tests/testthat/_snaps/utils-cli.md | 20 +---- 14 files changed, 94 insertions(+), 219 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 3aded6ab..c04c3c3e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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", @@ -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, diff --git a/NAMESPACE b/NAMESPACE index 15748ab3..56fc753b 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -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) @@ -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) diff --git a/NEWS.md b/NEWS.md index 7532d584..413ecd9b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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 diff --git a/R/callback-itm.R b/R/callback-itm.R index f88a90ba..19bcbcd1 100644 --- a/R/callback-itm.R +++ b/R/callback-itm.R @@ -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)) } diff --git a/R/data-env.R b/R/data-env.R index cc16b4d8..984360f1 100644 --- a/R/data-env.R +++ b/R/data-env.R @@ -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 @@ -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 @@ -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 diff --git a/R/data-load.R b/R/data-load.R index 92869582..3f1530d9 100644 --- a/R/data-load.R +++ b/R/data-load.R @@ -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) } diff --git a/R/data-utils.R b/R/data-utils.R index f3767558..9b3d23ee 100644 --- a/R/data-utils.R +++ b/R/data-utils.R @@ -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) diff --git a/inst/extdata/config/concept-dict.R b/inst/extdata/config/concept-dict.R index f0526c79..5a51be41 100644 --- a/inst/extdata/config/concept-dict.R +++ b/inst/extdata/config/concept-dict.R @@ -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))") ) ) ), diff --git a/inst/extdata/config/concept-dict.json b/inst/extdata/config/concept-dict.json index 43a41e50..09084942 100644 --- a/inst/extdata/config/concept-dict.json +++ b/inst/extdata/config/concept-dict.json @@ -6582,7 +6582,8 @@ { "table": "cases", "val_var": "WeightOnAdmission", - "class": "col_itm" + "class": "col_itm", + "callback": "transform_fun(binary_op(`/`, 1000))" } ] } diff --git a/man/change_id.Rd b/man/change_id.Rd index 561869a9..6193adf5 100644 --- a/man/change_id.Rd +++ b/man/change_id.Rd @@ -57,34 +57,19 @@ and \code{downgrade_id()} when the target ID system is of lower cardinality } \details{ In order to provide ID system conversion for a data source, the (internal) -function \code{\link[=id_map]{id_map()}} must be able to construct an ID mapping for that data +function [id_map()] must be able to construct an ID mapping for that data source. Constructing such a mapping can be expensive w.r.t. the frequency -it might be re-used and therefore, \code{\link[=id_map]{id_map()}} provides caching +it might be re-used and therefore, [id_map()] provides caching infrastructure. The mapping itself is constructed by the (internal) -function \code{\link[=id_map_helper]{id_map_helper()}}, which is expected to provide source and +function [id_map_helper()], which is expected to provide source and destination ID columns as well as start and end columns corresponding to the destination ID, relative to the source ID system. In the following -example, we request for \code{mimic_demo}, with ICU stay IDs as source and +example, we request for `mimic_demo`, with ICU stay IDs as source and hospital admissions as destination IDs. -\if{html}{\out{
}}\preformatted{id_map_helper(mimic_demo, "icustay_id", "hadm_id") -#> # An `id_tbl`: 136 x 4 -#> # Id var: `icustay_id` -#> icustay_id hadm_id hadm_id_start hadm_id_end -#> -#> 1 201006 198503 -3291 mins 9113 mins -#> 2 201204 114648 -2 mins 6949 mins -#> 3 203766 126949 -1336 mins 8818 mins -#> 4 204132 157609 -1 mins 10103 mins -#> 5 204201 177678 -369 mins 9444 mins -#> ... -#> 132 295043 170883 -10413 mins 31258 mins -#> 133 295741 176805 -2 mins 3152 mins -#> 134 296804 110244 -1295 mins 4598 mins -#> 135 297782 167612 -1 mins 207 mins -#> 136 298685 151323 -1 mins 19082 mins -#> # i 131 more rows -}\if{html}{\out{
}} +```{r, eval = is_data_avail("mimic_demo")} +id_map_helper(mimic_demo, "icustay_id", "hadm_id") +``` Both start and end columns encode the hospital admission windows relative to each corresponding ICU stay start time. It therefore comes as no @@ -93,21 +78,22 @@ occurs before ICU stay start time), while end times are often days in the future (as hospital discharge typically occurs several days after ICU admission). -In order to use the ID conversion infrastructure offered by \code{ricu} for a -new dataset, it typically suffices to provide an \code{id_cfg} entry in the -source configuration (see \code{\link[=load_src_cfg]{load_src_cfg()}}), outlining the available ID +In order to use the ID conversion infrastructure offered by `ricu` for a +new dataset, it typically suffices to provide an `id_cfg` entry in the +source configuration (see [load_src_cfg()]), outlining the available ID systems alongside an ordering, as well as potentially a class specific -implementation of \code{\link[=id_map_helper]{id_map_helper()}} for the given source class, specifying +implementation of [id_map_helper()] for the given source class, specifying the corresponding time windows in 1 minute resolution (for every possible pair of IDs). -While both up- and downgrades for \code{id_tbl} objects, as well as downgrades -for \code{ts_tbl} objects are simple merge operations based on the ID mapping -provided by \code{\link[=id_map]{id_map()}}, ID upgrades for \code{ts_tbl} objects are slightly more -involved. As an example, consider the following setting: we have \code{data} -associated with \code{hadm_id} IDs and times relative to hospital admission: +While both up- and downgrades for `id_tbl` objects, as well as downgrades +for `ts_tbl` objects are simple merge operations based on the ID mapping +provided by [id_map()], ID upgrades for `ts_tbl` objects are slightly more +involved. As an example, consider the following setting: we have `data` +associated with `hadm_id` IDs and times relative to hospital admission: -\if{html}{\out{
}}\preformatted{ 1 2 3 4 5 6 7 8 +``` + 1 2 3 4 5 6 7 8 data ---*------*-------*--------*-------*-------*--------*------*--- 3h 10h 18h 27h 35h 43h 52h 59h @@ -117,17 +103,17 @@ hadm_id |-------------------------------------------------------------| icustay_id |------------------| |---------------| 0h 19h 0h 16h ICU_1 ICU_2 -}\if{html}{\out{
}} +``` -The mapping of data points from \code{hadm_id} to \code{icustay_id} is created as +The mapping of data points from `hadm_id` to `icustay_id` is created as follows: ICU stay end times mark boundaries and all data that is recorded after the last ICU stay ended is assigned to the last ICU stay. Therefore -data points 1-3 are assigned to \code{ICU_1}, while 4-8 are assigned to \code{ICU_2}. +data points 1-3 are assigned to `ICU_1`, while 4-8 are assigned to `ICU_2`. Times have to be shifted as well, as timestamps are expected to be relative to the current ID system. Data points 1-3 therefore are assigned to time stamps -4h, 3h and 11h, while data points 4-8 are assigned to -10h, -2h, 6h, 15h and 22h. Implementation-wise, the mapping is computed using an -efficient \code{data.table} rolling join. +efficient `data.table` rolling join. } \examples{ if (require(mimic.demo)) { diff --git a/man/data_env.Rd b/man/data_env.Rd index 0fd9d2a0..1e4e4430 100644 --- a/man/data_env.Rd +++ b/man/data_env.Rd @@ -11,6 +11,7 @@ \alias{hirid} \alias{aumc} \alias{miiv} +\alias{sic} \title{ICU datasets} \format{ The exported \code{data} environment contains all datasets that have been made @@ -42,98 +43,57 @@ hosted data source is available as well. As with the PhysioNet datasets, access is public but has to be granted by the data collectors. } \details{ -Setting up a dataset for use with \code{ricu} requires a configuration object. +Setting up a dataset for use with `ricu` requires a configuration object. For the included datasets, configuration can be loaded from -\if{html}{\out{
}}\preformatted{system.file("extdata", "config", "data-sources.json", package = "ricu") -}\if{html}{\out{
}} +``` +system.file("extdata", "config", "data-sources.json", package = "ricu") +``` -by calling \code{\link[=load_src_cfg]{load_src_cfg()}} and for dataset that are external to \code{ricu}, +by calling [load_src_cfg()] and for dataset that are external to `ricu`, additional configuration can be made available by setting the environment -variable \code{RICU_CONFIG_PATH} (for more information, refer to -\code{\link[=load_src_cfg]{load_src_cfg()}}). Using the dataset configuration object, data can be -downloaded (\code{\link[=download_src]{download_src()}}), imported (\code{\link[=import_src]{import_src()}}) and attached -(\code{\link[=attach_src]{attach_src()}}). While downloading and importing are one-time procedures, +variable `RICU_CONFIG_PATH` (for more information, refer to +[load_src_cfg()]). Using the dataset configuration object, data can be +downloaded ([download_src()]), imported ([import_src()]) and attached +([attach_src()]). While downloading and importing are one-time procedures, attaching of the dataset is repeated every time the package is loaded. Briefly, downloading loads the raw dataset from the internet (most likely -in \code{.csv} format), importing consists of some preprocessing to make the -data available more efficiently (by converting it to \code{\link[fst:fst]{.fst}} +in `.csv` format), importing consists of some preprocessing to make the +data available more efficiently (by converting it to [`.fst`][fst::fst()] format) and attaching sets up the data for use by the package. For more information on the individual steps, refer to the respective documentation pages. A dataset that has been successfully made available can interactively be explored by typing its name into the console and individual tables can be -inspected using the \code{$} function. For example for the MIMIC-III demo -dataset and the \code{icustays} table, this gives - -\if{html}{\out{
}}\preformatted{mimic_demo -#> -#> admissions callout caregivers chartevents -#> [129 x 19] [77 x 24] [7,567 x 4] [758,355 x 15] -#> cptevents d_cpt d_icd_diagnoses d_icd_procedures -#> [1,579 x 12] [134 x 9] [14,567 x 4] [3,882 x 4] -#> d_items d_labitems datetimeevents diagnoses_icd -#> [12,487 x 10] [753 x 6] [15,551 x 14] [1,761 x 5] -#> drgcodes icustays inputevents_cv inputevents_mv -#> [297 x 8] [136 x 12] [34,799 x 22] [13,224 x 31] -#> labevents microbiologyevents outputevents patients -#> [76,074 x 9] [2,003 x 16] [11,320 x 13] [100 x 8] -#> prescriptions procedureevents_mv procedures_icd services -#> [10,398 x 19] [753 x 25] [506 x 5] [163 x 6] -#> transfers -#> [524 x 13] +inspected using the `$` function. For example for the MIMIC-III demo +dataset and the `icustays` table, this gives + +```{r, eval = is_data_avail("mimic_demo")} +mimic_demo mimic_demo$icustays -#> # : [136 x 12] -#> # ID options: subject_id (patient) < hadm_id (hadm) < icustay_id (icustay) -#> # Defaults: `intime` (index), `last_careunit` (val) -#> # Time vars: `intime`, `outtime` -#> row_id subject_id hadm_id icustay_id dbsource first_careunit last_careunit -#> -#> 1 12742 10006 142345 206504 carevue MICU MICU -#> 2 12747 10011 105331 232110 carevue MICU MICU -#> 3 12749 10013 165520 264446 carevue MICU MICU -#> 4 12754 10017 199207 204881 carevue CCU CCU -#> 5 12755 10019 177759 228977 carevue MICU MICU -#> ... -#> 132 42676 44083 198330 286428 metavision CCU CCU -#> 133 42691 44154 174245 217724 metavision MICU MICU -#> 134 42709 44212 163189 239396 metavision MICU MICU -#> 135 42712 44222 192189 238186 metavision CCU CCU -#> 136 42714 44228 103379 217992 metavision SICU SICU -#> # i 131 more rows -#> # i 5 more variables: first_wardid , last_wardid , intime , -#> # outtime , los -}\if{html}{\out{
}} +``` Table subsets can be loaded into memory for example using the -\code{\link[base:subset]{base::subset()}} function, which uses non-standard evaluation (NSE) to +[base::subset()] function, which uses non-standard evaluation (NSE) to determine a row-subsetting. This design choice stems form the fact that some tables can have on the order of 10^8 rows, which makes loading full tables into memory an expensive operation. Table subsets loaded into -memory are represented as \code{\link[data.table:data.table]{data.table}} objects. +memory are represented as [`data.table`][data.table::data.table()] objects. Extending the above example, if only ICU stays corresponding to the patient -with \code{subject_id == 10124} are of interest, the respective data can be +with `subject_id == 10124` are of interest, the respective data can be loaded as -\if{html}{\out{
}}\preformatted{subset(mimic_demo$icustays, subject_id == 10124) -#> row_id subject_id hadm_id icustay_id dbsource first_careunit last_careunit -#> 1: 12863 10124 182664 261764 carevue MICU MICU -#> 2: 12864 10124 170883 222779 carevue MICU MICU -#> 3: 12865 10124 170883 295043 carevue CCU CCU -#> 4: 12866 10124 170883 237528 carevue MICU MICU -#> first_wardid last_wardid intime outtime los -#> 1: 23 23 2192-03-29 10:46:51 2192-04-01 06:36:00 2.8258 -#> 2: 50 50 2192-04-16 20:58:32 2192-04-20 08:51:28 3.4951 -#> 3: 7 7 2192-04-24 02:29:49 2192-04-26 23:59:45 2.8958 -#> 4: 23 23 2192-04-30 14:50:44 2192-05-15 23:34:21 15.3636 -}\if{html}{\out{
}} - -Much care has been taken to make \code{ricu} extensible to new datasets. For -example the publicly available ICU database \href{https://amsterdammedicaldatascience.nl/amsterdamumcdb/}{AmsterdamUMCdb } +```{r, eval = is_data_avail("mimic_demo")} +subset(mimic_demo$icustays, subject_id == 10124) +``` + +Much care has been taken to make `ricu` extensible to new datasets. For +example the publicly available ICU database [AmsterdamUMCdb +](https://amsterdammedicaldatascience.nl/amsterdamumcdb/) provided by the Amsterdam University Medical Center, currently is not part -of the core datasets of \code{ricu}, but code for integrating this dataset is -available on \href{https://github.com/eth-mds/aumc}{github}. +of the core datasets of `ricu`, but code for integrating this dataset is +available on [github](https://github.com/eth-mds/aumc). } \section{MIMIC-III}{ @@ -199,8 +159,8 @@ is spread over 7 tables. \section{MIMIC-IV}{ -With the recent v1.0 release of MIMIC-IV, experimental support has been -added in \code{ricu}. Building on the success of MIMIC-III, this next iteration +The latest v2.2 release of MIMIC-IV is available in added in \code{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 @@ -211,6 +171,13 @@ of the initial v1.0 release and currently is not supported by \code{ricu}. For further information, please refer to the \href{https://mimic.mit.edu/docs/iii/}{MIMIC-III documentation }. } +\section{SICdb}{ + +The Salzburg ICU database (SICdb) originates from the University Hospital of +Salzburg. In \code{ricu}, version v1.0.6 is currently supported. For +further information, please refer to the \href{https://physionet.org/content/sicdb/1.0.6/}{SICdb documentation }. +} + \references{ Johnson, A., Pollard, T., & Mark, R. (2016). MIMIC-III Clinical Database (version 1.4). PhysioNet. https://doi.org/10.13026/C2XW26. diff --git a/man/figures/sofa-sep-3-1.png b/man/figures/sofa-sep-3-1.png index 096d3021c322c18366fdfea03ad7a83d25126239..c154b29761e48edc0075fd602aa7c5b7e6fdb05d 100644 GIT binary patch delta 12 UcmZ3#jcNWirU@z=O@7Y;0409~?EnA( delta 26 icmbQgjcNThrU@#%Ea{HEjtmSN`?>!lvTjuTHwyrL;tA0J diff --git a/man/label_sep3.Rd b/man/label_sep3.Rd index e9ac7d43..9fd07593 100644 --- a/man/label_sep3.Rd +++ b/man/label_sep3.Rd @@ -55,90 +55,7 @@ increase in SOFA score. The Sepsis-3 Consensus (Singer et. al.) defines sepsis as an acute increase in the SOFA score (see \code{\link[=sofa_score]{sofa_score()}}) of 2 points or more within the suspected infection (SI) window (see \code{\link[=susp_inf]{susp_inf()}}): - -\if{html}{\out{
}}\preformatted{#| sofa-sep-3, -#| echo = FALSE, -#| engine.opts = list( -#| extra.preamble = c( -#| "\\\\usepackage\{pgfplots\}", "\\\\pgfplotsset\{compat=newest\}" -#| ) -#| ) - -\\begin\{tikzpicture\} - - \\draw (-5.5, 0) -- (3.5, 0); - \\draw (-5.5, -0.2) -- (-5.5, 0.2); - \\draw (3.5, -0.2) -- (3.5, 0.2); - \\draw (0.5, -0.2) -- (0.5, 0.2); - - \\node[align = center] at (0.5, 0.5) \{SI time\}; - \\node[align = center] at (3.5, 0.5) \{SI window end\}; - \\node[align = center] at (-5.5, -0.5) \{SI window start\}; - - \\draw (-1.5, -0.2) -- (-1.5, 0.2); - \\draw[dashed] (-1.5, 2) -- (-1.5, 0); - \\node[align = center] at (-1.5, -0.5) \{Sepsis-3 time\}; - - \\node[align = center] at (-2.75, 0.5) \{-48 hours\}; - \\node[align = center] at (2, -0.5) \{24 hours\}; - - \\draw[dashed] (0.5, 0) -- (0.5, -1); - - \\draw (0.5, -1) -- (3.5, -1); - \\draw (3.5, -1.2) -- (3.5, -0.8); - \\draw (0.5, -1.2) -- (0.5, -0.8); - - \\node at (5.25, -1) \{within 24 hours\}; - - \\node[align = center] at (0.5, -1.5) \{ABX\}; - \\node[align = center] at (3.5, -1.5) \{Sampling\}; - - \\draw (0.5, -2) -- (9.5, -2); - \\draw (9.5, -2.2) -- (9.5, -1.8); - \\draw (0.5, -2.2) -- (0.5, -1.8); - - \\node[align = center] at (5.25, -2.5) \{within 72 hours\}; - - \\node[align = center] at (0.5, -2.5) \{Sampling\}; - \\node[align = center] at (9.5, -2.5) \{ABX\}; - - \\draw [decorate, decoration = \{brace, mirror, amplitude=5pt, raise=4pt\}, - yshift=0pt] (0, -0.9) -- (0, -2.1); - \\node at (-3, -1.5) \{Either option is permissible\}; - - \\filldraw (-6, 1.5) circle (1pt); - \\draw (-6, 1.5) -- (-5.5, 1.5); - \\filldraw (-5.5, 1.5) circle (1pt); - \\draw (-5.5, 1.5) -- (-5, 1); - \\filldraw (-5, 1) circle (1pt); - \\draw (-5, 1) -- (-4.5, 1); - \\filldraw (-4.5, 1) circle (1pt); - \\draw (-4.5, 1) -- (-4, 1); - \\filldraw (-4, 1) circle (1pt); - \\draw (-4, 1) -- (-3.5, 1); - \\filldraw (-3.5, 1) circle (1pt); - \\draw (-3.5, 1) -- (-3, 1.5); - \\filldraw (-3, 1.5) circle (1pt); - \\draw (-3, 1.5) -- (-2.5, 1.5); - \\filldraw (-2.5, 1.5) circle (1pt); - \\draw (-2.5, 1.5) -- (-2, 1.5); - \\filldraw (-2, 1.5) circle (1pt); - \\draw (-2, 1.5) -- (-1.5, 2.0); - \\filldraw (-1.5, 2.0) circle (1pt); - - \\draw [decorate, decoration = \{brace, amplitude=5pt, mirror, raise=4pt\}, - yshift=0pt] (-1.25, 1) -- (-1.25, 2); - \\node [black] at (0.25, 1.5) \{$\\Delta$SOFA $\\geq 2$\}; - - \\draw (-6.5, 1) -- (-6.5, 2.5); - \\node at (-6.5, 3) \{SOFA\}; - \\draw (-6.5, 1) -- (-6.6, 1) node[left]\{0\}; - \\draw (-6.5, 1.5) -- (-6.6, 1.5) node[left]\{1\}; - \\draw (-6.5, 2) -- (-6.6, 2) node[left]\{2\}; - \\draw (-6.5, 2.5) -- (-6.6, 2.5) node[left]\{3\}; - -\\end\{tikzpicture\} -}\if{html}{\out{
}} +\figure{sofa-sep-3-1.png} A patient can potentially have multiple SI windows. The argument \code{si_window} is used to control which SI window we focus on (options are diff --git a/tests/testthat/_snaps/utils-cli.md b/tests/testthat/_snaps/utils-cli.md index e446e7e4..7f61daf9 100644 --- a/tests/testthat/_snaps/utils-cli.md +++ b/tests/testthat/_snaps/utils-cli.md @@ -2,30 +2,22 @@ Code with_progress(do_stuff(pb), pb) - Message + Message * a - Message ( ) hello from index 1 ( ) hello from index 2 ( ) hello from index 3 - Message * abcd abcd abcd abcd - Message ( ) hello from index 4 ( ) hello from index 5 ( ) hello from index 6 - Message * abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg - Message ( ) hello from index 7 ( ) hello from index 8 ( ) hello from index 9 - Message * abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij - Message ( ) hello from index 10 - Message -------------------------------------------------------------------------------- Output NULL @@ -34,30 +26,22 @@ Code with_progress(do_stuff(pb), pb) - Message + Message * a - Message ( ) hello from index 1 ( ) hello from index 2 ( ) hello from index 3 - Message * abcd abcd abcd abcd - Message ( ) hello from index 4 ( ) hello from index 5 ( ) hello from index 6 - Message * abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg - Message ( ) hello from index 7 ( ) hello from index 8 ( ) hello from index 9 - Message * abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij - Message ( ) hello from index 10 - Message -------------------------------------------------------------------------------- Output NULL