verify_events: Verify CC-HIC Data

Description Usage Arguments Details Value Examples

View source: R/verify_events.R

Description

Applies all relevent varification flags to an extracted dataitem. This includes:

Usage

1
verify_events(x, los_table = NULL)

Arguments

x

extracted dataitem from extract

los_table

episode length table from characterise_episodes

Details

Other varification components are found elsewhere, as they don't necessarily fit into an evaludation at the data item level. I am contemplating how to unify this procedure.

Value

a tibble with verification applied

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## DB Connection
db_pth <- system.file("testdata/synthetic_db.sqlite3", package = "inspectEHR")
ctn <- connect(sqlite_file = db_pth)

## Pre-requisites
core <- make_core(ctn)
episode_length <- characterise_episodes(ctn)
ve <- verify_episodes(episode_length)

## Data item extraction
hr <- extract(core, input = "NIHR_HIC_ICU_0108")

## Full varification
vhr <- verify_events(hr, ve)
head(vhr)
DBI::dbDisconnect(ctn)

CC-HIC/inspectEHR documentation built on Jan. 16, 2020, 11:24 p.m.