Skip to content

RxNorm Approximate Match

Finds approximate RxNorm matches for a free-text term (e.g., misspelled or partial drug names). It returns a JSON string containing the search term and the API's match results, along with a status message indicating success or error.
Preview

Usage

Use this node when you have a non-standard or potentially misspelled drug term and need to identify likely RxNorm concepts. Typical workflow: provide a user-entered term, get approximate matches, then pass the resulting JSON to downstream nodes or logic to select a specific RxCUI for further lookups.

Inputs

FieldRequiredTypeDescriptionExample
termTrueSTRINGThe free-text drug term to match (supports partial or misspelled names).acetominophen

Outputs

FieldTypeDescriptionExample
approximate_matchesSTRINGA JSON string with the search term and the approximate match results from RxNorm.{ "search_term": "acetominophen", "results": { "approximateGroup": { "candidate": [ { "rxcui": "161", "score": "100", "rxnormId": "161", "name": "Acetaminophen" } ] } } }
statusSTRINGStatus message indicating success or describing the error encountered.Successfully retrieved approximate matches for 'acetominophen'

Important Notes

  • Input validation: An empty term returns "{}" for approximate_matches and "Error: Term cannot be empty" as status.
  • Output format: approximate_matches is a JSON string. Parse it downstream to access fields like candidates, names, or RxCUIs.
  • API errors: If the external service returns an error, the node returns the error JSON and a status starting with "API Error:".
  • Default behavior: If no input is provided, the default term is "acetaminophen".
  • Variability: The structure inside results may vary based on the external API; always check keys like approximateGroup/candidate before accessing.

Troubleshooting

  • Empty input returns an error: Provide a non-empty term. The node will not proceed with blank input.
  • No matches found: The results array may be empty. Try a more general term or a correct spelling.
  • Parsing issues downstream: Ensure you parse the approximate_matches string as JSON before accessing fields.
  • API Error status: Network or service issues will produce a status like "API Error: ...". Retry later or verify connectivity.
  • Unexpected results structure: The external API may change response shapes. Add defensive checks when extracting candidates and IDs.