Description Usage Arguments Value Examples
Classifies patients as exposed or unexposed based on whether they received two prescriptions for the drug of interest within a desired number of days of each other
1 2 3 |
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 |
timeframe |
a number representing the desired maximum gap between prescriptions |
return_all |
logical, if TRUE function returns data for all patient IDs with a flag indicating which patients did and did not meet the threshold for exposure |
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 the patient IDs and first two prescription dates for patients who meet the definition of exposure
1 2 3 | uat_gap(df = synth_presc, drug = "SIMVASTATIN", timeframe = 14,
patient_id_col = "patient_id", 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.