RxNav

RxNorm Prescribable API

updated: 10/11/2012

Lister Hill Center

The RxNorm Prescribable API is a web service for accessing the RxNorm Current Prescribable Content from your program via SOAP/WSDL.

Useful links:

Building Applications to Use the RxNorm Prescribable API

This page describes how to build applications to use the RxNorm Prescribable API.
We provide documentation for coding Java and .Net applications. Documentation for building applications in other programming languages (e.g. Perl) may be added at a later time.

Building a Java Application to use the RxNorm Prescribable API

The RxNorm Prescribable API provides developers with functions for retrieving RxNorm Current Prescribable Content data from the most current data set. Building applications to use the RxNorm Prescribable API require initial setup of the development environment and developing code. Each of these is described in detail in this chapter.

Java Development Environment Setup

Setup of a Java developer's environment involves the following steps. All steps must be completed before application code can be compiled and built to execute requests with the RxNorm Prescribable API.
  1. Obtain a Simple Object Access Protocol (SOAP) 1.2 compatible engine for web service message routing.
  2. Download the WSDL for the RxNorm Prescribable API web service.
  3. Generate the client side stubs using Axis's WSDL2Java utility for the WSDL (for applications written in Java).

1. Obtaining a SOAP 1.2 Engine

Developers will require a Simple Object Access Protocol (SOAP) 1.2 compatible engine to route the web service messages to/from the RxNorm Prescribable API. The client programs shown in this guide have been tested with Apache Axis Version 1.4 Follow the link to their website and download and install the version onto your development machine. The location of this download will be referred to as <AXIS_DIR> in this guide.

2. Downloading the RxNorm Prescribable WSDL

The RxNorm WSDL may be downloaded from the RxNav web site. Right-click on the RxNorm Prescribable Service WSDL and save the WSDL file to your development machine. The path to this file will be hereafter referred to as <PRESCRIBABLE_WSDL_LOCATION>.

3. Generating Client Stubs for Java

Apache Axis is delivered with a utility to generate Java classes from a WSDL. Using WSDL2Java generates client stubs that enable communication with a defined web service.
  prompt> java -classpath  <CLASSPATH> org.apache.axis.wsdl.WSDL2Java \
      <PRESCRIBABLE_WSDL_LOCATION>
The call to the utility places generated Java class files in the directory where the utility is run. The <CLASSPATH> must include the following jar files generally found in the lib directory of the Axis installation:
axis.jar
wsdl4j-1.5.1.jar
commons-logging-1.0.4.jar
commons-discovery-0.2.jar
jaxrpc.jar
saaj.jar
activation.jar
mail.jar
Other SOAP engines use different utilities to generate the client stubs. Refer to your specific SOAP engine documentation for instructions on building the client stubs using the downloaded WSDL.

Coding Java Applications to use the RxNorm Prescribable API

The basic paradigm for obtaining RxNorm data from the RxNorm Prescribable API web service is as follows:
  1. Establish a connection to the RxNorm Prescribable API web service.
  2. Obtain the data from the RxNorm Prescribable API web service.

Java Code: Establishing a Connection to the RxNorm Prescribable API Web Service

The RxNorm Prescribable API web service is an Axis web service running at the NLM on the RxNav production machine. The web service endpoint URI is http://mor.nlm.nih.gov/axis/services/PrescribeAPIService The classes generated during WSDL2Java execution must be imported into your application. For Java applications, include these import statements:
import java.net.URL;
import BeanService.*;
import gov.nih.nlm.rxnav.axis.services.PrescribeAPIService.*;
The following code snippet shows how to establish a connection to the RxNorm Prescribable API web service.
String rxhost = "http://mor.nlm.nih.gov";
String rxURI = rxhost + "/axis/services/PrescribeAPIService";

// Locate the RxNorm Prescribable API web service
URL rxURL = new URL(rxURI);
PrescribeDBManagerService rxnormService = new PrescribeDBManagerServiceLocator();
PrescribeDBManager dbmanager = rxnormService.getPrescribeAPIService(rxURL);

