Description Usage Arguments Value Examples
View source: R/verify_events.R
Varifies events as being within (0
), after (+1
) or
before (-1
) an associated episode. This isn't necessarily a problem,
for example, microbiology data coming back after death. However, it is
often demonstrative of a bigger problem. For example, data is sometimes
contributes from more than one episode, and then duplicated across episodes.
1 | verify_bounds(x = NULL, los_table = NULL, hours = 24)
|
x |
an extracted nhic event table |
los_table |
episode length table |
hours |
the number of hours you allow before and after an episode |
a tibble of the same length as x with the following features:
event is before the ICU episode
event is during the ICU episode
event is after the ICU episode
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## DB Connection
db_pth <- system.file("testdata/synthetic_db.sqlite3", package = "inspectEHR")
ctn <- connect(sqlite_file = db_pth)
## Pre-requisites
core <- make_core(ctn)
episodes <- characterise_episodes(ctn)
## Data item extraction
hr <- extract(core, input = "NIHR_HIC_ICU_0108")
## verify Boundary Conditions
vhr <- verify_bounds(hr, los_table = episodes)
head(vhr)
DBI::dbDisconnect(ctn)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.