RxNav

NDF-RT RESTful Web API User's Guide

updated: 7/19/2012
Lister Hill Center

The NDF-RT RESTful API is a web service for accessing the current NDF-RT data set.

Useful links:

Introduction

This document details the NDF-RT RESTful web API, an alternative web service developed at the National Library of Medicine for the NDF-RT data from the SOAP-based NDF-RT API web services. Representational state transfer (REST) is a style of software architecture for distributed hypermedia systems such as the World Wide Web. REST-style architectures consist of clients and servers. Clients initiate requests to servers; servers process requests and return appropriate responses. Requests and responses are built around the transfer of "representations" of "resources". A resource can be essentially any coherent and meaningful concept that may be addressed. A representation of a resource is typically a document that captures the current or intended state of a resource.

The NDF-RT RESTful web API is a simple web service implemented using HTTP and can be thought of as a collection of resources, specified as URIs. Some characteristics of the NDF-RT RESTful web API:

This document will define the valid resources for the NDF-RT RESTful web API and provide the representations of the responses to these resource requests. Examples will be present throughout this document to provide a greater understanding of these interactions.

Clients

Clients of the NDF-RT RESTful web API can be browsers, such as Internet Explorer or Firefox, or programs such as the Unix/Linux curl command, or user developed clients. For example, the Unix/Linux curl command could be used to get the NDF-RT version:
curl http://rxnav.nlm.nih.gov/REST/Ndfrt/version
(returns)
<?xml  version="1.0" encoding="UTF-8" standalone="yes"?><ndfrtdata><version><versionName>2012.07.02</versionName><version></ndfrtdata>
Notice that the data returned from the NDF-RT RESTful web API is in XML format. The curl command takes a URL as part of its command sequence. The string http://rxnav.nlm.nih.gov/REST/Ndfrt/version is a NDF-RT RESTful web API resource. The Resources section details the NDF-RT RESTful web API resources available to clients.

Clients to the NDF-RT RESTful web API provide resource names in the form of URIs to receive data about the resources. Currently, the NDF-RT API RESTful web services return the data in XML form as the default. The API can also return the data in JSON or plain text format. Here is the curl command, modified from above, to return the NDF-RT version in JSON format:

 curl -H "Accept:application/json" http://rxnav.nlm.nih.gov/REST/Ndfrt/version
(returns)
{"version":{"versionName":"2012.07.02"}}

Here is the curl command to return the NDF-RT version in plain text format:

 curl -H "Accept:text/plain" http://rxnav.nlm.nih.gov/REST/Ndfrt/version
(returns)
2012.07.02

Resources

This section describes the resources of the NDF-RT RESTful Web API. For users familiar with the SOAP-based NDF-RT API, Table 1 lists the mapping between resources of the NDF-RT RESTful web API and the SOAP-based NDF-RT API functions. Note that for readability, the base URI has been omitted from the table, so for example the table contains "/version" instead of http://rxnav.nlm.nih.gov/REST/Ndfrt/version. In addition, the text in italics indicates a user provided value. The notation {nui} indicates that an actual value of a NUI is needed.

Table 1 - Mapping of NDF-RT API RESTful resources and SOAP-based web services
RESTful web service resourceSOAP-based web service function
/(none)
/allconcepts?kind=kindNames getAllConceptsByKind
/allInfo/{nui}getAllInfo
/associationListgetAssociationList
/associations/nui={nui}&associationName={associationName}getRelatedConceptsByAssociation
/childConcepts/nui={nui}&transitive={transitive}getChildConcepts
/concept?propertyName={propName}&propertyValue={propertyValue}getConceptsByProperty
/conceptName={conceptName}&kindName={kindName} DEPRECATEDfindConceptsByName
/idType={idType}&idString={idString}findConceptsByID
/interaction/nui={nui}&scope={scope}findDrugInteractions
/interaction?nuis={nuiValues}&scope={scope}findInteractionsFromList
/interaction/nui1={nui}&nui2={nui2}&scope={scope}interactions
/kindListgetKindList
/nui={nui}&roleName={roleName}&transitive={transitive}getRelatedConceptsByRole
/parentConcepts/nui={nui}&transitive={transitive}getParentConcepts
/properties/nui={nui}&propertyName={propertyName}getConceptProperties
/propertyListgetPropertyList
/propertyName={propName}&propertyValue={propertyValue} DEPRECATEDgetConceptsByProperty
/reverse/nui={nui}&roleName={roleName}&transitive={transitive}getRelatedConceptsByReverseRole
/roleListgetRoleList
/search?conceptName={conceptName}&kindName={kindName}findConceptsByName
/typeListgetIdTypeList
/VA/{nui}getVAClassOfConcept
/VAMember/{nui}getVAClassMembers
/versiongetNDFRTversion

Resource "/"

This resource lists the NDF-RT resources.

Example

http://rxnav.nlm.nih.gov/REST/Ndfrt/

