This is a function to get RxCui via National Drug Code(NDC)

getRxCuiViaNDC(df, NdcColName = NDC, cores = 8)

Arguments

df

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

NdcColName

a column name for NDC of df

cores

number of parallel operation

Value

A new data.table sample_data_subset_rxcui 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 dispensed

RxCui drug code for the drug in the RxNorm drug vocabulary

ndcStatus NDC status

Details

User can input the data.frame with drug column which encoded in NDC. The content is to add a column named RxCui in the original input data frame, storing the result of converting NDC to RxNorm in this column. The column ndcStatus is to show whether the converted NDC is now used.

Examples

#sample of getting RxCui via NDC. sample_data_subset_rxcui <- getRxCuiViaNDC(df = sample_data_subset, NdcColName = NationalDrugCode)
#> Error in df %>% select("NDC") %>% unique(): 沒有這個函數 "%>%"
head(sample_data_subset_rxcui)
#> Error in head(sample_data_subset_rxcui): 找不到物件 'sample_data_subset_rxcui'