preRxData {medAdherence} | R Documentation |
preRxData
function prepares the data for medical adherence calculation.
preRxData(df=data,id=NULL,rxDate=NULL,daySupply=NULL,followUpDays=365)
df |
a dataframe. Patient id (id), prescription refill date (rxDate), days supply (DaySupply) are required variables |
id |
a variable to identify patients |
rxDate |
numeric variable name. Medication dispensation date |
daySupply |
numeric varable name. Prescription days' supply |
followUpDays |
a scalar. 365 days is the default, 12 month follow up |
Xiangyang Ye, Pharmacotherapy Outcomes Research Center, University of Utah
data(cmos) preRxData(df=cmos,id=ptid,rxDate=rxDay,daySupply=supplies)