(returns)
<ndfrtdata>
  <resourceList>
    <resource>http://rxnav.nlm.nih.gov/REST/Ndfrt/version</resource>
    <resource>http://rxnav.nlm.nih.gov/REST/Ndfrt/associationList</resource>
    <resource>http://rxnav.nlm.nih.gov/REST/Ndfrt/typeList</resource>
    <resource>http://rxnav.nlm.nih.gov/REST/Ndfrt/kindList</resource>
    <resource>http://rxnav.nlm.nih.gov/REST/Ndfrt/roleList</resource>
    <resource>http://rxnav.nlm.nih.gov/REST/Ndfrt/propertyList</resource>
    <resource>http://rxnav.nlm.nih.gov/REST/Ndfrt/interaction/nui={nui}&scope={scope}</resource>
    <resource>http://rxnav.nlm.nih.gov/REST/Ndfrt/interaction/nui1={nui}&nui2={nui2}&scope={scope}</resource>
    <resource>http://rxnav.nlm.nih.gov/REST/Ndfrt/interaction?nuis={nuiValues}&scope={scope}</resource>
    <resource>http://rxnav.nlm.nih.gov/REST/Ndfrt/VA/{nui}</resource>
    <resource>http://rxnav.nlm.nih.gov/REST/Ndfrt/allInfo/{nui}</resource>
    <resource>http://rxnav.nlm.nih.gov/REST/Ndfrt/idType={idType}&idString={idString}</resource>
    <resource>http://rxnav.nlm.nih.gov/REST/Ndfrt/conceptName={conceptName}&kindName={kindName}</resource>
    <resource>http://rxnav.nlm.nih.gov/REST/Ndfrt/propertyName={propName}&propertyValue={propValue}</resource>
    <resource>http://rxnav.nlm.nih.gov/REST/Ndfrt/nui={nui}&roleName={roleName}&transitive={transitive}</resource>
    <resource>http://rxnav.nlm.nih.gov/REST/Ndfrt/childConcepts/nui={nui}&transitive={transitive}</resource>
    <resource>http://rxnav.nlm.nih.gov/REST/Ndfrt/parentConcepts/nui={nui}&transitive={transitive}</resource>
    <resource>http://rxnav.nlm.nih.gov/REST/Ndfrt/properties/nui={nui}&propertyName={propertyName}</resource>
    <resource>http://rxnav.nlm.nih.gov/REST/Ndfrt/associations/nui={nui}&associationName={associationName}</resource>
    <resource>http://rxnav.nlm.nih.gov/REST/Ndfrt/reverse/nui={nui}&roleName={roleName}&transitive={transitive}</resource>
    <resource>http://rxnav.nlm.nih.gov/REST/Ndfrt/VAMember/{nui}</resource>
    <resource>http://rxnav.nlm.nih.gov/REST/Ndfrt/allconcepts?kind={kindNames}</resource>
    <resource>http://rxnav.nlm.nih.gov/REST/Ndfrt/search?conceptName={conceptName}&kindName={kindName}</resource>
  </resourceList>
</ndfrtdata>

Resource "/allconcepts?kind={kindNames}"

Get concept information for specified kinds.

Input

kindNames - one or more Kind identifiers. See /kindList example for valid values.

Example

http://rxnav.nlm.nih.gov/REST/Ndfrt/allconcepts?kind=pharmacokinetics_kind

(returns)

<ndfrtdata>
  <responseType/>
    <groupConcepts>
      <concept>
        <conceptName>1-Compartment</conceptName>
        <conceptNui>N0000000060</conceptNui>
        <conceptKind>PHARMACOKINETICS_KIND</conceptKind>
      </concept>
      <concept>
        <conceptName>2-Compartment</conceptName>
        <conceptNui>N0000000061</conceptNui>
        <conceptKind>PHARMACOKINETICS_KIND</conceptKind>
      </concept>
      <concept>
        <conceptName>3-Compartment</conceptName>
        <conceptNui>N0000000062</conceptNui>
        <conceptKind>PHARMACOKINETICS_KIND</conceptKind>
      </concept>
      <concept>
        <conceptName>Absorption</conceptName>
        <conceptNui>N0000000008</conceptNui>
        <conceptKind>PHARMACOKINETICS_KIND</conceptKind>
      </concept>

     (many more ...)

    <groupConcepts>
  </responseType/>
</ndfrtdata>

Resource "/allInfo/{nui}"

This resource returns concept information for a specified concept.

Input

nui - the NDF-RT identifier

Example

http://rxnav.nlm.nih.gov/REST/Ndfrt/allInfo/N0000152900

(returns)

