View source: R/comorbidity-window.R
comorbidity_window | R Documentation |
comorbidity_window
returns a dataset of claims which fall within a specific timeframe.
comorbidity_window( dat = NULL, id_dat = NULL, id = NULL, id_date = NULL, claims_date = NULL, time_pre = Inf, time_post = Inf )
dat |
dataset |
id_dat |
dataset with our other identifying variables, this should be 1 row per person |
id |
ID variable which will be used to match and merge |
id_date |
name of the date of interest from the identification dataset, for example a date of diagnosis |
claims_date |
name for the variable in the claims data (dat) which is the date of the claim |
time_pre |
number to limit how many days, pre diagnosis, should be included. Default will be infinity (all claims) |
time_post |
similar to time_pre, but this will be after the date of interest |
This function takes prepared data, using the 'prepare_data' function, along with an identification dataset to limit the claims of interest to a specific time window.
dataframe with which has limited the claims to a specific window
comorbidity_window(id_dat = id, dat = prepared_data, id = patient_id, id_date = date_of_interest9, claims_date = claim_date, time_pre = 60)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.