Java Code: Obtaining RxNorm Data

The RxNorm Prescribable API web service provides access to current RxNorm data through its calls defined in the WSDL. The code snippet below searches for a concept unique identifier (RxCUI) using exact matching of an input string. Each operation made available in the RxNorm Prescribable API web service is described in detail in the RxNorm Prescribable API design document.
// Get the concept unique identifier for a string
String [] rxcuis = dbmanager.findRxcuiByString("aspirin",,0,0);
// print results
for (int j = 0; j < rxcuis.length; j++)
    System.out.println("RXCUI = " + rxcuis[j]);
if (rxcuis.length == 0) 
    System.out.println("No concept found");

Compiling the Java Application

When compiling the application using the RxNorm Prescribable API, the CLASSPATH must include the directory into which the compiled stubs were put and the following jar files which are generally found in the lib directory of the Axis installation:
axis.jar
wsdl4j-1.5.1.jar
commons-logging-1.0.4.jar
commons-discovery-0.2.jar
jaxrpc.jar
saaj.jar
activation.jar
mail.jar


Building a .Net Application to use the RxNorm Prescribable API

.Net Development Environment and Project Setup

Setup of a .Net developer's environment involves the following steps:
  1. Install a current version of Microsoft Visual Studio .Net, selecting at least these options: VB, C#, and Web development. This tutorial mainly assumes VS 2010, but 2008 is known to work with minor differences.
  2. Start up Visual Studio. If it asks for default settings, choose C# or VB, depending on your preference. In this tutorial, we use C#.
  3. From the Visual Studio menu, choose File -> New Project
    In the Left pane, choose Visual C# -> Windows
    In the Right Pane, choose either Console Application (for a command-line-driven application) or Windows Forms Application (for a GUI-driven application)
    In the "Name:" box, enter a name for your project: RxNormClient or RxNorm_GUI_Client (or any project name you want)
    A new C# file skeleton named Program.cs that contains an empty Main() method in the Program class will be generated.
  4. Do not close Visual Studio and do not close the project or the current program file. You will need to return here later to complete the project setup.

Downloading the RxNorm WSDL and Generating a Client Stub for .Net

In the steps below, Open a command prompt window and enter:
cd [your_source_dir]
"[your_wsdl_dir]\wsdl.exe" /l:CS /protocol:SOAP http://rxnav.nlm.nih.gov/PrescribeAPIService.xml
The following message should be displayed:
Writing file '[your_source_dir]\PrescribeDBManagerService.cs'
Your client stub is in the .cs file that was just created (PrescribeDBManagerService.cs in this example)

Putting the pieces together into a .Net project

  1. You can now either...
    1. Add your client stub source file to your project in Visual Studio
      • In the Solution Explorer pane, right-click the project name and choose Add -> Existing Item
        (The beauty of this option is that it allows you to step into the stub source code in Debug mode.)
    2. Compile the stub into a DLL, by first executing the command line:
            "[your_csc_dir]\csc.exe" /t:library /r:System.Web.Services.dll /r:System.Xml.dll PrescribeDBManagerService.cs
              
      then adding the DLL as a Reference to your project:
      • Right-click the project name in the Solution Explorer pane
      • Choose Add Reference... then select the Browse tab.
  2. Finally, your project needs a reference to the .Net Web Services namespace before it will compile:
  3. You are now ready to code your class's Main() method in any way you wish.



RxNorm Prescribable API Reference

This section contains the design details of the RxNorm Prescribable API. Each function contains a description, the inputs to the function, the outputs from the function and examples. Available functions:

