View source: R/get_hospital_admissions.R
get_hospital_admissions | R Documentation |
get_hospital_admissions
get_hospital_admissions(
sus_apc_obj,
codes_list = NA,
return_all_codes = FALSE,
search_strategy = "primary_diagnosis",
search_strat_adm_method = "all",
datetime_window = lubridate::interval(NA, NA, tzone = "GMT"),
id_list = NA,
ccg_provider_code_list = NA,
level = "spell",
verbose = FALSE
)
sus_apc_obj |
an R6 Database object connected to the APC_SUS database |
codes_list |
list of ICD-10 diagnosis codes or OPCS procedure codes to search for |
return_all_codes |
whether to return all the ICD-10 codes associated with the episode/spell, or just those in the 'codes_list' |
search_strategy |
whether to look in primary diagnosis field, secondary diagnosis field, all diagnosis fields, procedure fields |
search_strat_adm_method |
the admission method |
datetime_window |
the beginning and end of the date window (inclusive), must be a lubridate::interval object e.g. lubridate::interval(start, end, tzone = "GMT") |
id_list |
vector list of character pseudo NHS ids to filter on |
ccg_provider_code_list |
list of CCG provider codes, default = ALL |
level |
whether to extract consultant episode or spell level data |
verbose |
TRUE = print SQL query to console |
a data frame
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.