Description Usage Arguments Value Examples
This function determines periods of persistent use of the drug of interest based on the gaps between prescriptions, taking into account the coverage of those prescriptions. Prescription duration is defined based on the number of daily doses dispensed, and there is the option to carry stockpiled medications from one prescription over to the next . Gaps which exceed the selected allowable gap length result in discontinuation points, and the function returns patient ID's and periods of exposure that are over the selected minimum length.
1 2 3 4 | refill_gap_dd(df, drug, gap, dd_factor = 1, threshold = 0,
stockpile = FALSE, summary = FALSE, patient_id_col = "patient_id",
drug_id_col = "drug_id", presc_date_col = "presc_date_x",
dd_disp_col = "dd_disp", date_format)
|
df |
a data frame containing prescribing records to be analysed - records must contain at least a paitent ID, drug ID, a prescription date and a number of daily doses dispensed |
drug |
a string containing a drug ID to be used to limit the prescribing data to the drug(s) of interest, accepts regular expressions |
gap |
a number, the length of the allowable gap in days between two prescriptions before the patient is considered to have discontinued use of the drug |
dd_factor |
a number, a multiplication factor applied to the dd_disp field to calculate prescription duration - used, for example, if using an assumption of 0.5 DDDs per day |
threshold |
a number, the minimum length of period of exposure, in days, to be included in the results |
stockpile |
a logical, if TRUE the function will carry over leftover medication from one prescription period to the next when determining duration |
summary |
a logical, if TRUE the function will return a summary of all exposure periods instead of the individual periods |
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 |
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 patient IDs and corresponding periods of exposure (consisting of first and last prescriptions, number of prescriptions and lengths of exposure) which match the chosen refill gap and minimum length
1 2 3 4 | ## Not run: refill_gap_dd(synth_presc, drug = "SIMVASTATIN", gap = 30, stockpile = TRUE,
drug_id_col = "approved_name", presc_date_col = "presc_date",
dd_disp_col = "ddd_dispensed", date_format = "%d/%m/%Y")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.