R/getRxCuiViaMayPrevent.R

Defines functions getRxCuiViaMayPrevent

Documented in getRxCuiViaMayPrevent

#' @rdname getRxCuiViaMayPrevent
#' @export

getRxCuiViaMayPrevent <- function(strmayprevent){

  strmayprevent <-  tolower(gsub(" ","",strmayprevent))
  resMayprevent[,t := grepl(strmayprevent, mayprevent)]
  resMayprevent <- resMayprevent %>%
    filter(t == TRUE) %>%
    select(RxCui, min.rxcui, Name, May_prevent) %>%
    arrange(May_prevent)
  resMayprevent

}
.datatable.aware = TRUE
DHLab-CGU/pharm documentation built on July 2, 2022, 7:16 a.m.