adheRenceRX (version 1.0.0)

propagate_date: Adjust Overlapping Fill Dates

Description

When assessing pharmaceutical adherence, one should adjust overlapping dates forward for a specified group (e.g. patient ids or medication classes) so that there is no overlap in days supply. For example, if a patient receives a 30 days supply on January 1st, and another 15 days later, the next fill date should be moved up 15 days. This function is modeled after recommendations from Canfield SL, Zuckerman A, Anguiano RH, Jolly JA, DeClercq J. Navigating the wild west of medication adherence reporting in specialty pharmacy. J Manag Care Spec Pharm. 2019;25(10):1073-77.

Usage

propagate_date(.data, .date_var = NULL, .days_supply_var = NULL)

Arguments

.data

Data to be piped into the function

.date_var

Date, column indicating the date of a given fill

.days_supply_var

Integer, column indicating the days supply of a given fill

Value

The initial claims data frame with an appended column, adjusted_date

Examples

Run this code
# NOT RUN {
library(adheRenceRX)
library(dplyr)

toy_claims %>% 
  filter(ID == "D") %>% 
  propagate_date(.date_var = date, .days_supply_var = days_supply)
# }

Run the code above in your browser using DataCamp Workspace