Prescribable RxNorm API
findRxcuiByString
- Information returned
- Concepts with a specified name
- Service domain
- https://rxnav.nlm.nih.gov
- HTTP request
- GETÂ /REST/Prescribe/rxcui.xml?name=yourName&allsrc=0or1&srclist=yourSources&search=0or1or2
Description
Searches for a drug by name (from any vocabulary in RxNorm).
Four degrees of precision are available:
Exact: Finds concepts with an atom (string) that exactly matches the name parameter. Only difference of upper/lowercase is ignored.
Normalized: Finds concepts with an atom (string) that corresponds to the name parameter. Word order, punctuation, suffixes that might be English inflections, and salts forms are ignored (e.g., "morphine sulfate" is treated as "morphine"). Abbreviations are expanded (e.g., "hctz" matches "hydrochlorothiazide").
Exact or Normalized: Tries an exact search, then a normalized search if nothing was found.
Approximate: Finds a concept, or a few concepts, by the same criteria as getApproximateMatch. Returns RxCUIs in order by the quality of the match, best guess first.
All RxNorm source vocabularies are searched. Therefore, even an exact-match search may return more than one concept.
The results may be filtered by the presence of an RxNorm-vocabulary term in the concept: When allsrc=0, only concepts that have at least one active atom from the RxNorm vocabulary are returned. When allsrc=1, only concepts that have at least one atom from a source listed in the srclist parameter are returned. Approximate matching works only with allsrc=0.
To search for drugs by the name of a category or class (as opposed to the name of a particular drug), see the RxClass API.
Scope
Selectable (see parameters):
Active: concepts in the current RxNorm data set that have an atom with SAB=RXNORM and SUPPRESS=N
Current: concepts in the current RxNorm data set that have an atom with SUPPRESS=N
Parameters
Parameter | Location | Use | Description | Default |
---|---|---|---|---|
format | Path | Optional | Notation for results One of:
| .xml |
name | Query | Required | Name of concept to find | |
allsrc | Query | Optional | Scope of search One of:
| 0 |
srclist | Query | Optional | Filter: find only concepts that include an atom from among these sources (if allsrc=1) (Space-separated list. See getSourceTypes for the menu.) | ALL |
search | Query | Optional | Precision One of:
| 0 |
All query parameters are case-insensitive.
Note that HTTP requires that query parameters be "URL encoded". For instance, a "space-separated list" will, in practice, usually appear to use either a plus sign (+) or %20 as the separator. For full information on URL encoding, please refer to IETF RFC 3986, "Uniform Resource Identifier".
Output structure
Results are available as either XML or JSON.
The XML result has the root element rxnormdata. It is described in the XML Schema for the Prescribable RxNorm API; the relevant element structure is summarized below. Elements that would be empty might be left out.
The JSON result is an object {...}, analogous to the content of the XML rxnormdata. Fields that might occur multiple times in the XML are expressed as an array. Fields that would be empty might be null or left out. Numbers are expressed as strings.
Both XML and JSON results follow the same outline:
- rxnormdata
- Root element in XML, or anonymous object in JSON
- idGroup
- rxnormId (array)
- A concept associated with the requested ID
See also
Example: Exact match finds a concept with the given name
XML: https://rxnav.nlm.nih.gov/REST/Prescribe/rxcui?name=lipitor
JSON: https://rxnav.nlm.nih.gov/REST/Prescribe/rxcui.json?name=lipitor
An XML result is shown below.
<rxnormdata> <idGroup> <rxnormId>153165</rxnormId> </idGroup> </rxnormdata>
Example: Approximate match finds concepts by distinctive words, such as the market name of a pack
XML: https://rxnav.nlm.nih.gov/REST/Prescribe/rxcui?name=cabenuva&search=9
JSON: https://rxnav.nlm.nih.gov/REST/Prescribe/rxcui.json?name=cabenuva&search=9
An XML result is shown below.
<rxnormdata> <idGroup> <rxnormId>2475416</rxnormId> <rxnormId>2475418</rxnormId> </idGroup> </rxnormdata>