nSIDES Query Skill
Search drug adverse reactions across three complementary nSIDES sources by drug name.
| Source |
Content |
Method |
Scale |
| OnSIDES v3.1.0 |
Label-extracted ADEs (US/EU/UK/JP) |
PubMedBERT NLP on product labels |
1,955 ingredients, 5.5M drug-ADE pairs |
| OffSIDES |
Off-label side effects |
Propensity-score matching on FAERS |
3,300+ drugs |
| KidSIDES |
Pediatric safety signals by developmental phase |
Disproportionality analysis on FAERS |
Age-stratified ADE signals |
Entity Detection
| Input |
Routing |
| any free text |
substring match on drug / ingredient name across all three sources |
No ID-based routing — all queries are natural-language drug names.
API
| Function |
Input |
Returns |
search(entity, limit) |
drug name string |
dict with keys: entity, onsides, offsides, kidsides |
search_batch(entities, limit) |
list of drug names |
list[dict] |
search_onsides(drug_name, limit) |
drug name |
list[dict] — ingredient, effect, meddra_id, source, label_count |
search_offsides(drug_name, limit) |
drug name |
list[dict] — drug, condition, PRR, A/B/C/D |
search_kidsides(drug_name, limit) |
drug name |
list[dict] — drug, event, nichd_phase, gam_score, ror |
summarize(result) |
single search() output |
compact text |
to_json(result) |
single search() output |
JSON string |
Output Fields
OnSIDES row
ingredient — RxNorm ingredient name
effect — MedDRA adverse effect term
meddra_id — MedDRA concept ID
source — label origin country (US / EU / UK / JP)
label_count — number of labels reporting this ADE
OffSIDES row
drug — RxNorm drug name
condition — MedDRA side effect name
PRR — proportional reporting ratio (>1 = signal)
A/B/C/D — 2×2 contingency counts
mean_reporting_frequency — proportion of drug reports with this effect
KidSIDES row
drug — drug concept name
event — adverse event name
nichd_phase — NICHD developmental phase (e.g. "Neonatal", "Infancy", "Adolescence")
gam_score — GAM model score
ror / ror_lower / ror_upper — reporting odds ratio with 95% CI
Usage
See if __name__ == "__main__" block in 15_nSIDES.py for runnable examples:
single-drug query, batch query, text summary, and JSON output.
Data
| File |
Location |
Size |
onsides.db |
DATA_DIR/onsides.db |
SQLite, from OnSIDES v3.1.0 release |
OFFSIDES.csv.gz |
DATA_DIR/OFFSIDES.csv.gz |
gzipped CSV |
ade_nichd.csv.gz |
DATA_DIR/ade_nichd.csv.gz |
gzipped CSV (172 MB) |
drug.csv.gz |
DATA_DIR/drug.csv.gz |
KidSIDES drug dictionary |
event.csv.gz |
DATA_DIR/event.csv.gz |
KidSIDES event dictionary |
dictionary.csv.gz |
DATA_DIR/dictionary.csv.gz |
NICHD phase dictionary |
DATA_DIR default: resources_metadata/adr/nSIDES
Citations
- OnSIDES: Tanaka Y et al. OnSIDES database: Extracting adverse drug events from drug labels using NLP models. Med. 2025;100642. doi:10.1016/j.medj.2025.100642
- OffSIDES / TwoSIDES: Tatonetti NP et al. Data-driven prediction of drug effects and interactions. Sci Transl Med. 2012;4(125):125ra31. doi:10.1126/scitranslmed.3003377
- KidSIDES: Giangreco NP, Tatonetti NP. A database of pediatric drug effects to evaluate ontogenic mechanisms. Med. 2022.
1---2name: nsides-query3description: Query the nSIDES drug side effect databases (OnSIDES, OffSIDES, KidSIDES). Use whenever the user asks about drug adverse reactions, side effects, off-label safety signals, or pediatric drug safety for a given drug name.4---5
6# nSIDES Query Skill
7
8Search drug adverse reactions across three complementary nSIDES sources by drug name.
9
10| Source | Content | Method | Scale |
11|---|---|---|---|
12| **OnSIDES** v3.1.0 | Label-extracted ADEs (US/EU/UK/JP) | PubMedBERT NLP on product labels | 1,955 ingredients, 5.5M drug-ADE pairs |
13| **OffSIDES** | Off-label side effects | Propensity-score matching on FAERS | 3,300+ drugs |
14| **KidSIDES** | Pediatric safety signals by developmental phase | Disproportionality analysis on FAERS | Age-stratified ADE signals |
15
16## Entity Detection
17
18| Input | Routing |
19|---|---|
20| any free text | substring match on drug / ingredient name across all three sources |
21
22No ID-based routing — all queries are natural-language drug names.
23
24## API
25
26| Function | Input | Returns |
27|---|---|---|
28| `search(entity, limit)` | drug name string | `dict` with keys: `entity`, `onsides`, `offsides`, `kidsides` |
29| `search_batch(entities, limit)` | list of drug names | `list[dict]` |
30| `search_onsides(drug_name, limit)` | drug name | `list[dict]` — ingredient, effect, meddra_id, source, label_count |
31| `search_offsides(drug_name, limit)` | drug name | `list[dict]` — drug, condition, PRR, A/B/C/D |
32| `search_kidsides(drug_name, limit)` | drug name | `list[dict]` — drug, event, nichd_phase, gam_score, ror |
33| `summarize(result)` | single `search()` output | compact text |
34| `to_json(result)` | single `search()` output | JSON string |
35
36## Output Fields
37
38### OnSIDES row
39- `ingredient` — RxNorm ingredient name
40- `effect` — MedDRA adverse effect term
41- `meddra_id` — MedDRA concept ID
42- `source` — label origin country (US / EU / UK / JP)
43- `label_count` — number of labels reporting this ADE
44
45### OffSIDES row
46- `drug` — RxNorm drug name
47- `condition` — MedDRA side effect name
48- `PRR` — proportional reporting ratio (>1 = signal)
49- `A/B/C/D` — 2×2 contingency counts
50- `mean_reporting_frequency` — proportion of drug reports with this effect
51
52### KidSIDES row
53- `drug` — drug concept name
54- `event` — adverse event name
55- `nichd_phase` — NICHD developmental phase (e.g. "Neonatal", "Infancy", "Adolescence")
56- `gam_score` — GAM model score
57- `ror` / `ror_lower` / `ror_upper` — reporting odds ratio with 95% CI
58
59## Usage
60
61See `if __name__ == "__main__"` block in `15_nSIDES.py` for runnable examples:
62single-drug query, batch query, text summary, and JSON output.
63
64## Data
65
66| File | Location | Size |
67|---|---|---|
68| `onsides.db` | `DATA_DIR/onsides.db` | SQLite, from OnSIDES v3.1.0 release |
69| `OFFSIDES.csv.gz` | `DATA_DIR/OFFSIDES.csv.gz` | gzipped CSV |
70| `ade_nichd.csv.gz` | `DATA_DIR/ade_nichd.csv.gz` | gzipped CSV (172 MB) |
71| `drug.csv.gz` | `DATA_DIR/drug.csv.gz` | KidSIDES drug dictionary |
72| `event.csv.gz` | `DATA_DIR/event.csv.gz` | KidSIDES event dictionary |
73| `dictionary.csv.gz` | `DATA_DIR/dictionary.csv.gz` | NICHD phase dictionary |
74
75`DATA_DIR` default: `resources_metadata/adr/nSIDES`
76
77## Citations
78
79- **OnSIDES**: Tanaka Y et al. OnSIDES database: Extracting adverse drug events from drug labels using NLP models. *Med*. 2025;100642. doi:10.1016/j.medj.2025.100642
80- **OffSIDES / TwoSIDES**: Tatonetti NP et al. Data-driven prediction of drug effects and interactions. *Sci Transl Med*. 2012;4(125):125ra31. doi:10.1126/scitranslmed.3003377
81- **KidSIDES**: Giangreco NP, Tatonetti NP. A database of pediatric drug effects to evaluate ontogenic mechanisms. *Med*. 2022.