<ndfrtdata>
  <responseType>
    <inputNui1>N0000152900</inputNui1>
  </responseType>
  <fullConcept>
    <conceptName>ACETIC ACID 2%/HYDROCORTISONE 1% SOLN,OTIC</conceptName>
    <conceptKind>DRUG_KIND</conceptKind>
    <conceptNui>N0000152900</conceptNui>
    <parentConcepts>
      <concept>
        <conceptName>ACETIC ACID/HYDROCORTISONE</conceptName>
        <conceptNui>N0000020387</conceptNui>
        <conceptKind>DRUG_KIND</conceptKind>
      </concept>
      <concept>
        <conceptName>ANTI-INFECTIVE/ANTI-INFLAMMATORY COMBINATIONS,TOPICAL OTIC</conceptName>
        <conceptNui>N0000029341</conceptNui>
        <conceptKind>DRUG_KIND</conceptKind>
      </concept>
    </parentConcepts>
    <childConcepts/>
    <groupProperties>
      <property>
        <propertyName>Display_Name</propertyName>
        <propertyValue>ACETIC ACID 2%/HYDROCORTISONE 1% SOLN,OTIC</propertyValue>
      </property>
      <property>
        <propertyName>NUI</propertyName>
        <propertyValue>N0000152900</propertyValue>
      </property>
      <property>
        <propertyName>VANDF_Record</propertyName>
        <propertyValue> 
          <VANDF_Record>50.68^4308^</VANDF_Record><VA_File>50.68</VA_File><VA_IEN>4308</VA_IEN>
        </propertyValue>
      </property>
      <property>
        <propertyName>kind</propertyName>
        <propertyValue>DRUG_KIND</propertyValue>
      </property>
      <property>
        <propertyName>RxNorm_Name</propertyName>
        <propertyValue>Acetic Acid 20 MG/ML / Hydrocortisone 10 MG/ML Otic Solution</propertyValue>
      </property>
      <property>
        <propertyName>RxNorm_CUI</propertyName>
        <propertyValue>313786</propertyValue>
      </property>
      <property>
        <propertyName>Level</propertyName>
        <propertyValue>VA Product</propertyValue>
      </property>
      <property>
        <propertyName>code</propertyName>
        <propertyValue>C32240</propertyValue>
      </property>
      <property>
        <propertyName>Status</propertyName>
        <propertyValue>Active</propertyValue>
      </property>
      <property>
        <propertyName>VUID</propertyName>
        <propertyValue>4004860</propertyValue>
      </property>
      <property>
        <propertyName>UMLS_CUI</propertyName>
        <propertyValue>C0981197</propertyValue>
      </property>
      <property>
        <propertyName>Print_Name</propertyName>
        <propertyValue>ACETIC ACID 2/HC 1% OTIC SOLN</propertyValue>
      </property>
      <property>
        <propertyName>VA_National_Formulary_Name</propertyName>
        <propertyValue>ACETIC ACID/HYDROCORTISONE SOLN,OTIC</propertyValue>
      </property>
    </groupProperties>
    <groupRoles>
      <role>
        <roleName>has_DoseForm</roleName>
        <concept>
          <conceptName>Otic Solution</conceptName>
          <conceptNui>N0000135765</conceptNui>
          <conceptKind>DOSE_FORM_KIND</conceptKind>
        </concept>
      </role>
    </groupRoles>
    <groupAssociations>
      <association>
        <associationName>Product_Component</associationName>
        <concept>
          <conceptName>ACETIC ACID</conceptName>
          <conceptNui>N0000145831</conceptNui>
          <conceptKind>DRUG_KIND</conceptKind>
        </concept>
      </association>
      <association>
        <associationName>Product_Component</associationName>
        <concept>
          <conceptName>HYDROCORTISONE</conceptName>
          <conceptNui>N0000146291</conceptNui>
          <conceptKind>DRUG_KIND</conceptKind>
        </concept>
      </association>
    </groupAssociations>
  </fullConcept>
</ndfrtdata>

Resource "/associationList"

Lists the association names.

Example

http://rxnav.nlm.nih.gov/REST/Ndfrt/associationList

(returns)

<ndfrtdata>
  <associationList>
    <associationName xsi:type="xs:string">Heading_Mapped_To</associationName>
    <associationName xsi:type="xs:string">Ingredient_1</associationName>
    <associationName xsi:type="xs:string">Ingredient_2</associationName>
    <associationName xsi:type="xs:string">Product_Component</associationName>
    <associationName xsi:type="xs:string">Product_Component-2</associationName>
  </associationList>
</ndfrtdata>

Resource "/associations/nui={nui}&associationName={associationName}"

Get the associated concepts of a given concept with a specified association.

Input

nui - the NDF-RT concept identifier

associationName - (optional, default: false) the association name. If not specified, the all associations are returned for the concept. See /associationList example for valid association names.

Example

http://rxnav.nlm.nih.gov/REST/Ndfrt/associations/nui=N0000152900&associationName=Product_Component

(returns)

<ndfrtdata>
  <responseType>
    <inputNui1>N0000152900</inputNui1>
    <inputAssociationName>Product_Component</inputAssociationName>
  </responseType>
  <groupAssociations>
    <association>
      <associationName>Product_Component</associationName>
      <concept>
        <conceptName>ACETIC ACID</conceptName>
        <conceptNui>N0000145831</conceptNui>
        <conceptKind>DRUG_KIND</conceptKind>
      </concept>
    </association>
    <association>
      <associationName>Product_Component</associationName>
      <concept>
        <conceptName>HYDROCORTISONE</conceptName>
        <conceptNui>N0000146291</conceptNui>
        <conceptKind>DRUG_KIND</conceptKind>
      </concept>
    </association>
  </groupAssociations>
</ndfrtdata>

Resource "/childConcepts/nui={nui}&transitive={transitive}"

Get the child concepts of a specified concept

