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 a structured JSON payload with the lookup details and a separate JSON array of the matching RxCUI values. Provides human-readable status messages for success and error cases.
Preview

Usage

Use this node when you have an NDC and need to map it to RxNorm concepts for downstream medication analysis, normalization, or interoperability tasks. Typical workflows include converting package-level identifiers to RxCUIs prior to retrieving concept properties, related concepts, or performing drug class analytics.

Inputs

FieldRequiredTypeDescriptionExample
ndcTrueSTRINGThe National Drug Code (NDC) to resolve. Accepts 10- or 11-digit formats as a plain string. Preserve leading zeros.00071015527

Outputs

FieldTypeDescriptionExample
rxcui_infoSTRINGA formatted JSON string containing the original NDC and the raw RxNorm response payload for that NDC.{ "ndc": "00071015527", "rxcui_data": { "idGroup": { "rxnormId": ["161"] } } }
rxcuiSTRINGA JSON string of an array containing the RxCUI(s) extracted from the response.["161"]
statusSTRINGA human-readable status message indicating success or detailing any error encountered.Successfully retrieved RxCUI for NDC 00071015527

Important Notes

  • Input format: NDC must be provided as a string to preserve leading zeros; avoid numeric types.
  • Output formatting: The 'rxcui' output is a JSON-encoded array string (e.g., "[\"161\"]"); parse it before use if your downstream step expects an array.
  • Empty or invalid NDC: If the input is empty or invalid, the node returns "{}" for rxcui_info, an empty string for rxcui, and a status message describing the error.
  • API responses: If the RxNorm service returns an error, the node forwards the error message in the status and rxcui_info while leaving 'rxcui' empty.
  • Multiple matches: Some NDCs may map to multiple RxCUIs; expect multiple IDs in the 'rxcui' array.
  • No secrets required: This node does not require tokens or secrets; do not supply any credentials.

Troubleshooting

  • No RxCUI returned: Verify the NDC is valid, correctly formatted as a string, and includes any leading zeros.
  • Parse errors downstream: Ensure you parse the JSON string in the 'rxcui' field into an array before iterating or indexing.
  • Unexpected response structure: Check 'rxcui_info' for the full raw payload to understand the returned structure and adjust parsing accordingly.
  • API error status: If status begins with 'API Error', retry later or validate the NDC; intermittent service issues can occur.
  • Out-of-range or blank input: Provide a non-empty NDC; the node returns an explicit error when the input is blank.