Description Usage Arguments Value Examples
Function generates a breakdown of the number of prescriptions, and if requested daily doses dispensed, from prescriptions matching a chosen drug identifier over time - either broken down by month, quarter, semester or year.
1 2 3 | presc_by_time(df, drug = ".", flatten = FALSE, group = "Y",
drug_id_col = "drug_id", patient_id_col = "patient_id",
presc_date_col = "presc_date_x", dd_disp_col = NULL, date_format)
|
df |
a data frame containing prescribing records to be analysed - records must contain at least a drug identifier and a 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 |
flatten |
logical, if TRUE the function will only count one record/ prescription per patient per drug ID per date |
group |
a string corresponding to the desired grouping for results - either month ("M"), quarter ("Q"), semester ("S") or year ("Y") |
drug_id_col |
a string, the name of the column in |
patient_id_col |
a string, the name of the column in |
presc_date_col |
a string, the name of the column in |
dd_disp_col |
a string, the name of the column in |
date_format |
a string, the format of the dates in |
a data frame containing the selected time intervals and the corresponding number of prescriptions and patients with at least 1 prescription during the interval
1 2 3 | presc_by_time(synth_presc, drug = "SIMVASTATIN",
drug_id_col = "approved_name", presc_date_col = "presc_date",
dd_disp_col = "ddd_dispensed", date_format = "%Y-%m-%d")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.