Description Usage Arguments Value Examples
Classifies patients as current or past users of the drug(s) of interest at an event date based on a user-defined time window, and calculates the number of prescriptions that fall within and outwith the recent use window.
1 2 3 | uat_recent(df, df2, drug, timeframe, 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 prescription records to be analysed; records must contain at least a patient ID, drug ID and prescription date |
df2 |
a data frame containing medical event data to be analysed; records must contain at least a patient ID and event date, maximum 1 event per patient |
drug |
a string containing a drug ID to be used to limit the prescribing data to the drug(s) of interest, accepts regular expressions |
timeframe |
a number, subtracted from the event date to define the start of the rexcent use period |
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 |
a data frame containing patient IDs, the number of prescriptions in each period and the use classification at the event date
1 2 3 | uat_recent(df = synth_presc, df2 = synth_events, drug = "OMEPRAZOLE", timeframe = 30,
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.