Skip to contents

Retrieves adverse event reports from the FDA Adverse Event Reporting System (FAERS) that match a specific drug name using the RESTful API endpoint /drug/event.json?search=<drug_name>.

This includes details such as the safety report ID, receive date, serious status, patient information, drug details, and adverse reactions for each reported adverse event related to pharmaceutical products.

Usage

get_fda_adverse_events(drug_name)

Source

FDA Adverse Event Reporting System (FAERS) via openFDA: https://open.fda.gov/apis/drug/event/

Arguments

drug_name

A character string representing the name of the drug.

Value

A tibble with the following columns:

  • report_id: Unique identifier for the adverse event report

  • date_received: Date FDA received the report

  • country: Country where event occurred

  • serious: Is it serious? ("Yes", "No", or original API value / NA)

  • adverse_reactions: List of adverse reactions reported (separated by semicolons) or NA

  • patient_sex: Patient sex ("Male", "Female", "Unknown", original API value, or NA)

  • patient_age: Patient age at onset (as returned by API) or NA

Details

This function sends a GET request to the FDA openFDA API. It supports caching via the memoise package to avoid redundant calls, and respects a rate limit between successive API requests.

If the API request fails, returns no matches, or returns an error status code, the function returns NULL with an informative message.

Note

Requires an internet connection.

See also

Examples

if (interactive()) {
  get_fda_adverse_events("aspirin")
}