Drug Classes¶
Retrieves drug classification data for a given RxNorm Concept Unique Identifier (RXCUI). It queries the RxClass service to return the classes a drug belongs to, optionally filtered by a specific classification system.

Usage¶
Use this node when you have an RXCUI for a drug and need to identify its class memberships (e.g., ATC class, VA class). Commonly placed after a step that resolves a drug name or NDC to an RXCUI, it returns a JSON string of classes and a status message.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| rxcui | True | STRING | RxNorm Concept Unique Identifier for the target drug. | 83367 |
| classification_system | True | STRING | Classification system filter. Use "ALL" to return all available systems or specify a particular relationship source (e.g., ATC, MEDRT, VA). | ALL |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| drug_classes | STRING | JSON string containing the requested classes for the provided RXCUI, along with the classification system used. | { "rxcui": "83367", "classification_system": "ALL", "classes": { ... } } |
| status | STRING | Human-readable status of the operation. | Successfully retrieved drug classes for RXCUI 83367 |
Important Notes¶
- Input validation: The rxcui input must be a non-empty string; otherwise, the node returns an error status and an empty JSON object.
- Classification filter: Setting classification_system to "ALL" returns classes across supported systems; specifying a system restricts results to that source.
- External dependency: Results depend on availability and responses from the RxClass/RxNorm services; API errors are surfaced in the output JSON and status.
- Output format: The primary output is a JSON-formatted STRING. Downstream nodes should parse it if structured access is needed.
Troubleshooting¶
- Empty or missing RXCUI: Ensure the RXCUI is provided and valid. If unknown, resolve it first using a node that maps drug names or NDCs to RXCUIs.
- API Error in status: If status contains "API Error", inspect the drug_classes JSON for an "error" field with details. Retry or adjust inputs.
- Unexpected empty classes: If the response has no classes, try "ALL" for classification_system or verify the RXCUI corresponds to a clinical drug concept recognized by RxClass.
- Parsing issues downstream: The drug_classes output is a STRING containing JSON. Ensure your downstream step parses the string before accessing fields.