Function Description
findRxcuiByString Search by name to find RxNorm concepts
findRxcuiById Search by identifier to find RxNorm concepts
getSpellingSuggestions Return spelling suggestions for a name
getRxConceptProperties Return the concepts properties
getRelatedByRelationship Return the related concepts of specified relationship types
getRelatedByType Return the related concepts of specified term types
getAllRelatedInfo Return all related concept information
getDrugs Return the related drugs
getNDCs Return all National Drug Codes (NDC) for a concept
getIdTypes Return the available identifier types
getRelaTypes Return the available relationship types
getSourceTypes Return the available vocabulary abbreviated source types
getTermTypes Return the available term types
getMultiIngredBrand Return the brands containing the specified ingredients
getDisplayTerms Return the prescribable brand and ingredient names
getStrength Return the strength attribute for a concept
getQuantity Return the quantity attribute for a concept
getUNII Return the UNII Code for a concept
getSplSetId Return the structured product label set identifiers for a concept
approxMatch Search by name to find the closest RxNorm concepts
getAllConceptsByTTY Return the RxNorm concepts for the specified term types
getAllProperties Return all properties for a concept
getPropNames Return the property names.
getPropCategories Return the property categories.


findRxcuiByString( searchString, source-list, allSourcesFlag, searchType )

Search for a name in the RxNorm data set and return the RxCUIs of any concepts which have that name as an RxNorm term or as a synonym of an RxNorm term.

Input:

searchString - the search string

source-list - not used.

allSourcesFlag - not used.

searchType - a number indicating the type of search to be performed. If set to 0, exact match search will be performed. If set to 1, a normalized string search will be done. When searchType = 2, then an exact match search will be done, and if no results are found, a normalized search will be done. For more information on the normalized string search, click here.

Output:

an array of RxNorm identifiers

Examples

findRxcuiByString( "ezetimibe 10 MG", , 0, 0)     

returns: 
  { 350671 }


findRxcuiByString( "10 MG ezetimibe", , 0, 0)     

returns: 
  { }


findRxcuiByString( "10 MG ezetimibe", , 0, 1)     

returns:
  { 350671 }


findRxcuiById( idType, id, allSourcesFlag )

Search for an identifier from another vocabulary and return the RxCUIs of any concepts which have an RxNorm term as a synonym or have that identifier as an attribute.

Input:

idType - the identifier type. See the getIdTypes example for the valid types. The table below describes the types:

idType Example Details
NDC 00069307086 the National Drug Code (NDC) from the National Drug Code Directory
SPL_SET_ID 1C5BC1DD-E9EC-44C1-9281-67AD482315D9 the FDA Structured Product Label Set Identifier
UMLS CUI C0000266 the Unified Medical Language System (UMLS) Concept Unique Identifier
UNII_CODE LVX8N1UT73 the FDA Unique Ingredient Identifier Code.

id - the identifier

allSourcesFlag - not used.

Output:

an array of RxNorm identifiers

Example

findRxcuiById ( "UMLSCUI", "C0162723", 0)    

returns:
  { 58930 }

getSpellingSuggestions( searchString )

Get spelling suggestions for a given term. The suggestions are RxNorm terms contained in the current version.

Input:

searchString - the name of the term

Output:

an array of names that are spelling suggestions of the input term, ranked by decreasing relevance.

Example

getSpellingSuggestions( "zyrteck" )

returns:
  {"Zyrtec", "Zyrtec-D" }

getRxConceptProperties( rxcui )

Get the RxNorm Concept properties

Input:

rxcui - the RxNorm identifier

Output:

an RxNorm concept structure containing the following fields:

Example

getRxConceptProperties( "58930")    

returns:

{ Name = "Zyrtec",  Rxcui = "58930", Type = "BN", Lat = "ENG", 
Suppress = "N", Umlscui = "C0162723", SY = "" }

getRelatedByRelationship( rxcui, relationship-list )

Get the related RxNorm identifiers of an RxNorm concept specified by a relational attribute.

Input:

rxcui - the RxNorm identifier

relationship-list - an array of the relationship attribute names such as "tradename_of", "has_form", "isa", etc. The list of valid relationship attributes is contained in the getRelaTypes example.

