RxNorm Drug Search¶
Searches the RxNorm database for drug concepts by name and returns a formatted JSON of the search results, the matched RxCUI list as JSON, and a status message. Supports optionally searching across all terms (not just active ones). Handles empty input and upstream API error responses gracefully.

Usage¶
Use this node to look up standardized RxNorm concept identifiers (RxCUIs) for a drug name before performing downstream operations such as concept info retrieval, related concepts exploration, or drug interaction checks. Typical workflow: provide a drug name, optionally enable broader term matching, then feed the returned RxCUI JSON into subsequent RxNorm nodes.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| drug_name | True | STRING | The drug name to search for in RxNorm. | acetaminophen |
| search_all_terms | True | BOOLEAN | If true, searches across all terms (not limited to active ones). If false, limits to active terms. | false |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| search_results | STRING | A pretty-printed JSON string containing the original search term, the search_all_terms flag, and the raw API results. | {"search_term": "acetaminophen", "search_all_terms": false, "results": {"idGroup": {"name": "acetaminophen", "rxnormId": ["12345", "67890"]}}} |
| rxcui | STRING | JSON stringified array of matched RxCUI identifiers extracted from the results. | ["12345", "67890"] |
| status | STRING | Human-readable message indicating success or the type of error encountered. | Successfully searched for 'acetaminophen' in RxNorm |
Important Notes¶
- Outputs are JSON strings: Both search_results and rxcui are JSON-encoded strings. Parse them if you need structured data downstream.
- Empty input check: If drug_name is empty or whitespace, the node returns search_results="{}", rxcui="[]", and an error status.
- API error handling: If the upstream service returns an error, the node returns the error payload in search_results, rxcui="[]", and a status starting with "API Error:"
- search_all_terms broadens matching: Turn this on to include non-active or additional term variants, which may increase the number of RxCUIs returned.
- Network dependency: This node relies on an external RxNorm API; connectivity or service interruptions can affect results and timing.
Troubleshooting¶
- Received 'Error: Drug name cannot be empty': Provide a non-empty drug_name value.
- Status shows 'API Error:': Inspect search_results for the error details. Retry later, check network connectivity, or adjust the input term.
- rxcui is an empty array: Either no matches were found or the request errored. Try enabling search_all_terms, use a more general name, or correct spelling.
- Downstream nodes fail to read outputs: Ensure you parse the JSON strings from search_results and rxcui before accessing fields or iterating.