View source: R/query_opcs_codes.R
| query_opcs_codes | R Documentation |
Title query_opcs_codes
query_opcs_codes(
hospital_events_tbl,
codes,
search_strat_date,
search_strat_adm_method = "all",
time_window,
return_vals
)
hospital_events_tbl |
table of hospital episodes and associated data |
codes |
A vector OPCS codes to search for e.g. c("K72") |
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 OPCS code "spell_interval" returns the spell interval in which the OPCS 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.