knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

rxnorm

Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.

Access drug name and class using RxCUI from the National Library of Medicine RxNorm RESTful API.

Scope

rxnorm is an R package providing a basic interface to query the National Library of Medicine RxNorm RESTful API using RxCUI. The goal is to provide a simple way to translate RxCUI into drug categories with incremental levels of generality: specific drug names r knitr::asis_output("\U02192") brand names r knitr::asis_output("\U02192") drug classes.

Installation

You can install rxnorm from GitHub with:

devtools::install_github("nt-williams/rxnorm")

Example

library(rxnorm)

Query the API for the RxNorm name:

get_rx(1011485)

Query the API for the brand name:

get_bn(1011485)

Query the API for the strength of active ingredients:

get_rxcui_strength(861819)

Query the API for the WHO ATC drug class:

get_atc(1011485)

We can further parse ATC codes to varying levels of specificy:

get_atc(1011485, "first")
get_atc(1011485, "second")
get_atc(1011485, "third")
get_atc(1011485, "fourth")


nt-williams/rxnorm documentation built on April 11, 2025, 11:05 p.m.