RxNorm API is a web service for accessing the current RxNorm data set from your program via SOAP/WSDL.
The WSDL file for the RxNorm API can be found here.
prompt> java -classpath <CLASSPATH> org.apache.axis.wsdl.WSDL2Java \ <RXNORM_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.jarOther 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.
http://mor.nlm.nih.gov/axis/services/RxNormDBService
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.mor.axis.services.RxNormDBService.*;The following code snippet shows how to establish a connection to the RxNorm API web service.
String rxhost = "http://mor.nlm.nih.gov"; String rxURI = rxhost + "/axis/services/RxNormDBService"; // Locate the RxNorm API web service URL rxURL = new URL(rxURI); DBManagerService rxnormService = new DBManagerServiceLocator(); DBManager dbmanager = rxnormService.getRxNormDBService(rxURL);
// Get the concept unique identifier for a string
String [] rxcuis = dbmanager.findRxcuiByString("aspirin");
// 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");
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
This document contains the design details of the RxNorm API. Each function contains a description, the inputs to the function, the outputs from the function and examples. Available functions:
Input:
searchString - the search stringOutput:
an array of RxNorm identifiersExample
findRxcuiByString( "zocor")
returns:
{ 19653 }
Input:
idType - the identifier type. Valid types are:Output:
an array of RxNorm identifiersExample
findRxcuiById ( "UMLSCUI", "C0162723")
returns:
{ 58930 }
Input:
searchString - the name of the termOutput:
an array of names that are spelling suggestions of the input term, ranked by decreasing relevance.Example
getSpellingSuggestions( "zyrteck" )
returns:
{"Zyrtec", "Zyrtec-D", "zyrphen"}
Input:
rxcui - the RxNorm identifierOutput:
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 = "" }
Input:
rxcui - the RxNorm identifierOutput:
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 = ""},
{ Name = "Cetirizine Dihydrochloride", Rxcui = "203150", Type = "IN", Lat = "ENG",
Suppress = "N", Umlscui = "C0700480", SY = ""} }
}
Input:
rxcui - the RxNorm identifierOutput:
an array of RxNorm concept group structures. An RxNorm concept group structure has the following fields:Example
getRelatedByType( "131725", {"IN", "SBD"} )
returns:
{
Type = "IN", {
{ Name = "zolpidem", Rxcui = "39993", Type = "IN", Lat = "ENG",
Suppress = "N", Umlscui = "C0078839", SY = ""},
{ Name = "Zolpidem tartrate", Rxcui = "221183", Type = "IN", Lat = "ENG",
Suppress = "N", Umlscui = "C0724725", SY = ""} }
Type = "SBD", {
{ Name = "zolpidem 10 MG Oral Tablet [Ambien]", Rxcui = "210762", Type = "SBD", Lat = "ENG",
Suppress = "N", Umlscui = "C0712713", SY= "Ambien 10 MG Oral Tablet"},
{ Name = "zolpidem 12.5 MG Extended Release Tablet [Ambien]", Rxcui = "602455", Type = "SBD", Lat = "ENG",
Suppress = "N", Umlscui = "C1628353", SY= "Ambien 12.5 MG Extended Release Tablet"},
{ Name = "zolpidem 5 MG Oral Tablet [Ambien]", Rxcui = "210749", Type = "SBD", Lat = "ENG",
Suppress = "N", Umlscui = "C0712699", SY= "Ambien 5 MG Oral Tablet"},
{ Name = "zolpidem 6.25 MG Extended Release Tablet [Ambien]", Rxcui = "602459", Type = "SBD", Lat = "ENG",
Suppress = "N", Umlscui = "C1630664", SY= "Ambien 6.25 MG Extended Release Tablet"} }
}
Input:
rxcui - the RxNorm identifierOutput:
an array of RxNorm concept group structures. An RxNorm concept group structure has the following fields: Type - the RxNorm term type Array of RxNorm concept structures. See above for the description of the RxNorm concept structure.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 = "DF", {
{ Name = "Oral Tablet", Rxcui = "317541", Type = "DF", Lat = "ENG",
Suppress = "N", Umlscui = "C0993159", SY= ""} }
Type = "BPCK", {}
Type = "GPCK", {}
}
Input:
name - the name of the drugOutput:
An array of concept group structures whose types are "SBD" and "BPCK" for brand names, branded drug forms or branded drug components, or "SCD" and "GPCK" for ingredients, clinical drug forms or clinical drug components.Example 1:
getDrugs( "varenicline" )
returns:
{
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= ""} }
Type = "GPCK", {
{ Name = "{ 56 (varencline 1 MG Oral Tablet) } Pack", RxCui = "749788", Type = "GPCK",
Lat = "ENG", Suppress = "N", Umlscui = "", 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", {}
}
Input:
rxcui - the RxNorm identifierOutput:
An array of NDCsExample
getNDCs( "105259")
returns:
{ "00069305050", "00069305086", "51129930501", "60491072206" }
Input:
NoneOutput:
The version of the RxNorm data setExample
getRxNormVersion() returns "07AC_071228F"
Input:
NoneOutput:
An array of valid identifier types.Example
getIdTypes()
returns:
{"AMPID", "GCN", "GFC", "GPPC", "LISTING_SEQ_NO", "MMSL_CODE", "NDC", "SNOMEDCT",
"SPL", "UMLSCUI", "VUID" }
Input:
NoneOutput:
An array of relationship names. See getRelatedByRelationship for use of these names.Example
getRelaTypes()
returns:
{ "consists_of", "constitutes", "contained_in", "contains", "dose_form_of",
"form_of", "has_dose_form", "has_form", "has_ingredient", "has_precise_ingredient",
"has_tradename", "ingredient_of", "inverse_isa", "isa", "precise_ingredient_of",
"reformulated_to", "reformulation_of", "tradename_of" }
Input:
NoneOutput:
An array of the valid term types. See getRelatedByType for use of these term types.Example
getTermTypes()
returns:
{ "BN", "BPCK", "DF", "GPCK", "IN", "SBD", "SBDC", "SBDF", "SCD", "SCDC", "SCDF"}