Output:

an array of RxNorm concept group structures. An RxNorm concept group structure has the following fields:

Example

getRelatedByRelationship( "58930", {"tradename_of", "has_precise_ingredient"} )  

returns:

{
Type = "IN", {
{ Name = "Cetirizine", Rxcui = "20610", Type = "IN", Lat = "ENG", 
Suppress = "N", Umlscui = "C055147", SY = ""}}
Type = "PIN", {
{ Name = "cetirizine hydrochloride", Rxcui = "203150", Type = "PIN", Lat = "ENG", 
Suppress = "N", Umlscui = "C0700480", SY = ""} }
}

getRelatedByType( rxcui, type-list )

Get the related RxNorm identifiers of an RxNorm concept specified one or more term types.

Input:

rxcui - the RxNorm identifier

type-list - an array of one or more RxNorm term types. Valid RxNorm term types are list in the getTermTypes example.

Output:

an array of RxNorm concept group structures. An RxNorm concept group structure has the following fields:

Example

getRelatedByType( "131725", {"IN", "PIN", "SBD"} )  

returns:

{
Type = "IN", { 
{ Name = "zolpidem", Rxcui = "39993", Type = "IN", Lat = "ENG", 
Suppress = "N", Umlscui = "C0078839", SY = ""}}
Type = "PIN", {
{ Name = "Zolpidem tartrate", Rxcui = "221183", Type = "PIN", Lat = "ENG", 
Suppress = "N", Umlscui = "C0724725", SY = ""}}
Type = "SBD", {
{ Name = "Zolpidem tartrate 10 MG Oral Tablet [Ambien]", Rxcui = "854875", Type = "SBD", Lat = "ENG", 
Suppress = "N", Umlscui = "C0712713", SY= "Ambien 10 MG Oral Tablet"},
{ Name = "Zolpidem tartrate 12.5 MG Extended Release Tablet [Ambien]", Rxcui = "854882", Type = "SBD", Lat = "ENG", 
Suppress = "N", Umlscui = "C1628353", SY= "Ambien CR 12.5 MG Extended Release Tablet"}, 
{ Name = "Zolpidem tartrate 5 MG Oral Tablet [Ambien]", Rxcui = "854878", Type = "SBD", Lat = "ENG", 
Suppress = "N", Umlscui = "C0712699", SY= "Ambien 5 MG Oral Tablet"}, 
{ Name = "Zolpidem tartrate 6.25 MG Extended Release Tablet [Ambien]", Rxcui = "854896", Type = "SBD", Lat = "ENG", 
Suppress = "N", Umlscui = "C1630664", SY= "Ambien CR 6.25 MG Extended Release Tablet"} }
} 

getAllRelatedInfo( rxcui )

Get all the related RxNorm concepts for a given RxNorm identifier. This includes concepts of term types "IN", "MIN", "PIN", "BN", "SBD", "SBDC", "SBDF", "SCD", "SCDC", "SCDF", "DF", "BPCK" and "GPCK".

Input:

rxcui - the RxNorm identifier

Output:

an array of RxNorm concept group structures. An RxNorm concept group structure has the following fields:

Example

getAllRelatedInfo( "151524" ) 

returns:

