find_drug: find_ndc Function: Find ndc from FDA ndc database

Description Usage Arguments Value See Also Examples

View source: R/find_drug.R

Description

find_ndc returns a list of items after connecting to the openFDA API.

Usage

1
2
find_drug(src = "fda", ndc = NULL, bname = NULL, gname = NULL,
  dea_schedule = NULL, limit = NULL, query = NULL, ...)

Arguments

src

String describing the source (e.g. "fda").

ndc

Integer describing the NDC number of drug of interest (e.g. "fda")

bname

String indicating brand name (e.g. "lorazepam")

gname

String indicating generic name (e.g. "lorazepam")

dea_schedule

Integer indicating class(e.g. "1")

limit

Integer indicating limit on how many items to limit in the result (e.g. "1")

query

String indicating actual httr::GET() query to the API

...

Additional parameters specified (TBD)

Value

A list with components based on the parameters specified.

See Also

https://open.fda.gov/apis/drug/ndc/ for the actual API description from openFDA. httr for accessing API.

Examples

1
2
3
4
5
6
7
8
find_drug(src="fda", ndc=687889736)
find_drug(src="fda", bname="Acetaminophen")
find_drug(src="fda", gname="Codeine")

## Not run: 
  find_drug(ndc="687889736")

## End(Not run)

ck2136/FDAopenR documentation built on Aug. 15, 2021, 3:43 a.m.