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 patient-specific event dates. By default it considers all prescriptions before or after the event date, but a number of days can be entered to give a more specific timeframe.
1 2 3 4 | uat_fixed_events(df, df2, drug, flatten = FALSE, timeframe = 0,
forward = TRUE, patient_id_col = "patient_id",
drug_id_col = "drug_id", presc_date_col = "presc_date_x",
ev_date_col = "ev_date_1", date_format)
|
df |
a data frame containing prescribing records to be analysed - records must contain at least a patient ID, drug ID, prescription date |
df2 |
a data frame containing event dates - must contain at least patient IDs and an event 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 |
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 |
ev_date_col |
a string, the name of the column in |
date_format |
a string, the format of the dates contained in |
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 | uat_fixed_events(df = synth_presc, df2 = synth_events, drug = "SIMVASTATIN", forward = TRUE,
drug_id_col = "approved_name", presc_date_col = "presc_date", ev_date_col = "event_1",
date_format = "%Y-%m-%d")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.