RxNorm Approximate Match¶
Finds approximate RxNorm matches for a free-text term (e.g., a common drug name or misspelling). It queries the RxNorm service and returns the raw results as a JSON string along with a status message. Useful for fuzzy matching when exact concept names or identifiers are unknown.

Usage¶
Use this node when you have a user-entered or noisy medication string and need to discover likely RxNorm concepts. Provide a single term (like 'acetamenophen' or a brand name). The node returns a JSON string containing the search term and the RxNorm API results. Downstream nodes can parse this JSON to extract candidate RxCUIs or display suggestions.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| term | True | STRING | The free-text term to approximate-match against RxNorm (drug name, brand, or potentially misspelled term). | acetaminophen |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| approximate_matches | STRING | A JSON string containing the search term and the RxNorm approximate-match results. Structure: { "search_term": | { "search_term": "acetaminophen", "results": { "approximateGroup": { "candidate": [ { "rxcui": "161", "rxaui": "...", "score": "100", "name": "Acetaminophen" } ] } } } |
| status | STRING | Human-readable status message indicating success or the error encountered. | Successfully retrieved approximate matches for 'acetaminophen' |
Important Notes¶
- Input required: The term must be a non-empty string; an empty or whitespace-only term returns "{}" and an error status.
- Raw API structure: The node returns the RxNorm approximate-match results without normalization; downstream logic should parse the JSON and handle fields like scores, candidate lists, and RxCUIs.
- Error handling: If the RxNorm service responds with an error (results contain an "error" key), the node returns that error payload in the JSON and a corresponding API error status.
- Output types: Both outputs are strings; parse the first output as JSON before extracting values.
- Service dependency: Results depend on the availability and behavior of the RxNorm API; network or service issues can impact responses.
Troubleshooting¶
- Empty results or '{}' output: Ensure the 'term' input is not empty and does not contain only whitespace.
- API Error in status: The returned JSON likely includes an "error" key from RxNorm; inspect the 'approximate_matches' JSON for details and retry later or adjust the term.
- Unexpected JSON structure: RxNorm responses can vary; log or print the JSON to confirm keys like 'approximateGroup' and 'candidate' are present before indexing.
- Unicode or special characters: If the term includes special characters, try a simplified ASCII version or a common synonym.
- Downstream parsing errors: Remember the output is a string; parse it as JSON in subsequent steps before accessing fields like 'candidate' or 'rxcui'.