# getSubstanceAdverseReactionAggregates

**Identifier:** `eudravigilance_getSubstanceAdverseReactionAggregates`

**Provider:** [EudraVigilance](https://kirha.com/providers/eudravigilance.md)

Suspected adverse reaction counts from EudraVigilance (EMA, EEA) for one substance or one commercial product: total individual cases, and breakdowns by sex, age group, reporter group, geographic origin and reporting country. Pair with searchSubstances or searchProducts to resolve the code.

## Run it with the CLI

```bash
kirha tools run eudravigilance_getSubstanceAdverseReactionAggregates \
  --input '{}'
```

`--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": "eudravigilance_getSubstanceAdverseReactionAggregates",
  "input": {}
}'
```

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": {
    "productHighLevelCode": {
      "description": "From searchProducts; reads that product alone.",
      "type": "string"
    },
    "substanceHighLevelCode": {
      "description": "EudraVigilance Substance High Level Code (preferred; from searchSubstances).",
      "type": "string"
    },
    "substanceName": {
      "description": "Substance name, resolved to a code when no code is given.",
      "type": "string"
    }
  },
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "byAgeGroup": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "cases": {
            "maximum": 9007199254740991,
            "minimum": 0,
            "type": "integer"
          },
          "label": {
            "type": "string"
          },
          "percentOfCases": {
            "description": "percentage of total cases, 0-100",
            "maximum": 100,
            "minimum": 0,
            "type": "number"
          }
        },
        "required": [
          "label",
          "cases",
          "percentOfCases"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "byGeographicOrigin": {
      "description": "Where the reaction occurred, EEA or not",
      "items": {
        "additionalProperties": false,
        "properties": {
          "cases": {
            "maximum": 9007199254740991,
            "minimum": 0,
            "type": "integer"
          },
          "label": {
            "type": "string"
          },
          "percentOfCases": {
            "description": "percentage of total cases, 0-100",
            "maximum": 100,
            "minimum": 0,
            "type": "number"
          }
        },
        "required": [
          "label",
          "cases",
          "percentOfCases"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "byReporterGroup": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "cases": {
            "maximum": 9007199254740991,
            "minimum": 0,
            "type": "integer"
          },
          "label": {
            "type": "string"
          },
          "percentOfCases": {
            "description": "percentage of total cases, 0-100",
            "maximum": 100,
            "minimum": 0,
            "type": "number"
          }
        },
        "required": [
          "label",
          "cases",
          "percentOfCases"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "byReportingCountry": {
      "description": "EEA countries whose regulator sent the report",
      "items": {
        "additionalProperties": false,
        "properties": {
          "cases": {
            "maximum": 9007199254740991,
            "minimum": 0,
            "type": "integer"
          },
          "country": {
            "type": "string"
          },
          "percentOfEeaOriginCases": {
            "maximum": 100,
            "minimum": 0,
            "type": "number"
          }
        },
        "required": [
          "country",
          "cases",
          "percentOfEeaOriginCases"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "bySex": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "cases": {
            "maximum": 9007199254740991,
            "minimum": 0,
            "type": "integer"
          },
          "label": {
            "type": "string"
          },
          "percentOfCases": {
            "description": "percentage of total cases, 0-100",
            "maximum": 100,
            "minimum": 0,
            "type": "number"
          }
        },
        "required": [
          "label",
          "cases",
          "percentOfCases"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "context": {
      "type": "string"
    },
    "dataAsOf": {
      "description": "Date EMA generated the extract",
      "type": "string"
    },
    "eeaOriginCases": {
      "description": "Cases byReportingCountry covers, its percentage base",
      "maximum": 9007199254740991,
      "minimum": 0,
      "type": "integer"
    },
    "extractUrls": {
      "description": "CSV each field above was read from, pinned to the month read",
      "items": {
        "additionalProperties": false,
        "properties": {
          "field": {
            "type": "string"
          },
          "url": {
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "field",
          "url"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "extractedAt": {
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
      "type": "string"
    },
    "productHighLevelCode": {
      "type": "string"
    },
    "scope": {
      "description": "Which vocabulary these figures were read under",
      "enum": [
        "substance",
        "product"
      ],
      "type": "string"
    },
    "sourceUrl": {
      "format": "uri",
      "type": "string"
    },
    "substanceHighLevelCode": {
      "type": "string"
    },
    "substanceName": {
      "type": "string"
    },
    "totalIndividualCases": {
      "maximum": 9007199254740991,
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "context",
    "substanceName",
    "scope",
    "totalIndividualCases",
    "dataAsOf",
    "extractedAt",
    "sourceUrl",
    "extractUrls",
    "byAgeGroup",
    "bySex",
    "byGeographicOrigin",
    "byReporterGroup",
    "byReportingCountry",
    "eeaOriginCases"
  ],
  "type": "object"
}
```

## Related tools

Other EudraVigilance tools that this tool refers to, or that refer to it.

- [`searchSubstances`](https://kirha.com/providers/eudravigilance/searchSubstances.md)
- [`searchProducts`](https://kirha.com/providers/eudravigilance/searchProducts.md)

-----

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