{
Type = "IN", { 
{ Name = "Sulindac", Rxcui = "10237", Type = "IN", Lat = "ENG", Suppress = "N", 
Umlscui = "C0038792", SY = ""} }
Type = "BN", {
{ Name = "Clinoril", Rxcui = "151524", Type = "BN", Lat = "ENG", Suppress = "N", 
Umlscui = "C0591267", SY = ""} }
Type = "SCDC", {
{ Name = "Sulindac 150 MG", Rxcui = "316755", Type = "SCDC", Lat = "ENG", 
Suppress = "N", Umlscui = "C0990458", SY= ""},
{ Name = "Sulindac 200 MG", Rxcui = "316756", Type = "SCDC", Lat = "ENG", 
Suppress = "N", Umlscui = "C0990459", SY= ""} }
Type = "SBDC", {
{ Name = "Sulindac 150 MG [Clinoril]", Rxcui = "569138", Type = "SBDC", Lat = "ENG", 
Suppress = "N", Umlscui = "C1618559", SY= ""},
{ Name = "Sulindac 200 MG [Clinoril]", Rxcui = "564274", Type = "SBDC", Lat = "ENG", 
Suppress = "N", Umlscui = "C1617517", SY= ""} }
Type = "SCD", {
{ Name = "Sulindac 150 MG Oral Tablet", Rxcui = "198238", Type = "SCD", Lat = "ENG", 
Suppress = "N", Umlscui = "C0690432", SY= ""},
{ Name = "Sulindac 200 MG Oral Tablet", Rxcui = "198239", Type = "SCD", Lat = "ENG", 
Suppress = "N", Umlscui = "C0690433", SY= ""} }
Type = "SBD", {
{ Name = "Sulindac 150 MG Oral Tablet [Clinoril]", Rxcui = "198238", Type = "SBD", Lat = "ENG", 
Suppress = "N", Umlscui = "C0710020", SY= "Clinoril 150 MG Oral Tablet"}, 
{ Name = "Sulindac 200 MG Oral Tablet [Clinoril]", Rxcui = "105944", Type = "SBD", Lat = "ENG", 
Suppress = "N", Umlscui = "C0357508", SY= "Clinoril 200 MG Oral Tablet"} }
Type = "SCDF", {
{ Name = "Sulindac Oral Tablet", Rxcui = "374003", Type = "SCDF", Type = "SCDF", Lat = "ENG", 
Suppress = "N", Umlscui = "C1248075", SY= ""} }
Type = "SBDF", {
{ Name = "Sulindac Oral Tablet [Clinoril]", Rxcui = "367629", Type = "SBDF", Lat = "ENG", 
Suppress = "N", Umlscui = "C1621233", SY= ""} }
Type = "SCDG", {
{ Name = "Sulindac Oral Product", Rxcui = "1163018", Type = "SCDG", Lat = "ENG", 
Suppress = "N", Umlscui = "", SY= ""},
{ Name = "Sulindac Pills", Rxcui = "1163019", Type = "SCDG", Lat = "ENG", 
Suppress = "N", Umlscui = "", SY= ""} }
Type = "SBDG", {
{ Name = "CLinoril Oral Product", Rxcui = "1173005", Type = "SBDG", Lat = "ENG", 
Suppress = "N", Umlscui = "", SY= ""},
{ Name = "Clinoril Pill", Rxcui = "1173006", Type = "SBDG", Lat = "ENG", 
Suppress = "N", Umlscui = "", SY= ""} }
Type = "DFG", {
{ Name = "Oral Product", Rxcui = "1151131", Type = "DFG", Lat = "ENG", 
Suppress = "N", Umlscui = "", SY= ""},
{ Name = "Pill", Rxcui = "1151133", Type = "DFG", Lat = "ENG", 
Suppress = "N", Umlscui = "", SY= ""} }
Type = "DF", {
{ Name = "Oral Tablet", Rxcui = "317541", Type = "DF", Lat = "ENG", 
Suppress = "N", Umlscui = "C0993159", SY= ""} }
Type = "PIN", {}
Type = "BPCK", {}
Type = "GPCK", {}
Type = "MIN", {}
}

getDrugs( name )

Get the drug products associated with a specified name. The name can be an ingredient, brand name, clinical dose form, branded dose form, clinical drug component, or branded drug component.

Input:

name - the name of the drug

Output:

An array of concept group structures whose types are "SBD" and "BPCK" for brand names, branded dose forms or branded drug components, or "SCD" and "GPCK" for clinical dose forms or clinical drug components. For ingredients "SBD", "BPCK", "SCD" and "GPCK" are returned.

Example 1:

getDrugs( "varenicline" )  

returns:

{
Type = "BPCK", {
{ Name = "{56 (varenicline 1 MG Oral Tablet [Chantix]) } Pack [Chantix Continuing Months Of Therapy]", 
Rxcui = "795735", Type = "BPCK",
Lat = "ENG", Suppress = "N", Umlscui = "C1877454", SY= "Chantix Continuing Months Of Therapy Pack"},
{ Name = "{11 (varenicline 0.5 MG Oral Tablet [Chantix]) / 42 (varenicline 1 MG Oral Tablet [Chantix]) } Pack [Chantix First Month of Therapy]", 
Rxcui = "795737", Type = "BPCK",
Lat = "ENG", Suppress = "N", Umlscui = "C1877455", SY= "Chantix First Month Of Therapy Pack"} }
Type = "GPCK", {
{ Name = "{11 (varenicline 0.5 MG Oral Tablet) / 42 (varenicline 1 MG Oral Tablet) }", RxCui = "749289", Type = "GPCK", 
Lat = "ENG", Suppress = "N", Umlscui = "C1968342", SY= ""},
{ Name = "{ 56 (varencline 1 MG Oral Tablet) } Pack", RxCui = "749788", Type = "GPCK", 
Lat = "ENG", Suppress = "N", Umlscui = "C1968394", SY= ""} }
Type = "SBD", {
{ Name = "varenicline 0.5 MG Oral Tablet[Chantix]", Rxcui = "637188", Type = "SBD", 
Lat = "ENG", Suppress = "N", Umlscui = "C1712045", SY= "Chantix 0.5 MG Oral Tablet"},
{ Name = "varenicline 1 MG Oral Tablet[Chantix]", Rxcui = "637190", Type = "SBD", 
Lat = "ENG", Suppress = "N", Umlscui = "C1712047", SY= "Chantix 1 MG Oral Tablet"} }
Type = "SCD", {
{ Name = "varenicline 0.5 MG Oral Tablet", Rxcui = "636671", Type = "SCD", 
Lat = "ENG", Suppress = "N", Umlscui = "C1711886", SY= ""},
{ Name = "varenicline 1 MG Oral Tablet", Rxcui = "636676", Type = "SCD", 
Lat = "ENG", Suppress = "N", Umlscui = "C1711889", SY= ""} }
}
Example 2:
getDrugs("cymbalta")   

returns:

{
Type = "SBD", {
{ Name = "duloxetine 20 MG Enteric Coated Capsule [Cymbalta]", Rxcui = "596928", 
Type = "SBD", Lat = "ENG", Suppress = "N", Umlscui = "C1656295", 
SY= "Cymbalta 20 MG Enteric Coated Capsule"},
{ Name = "duloxetine 30 MG Enteric Coated Capsule [Cymbalta]", Rxcui = "596932", 
Type = "SBD", Lat = "ENG", Suppress = "N", Umlscui = "C1614249", 
SY= "Cymbalta 30 MG Enteric Coated Capsule"},
{ Name = "duloxetine 60 MG Enteric Coated Capsule [Cymbalta]", Rxcui = "615186", 
Type = "SBD", Lat = "ENG", Suppress = "N", Umlscui = "C1624617", 
SY= "Cymbalta 60 MG Enteric Coated Capsule"} }
Type = "BPCK", {}
}

getNDCs( rxcui )

Get the National Drug Codes (NDCs) for the RxNorm concept.

Input:

rxcui - the RxNorm identifier

Output:

An array of NDCs

Example

getNDCs( "226827")    

returns:
             
  { "00069307030", "00069307086", "58016033515", "58016033530" }

getIdTypes()

Get the valid identifier types of the RxNorm data set. See findRxcuiById for use of these types.

Input:

None

Output:

An array of valid identifier types.

Example

getIdTypes()   

returns:
 
{"NDC", "SPL_SET_ID", "UMLSCUI", "UNII_CODE"}