Input

nui - the NDF-RT identifier

transitive - (optional, default: false) if false, then only direct child concepts are returned. If true, return all descendant concepts.

Example

http://rxnav.nlm.nih.gov/REST/Ndfrt/childConcepts/nui=N0000022046&transitive=true

(returns)

<ndfrtdata>
  <responseType>
    <inputNui1>N0000022046</inputNui1>
    <inputTransitive>true</inputTransitive>
  </responseType>
  <groupConcepts>
    <concept>
      <conceptName>ATORVASTATIN CA 10MG TAB</conceptName>
      <conceptNui>N0000160833</conceptNui>
      <conceptKind>DRUG_KIND</conceptKind>
    </concept>
    <concept>
      <conceptName>ATORVASTATIN CA 20MG TAB</conceptName>
      <conceptNui>N0000160834</conceptNui>
      <conceptKind>DRUG_KIND</conceptKind>
    </concept>
    <concept>
      <conceptName>ATORVASTATIN CA 40MG TAB</conceptName>
      <conceptNui>N0000160835</conceptNui>
      <conceptKind>DRUG_KIND</conceptKind>
    </concept>
    <concept>
      <conceptName>ATORVASTATIN CA 80MG TAB</conceptName>
      <conceptNui>N0000162618</conceptNui>
      <conceptKind>DRUG_KIND</conceptKind>
    </concept>
    <concept>
      <conceptName>ATORVASTATIN CALCIUM</conceptName>
      <conceptNui>N0000148468</conceptNui>
      <conceptKind>DRUG_KIND</conceptKind>
    </concept>
  </groupConcepts>
</ndfrtdata>

Resource "/concept?propertyName={propertyName}&propertyValue={propertyValue}"

Get the concepts that contain the specified property name and value

Input

propertyName - name of the property. See /propertyList example for valid property names.

propertyValue - the property value

Example

http://rxnav.nlm.nih.gov/REST/Ndfrt/concept?propertyName=RxNorm_CUI&propertyValue=161

(returns)

<ndfrtdata>
  <responseType>
    <inputPropertyName>RxNorm_CUI</inputPropertyName>
    <inputPropertyValue>161</inputPropertyValue>
  </responseType>
  <groupConcepts>
    <concept>
      <conceptName>ACETAMINOPHEN</conceptName>
      <conceptNui>N0000145898</conceptNui>
      <conceptKind>DRUG_KIND</conceptKind>
    </concept>
    <concept>
      <conceptName>Acetaminophen</conceptName>
      <conceptNui>N0000007359</conceptNui>
      <conceptKind>INGREDIENT_KIND</conceptKind>
    </concept>
  </groupConcepts>
</ndfrtdata>

Resource "/conceptName={conceptName}&kindName={kindName}"

This function has been deprecated. Use /search for searching by string.

Resource "/search?conceptName={conceptName}&kindName={kindName}"

Get the concept identfier given a concept name and kind.

Input

conceptName - the name of the concept

kindName - (optional) the kind value. If not specified, all kinds are returned. See /kindList example for valid values.

Example

http://rxnav.nlm.nih.gov/REST/Ndfrt/search?conceptName=morphine&kindName=DRUG_KIND

(returns)

<ndfrtdata>
  <responseType>
    <inputConceptName>morphine</inputConceptName>
    <inputKindName>DRUG_KIND</inputKindName>
  </responseType>
  <groupConcepts>
    <concept>
      <conceptName>MORPHINE</conceptName>
      <conceptNui>N0000145914</conceptNui>
      <conceptKind>DRUG_KIND</conceptKind>
    </concept>
  </groupConcepts>
</ndfrtdata>

Resource "/idType={idType}&idString={idString}"

Find the concepts from a given identifier.

Input

idType - the type of identifier. See /typeList for valid identifiers types.

idString - the value of the identifier.

Example

http://rxnav.nlm.nih.gov/REST/Ndfrt/idType=RXCUI&idString=161

(returns)

<ndfrtdata>
  <responseType>
    <inputIdType>RXCUI</inputIdType>
    <inputIdString>161</inputIdString>
  </responseType>
  <concept>
    <conceptName>ACETAMINOPHEN</conceptName>
    <conceptNui>N0000145898</conceptNui>
    <conceptKind>DRUG_KIND</conceptKind>
  </concept>
</ndfrtdata>

Resource "/interaction/nui={nui}&scope={scope}"

Find the drug interactions for a specified drug.

Input

nui - the NDF-RT identifier of the drug

scope - (optional, default: 3) The range of concepts related to the specified drug that are to be checked for interactions. Possible values are:

Example

http://rxnav.nlm.nih.gov/REST/Ndfrt/interaction/nui=N0000145914&scope=2

(returns)

