View source: R/query_icd10_codes.R
| query_icd10_codes | R Documentation |
Title query_icd10_codes
query_icd10_codes(
hospital_events_tbl,
codes,
search_strat_diag,
search_strat_date,
search_strat_adm_method = "all",
time_window,
return_vals
)
hospital_events_tbl |
table with hospital admissions data |
codes |
A vector ICD-10 codes to search for e.g. c("I210", "I219") |
search_strat_diag |
The diagnosis search strategy, one out of c("primary", "secondary", "all") |
search_strat_date |
The date search strategy; return the most recent date with "max", or the most historical date with "min" |
search_strat_adm_method |
the admission method to filter on, on of c(...) "exists" returns a boolean as to whether a code was found within the time window |
time_window |
The time window to search within - must be a lubridate::interval() object |
return_vals |
A switch on what is being returned. If nothing found then NA is returned. Can be a vector, in which case multiple colums returned "code" returns the ICD-10 code; this will return the first code in the input codes - so arrange the input codes by most important first "spell_interval" returns the spell interval in which the ICD-10 code was found |
Depends on the return_val parameter
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.