View source: R/extract_demographics.R
| extract_demographics | R Documentation | 
Takes a remote database contection to CC-HIC, a vector of HIC codes (and optionally a vector of labels to rename the codes) and returns a table with 1 row per patient and 1 column per data item.
extract_demographics( connection = NULL, episode_ids = NA_integer_, code_names = NA_character_, rename = NA_character_ )
connection | 
 a CC-HIC database connection  | 
episode_ids | 
 an integer vector of episode ids from the CC-HIC DB that you want to extact. The default (NULL) is to extract all.  | 
code_names | 
 a character vector of CC-HIC codes  | 
rename | 
 a character vector of names you want to relabel CC-HIC codes as, or NULL (the default) if you do not want to relabel.  | 
A tibble of 1d data
hic_codes <- "NIHR_HIC_ICU_0409" new_labels <- "apache_score" con <- setup_dummy_db() dtb <- extract_demographics( connection = con, episode_ids = 1:10, code_names = hic_codes, rename = new_labels) head(dtb) DBI::dbDisconnect(con)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.