<ndfrtdata>
  <responseType>
    <inputNui1>N0000145914</inputNui1>
  </responseType>
  <groupInteractions>
    <interactions>
      <comment>MORPHINE is resolved to MORPHINE and MORPHINE has 6 interaction(s)</comment>
      <concept>
        <conceptName>MORPHINE</conceptName>
        <conceptNui>N0000145914</conceptNui>
        <conceptKind>DRUG_KIND</conceptKind>
      </concept>
      <groupInteractingDrugs>
        <interactingDrug>
          <concept>
            <conceptName>NALTREXONE</conceptName>
            <conceptNui>N0000147939</conceptNui>
            <conceptKind>DRUG_KIND</conceptKind>
          </concept>
	  <severity>Critical</severity>
          <concept>
            <conceptName>RASAGILINE</conceptName>
            <conceptNui>N0000171790</conceptNui>
            <conceptKind>DRUG_KIND</conceptKind>
          </concept>
	  <severity>Critical</severity>
          <concept>
            <conceptName>BUPRENORPHINE</conceptName>
            <conceptNui>N0000147737</conceptNui>
            <conceptKind>DRUG_KIND</conceptKind>
          </concept>
	  <severity>Significant</severity>
          <concept>
            <conceptName>RIFAMPIN</conceptName>
            <conceptNui>N0000146932</conceptNui>
            <conceptKind>DRUG_KIND</conceptKind>
          </concept>
	  <severity>Significant</severity>
          <concept>
            <conceptName>BUTORPHANOL</conceptName>
            <conceptNui>N0000147743</conceptNui>
            <conceptKind>DRUG_KIND</conceptKind>
          </concept>
	  <severity>Significant</severity>
          <concept>
            <conceptName>NALBUPHINE</conceptName>
            <conceptNui>N0000147937</conceptNui>
            <conceptKind>DRUG_KIND</conceptKind>
          </concept>
	  <severity>Significant</severity>
        </interactingDrug>
      </groupInteractingDrugs>
    </interactions>
  </groupInteractions>
</ndfrtdata>

Resource "/interaction?nuis={nuiValues}&scope={scope}"

Return the interactions of a list of drugs.

Input

nuiValues - a list of NDF-RT identifiers. There is a limit of 50 identifiers, more than 50 identifiers will return no output.

scope - the range of concepts related to the specified drug that are to be checked for interactions. Possible values are:

Example

In the following example, the ingredients morphine (NUI="N0000007070"), doxepin (NUI="N0000147828") and rasagiline (NUI="N0000179514") are checked. The returned data indicates that there are interactions between morphine and rasagiline and also between doxepin and rasagiline.
http://rxnav.nlm.nih.gov/REST/Ndfrt/interaction?nuis=N0000007070+N0000147828+N0000179514&scope=3

(returns)

<ndfrtdata>
  <responseType>
    <inputScope>3</inputScope>
  </responseType>
  <fullInteractionGroup>
    <fullInteraction>
      <interactionPair>
        <concept>
          <conceptName>Morphine</conceptName>
          <conceptNui>N0000007070</conceptNui>
          <conceptKind>INGREDIENT_KIND</conceptKind>
        </concept>
        <concept>
          <conceptName>rasagiline</conceptName>
          <conceptNui>N0000179514</conceptNui>
          <conceptKind>INGREDIENT_KIND</conceptKind>
        </concept>
      </interactionPair>
      <comment>There is(are) 1 drug interaction(s)</comment>
      <interactionCount>1</interactionCount>
      <interactionTripleGroup>
        <interactionTriple>
          <groupConcepts>
            <concept>
              <conceptName>MORPHINE</conceptName>
              <conceptNui>N0000145914</conceptNui>
              <conceptKind>DRUG_KIND</conceptKind>
            </concept>
            <concept>
              <conceptName>RASAGILINE</conceptName>
              <conceptNui>N0000171790</conceptNui>
              <conceptKind>DRUG_KIND</conceptKind>
            </concept>
            <concept>
              <conceptName>MORPHINE/RASAGILINE</conceptName>
              <conceptNui>N0000176852</conceptNui>
              <conceptKind>DRUG_INTERACTION_KIND</conceptKind>
            </concept>
          </groupConcepts>
          <severity>Critical</severity>
        </interactionTriple>
      </interactionTripleGroup>
    </fullInteraction>
    <fullInteraction>
      <interactionPair>
        <concept>
          <conceptName>DOXEPIN</conceptName>
          <conceptNui>N0000147828</conceptNui>
          <conceptKind>DRUG_KIND</conceptKind>
        </concept>
        <concept>
          <conceptName>rasagiline</conceptName>
          <conceptNui>N0000179514</conceptNui>
          <conceptKind>INGREDIENT_KIND</conceptKind>
        </concept>
      </interactionPair>
      <comment>There is(are) 1 drug interaction(s)</comment>
      <interactionCount>1</interactionCount>
      <interactionTripleGroup>
        <interactionTriple>
          <groupConcepts>
            <concept>
              <conceptName>DOXEPIN</conceptName>
              <conceptNui>N0000147828</conceptNui>
              <conceptKind>DRUG_KIND</conceptKind> 
            </concept>
            <concept>
              <conceptName>RASAGILINE</conceptName>
              <conceptNui>N0000171790</conceptNui>
              <conceptKind>DRUG_KIND</conceptKind>
            </concept>
            <concept>
              <conceptName>DOXEPIN/RASAGILINE</conceptName>
              <conceptNui>N0000180789</conceptNui>
              <conceptKind>DRUG_INTERACTION_KIND</conceptKind>
            </concept>
          </groupConcepts>
          <severity>Critical</severity>
        </interactionTriple>
      </interactionTripleGroup>
    </fullInteraction>
  <fullInteractionGroup>
