RxNorm API
getRelatedByRelationship
- Information returned
- Concepts directly related to a specified concept by a specified relationship
- Service domain
- https://rxnav.nlm.nih.gov
- HTTP request
- GETÂ /REST/rxcui/rxcui/related.xml?rela=yourRelas&expand=fields
Description
Get RxNorm concepts related to concept rxcui by relationships specified by the rela parameter.
Scope
Active: concepts in the current RxNorm data set that have an atom with SAB=RXNORM and SUPPRESS=N
Parameters
Parameter | Location | Use | Description | Default |
---|---|---|---|---|
rxcui | Path | Required | RxNorm identifier | |
format | Path | Optional | Notation for results One of:
| .xml |
rela | Query | Required | Relationship(s) (Space-separated list. See getRelaTypes for the menu.) | |
expand | Query | Optional | Additional result fields to retrieve One or more of:
(Space-separated list.) |
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 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
- relatedGroup
- rxcui
- (Always empty)
- conceptGroup (array)
- Related concepts having a certain TTY
- tty
- Term type of the concepts in this group
- conceptProperties (array)
- Related concept
- rxcui
- RxNorm identifier
- name
- RxNorm concept name
- synonym
- Short or "Tallman" RxNorm synonym
- tty
- Term type
- language
- LAT attribute from RxNorm
- suppress
- SUPPRESS field from RxNorm
- umlscui
- (Always empty)
- psn
- Prescribable Name
Example: Concepts related by "tradename_of" or "has_precise_ingredient" to Plavix (RxCUI=174742)
XML: https://rxnav.nlm.nih.gov/REST/rxcui/174742/related?rela=tradename_of+has_precise_ingredient
JSON: https://rxnav.nlm.nih.gov/REST/rxcui/174742/related.json?rela=tradename_of+has_precise_ingredient
An XML result is shown below.
<rxnormdata> <relatedGroup> ... <conceptGroup> <tty>IN</tty> <conceptProperties> <rxcui>32968</rxcui> <name>clopidogrel</name> <synonym/> <tty>IN</tty> <language>ENG</language> <suppress>N</suppress> <umlscui/> </conceptProperties> </conceptGroup> <conceptGroup> <tty>PIN</tty> <conceptProperties> <rxcui>236991</rxcui> <name>clopidogrel bisulfate</name> <synonym/> <tty>PIN</tty> <language>ENG</language> <suppress>N</suppress> <umlscui/> </conceptProperties> </conceptGroup> </relatedGroup> </rxnormdata>