# getSubstanceCaseAccrual

**Identifier:** `eudravigilance_getSubstanceCaseAccrual`

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

How fast one substance or one commercial product is accruing new EudraVigilance case reports month over month, and which MedDRA reaction groups the new cases fall into. Use for reporting momentum; use getSubstanceReactionBreakdown for the standing totals.

## Run it with the CLI

```bash
kirha tools run eudravigilance_getSubstanceCaseAccrual \
  --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_getSubstanceCaseAccrual",
  "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": {
    "months": {
      "description": "Months to measure over, e.g. 3 for the past quarter. Omit for the whole history.",
      "maximum": 9007199254740991,
      "minimum": 1,
      "type": "integer"
    },
    "productHighLevelCode": {
      "description": "From searchProducts; reads that product alone.",
      "type": "string"
    },
    "substanceHighLevelCode": {
      "description": "From searchSubstances; preferred over substanceName.",
      "type": "string"
    },
    "substanceName": {
      "description": "Used when substanceHighLevelCode is not provided.",
      "type": "string"
    }
  },
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "caseReceiptExtractUrl": {
      "format": "uri",
      "type": "string"
    },
    "caseReceiptsCoverFrom": {
      "description": "Earliest month monthlyCasesReceived could have covered, whatever window was asked for",
      "type": "string"
    },
    "casesReceivedInWindow": {
      "maximum": 9007199254740991,
      "minimum": 0,
      "type": "integer"
    },
    "context": {
      "type": "string"
    },
    "extractUrl": {
      "description": "CSV of the monthly series, over the window read",
      "format": "uri",
      "type": "string"
    },
    "monthlyCasesReceived": {
      "description": "Cases per month the EMA gateway received them",
      "items": {
        "additionalProperties": false,
        "properties": {
          "casesReceived": {
            "maximum": 9007199254740991,
            "minimum": 0,
            "type": "integer"
          },
          "cumulativeCases": {
            "description": "Cases received up to and including this month",
            "maximum": 9007199254740991,
            "minimum": 0,
            "type": "integer"
          },
          "eeaCases": {
            "maximum": 9007199254740991,
            "minimum": 0,
            "type": "integer"
          },
          "month": {
            "description": "Month the EMA gateway received the reports",
            "type": "string"
          },
          "monthId": {
            "type": "string"
          },
          "nonEeaCases": {
            "maximum": 9007199254740991,
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "month",
          "monthId",
          "eeaCases",
          "nonEeaCases",
          "casesReceived",
          "cumulativeCases"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "monthlyTotals": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "cumulativeCases": {
            "maximum": 9007199254740991,
            "minimum": 0,
            "type": "integer"
          },
          "month": {
            "type": "string"
          },
          "monthId": {
            "type": "string"
          },
          "newCases": {
            "description": "Omitted for the first month, whose predecessor is out of range",
            "maximum": 9007199254740991,
            "minimum": -9007199254740991,
            "type": "integer"
          }
        },
        "required": [
          "month",
          "monthId",
          "cumulativeCases"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "newCasesByReactionGroup": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "cases": {
            "maximum": 9007199254740991,
            "minimum": 0,
            "type": "integer"
          },
          "socName": {
            "description": "MedDRA System Organ Class",
            "type": "string"
          }
        },
        "required": [
          "socName",
          "cases"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "newCasesInWindow": {
      "description": "Growth of monthlyTotals over the window read",
      "maximum": 9007199254740991,
      "minimum": 0,
      "type": "integer"
    },
    "productHighLevelCode": {
      "type": "string"
    },
    "reactionGroupWindow": {
      "description": "Months the reaction group counts below were measured over",
      "type": "string"
    },
    "scope": {
      "description": "Which vocabulary these figures were read under",
      "enum": [
        "substance",
        "product"
      ],
      "type": "string"
    },
    "sourceCoversFrom": {
      "description": "Earliest month still readable at sourceUrl; earlier ones come from snapshots taken here",
      "type": "string"
    },
    "sourceUrl": {
      "format": "uri",
      "type": "string"
    },
    "substanceHighLevelCode": {
      "type": "string"
    },
    "substanceName": {
      "type": "string"
    }
  },
  "required": [
    "context",
    "substanceName",
    "scope",
    "monthlyTotals",
    "sourceUrl",
    "extractUrl",
    "newCasesInWindow",
    "monthlyCasesReceived",
    "reactionGroupWindow",
    "newCasesByReactionGroup"
  ],
  "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)
- [`getSubstanceReactionBreakdown`](https://kirha.com/providers/eudravigilance/getSubstanceReactionBreakdown.md)

-----

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