</ndfrtdata>

Resource "/interaction/nui1={nui1}&nui2={nui2}&scope={scope}"

Return the interactions between two drugs.

Input

nui1 - the NDF-RT identifier of the first drug

nui2 - the NDF-RT identifier of the second drug

scope - (optional, default: 3) The range of concepts related to the specified drug that are to be checked for interactions. Possible values are:

Example

In the following example, the ingredients morphine (NUI="N0000007070") and rasagiline (NUI="N0000179514") are checked. The returned data indicates that there is an interaction between the two drugs.
http://rxnav.nlm.nih.gov/REST/Ndfrt/interaction/nui1=N0000007070&nui2=N0000179514&scope=2

(returns)

<ndfrtdata>
  <responseType>
    <inputNui1>N0000007070</inputNui1>
    <inputNui2>N0000179514</inputNui2>
    <inputScope>2</inputScope>
  </responseType>
  <fullInteractionGroup>
    <fullInteraction>
      <comment>There is(are) 1 drug interaction(s)</comment>
      <interactionCount>1</interactionCount>
      <interactionTripleGroup>
        <interactionTriple>
          <groupConcepts>
            <concept>
              <conceptName>MORPHINE</conceptName>
              <conceptNui>N0000145914</conceptNui>
              <conceptKind>DRUG_KIND</conceptKind>
            </concept>
            <concept>
              <conceptName>RASAGILINE</conceptName>
              <conceptNui>N0000171790</conceptNui>
              <conceptKind>DRUG_KIND</conceptKind>
            </concept>
            <concept>
              <conceptName>MORPHINE/RASAGILINE</conceptName>
              <conceptNui>N0000176852</conceptNui>
              <conceptKind>DRUG_INTERACTION_KIND</conceptKind>
            </concept>
          </groupConcepts>
          <severity>Critical</severity>
        </interactionTriple>
      </interactionTripleGroup>
    </fullInteraction>
  <fullInteractionGroup>
</ndfrtdata>

Resource "/kindList"

Return the Kind list.

Example

http://rxnav.nlm.nih.gov/REST/Ndfrt/kindList

(returns)

<ndfrtdata>
  <kindList>
    <kindName xsi:type="xs:string">DISEASE_KIND</kindName>
    <kindName xsi:type="xs:string">DOSE_FORM_KIND</kindName>
    <kindName xsi:type="xs:string">DRUG_INTERACTION_KIND</kindName>
    <kindName xsi:type="xs:string">DRUG_KIND</kindName>
    <kindName xsi:type="xs:string">INGREDIENT_KIND</kindName>
    <kindName xsi:type="xs:string">MECHANISM_OF_ACTION_KIND</kindName>
    <kindName xsi:type="xs:string">PHARMACOKINETICS_KIND</kindName>
    <kindName xsi:type="xs:string">PHYSIOLOGIC_EFFECT_KIND</kindName>
    <kindName xsi:type="xs:string">THERAPEUTIC_CATEGORY_KIND</kindName>
  </kindList>
</ndfrtdata>

Resource "/nui={nui}&roleName={roleName}&transitive={transitive}"

Get the related concepts by role.

Input

nui - the NDF-RT identifier

roleName - the role. See /roleList example for valid role names.

transitive - (optional, default: false) if false, then only the concepts directly associated with the role are returned. If true, the concepts directly associated with the role along with the descendants of these concepts are returned.

Example

http://rxnav.nlm.nih.gov/REST/Ndfrt/nui=N0000145914&roleName=has_PE&transitive=false

(returns)

<ndfrtdata>
  <responseType>
    <inputNui1>N0000145914</inputNui1>
    <inputRoleName>has_PE</inputRoleName>
    <inputTransitive>false</inputTransitive>
  </responseType>
  <groupConcepts>
    <concept>
      <conceptName>Decreased Organized Electrical Activity</conceptName>
      <conceptNui>N0000008768</conceptNui>
      <conceptKind>PHYSIOLOGIC_EFFECT_KIND</conceptKind>
    </concept>
  </groupConcepts>
</ndfrtdata>

Resource "/parentConcepts/nui={nui}&transitive={transitive}"

Get the parent concepts of a specified concept.

Input

nui - the NDF-RT identifier

transitive - (optional, default: false) if false, then only direct parent concepts are returned. If true, all ancestor concepts are returned.

Example

http://rxnav.nlm.nih.gov/REST/Ndfrt/parentConcepts/nui=N0000153235&transitive=false

(returns)

<ndfrtdata>
  <responseType>
    <inputNui1>N0000153235</inputNui1>
    <inputTransitive>false</inputTransitive>
  </responseType>
  <groupConcepts>
    <concept>
      <conceptName>ANTICOAGULANTS</conceptName>
      <conceptNui>N0000029110</conceptNui>
      <conceptKind>DRUG_KIND</conceptKind>
    </concept>
    <concept>
      <conceptName>WARFARIN SODIUM</conceptName>
      <conceptNui>N0000146870</conceptNui>
      <conceptKind>DRUG_KIND</conceptKind>
    </concept>
  </groupConcepts>
