getATCViaRxCui: Get Anatomical Therapeutic Chemical Classification...

View source: R/getATCViaRxCui.R

getATCViaRxCuiR Documentation

Get Anatomical Therapeutic Chemical Classification System(ATC) code via RxCui

Description

This is a function to get Anatomical Therapeutic Chemical Classification System(ATC) code via RxCui

Usage

getATCViaRxCui(df, RxCuiColName = RxCui, cores = 4, MatchRoute = FALSE)

Arguments

df

data.frame, a drug ingredient's RxCui of the specific indication

cores

number of parallel operation

MatchRoute

an option to mapping drug ingredient and route

RxCuiColNamea

a column name for RxCui of df

Details

User can input the data.frame with drug column which encoded in RxCui, and to add the result of converting column named ATC.

The same drug components in ATC might depend on different ATC medication route. Hence, this function also refer to the research of Bodenreider et al.(https://www.researchgate.net/publication/276067397_Analyzing_US_prescription_lists_with_RxNorm_and_the_ATCDDD_Index) and adds the parameter MatchRoute for user to consider. If user wants to compare the ATC medication route, input TRUE in the parameter MatchRoute, otherwise input FALSE. Because RxCui is slightly different from the ATC drug vocabulary, not every RxCui has a corresponding ATC code. Therefore, if RxCui does not have a corresponding ATC code, this field will display NA, and pharm does not provide the code conversion of the clinical drug and brand drug combination package, such as birth control pills. If the input RxCui is a drug combination package, the field output result will be filled in GPCK or BPCK.

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 dispensed

RxCui drug RxCui

ATC drug ATC code

Examples

# sample of getting ATC via RxCui.
sample_data_subset_atc <- getATCViaRxCui(df = sample_data_subset_rxcui,RxCuiColName = RxCui,cores = 2,MatchRoute = FALSE)
head(sample_data_subset_atc)

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