-
Notifications
You must be signed in to change notification settings - Fork 2
/
README.Rmd
73 lines (51 loc) · 1.66 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# rxnorm
<!-- badges: start -->
[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
<!-- badges: end -->
> 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](https://github.com/) with:
``` r
devtools::install_github("nt-williams/rxnorm")
```
## Example
```{r}
library(rxnorm)
```
Query the API for the RxNorm name:
```{r}
get_rx(1011485)
```
Query the API for the brand name:
```{r}
get_bn(1011485)
```
Query the API for the strength of active ingredients:
```{r}
get_rxcui_strength(861819)
```
Query the API for the [WHO ATC](https://www.whocc.no/atc_ddd_index/) drug class:
```{r}
get_atc(1011485)
```
We can further parse ATC codes to varying levels of specificy:
```{r}
get_atc(1011485, "first")
get_atc(1011485, "second")
get_atc(1011485, "third")
get_atc(1011485, "fourth")
```