# Detecting Pv Signals

Computes disproportionality signals, PRR, ROR, EBGM, and IC (BCPNN), over FAERS /...

- Repository: https://github.com/maziyarpanahi/openmed (5755 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-10-31
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add maziyarpanahi/openmed --skill detecting-pv-signals -g -a claude-code -y`
Codex: `npx skills add maziyarpanahi/openmed --skill detecting-pv-signals -g -a codex -y`
Cursor: `npx skills add maziyarpanahi/openmed --skill detecting-pv-signals -g -a cursor -y`
Gemini CLI: `npx skills add maziyarpanahi/openmed --skill detecting-pv-signals -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add maziyarpanahi/openmed`

## Description

Computes disproportionality signals, PRR, ROR, EBGM, and IC (BCPNN), over FAERS / OpenFDA drug-event data to flag potential safety signals. Use when the user wants to mine spontaneous-report data for drug-reaction associations, build a 2x2 contingency table, compute a Proportional Reporting Ratio or Reporting Odds Ratio, run Empirical Bayes (EBGM/EB05) or Information Component shrinkage, or screen a drug for over-reported reactions. Trigger keywords: disproportionality, signal detection, PRR, ROR, EBGM, EB05, IC, BCPNN, MGPS, 2x2 table, signal of disproportionate reporting, SDR, OpenFDA, FAERS. Pairs adjacent to OpenMed: aggregate de-identified, coded cases (from reporting-adverse-events) then query the public OpenFDA /drug/event count API to build the contingency table. Reaction terms are MedDRA PTs (licensed, user-supplied).

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Detecting pharmacovigilance signals (disproportionality)

Spontaneous-report databases like the FDA's **FAERS** are mined for
**signals of disproportionate reporting (SDR)**: drug-reaction pairs that occur
together *more than expected* given the background of all reports. The core
device is a **2x2 contingency table** and a disproportionality metric computed
from it, **PRR**, **ROR**, **EBGM**, or **IC (BCPNN)**.

You can build the 2x2 table directly from the **public, free OpenFDA**
`/drug/event` endpoint (no PHI, no MedDRA license to *query*; the reaction terms
returned are already MedDRA PTs). This skill is **statistical screening**: a high
PRR is a *hypothesis*, not a confirmed adverse drug reaction.

## When to use

- You have a drug of interest and want to see which reactions are over-reported.
- You need a PRR / ROR with confidence interval, or an Empirical Bayes EBGM/EB05
  / IC025 to control for the small-count noise PRR/ROR suffer from.
- You are building a routine signal-screening run over OpenFDA or your own
  aggregated case counts.

## The 2x2 table

For one drug D and one reaction R, classify every report:

|            | Reaction R | Not R |
| ---------- | ---------- | ----- |
| Drug D     | **a**      | **b** |
| Not D      | **c**      | **d** |

- **PRR** = [a/(a+b)] / [c/(c+d)]
- **ROR** = (a·d)/(b·c)
- **IC** (BCPNN, log2 information component) ≈ log2( a·(a+b+c+d) / ((a+b)·(a+c)) )
- **EBGM** = Empirical Bayes Geometric Mean, a gamma-Poisson *shrinkage* of the
  observed/expected ratio (the MGPS method) that pulls small-count estimates
  toward 1; report **EB05** (the 5th percentile) as the conservative signal.

Common signal thresholds (screening only): PRR ≥ 2 with χ² ≥ 4 and a ≥ 3; ROR
lower 95% CI > 1; **IC025 > 0**; **EB05 ≥ 2**.

## Quick start (real OpenFDA count queries)

The rest: https://github.com/maziyarpanahi/openmed/blob/HEAD/skills/detecting-pv-signals/SKILL.md
