This function provides user to get drug era histogram plot.

getDrugEraPlot(
  df,
  MemberIDColName = MemberID,
  DrugColName,
  DrugEraColName = DrugEra,
  SupplyDaysColName = SupplyDays
)

Arguments

df

data.frame include drug era info

MemberIDColName

a column name for member id of df

DrugColName

a column name for drug name df

DrugEraColName

a column name for drug era of df

SupplyDaysColName

A column name for supply days of df

Details

User can get the drug data, the length of each drug record, and the number of days of drug supply in the drug era. In addition to the analysis of each drug route by the drug era, user can also visualize the drug data of the drug era.

Examples

#sample of getting drug era histogram plot. getDrugEraPlot(df = sample_data_DrugEraPlot,MemberIDColName = MemberId,DrugColName = ATC,DrugEraColName = DrugEra,SupplyDaysColName = SupplyDays)
#> Error in select(tempDF, MemberID, DrugEra, SupplyDays, DispenseTimes) %>% unique(): 沒有這個函數 "%>%"