faers_count_by_field
Aggregate FAERS adverse event reports for a drug by any field, returning the top values—like a SQL GROUP BY count for pharmacovigilance analysis.
Instructions
Aggregate FAERS reports for a drug by any field (SQL GROUP BY equivalent).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top_n | No | Number of values to return. | |
| events | No | MedDRA preferred terms, e.g. ['PANCREATITIS']. Case-insensitive. | |
| date_to | No | End of a receivedate window, YYYYMMDD. Must be paired with date_from. | |
| date_from | No | Start of a receivedate window, YYYYMMDD. Must be paired with date_to. | |
| drug_name | Yes | Active substance name, e.g. 'EMPAGLIFLOZIN'. | |
| raw_filter | No | Extra Lucene clause ANDed onto the preset query, e.g. 'patient.patientsex:2'. Applied to every marginal of a contingency table. See faers_describe_fields. | |
| count_field | Yes | FAERS field to aggregate, e.g. 'patient.reaction.reactionmeddrapt.exact'. See faers_describe_fields for the catalogue. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||