getRelaTypes()

Get the relationship names in the RxNorm data set.

Input:

None

Output:

An array of relationship names. See getRelatedByRelationship for use of these names.

Example

getRelaTypes()    

returns:

{ "consists_of", "constitutes", "contained_in", "contains", "dose_form_of", "doseformgroup_of", 
"form_of", "has_dose_form", "has_form", "has_ingredient", "has_ingredients", 
"has_part", "has_precise_ingredient", "has_quantified_form", "has_tradename", "has_doseformgroup",
"ingredient_of", "ingredients_of", "inverse_isa", "isa", "part_of", "precise_ingredient_of", 
"quantified_form_of", "reformulated_to", "reformulation_of", "tradename_of" }

getSourceTypes()

Get the vocabulary abbreviated source names in the RxNorm data set.

Input:

None

Output:

An array of vocabulary source abbreviated names.

Example

getSourceTypes()

returns

{"MTHSPL", "RXNORM"}

getTermTypes()

Get the valid term types in the RxNorm data set.

Input:

None

Output:

An array of the valid term types. See getRelatedByType for use of these term types.

Example

getTermTypes()     

returns:

{ "BN", "BPCK", "DF", "DFG", "GPCK", "IN", "MIN", "PIN", "SBD", "SBDC", "SBDF", "SBDG", "SCD", "SCDC", "SCDF", "SCDG"}

getMultiIngredBrand( rxcui-list )

Get the brands that contain all the specified ingredients. Note that the brands returned may contain other ingredients in addition to those specified.

Input:

rxcui-list - list of the RxCuis of the ingredients

Output:

an RxNorm concept structure containing the following fields:

Example

In this example, find all the brands which contain acetaminophen(1191), aspirin(161), caffeine(1886) and salicylamide(9518).
getMultiIngredBrand( {1191, 161, 1886, 9518} ) 

returns:
{
  {Name = "Levacet", Rxcui = "545872", Type = "BN", Lat = "ENG", Suppress = "N", Umlscui = "C1590207", SY = ""},
  {Name = "Saleto",  Rxcui = "219779", Type = "BN", Lat = "ENG", Suppress = "N", Umlscui = "C0723188", SY = ""}
}

getDisplayTerms( )

Gets the names of ingredients, brands, and branded packs in the prescribable set.

Input:

None

Output:

An array of ingredient, brand and branded pack RxNorm names.

Example

getDisplayTerms()

returns:
(a list of all ingredient, brand and branded pack names)

getStrength( rxcui )

Gets the strength attribute for a specified RxNorm concept.

Input:

rxcui - the RxNorm identifier

Output:

The strength of the concept. This is the RXN_STRENGTH attribute from the RXNSAT file. This applies to RxNorm concepts with term type = "SBDC" or "SCDC".

Example

# get the strength of concept rxcui=315935 "Fluconazole 100 MG"

getStrength( 315935 )

returns:

100 MG

getQuantity( rxcui )

Gets the quantity attribute for a specified RxNorm concept.

Input:

rxcui - the RxNorm identifier

Output:

The quantity attribute of the concept. This is the RXN_QUANTITY attribute from the RXNSAT file. This applies to some RxNorm concepts of term type = "SBD" or "SCD".

Example

# get the quantity of concept RxCUI=727339 "0.5 ML Sumatriptan 12 MG/ML Prefilled Syringe"

getQuantity( 727339 )

returns:

0.5 ML

getUNII( rxcui )

Gets the FDA Unique Ingredient Identifier (UNII) code for a specified RxNorm concept.

Input:

rxcui - the RxNorm identifier

Output:

The FDA Unique Ingredient Identifier Code for the concept. This is the UNII_CODE attribute from the RXNSAT file.

Example

getUNII( 7052 )

returns:

76I7G6D29C

getSplSetId( rxcui )

Gets the Structured Product Label set identifiers for a specified RxNorm concept.

Input:

