Skip to content

RxCUI by NDC

Converts a National Drug Code (NDC) into its corresponding RxNorm Concept Unique Identifier(s) (RxCUI). It queries the RxNorm service and returns both the raw response and a convenient list of RxCUI IDs extracted from the result.
Preview

Usage

Use this node when you have a medication's NDC and need the RxCUI to continue downstream tasks such as retrieving concept details, properties, or related concepts. Typical workflow: provide an NDC, get RxCUI(s), then feed the RxCUI(s) into other RxNorm nodes for further analysis.

Inputs

FieldRequiredTypeDescriptionExample
ndcTrueSTRINGThe National Drug Code for the medication to resolve. Must be a non-empty string.00071015527

Outputs

FieldTypeDescriptionExample
rxcui_infoSTRINGA JSON string containing the input NDC and the full RxNorm response payload for that NDC.{ "ndc": "00071015527", "rxcui_data": { "idGroup": { "rxnormId": ["161"] } } }
rxcuiSTRINGA JSON array string of RxCUI IDs extracted from the response. Returns an empty array if none are found.["161"]
statusSTRINGA human-readable status message indicating success or describing an error.Successfully retrieved RxCUI for NDC 00071015527

Important Notes

  • Input validation: The NDC must be non-empty; the node returns an error status if it is blank.
  • Output structure: The 'rxcui' output is a JSON array string (not a native array). Parse it before iterating.
  • No-match behavior: If the RxNorm response does not include any RxCUI IDs, the 'rxcui' output will be "[]".
  • API errors: If the upstream service returns an error, the node forwards it in the 'rxcui_info' payload and sets a descriptive status.

Troubleshooting

  • Empty input provided: Ensure 'ndc' is a non-empty string. The node returns an error if it's blank.
  • No RxCUI returned: Verify the NDC is valid and active. Some NDCs may not map to RxCUI or may be retired; the node will return an empty array.
  • API Error in status: Check network connectivity and try again later. Inspect 'rxcui_info' for the forwarded error message.
  • Unexpected output format: Remember that outputs are JSON strings. Parse them in downstream steps before accessing fields.