|
RxNorm APIupdated: 10/7/2009 |
|
The 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.
Recent changes to 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.rxnav.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
|
RxNorm API Reference |
This section 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:
Output:
an array of RxNorm identifiers
Example
findRxcuiByString( "zyrtec", {"MMSL", "VANDF"}, 1)
returns:
{ 58930 }
Input:
Output:
an array of RxNorm identifiers
Example
findRxcuiById ( "UMLSCUI", "C0162723", 0)
returns:
{ 58930 }
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", "zyrphen"}
Input:
rxcui - the RxNorm identifier
Output:
Example
getRxConceptProperties( "58930")
returns:
{ Name = "Zyrtec", Rxcui = "58930", Type = "BN", Lat = "ENG",
Suppress = "N", Umlscui = "C0162723", SY = "" }
Input:
rxcui - the RxNorm identifier
relationship-list - an array of the relationship attribute names such as "tradename_of", "has_form", "isa", etc
Output:
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 = "PIN", Lat = "ENG",
Suppress = "N", Umlscui = "C0700480", SY = ""} }
}
Input:
rxcui - the RxNorm identifier
type-list - an array of one or more RxNorm term types
Output:
Example
getRelatedByType( "131725", {"IN", "PIN", "SBD"} )
returns:
{
Type = "IN", {
{ Name = "zolpidem", Rxcui = "39993", Type = "IN", Lat = "ENG",
Suppress = "N", Umlscui = "C0078839", SY = ""},
{ Name = "Zolpidem tartrate", Rxcui = "221183", Type = "PIN", 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 identifier
Output:
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 = "PIN", {}
Type = "BPCK", {}
Type = "GPCK", {}
}
Input:
name - the name of the drug
Output:
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 identifier
Output:
An array of NDCs
Example
getNDCs( "105259")
returns:
{ "00069305050", "00069305086", "51129930501", "60491072206" }
Input:
None
Output:
The version of the RxNorm data set. The date of the monthly release will be returned along (if applicable) the date of the last weekly update.
Example
getRxNormVersion() returns "01-Oct-2008;08-Oct-2008"
Input:
None
Output:
An array of valid identifier types.
Example
getIdTypes()
returns:
{"AMPID", "GCN_SEQNO", "GFC", "GPPC", "LISTING_SEQ_NO", "MMSL_CODE", "NDC", "SNOMEDCT",
"SPL", "UMLSCUI", "UNII_CODE", "VUID" }
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",
"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:
None
Output:
An array of the valid term types. See getRelatedByType for use of these term types.
Example
getTermTypes()
returns:
{ "BN", "BPCK", "DF", "GPCK", "IN", "PIN", "SBD", "SBDC", "SBDF", "SCD", "SCDC", "SCDF"}
Input:
Output:
Example
getProprietaryInformation( "61609", {"SNOMEDCT", "MMSL"}, ticket)
returns:
{{RxCui= "61609", Name= "Arbutamine", Type= "PT", Id= "109207004", Source= "SNOMEDCT"},
{RxCui= "61609", Name= "Arbutamine (substance)", Type= "FN", Id= "109207004", Source= "SNOMEDCT"},
{RxCui= "61609", Name= "arbutamine", Type= "GN", Id= "d04216", Source= "MMSL"}}
Input:
rxcui-list - list of the RxCuis of the ingredients
Output:
Example
getMultiIngredBrand( {1191, 33408} )
returns:
{Name = "Momentum tradename", Rxcui = "218423", Type = "BN", Lat = "ENG", Suppress = "N", Umlscui = "C0721776", SY = ""}
Input:
None
Output:
An array of ingredient, brand and branded pack RxNorm names.
Example
getDisplayTerms() returns: (a list of names used by the auto completion function of RxNav)
|
Release Date: October 7, 2009 Modules effected: getDisplayTerms Description of change: New function added to user documentation and to the WSDL file. |
|
Release Date: August 17, 2009 Modules effected: findRxcuiById, getIdTypes Description of change: The GCN identifier has been replaced by GCN_SEQNO. |
|
Release Date: July 8, 2009 Modules effected: getAllRelatedInfo, getConceptProperties, getRelatedByType, getTermTypes Description of change: The PIN (precise ingredient) term type was added starting with the July 2009 release of the RxNorm data set. RxNorm terms of this type previously had an IN term type. The PIN term type will be returned as part of the structure returned by getAllRelatedInfo. PIN is also now a valid input type for getRelatedByType. |
|
Release Date: April 28, 2009 Modules effected: findRxcuiById, with idType = "NDC" Description of change: The change fixes a problem in the findRxcuiById function when used with the NDC identifier type. In certain cases RxCUIs were not returned when the NDC identifier was contained in more than one concept. This problem occurred regardless of the value of the allSourcesFlag parameter. |
|
Release Date: March 23, 2009 Modules effected: getRelatedByType, getAllRelatedInfo Description of change: The change fixes a problem in the getRelatedByType and the getAllRelatedInfo functions when the term type (TTY) associated with the RxCUI was a branded pack (BPCK). In certain cases the related ingredient (IN) and clinical drug component (SCDC) concepts were not returned. |
|
U.S. National Library of Medicine,
8600 Rockville Pike, Bethesda, MD 20894
National Institutes of Health, Department of Health & Human Services Copyright, Privacy, Accessibility |