Description Usage Arguments Value Examples
Determines which patients have been exposed to the drug(s) of interest within a timeframe of interest. This function determines exposure by checking for prescription dates between two patient-specific event dates.
1 2 3 4 | uat_var_events(df, df2, drug, flatten = FALSE,
patient_id_col = "patient_id", drug_id_col = "drug_id",
presc_date_col = "presc_date_x", ev_date_1_col = "ev_date_1",
ev_date_2_col = "ev_date_2", 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 data to be analysed, records must
contain at least two event dates ( |
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 |
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_1_col |
a string, the name of the column in |
ev_date_2_col |
a string, the name of the column in |
date_format |
a string, the format of the dates contained 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 | uat_var_events(synth_presc, df2 = synth_events, drug = "ATORVASTATIN",
drug_id_col = "approved_name", presc_date_col = "presc_date",
ev_date_1_col = "event_1", ev_date_2_col = "event_2")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.