Skip to content

RxClass Search

Searches the RxClass database by a drug class name and returns formatted JSON results. The node validates input, calls the RxNorm RxClass service via an internal API helper, and provides a human-readable status message.
Preview

Usage

Use this node when you need to look up RxClass information starting from a class name (e.g., to find matching pharmacologic or therapeutic classes). Typical workflow: provide a class name, retrieve structured search results as JSON, and feed that JSON into downstream nodes for selection, filtering, or further analysis.

Inputs

FieldRequiredTypeDescriptionExample
class_nameTrueSTRINGThe drug class name to search for in RxClass.ACE Inhibitors

Outputs

FieldTypeDescriptionExample
class_search_resultsSTRINGA JSON string containing the search term and the returned results from RxClass. On success, the payload is formatted as: {"search_term": "", "results": }. On input or runtime error, an empty JSON object "{}" is returned.{ "search_term": "ACE Inhibitors", "results": { "rxclassMinConceptList": [ {"classId": "100", "className": "ACE Inhibitors", "classType": "PHARMACOKINETIC"} ] } }
statusSTRINGA human-readable status message describing the outcome, e.g., success, input validation error, API error, or runtime error.Successfully searched RxClass for 'ACE Inhibitors'

Important Notes

  • Input validation: If class_name is empty or whitespace, the node returns "{}" with status "Error: Class name cannot be empty".
  • API error propagation: If the underlying API returns an error (exposed as an 'error' field in the response), the node returns the API's error JSON and sets status to "API Error: ".
  • Output format: On success, results are wrapped with the original search term and pretty-printed for readability.
  • Data type: Both outputs are strings; the first is a JSON-encoded string that downstream nodes may need to parse.
  • Service dependency: Relies on an internal RxNorm API helper to query RxClass; network or service issues will surface as error status with an empty JSON payload.

Troubleshooting

  • Empty results or '{}' output: Verify that 'class_name' is non-empty and correctly spelled. The node returns '{}' when input is blank or a runtime error occurs.
  • Status shows 'API Error: ...': The RxClass service returned an error. Check the error message within the JSON output for details, adjust the class name, or retry later.
  • Downstream parsing failures: Ensure the consumer expects a JSON string and parses it before accessing fields. The output is not a native object.
  • Unexpected fields in results: RxClass responses can vary. Inspect the 'results' section to confirm the presence of expected keys before using them downstream.