# getDrugClasses

**Identifier:** `rxnorm_getDrugClasses`

**Provider:** [RxNorm](https://kirha.com/providers/rxnorm.md)

Get drug classification information for one or more drug names. Returns classifications from ATC, VA, MeSH, and MedRT (mechanism of action, physiologic effect, pharmacologic class). Results are attributed to the input drug name via the `query` field.

## Run it with the CLI

```bash
kirha tools run rxnorm_getDrugClasses \
  --input '{
    "drugNames": [
      "<drugNames>"
    ]
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "rxnorm_getDrugClasses",
  "input": {
    "drugNames": [
      "<drugNames>"
    ]
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "drugNames": {
      "items": {
        "type": "string"
      },
      "maxItems": 20,
      "minItems": 1,
      "type": "array"
    },
    "relaSource": {
      "enum": [
        "atc",
        "atc_product",
        "va",
        "medrt",
        "mesh",
        "dailymed",
        "fda_spl",
        "snomed_ct"
      ],
      "type": "string"
    }
  },
  "required": [
    "drugNames"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "classIds": {
      "description": "Unique class IDs across all input drugs for use with other drug classification tools",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "classifications": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "classId": {
            "type": "string"
          },
          "className": {
            "type": "string"
          },
          "classType": {
            "type": "string"
          },
          "query": {
            "type": "string"
          },
          "relationship": {
            "type": "string"
          },
          "rxcuiCount": {
            "description": "Product RxCUIs carrying this classification before the cap",
            "type": "number"
          },
          "rxcuis": {
            "description": "First 5 product RxCUIs (from the query) carrying this classification",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "source": {
            "type": "string"
          }
        },
        "required": [
          "query",
          "classId",
          "className",
          "classType",
          "rxcuis",
          "rxcuiCount"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "context": {
      "type": "string"
    },
    "missing": {
      "description": "Input drug names that returned no classifications",
      "items": {
        "type": "string"
      },
      "type": "array"
    }
  },
  "required": [
    "context",
    "classifications",
    "classIds",
    "missing"
  ],
  "type": "object"
}
```

-----

[All RxNorm tools](https://kirha.com/providers/rxnorm.md) · [< Back to tools list](https://kirha.com/tools.md)