Description Usage Arguments Value Examples
View source: R/verify_events.R
Varifies events as being duplicated (+1
) or not. This is primarily
trained on the datetime of an object (if 2d), and looks for two events that
are perfectly co-incident. This assumptions can be relaxed with
exact = FALSE
which looks to see if there are any duplicates in
value for the preceeding/following 12 hours. This is pointless for dataitems
like heart rate, but is useful so dataitems like creatinine, where we have
seen this type of duplication error. 1d events are checked for raw
duplication, since they should only occur once per episode anyway.
1 | verify_duplicate(x, exact = TRUE)
|
x |
an extracted event table |
exact |
TRUE/FALSE |
a tibble of the same length as x with the following features:
value is a suspected/confirmed duplicate
event is unique
Note, when 2 values are deems to be duplicates, the one that first appears in the database is cleared as verified, while the second is not.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## DB Connection
db_pth <- system.file("testdata/synthetic_db.sqlite3", package = "inspectEHR")
ctn <- connect(sqlite_file = db_pth)
## Pre-requisites
core <- make_core(ctn)
## Data item extraction
hr <- extract(core, input = "NIHR_HIC_ICU_0108")
## verify Range
vhr <- verify_duplicate(hr)
head(vhr)
DBI::dbDisconnect(ctn)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.