Extracts NHIC events and appends them with the correct class for further processing. This is essentially the creator method for the S3 classes associated with the inspectEHR package

extract(core_table = NULL, input = NULL)

Arguments

core_table

core table from make_core

input

the input variable of choice

Value

A tibble with 1 row per event

Examples

db_pth <- system.file("testdata/synthetic_db.sqlite3", package = "inspectEHR") ctn <- connect(sqlite_file = db_pth) core <- make_core(ctn) extract(core, input = "NIHR_HIC_ICU_0073")
#> # A tibble: 1,000 x 5 #> event_id site code_name episode_id value #> <int> <chr> <chr> <int> <chr> #> 1 29582 B NIHR_HIC_ICU_0073 13626 8674351972 #> 2 29595 B NIHR_HIC_ICU_0073 13639 4295442348 #> 3 29596 B NIHR_HIC_ICU_0073 13640 3369135825 #> 4 29597 B NIHR_HIC_ICU_0073 13641 5222379698 #> 5 29598 B NIHR_HIC_ICU_0073 13642 4463215420 #> 6 29599 B NIHR_HIC_ICU_0073 13643 7366572217 #> 7 29600 B NIHR_HIC_ICU_0073 13644 2869432968 #> 8 29601 B NIHR_HIC_ICU_0073 13645 7961536515 #> 9 29602 B NIHR_HIC_ICU_0073 13646 1894163389 #> 10 29603 B NIHR_HIC_ICU_0073 13647 6386822293 #> # … with 990 more rows
DBI::dbDisconnect(ctn)