calDDDsViaRxCui: Calculate total daily dosage drugs(DDDs) in RxCui

View source: R/calDDDsViaRxCui.R

calDDDsViaRxCuiR Documentation

Calculate total daily dosage drugs(DDDs) in RxCui

Description

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

Usage

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

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.

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

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)
head(sample_data_subset_atc)

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