R/funPharm.R
, R/getRxCuiViaNDC.R
getRxCuiViaNDC.Rd
This is a function to get RxCui via National Drug Code(NDC)
getRxCuiViaNDC(df, NdcColName = NDC, cores = 8)
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 |
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
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.
#sample of getting RxCui via NDC. sample_data_subset_rxcui <- getRxCuiViaNDC(df = sample_data_subset, NdcColName = NationalDrugCode)#> Error in df %>% select("NDC") %>% unique(): 沒有這個函數 "%>%"#> Error in head(sample_data_subset_rxcui): 找不到物件 'sample_data_subset_rxcui'