</ndfrtdata>

Resource "/properties/nui={nui}&propertyName={propertyName}"

Get the property values for a specified concept and property

Input

nui - the NDF-RT identifier

propertyName - (optional) the property name. If not specified, all concept properties are returned. See /propertyList example for valid property names

Example

http://rxnav.nlm.nih.gov/REST/Ndfrt/properties/nui=N0000153235&propertyName=UMLS_CUI

(returns)

<ndfrtdata>
  <responseType>
    <inputNui1>N0000153235</inputNui1>
    <inputPropertyName>UMLS_CUI</inputPropertyName>
  </responseType>
  <groupProperties>
    <property>
      <propertyName>UMLS_CUI</propertyName>
      <propertyValue>C0690746</propertyValue>
    </property>
  </groupProperties>
</ndfrtdata>

Resource "/propertyList"

Get the list of property names

Example

http://rxnav.nlm.nih.gov/REST/Ndfrt/propertyList

(returns)

<ndfrtdata>
  <propertyList>
    <propertyName xsi:type="xs:string">Display_Name</propertyName>
    <propertyName xsi:type="xs:string">NUI</propertyName>
    <propertyName xsi:type="xs:string">VANDF_Record</propertyName>
    <propertyName xsi:type="xs:string">kind</propertyName>
    <propertyName xsi:type="xs:string">RxNorm_Name</propertyName>
    <propertyName xsi:type="xs:string">RxNorm_CUI</propertyName>
    <propertyName xsi:type="xs:string">Level</propertyName>
    <propertyName xsi:type="xs:string">FDA_UNII</propertyName>
    <propertyName xsi:type="xs:string">code</propertyName>
    <propertyName xsi:type="xs:string">Status</propertyName>
    <propertyName xsi:type="xs:string">VUID</propertyName>
    <propertyName xsi:type="xs:string">UMLS_CUI</propertyName>
    <propertyName xsi:type="xs:string">Synonym</propertyName>
    <propertyName xsi:type="xs:string">SNOMED_CID</propertyName>
    <propertyName xsi:type="xs:string">Units</propertyName>
    <propertyName xsi:type="xs:string">MeSH_CUI</propertyName>
    <propertyName xsi:type="xs:string">Strength</propertyName>
    <propertyName xsi:type="xs:string">MeSH_Name</propertyName>
    <propertyName xsi:type="xs:string">Class_Code</propertyName>
    <propertyName xsi:type="xs:string">MeSH_DUI</propertyName>
    <propertyName xsi:type="xs:string">Class_Description</propertyName>
    <propertyName xsi:type="xs:string">MeSH_Definition</propertyName>
    <propertyName xsi:type="xs:string">Severity</propertyName>
    <propertyName xsi:type="xs:string">CS_Federal_Schedule</propertyName>
    <propertyName xsi:type="xs:string">Print_Name</propertyName>
    <propertyName xsi:type="xs:string">VA_National_Formulary_Name</propertyName>
  </propertyList>
</ndfrtdata>

Resource "/propertyName={propertyName}&propertyValue={propertyValue}"

This function has been deprecated. Use /concept to search by property name and value.

Resource "/reverse/nui={nui}&roleName={roleName}&transitive={transitive}"

Get the concepts related to the specified object concept by role. The concept specified in the call is the object of the role.

Input

nui - the NDF-RT identifier

roleName - the role. See /roleList example for valid role names.

transitive - (optional, default: false) if false, then only the concepts directly associated with the role are returned. If true, the concepts directly associated with the role along with the descendants of these concepts are returned.

Example

In the example below, the drugs which "may_treat" arthritis (NUI="N0000000478") are returned.
http://rxnav.nlm.nih.gov/REST/Ndfrt/reverse/nui=N0000000478&roleName=may_treat&transitive=false

(returns)
<ndfrtdata>
  <responseType>
    <inputNui1>N0000000478</inputNui1>
    <inputRoleName>may_treat</inputRoleName>
    <inputTransitive>false</inputTransitive>
  </responseType>
  <groupConcepts>
    <concept>
      <conceptName>CHONDROITIN SODIUM</conceptName>
      <conceptNui>N0000022978</conceptNui>
      <conceptKind>DRUG_KIND</conceptKind>
    </concept>
    <concept>
      <conceptName>DEVILS CLAW</conceptName>
      <conceptNui>N0000148758</conceptNui>
      <conceptKind>DRUG_KIND</conceptKind>
    </concept>
    <concept>
      <conceptName>LINOLENIC ACID</conceptName>
      <conceptNui>N0000148143</conceptNui>
      <conceptKind>DRUG_KIND</conceptKind>
    </concept>
    <concept>
      <conceptName>MECLOFENAMATE</conceptName>
      <conceptNui>N0000020848</conceptNui>
      <conceptKind>DRUG_KIND</conceptKind>
    </concept>
    <concept>
      <conceptName>SALSALATE</conceptName>
      <conceptNui>N0000147121</conceptNui>
      <conceptKind>DRUG_KIND</conceptKind>
    </concept>
  </groupConcepts>
