Drug Name Resolution
RxLabelGuard accepts drug names (generic or brand) and RxCUIs, and resolves each input to an RxNorm concept before checking interactions. This page explains how resolution works and how to handle edge cases.
Accepted Input Formats
| Format | Example | Notes |
|---|---|---|
| Generic name | "warfarin" | Most reliable input format |
| Brand name | "Coumadin" | Resolved to generic via RxNorm |
| RxCUI | "11289" | Direct RxNorm concept identifier |
| Misspelling | "warfrin" | Handled by RxNorm approximate matching |
| NDC code | "0056-0172-70" | Not supported. An all-digit input is treated as an RxCUI, and an NDC with hyphens is matched as text, so it may fail or resolve to the wrong drug. Map NDCs to RxCUIs first with NLM RxNav (/REST/rxcui.json?idtype=NDC&id=…). |
Resolution Strategy
Resolution uses a tiered approach, trying the most precise match first and falling back to progressively fuzzier methods:
- All-digit input — Treated as an RxCUI. It is looked up in RxLabelGuard's interaction graph, then validated against RxNorm's properties endpoint.
- Graph name index — Names are lower-cased and matched against the generic names, brand names and aliases of drugs in the interaction graph.
- Exact match — RxNorm
/rxcui.json?name=…&search=2(normalized string match). - Approximate match — RxNorm
/approximateTerm.jsonfor misspellings and variant spellings. The top candidate is used.
Drugs matched in the graph come back with brand names and, when the graph has one, an SPL Set ID and DailyMed labelUrl. Drugs matched through RxNorm (steps 3 and 4) come back with an RxCUI and name, but brandNames is empty and splSetId and labelUrl are null. Interactions are only returned for drugs that exist in the interaction graph.
Resolution Response
Every API response includes a resolutions array showing how each input drug was resolved (the second entry, a misspelling, was matched through RxNorm; IDs are illustrative):
{
"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": [],
"splSetId": null,
"labelUrl": null,
"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,
"brandNames": [],
"splSetId": null,
"labelUrl": null,
"resolved": false,
"error": "Could not resolve \"xyzdrugnotfound\" to a known drug."
}