getDispensingPlot: Get specific medication history dispensing plot

View source: R/getDispensingPlot.R

getDispensingPlotR Documentation

Get specific medication history dispensing plot

Description

This function provides user to select specific patient to visualize their medication history in a custom interval period or specific date.

Usage

getDispensingPlot(
  df,
  MemberIDColName = MemberID,
  Member,
  DrugColName = NationalDrugCode,
  DispenseDateColName = Dispensing,
  DaysSupplyColName = DaysSupply,
  TimeInterval = 1,
  Unit = month
)

Arguments

df

data.frame, include dispensed info

MemberIDColName

a column name for member id of df

Member

a column name for the member name of plot

DrugColName

a column name for drug name of df

DispenseDateColName

a column name for dispensed date of df

DaysSupplyColName

a column name for day supplied of df

TimeInterval

a column name for time interval of df

Unit

a column name for time unit of df

Details

In addition to visualize the results of the drug era for all patients in the data, user can also select a single patient to see the medication history of the patient's specific drug, and mark the length of each medication record and the time interval between each medication record.

Examples

#sample of getting dispensing plot.
getDispensingPlot(df = sample_data_subset, MemberIDColName = MemberId,DrugColName = NationalDrugCode,DispenseDateColName = Dispensing,Member = 42, TimeInterval = 20, Unit = day)

DHLab-CGU/pharm documentation built on July 2, 2022, 7:16 a.m.