Skip to content

RxCUI by NDC

Looks up RxNorm Concept Unique Identifier(s) (RxCUI) for a given National Drug Code (NDC). It queries the RxNorm service and returns both the raw lookup payload and a parsed list of RxCUIs. Handles empty input validation and surfaces API errors in the status output.
Preview

Usage

Use this node when you have an NDC and need to map it to RxNorm concept identifiers for downstream drug concept processing. Typical workflows feed the returned RxCUI list into nodes that fetch concept details, properties, related concepts, or interactions.

Inputs

FieldRequiredTypeDescriptionExample
ndcTrueSTRINGThe National Drug Code to look up. Provide a valid NDC as a string.00071015527

Outputs

FieldTypeDescriptionExample
rxcui_infoSTRINGA JSON string containing the query NDC and the full response from the RxNorm lookup.{"ndc": "00071015527", "rxcui_data": {"idGroup": {"rxnormId": ["12345"]}}}
rxcuiSTRINGA JSON stringified array of RxCUI(s) extracted from the response. Empty array if none found.["12345", "67890"]
statusSTRINGOperation status message indicating success or an error description.Successfully retrieved RxCUI for NDC 00071015527

Important Notes

  • Input NDC must not be empty; otherwise the node returns an error status and empty outputs.
  • The 'rxcui' output is a JSON array encoded as a string; parse it if you need a list structure downstream.
  • If the RxNorm response does not include idGroup.rxnormId, the node returns an empty array for 'rxcui'.
  • API errors are surfaced in the 'status' output as 'API Error: ...' and the detailed error payload is included in 'rxcui_info'.
  • The node returns formatted JSON as strings; ensure consumers expecting objects parse these strings first.

Troubleshooting

  • Empty or missing NDC: Provide a non-empty NDC string; the node validates and will return 'Error: NDC cannot be empty'.
  • API Error responses: Check the 'status' output for 'API Error: ...' and review 'rxcui_info' for the full error payload.
  • No RxCUI returned: Verify the NDC is valid and active; some NDCs may not map to RxNorm or may have been retired.
  • Unexpected output format: Remember that 'rxcui_info' and 'rxcui' are JSON strings; parse them before further processing.