Description Usage Arguments Value Examples
View source: R/extract_demographics.R
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.
1 2 3 4 5 6  | extract_demographics(
  connection = NULL,
  episode_ids = NULL,
  code_names = NULL,
  rename = NULL
)
 | 
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
1 2 3 4 5 6  | db_pth <- system.file("testdata/synthetic_db.sqlite3", package = "inspectEHR")
ctn <- connect(sqlite_file = db_pth)
hic_codes <- "NIHR_HIC_ICU_0409"
new_labels <- "apache_score"
extract_demographics(ctn, episode_ids = 13639:13643, hic_codes, new_labels)
DBI::dbDisconnect(ctn)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.