m4_chartevents: Access charted items occurring during the ICU stay

Description Usage Arguments Details Value Examples

View source: R/m4_icu.R

Description

This function provides base access to the chartevents table containing data representing all the charted data available for a patient. During their ICU stay, the primary repository of a patient’s information is their electronic chart. The electronic chart displays patients' routine vital signs and any additional information relevant to their care: ventilator settings, laboratory values, code status, mental status, and so on. As a result, the bulk of information about a patient’s stay is contained in chartevents.

Usage

1
m4_chartevents(con, cohort = NULL, itemlist = NULL, ...)

Arguments

con

A bigrquery::bigquery() DBIConnection object, as returned by DBI::dbConnect() with an appropriate bigrquery::bigquery() DBI driver specified in the call.

cohort

an optional vector of patient IDs defining the cohort of interest

itemlist

an optional vector of item IDs defining the event types of interest

...

additional optional passed along parameters.

Details

Table attributes for chartevents table:

(PKEY subject_id, hadm_id, stay_id)

(FKEY subject_id) -> patients table

(FKEY hadm_id) -> admissions table

(FKEY stay_id) -> icustays table

(FKEY itemid) -> d_items table, chartevents sub-table

Value

a tibble with the results.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# To run examples, you must have the BIGQUERY_TEST_PROJECT environment
# variable set to name of project which has billing set up and to which
# you have write access.
con <- bigrquery::dbConnect(
  bigrquery::bigquery(),
  project = bigrquery::bq_test_project(),
  quiet = TRUE
)

evt <- m4_chartevents(con, cohort = 12384098)
dim(evt)

bigrquery::dbDisconnect(con)

hdshea/MIMIC4db documentation built on Dec. 20, 2021, 3:45 p.m.