Drug Class Analysis¶
Runs a complete workflow to classify a drug and optionally retrieve mechanism-of-action information. It normalizes a provided drug name or NDC to an RxCUI, fetches drug class memberships from selected classification systems, and returns formatted JSON for both classifications and mechanism data.

Usage¶
Use this node when you need to determine the therapeutic classes for a given drug and optionally include mechanism-of-action details. Typical workflow: provide a drug name (or NDC), choose the classification system scope (e.g., ALL, ATC, VA), and enable mechanism retrieval if desired. The node outputs two JSON strings—one summarizing class memberships, the other for mechanism data—along with a status message.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| drug_identifier | True | STRING | The drug to analyze, provided as either a human-readable drug name (e.g., generic or brand) or an NDC code, depending on identifier_type. | atorvastatin |
| identifier_type | True | STRING | Specifies how to interpret drug_identifier. Choose 'drug_name' to resolve by name or 'ndc' to resolve by NDC code. | drug_name |
| classification_system | True | STRING | The classification source(s) to consider when fetching classes. Common options include 'ALL' for all systems or a specific source such as 'ATC', 'MEDRT', 'VA', 'RXNORM', etc. | ALL |
| include_mechanism | True | BOOLEAN | If true, also returns mechanism-of-action data for the drug's RxCUI when available. | true |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| drug_classifications | STRING | A JSON string summarizing the normalized RxCUI, the list of classes the drug belongs to, and a summary (total classes, classification systems encountered, and detected therapeutic categories). | {"drug_identifier":"atorvastatin","rxcui":"83367","analysis_type":"Drug Class and Mechanism of Action Analysis","classifications":[{"class_id":"D007594","class_name":"HMG CoA Reductase Inhibitors","class_type":"ATC","class_url":"https://rxnav.nlm.nih.gov/REST/rxclass/class/D007594"}],"summary":{"total_classes":1,"classification_systems":["ATC"],"therapeutic_categories":["HMG CoA Reductase Inhibitors"]}} |
| mechanism_data | STRING | A JSON string containing mechanism-of-action information for the drug's RxCUI, when requested and available. | {"rxcui":"83367","mechanism_analysis":{"mechanismOfActionGroup":{"moa":[{"source":"MEDRT","name":"HMG-CoA Reductase Inhibitor"}]}},"note":"Mechanism of action data may require integration with additional databases like DrugBank or MeSH"} |
| status | STRING | A human-readable message indicating success or describing any error encountered during the analysis. | Successfully analyzed drug classes for atorvastatin (RXCUI: 83367) |
Important Notes¶
- Input normalization: The node first resolves the drug to an RxCUI; if resolution fails, outputs will be empty JSON objects with a failure status.
- Classification scope: Selecting 'ALL' returns classes across multiple systems; choosing a specific system (e.g., ATC, VA) filters results accordingly.
- Mechanism availability: Mechanism-of-action data may be limited depending on source coverage and may not always be returned for every RxCUI.
- Output format: Both 'drug_classifications' and 'mechanism_data' are JSON strings intended for downstream parsing or display.
- Network dependency: Requires network access to external drug information services; transient API issues may affect results.
Troubleshooting¶
- No RxCUI found for the input: Verify spelling for 'drug_name' or ensure the 'ndc' is valid and properly formatted. Try an alternative identifier type if available.
- Empty classifications: Switch 'classification_system' to 'ALL' to broaden results, or confirm the drug is expected to have class memberships in the chosen system.
- Mechanism data missing: Set 'include_mechanism' to true and retry. If still empty, the mechanism may not be available for this RxCUI in the underlying sources.
- API error messages: The 'status' field will include details. Retry later or confirm that upstream services are reachable.
- Unexpected output format: Ensure downstream nodes parse the output as JSON strings, not as objects.