This is a function to calculate daily dosage drugs(DDDs) in RxCui

calDDDsViaRxCui(
  df,
  RxCuiColName = RxCui,
  QuantityColName = Quantity,
  DaysSupply = DaysSupply,
  cores = 4
)

Arguments

df

data.frame, a drug ingredient`s ATC of the specific indication

RxCuiColName

a column name for RxCui of df

QuantityColName

a column name for drug quantity of df

DaysSupplyConName

a column name for the days that patient`s drug supplied of df

Value

A new data.table sample_data_subset_atc with following columns.

MemberId patient Id

DispenseDate patient`s drug dispensed date, and the time interval is from 2025-12-06 to 2038-01-25

NationalDrugCode drug NDC, total of 17,326 different drug codes

Quantity quantity of patient`s drug dispensed

DaysSupply days of patient`s drug supplied

RxCui drug RxCui

ATC drug ATC

DailyDosage daily dosage drugs

Unit drug calculate unit

Details

The calculation model: The dosage of the drug multiplied by the number of the days of drug taken, and then divided by the number of days of drug supplied.

Examples

# sample of calculating DDDs in RxCui. sample_data_subset_atc <- calDDDsViaRxCui(df = sample_data_subset_atc, RxCuiColName = RxCui, QuantityColName = Quantity, DaysSupplyConName = DaysSupply, cores = 2)
#> Error in calDDDsViaRxCui(df = sample_data_subset_atc, RxCuiColName = RxCui, QuantityColName = Quantity, DaysSupplyConName = DaysSupply, cores = 2): unused argument (DaysSupplyConName = DaysSupply)
head(sample_data_subset_atc)
#> Error in head(sample_data_subset_atc): 找不到物件 'sample_data_subset_atc'