rxcui - the RxNorm identifier

Output:

The structured product label set identifiers for the concept. This is the SPL_SET_ID attribute from the RXNSAT file.

Example

getSplSetId( 208848 )

returns:

{ "cf2d9bee-f8e3-477a-e4b4-f0e82657b7d2" }

approxMatch( searchString )

Do an approximate match search to determine the strings in the data set that most closely match the search string. The approximate match algorithm is discussed in detail here.

Input:

searchString - the search string

Output:

An array of matching structures. Each matching structure contains the following fields:

Example

approxMatch( "ACETAMINOPHEN 500 MG CAPLET" )

returns:

{  
  {Rxcui = "315266", Rxaui = "1476962", score = "75", rank = "1"},
  {Rxcui = "570054", Rxaui = "2285679", score = "60", rank = "2"},
  {Rxcui = "570042", Rxaui = "2285667", score = "60", rank = "2"},
  {Rxcui = "570063", Rxaui = "2285688", score = "60", rank = "2"},
  {Rxcui = "570072", Rxaui = "2285697", score = "60", rank = "2"},
  {Rxcui = "570070", Rxaui = "2285695", score = "60", rank = "2"},
  {Rxcui = "798927", Rxaui = "2852360", score = "60", rank = "2"},
  {Rxcui = "565623", Rxaui = "2281033", score = "60", rank = "2"},
  {Rxcui = "570043", Rxaui = "2285668", score = "50", rank = "9"}
  {Rxcui = "570044", Rxaui = "2285669", score = "50", rank = "9"}
}


getAllConceptsByTTY( termtypes )

Return all the concepts for the specified term types.

Input:

termtypes - an array of term types. See the getTermTypes example for the names of valid term types.

Output:

An array of concept minimal structures. Each concept minimal structure contains the following fields:

Example

getAllConceptsByTTY( {"BN","BPCK"} )

returns:

{
  {Rxcui = "672535", name = "4-Way", tty = "BN"},
  {Rxcui = "705301", name = "666 Cold Preparation", tty = "BN"},
  {Rxcui = "728461", name = "A-Cof DH", tty = "BN"},

  (many more listed ...)
}


getAllProperties( rxcui, categories )

Get all properties for a specified concept.

Input:

rxcui - the RxNorm concept identifier.

categories - an array of category types. See getPropCategories for the names of valid categories. To get all properties for all categories, specify "ALL" (see example below).

Output:

An array of property structures. Each property structure contains

Example

getAllProperties( "476299", {"ALL"} )

returns:
{
  { name="TTY",          value="SCD", category="ATTRIBUTES"},
  { name="HUMAN_DRUG",   value="US",  category="ATTRIBUTES"},
  { name="AVAILABLE_STRENGTH", value="600 MG", category="ATTRIBUTES"},
  { name="RxCUI",        value="476299",   category="CODES"},
  { name="UMLSCUI",      value="C1509258", category="CODES"},
  { name="RxNorm Name",  value="Amoxicillin trihydrate 600 MG Disintegrating Tablet", category="NAMES"} 
}


getPropNames( )

Get the property names.

Example

getPropNames()

returns:

{
  "ACTIVATED", "ANDA", "AVAILABLE_STRENGTH", "BN_CARDINALITY", "HUMAN_DRUG",
  "IN_EXPRESSED_FLAG", "NDA", "ORIG_CODE", "ORIG_SOURCE",
  "QUANTITY", "RxCUI", "RxNorm Name", "RxNorm Synonym", "SPL SET ID",
  "STRENGTH", "Source", "TTY", "UMLSCUI", "UNII_CODE", "VET_DRUG"
}


getPropCategories( )

Get the property categories.

Example

getPropCategories()

returns:

{ "ATTRIBUTES", "CODES", "NAMES", "SOURCES" }



Recent API changes

Release Date: October 11, 2012
Modules affected: all
Description of changes:
Initial release of the RxNorm Prescribable API.

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