Description Usage Arguments Value Examples
Determines which patients have been exposed to the drug(s) of interest within a timeframe of interest. This function applies the same timeframe to all prescriptions - by default it considers all prescriptions before or after the date provided, but a number of days can be entered to give a more specific timeframe.
1 2 3 4 |
df |
a data frame containing prescribing records to be analysed - records must contain at least a patient ID, drug ID and prescription date |
drug |
a string containing a drug ID to be used to limit the prescribing data to the drug(s) of interest, accepts regular expressions |
date_1 |
a string containing a date to base the follow-up window on |
flatten |
logical, if TRUE the function will only count one record/ prescription per drug ID per date |
timeframe |
a number representing the length of the follow-up window. If
0 as by default any prescriptions before or after (depending on the value
of |
forward |
a logical, if TRUE the value of |
patient_id_col |
a string, the name of the column in |
drug_id_col |
a string, the name of the column in |
presc_date_col |
a string, the name of the column in |
date_format |
a string, the format of the dates in |
a data frame containing a list of patient IDs for patients who have at least one prescription matching the criteria, the number of prescriptions within the defined date window and the date of the first matching prescription
1 2 3 4 5 | uat_fixed(synth_presc, drug = "ATORVASTATIN", date_1 = "01/07/2020",
drug_id_col = "approved_name", presc_date_col = "presc_date", date_format = "%Y-%m-%d")
uat_fixed(synth_presc, drug = "SIMVASTATIN", date_1 = "01/01/2021", timeframe = 180,
forward = FALSE, drug_id_col = "approved_name", presc_date_col = "presc_date",
date_format = "%Y-%m-%d")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.