RxNorm Prescribable APIupdated: 10/11/2012 |
The RxNorm Prescribable API is a web service for accessing the RxNorm Current Prescribable Content from your program via SOAP/WSDL.
Useful links: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.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/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);
// 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");
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
C:\Documents and Settings\[your_username]\\My Documents\Visual Studio 2010\Projects\RxNormClient\RxNormClient
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30318 C:\WINDOWS\Microsoft.NET\Framework\v3.5
cd [your_source_dir] "[your_wsdl_dir]\wsdl.exe" /l:CS /protocol:SOAP http://rxnav.nlm.nih.gov/PrescribeAPIService.xmlThe 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)
"[your_csc_dir]\csc.exe" /t:library /r:System.Web.Services.dll /r:System.Xml.dll PrescribeDBManagerService.csthen adding the DLL as a Reference to your project:
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. |
Input:
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 }
Input:
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. |
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" }
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. The list of valid relationship attributes is contained in the getRelaTypes example.
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 = ""}} Type = "PIN", { { Name = "cetirizine hydrochloride", 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. Valid RxNorm term types are list in the getTermTypes example.
Output:
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"} } }
Input:
rxcui - the RxNorm identifier
Output:
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", {} }
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", {} }
Input:
rxcui - the RxNorm identifier
Output:
An array of NDCs
Example
getNDCs( "226827") returns: { "00069307030", "00069307086", "58016033515", "58016033530" }
Input:
None
Output:
An array of valid identifier types.
Example
getIdTypes() returns: {"NDC", "SPL_SET_ID", "UMLSCUI", "UNII_CODE"}
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" }
Input:
None
Output:
An array of vocabulary source abbreviated names.
Example
getSourceTypes() returns {"MTHSPL", "RXNORM"}
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"}
Input:
rxcui-list - list of the RxCuis of the ingredients
Output:
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 = ""} }
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)
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
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
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
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" }
Input:
searchString - the search string
Output:
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"} }
Input:
termtypes - an array of term types. See the getTermTypes example for the names of valid term types.
Output:
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 ...) }
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:
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"} }
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" }
Example
getPropCategories() returns: { "ATTRIBUTES", "CODES", "NAMES", "SOURCES" }
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 |