% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/classes.R
\name{get_drug_classes}
\alias{get_drug_classes}
\title{Get class-like RxClass assertions for RxNorm drugs}
\usage{
get_drug_classes(
  x,
  by = c("rxcui", "name"),
  include_sources = c("ATC", "EPC", "SNOMEDCT"),
  collapse = TRUE,
  keep_input = TRUE,
  show_progress = interactive()
)
}
\arguments{
\item{x}{Character vector of RxCUIs or drug names.}

\item{by}{One of \code{"rxcui"} or \code{"name"}.}

\item{include_sources}{Character vector of class-like sources to include.
Defaults to \code{c("ATC", "ATCPROD", "EPC", "VA", "SNOMEDCT")}.}

\item{collapse}{Logical; if \code{TRUE}, returns one row per unique class
assertion per input and source, dropping drug-specific columns. If \code{FALSE},
returns the full source-specific rows, including matched RxCUI, drug name,
and term type.}

\item{keep_input}{Logical; if \code{TRUE}, includes the original input value.}

\item{show_progress}{Logical. Show a progress bar in interactive sessions.
Progress is shown only when at least 5 inputs are supplied.}
}
\value{
A tibble of class-like RxClass assertions.
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}}

\code{get_drug_classes()} is an experimental convenience function that returns
RxClass assertions that are likely to behave like drug-class labels.

It combines selected assertions from ATC, ATCPROD, FDA/SPL EPC, VA, and
SNOMED CT disposition relationships. It intentionally excludes relationship
types that usually describe contraindications, indications, physiologic
effects, chemical structures, or other non-class assertions.

For a more compact and ingredient-oriented output, rely on defaults for
include_sources. For extended list of product-level sources, consider adding
"ATCPROD" and "VA".

This function is experimental because "drug class" is not a single native
RxClass concept. Different sources use different classification logic, and
this helper applies an opinionated filter to return class-like assertions.
For source-specific results, use \code{\link[=get_classes]{get_classes()}}, \code{\link[=get_atc]{get_atc()}}, \code{\link[=get_epc]{get_epc()}},
\code{\link[=get_va]{get_va()}}, or related functions directly.
}
