db_get_patients: Simple table specific reference function for the PATIENTS...

Description Usage Arguments Value See Also Examples

View source: R/table_data.R

Description

Note that some internal processing is performed to reflect general usage patterns for converting DATE and TIME fields to POSIXct date-time format.

Usage

1

Arguments

con

A DBIConnection object, as returned by DBI::dbConnect().

...

an optional where parameter with a character string representing a SQL WHERE clause.

Value

a tibble with the results.

See Also

For an overview of the MIMIC-III database, see: Overview of the MIMIC-III data. For details on the PATIENTS table, see: The patients table.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
con <- RSQLite::dbConnect(RSQLite::SQLite(), ":memory:")
ex <- tibble::tibble(SUBJECT_ID = c(10006, 10011),
                     DOB = c("2020-10-10", "2020-10-10"),
                     DOD = c("2020-10-10", "2020-10-10"),
                     DOD_HOSP = c("2020-10-10", "2020-10-10"),
                     DOD_SSN = c("2020-10-10", "2020-10-10"))
RSQLite::dbWriteTable(con, "PATIENTS", ex)

td <- db_get_patients(con, where = "WHERE SUBJECT_ID = 10006")

RSQLite::dbDisconnect(con)

hdshea/MIMIC3db documentation built on Dec. 20, 2021, 3:44 p.m.