Skip to content

RxNorm Drug Search

Searches the RxNorm database for drug concepts by name. You can choose to search across all source terms or only active terms. Returns the full API response as JSON, a JSON array of matching RxCUIs, and a status message.
Preview

Usage

Use this node when you need to resolve a free-text drug name into RxNorm concepts. Typically, you start with this node to obtain one or more RxCUIs and then feed those identifiers into downstream nodes to fetch properties, RxTerms info, related concepts, or other analyses.

Inputs

FieldRequiredTypeDescriptionExample
drug_nameTrueSTRINGThe drug name to search for in RxNorm. Free text is accepted.acetaminophen
search_all_termsTrueBOOLEANIf true, searches all source terms; if false, searches only active terms.false

Outputs

FieldTypeDescriptionExample
search_resultsSTRINGA pretty-printed JSON string containing the search parameters and the raw RxNorm API response.{ "search_term": "acetaminophen", "search_all_terms": false, "results": { "idGroup": { "rxnormId": ["161"] } } }
rxcuiSTRINGA JSON array string of matched RxCUI identifiers extracted from the search results.["161", "798928"]
statusSTRINGA human-readable status summarizing success or any encountered error.Successfully searched for 'acetaminophen' in RxNorm

Important Notes

  • Empty input handling: If the drug_name is blank or whitespace, the node returns "{}", "[]", and an error status without calling the API.
  • External API dependency: This node calls the RxNav REST API; network issues or service errors will be reflected as an API error message in the status and search_results output.
  • RXCUI output format: The rxcui output is a JSON array serialized as a string. Downstream consumers may need to parse it back into an array.
  • Result structure: The node expects RxNorm's find endpoint to return idGroup.rxnormId. If that structure is missing due to no matches or API changes, the node returns an error payload and empty rxcui.
  • Search scope: 'search_all_terms' toggles whether to include all source terms vs. only active terms, which can significantly affect the number and type of matches.

Troubleshooting

  • No results returned: Ensure the drug_name is spelled correctly or enable search_all_terms to broaden the query.
  • Empty RXCUI list: This can occur if there are no matches or the API response lacks idGroup.rxnormId. Try a broader name or verify the API is reachable.
  • API/network errors: Check network connectivity and retry. The status will include a message like "API Error: " when RxNav is unavailable or returns an error.
  • Unexpected output format: The rxcui field is a JSON array as a string. If a downstream step expects a list, parse it first.
  • Input validation error: If you see "Error: Drug name cannot be empty", provide a non-empty string for drug_name.