</ndfrtdata>

Resource "/roleList"

Get the list of roles.

Example

http://rxnav.nlm.nih.gov/REST/Ndfrt/roleList

(returns)

<ndfrtdata>
  <roleList>
    <roleName xsi:type="xs:string">CI_ChemClass</roleName>
    <roleName xsi:type="xs:string">CI_MoA</roleName>
    <roleName xsi:type="xs:string">CI_PE</roleName>
    <roleName xsi:type="xs:string">CI_with</roleName>
    <roleName xsi:type="xs:string">effect_may_be_inhibited_by</roleName>
    <roleName xsi:type="xs:string">has_Chemical_Structure</roleName>
    <roleName xsi:type="xs:string">has_Ingredient</roleName>
    <roleName xsi:type="xs:string">has_MoA</roleName>
    <roleName xsi:type="xs:string">has_PE</roleName>
    <roleName xsi:type="xs:string">has_PK</roleName>
    <roleName xsi:type="xs:string">has_TC</roleName>
    <roleName xsi:type="xs:string">has_active_metabolites</roleName>
    <roleName xsi:type="xs:string">induces</roleName>
    <roleName xsi:type="xs:string">may_diagnose</roleName>
    <roleName xsi:type="xs:string">may_prevent</roleName>
    <roleName xsi:type="xs:string">may_treat</roleName>
    <roleName xsi:type="xs:string">may_treat_or_prevent</roleName>
    <roleName xsi:type="xs:string">metabolized_by</roleName>
    <roleName xsi:type="xs:string">site_of_metabolism</roleName>
  </roleList>
</ndfrtdata>

Resource "/typeList"

Get the list of identifier types.

Example

http://rxnav.nlm.nih.gov/REST/Ndfrt/typeList

(returns)

<ndfrtdata>
  <typeList>
    <typeName xsi:type="xs:string">CODE</typeName>
    <typeName xsi:type="xs:string">MeSH_CUI</typeName>
    <typeName xsi:type="xs:string">MeSH_DUI</typeName>
    <typeName xsi:type="xs:string">NUI</typeName>
    <typeName xsi:type="xs:string">RxCUI</typeName>
    <typeName xsi:type="xs:string">UMLSCUI</typeName>
    <typeName xsi:type="xs:string">UNII</typeName>
    <typeName xsi:type="xs:string">VUID</typeName>
  </typeList>
</ndfrtdata>

Resource "/VA/{nui}"

Get the VA class concepts for the specified concept.

Input

nui - the NDF-RT identifier

Example

http://rxnav.nlm.nih.gov/REST/Ndfrt/VA/N0000160729

(returns)

<ndfrtdata>
  <responseType>
    <inputNui1>N0000160729</inputNui1>
  </responseType>
  <concept>
    <conceptName>ANTIHISTAMINES,PIPERAZINE</conceptName>
    <conceptNui>N0000029291</conceptNui>
    <conceptKind>DRUG_KIND</conceptKind>
  </concept>
</ndfrtdata>

Resource "/VAMember/{nui}"

Get the members of the VA class.

Input

nui - the NDF-RT identifier of the VA class

Example

http://rxnav.nlm.nih.gov/REST/Ndfrt/VAMember/N0000029069

(returns)

<ndfrtdata>
  <responseType>
    <inputNui1>N0000029069</inputNui1>
  </responseType>
  <groupConcepts>
    <concept>
      <conceptName>SODIUM POLYSTYRENE SULFONATE 15GM/60ML SUSP</conceptName>
      <conceptNui>N0000152320</conceptNui>
      <conceptKind>DRUG_KIND</conceptKind>
    </concept>
    <concept>
      <conceptName>SODIUM POLYSTYRENE SULFONATE 50GM/200ML SUSP,RTL</conceptName>
      <conceptNui>N0000152322</conceptNui>
      <conceptKind>DRUG_KIND</conceptKind>
    </concept>
    <concept>
      <conceptName>SODIUM POLYSTYRENE SULFONATE PWDR</conceptName>
      <conceptNui>N0000152319</conceptNui>
      <conceptKind>DRUG_KIND</conceptKind>
    </concept>
    <concept>
      <conceptName>SODIUM POLYSTYRENE SULFONATE 30GM/120ML RTL</conceptName>
      <conceptNui>N0000152321</conceptNui>
      <conceptKind>DRUG_KIND</conceptKind>
    </concept>
  </groupConcepts>
</ndfrtdata>

Resource "/version"

Get the NDF-RT data set version

Example

http://rxnav.nlm.nih.gov/REST/Ndfrt/version

(returns)

<ndfrtdata>
  <version>
    <versionName>2012.07.02</versionName>
  </version>
</ndfrtdata>

Comments? Feedback? Questions?
Contact: Contact us


U.S. National Library of Medicine, 8600 Rockville Pike, Bethesda, MD 20894
National Institutes of Health, Department of Health & Human Services
Copyright, Privacy, Accessibility, Viewers & Players, Freedom of Information Act, USA.gov