Drug Name Resolution

RxLabelGuard accepts drug names in multiple formats and resolves them to the correct FDA label using RxNorm normalization. This page explains how resolution works and how to handle edge cases.

Accepted Input Formats

FormatExampleNotes
Generic name"warfarin"Most reliable input format
Brand name"Coumadin"Resolved to generic via RxNorm
RxCUI"11289"Direct RxNorm concept identifier
NDC code"0056-0172-70"National Drug Code
Misspelling"warfrin"Handled via fuzzy matching

Resolution Strategy

Resolution uses a tiered approach, trying the most precise match first and falling back to progressively fuzzier methods:

  1. Exact match — RxNorm findRxcuiByString with normalized matching. Handles standard drug names and brand names.
  2. Fuzzy match — RxNorm getApproximateMatch for misspellings, abbreviations, and partial names. Returns ranked candidates.
  3. NDC lookup — If the input matches NDC format, resolve via NDC-to-RxCUI mapping.
  4. Label fallback — Query openFDA directly by generic name or brand name if RxNorm resolution fails.

Resolution Response

Every API response includes a resolutions array showing how each input drug was resolved:

{
  "resolutions": [
    {
      "inputName": "Coumadin",
      "rxcui": "11289",
      "genericName": "warfarin",
      "brandNames": ["COUMADIN", "JANTOVEN"],
      "splSetId": "abc-123-def-456",
      "labelUrl": "https://dailymed.nlm.nih.gov/dailymed/drugInfo.cfm?setid=abc-123-def-456",
      "resolved": true
    },
    {
      "inputName": "tylenl",
      "rxcui": "161",
      "genericName": "acetaminophen",
      "brandNames": ["TYLENOL"],
      "splSetId": "xyz-789",
      "labelUrl": "https://dailymed.nlm.nih.gov/...",
      "resolved": true
    }
  ]
}

Unresolved Drugs

If a drug name cannot be resolved, it appears in the resolutions array with resolved: false. The API still processes interactions for all successfully resolved drugs — one unresolved input does not block the entire request.

{
  "inputName": "xyzdrugnotfound",
  "rxcui": null,
  "genericName": null,
  "resolved": false
}