Skip to content

RxClass Search

Searches the RxClass database by a drug class name and returns the results as a JSON string along with a status message. It formats the output to include the original search term and the raw results from the RxClass service.
Preview

Usage

Use this node when you need to look up drug classification entries by name (e.g., to find class IDs for subsequent queries). Typical workflow: provide a class name (like "ACE Inhibitors"), then pass the returned JSON to downstream steps that extract class identifiers for retrieving detailed info or members.

Inputs

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

Outputs

FieldTypeDescriptionExample
class_search_resultsSTRINGA pretty-printed JSON string containing the search term and the RxClass search results.{ "search_term": "ACE Inhibitors", "results": { ... } }
statusSTRINGA status message indicating success or describing the error encountered.Successfully searched RxClass for 'ACE Inhibitors'

Important Notes

  • Input validation: An empty or whitespace-only class_name returns '{}' and an error status.
  • Output format: Results are returned as a JSON string. Parse the string to access fields programmatically.
  • Error propagation: If the underlying service returns an error, the JSON will include the error details and the status will begin with 'API Error:'.
  • Result structure: The JSON groups data as {"search_term": , "results": }. Downstream nodes may need to extract class IDs from the results.

Troubleshooting

  • Empty input error: If status says 'Error: Class name cannot be empty', provide a non-empty class_name.
  • No matches found: If results are empty, try a broader or alternate class name spelling.
  • API Error: If status starts with 'API Error:', verify the class name and retry later; transient network or service issues may be the cause.
  • Parsing issues: If a downstream step expects structured data, ensure you parse the class_search_results string into JSON before accessing fields.