View source: R/calDDDsViaRxCui.R
calDDDsViaRxCui | R Documentation |
This is a function to calculate daily dosage drugs(DDDs) in RxCui
calDDDsViaRxCui( df, RxCuiColName = RxCui, QuantityColName = Quantity, DaysSupply = DaysSupply, cores = 4 )
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 |
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.
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
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.