Description Usage Arguments Value Examples
Calculates the number of Prescribed Daily Doses (PDDs) dispensed based on individual patient instructions on how many tablets should be taken per day, and the number of tablets dispensed, and adds this as a new column to the data frame.
1 2 | calculate_pdd(df, drug, drug_id_col = "drug_id",
qty_disp_col = "qty_disp", qty_per_day_col = "qty_per_day")
|
df |
a data frame containing prescribing records to be analysed - records must contain at least a paitent ID, drug ID, a quantity dispensed and a quantity per day instruction |
drug |
a string containing a drug ID to be used to limit the prescribing data to the drug(s) of interest, accepts regular expressions |
drug_id_col |
a string, the name of the column in |
qty_disp_col |
a string, the name of the column in |
qty_per_day_col |
a string, the name of the column in |
a modified version of df
containing records for the drug of
interest with the dd_disp
field added
1 2 | calculate_pdd(synth_presc, drug = "ATORVASTATIN",
drug_id_col = "approved_name", qty_disp_col = "qty_dispensed")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.