Drug Safety
Use case · Healthcare and life sciences
Drug safety and adverse event analysis
Pharmacovigilance teams look for signals in adverse-event reports: which reactions follow a drug, which drugs appear together in serious cases, which manufacturers report the most fatal outcomes.
Each report connects a patient case to suspect and concomitant drugs, reactions, outcomes, therapies and the reporting source, so the questions are about connections.
Stored as a graph, every report becomes a small network, and a signal is a pattern you can query directly.
- Reactions most often reported for a suspect drug
- Reactions that co-occur in the same case
- Manufacturers and drugs behind fatal outcomes
- Drug pairs reported together, as suspect or concomitant
nodes: cases, drugs, reactions, outcomes, manufacturers and more
edges linking each report to its drugs, reactions and outcome
ready-to-run demo queries
See it in CoraDB
The questions, as queries.
Each query below runs as it is on the healthcare demo database.
-- Which reactions are most associated with the drug
-- "LENALIDOMIDE" (as primary suspect)?
SELECT r.description, COUNT(ca) AS reports
FROM MATCH (d:drug)<-[:is_primary_suspect]-(ca:`case`),
(ca:`case`)-[:has_reaction]->(r:reaction)
WHERE d.primary_substance = 'LENALIDOMIDE'
GROUP BY r.description
ORDER BY reports DESC
LIMIT 15;
| description | reports |
|---|---|
| Pneumonia | 34 |
| Diarrhoea | 24 |
| Dyspnoea | 16 |
| Rash | 16 |
| Fatigue | 16 |
-- Which reaction pairs most frequently co-occur in the same case?
SELECT r1.description, r2.description, COUNT(ca) AS together
FROM MATCH (r1:reaction)<-[:has_reaction]-(ca:`case`),
(ca:`case`)-[:has_reaction]->(r2:reaction)
WHERE r1.id < r2.id
GROUP BY r1.description, r2.description
ORDER BY together DESC
LIMIT 15;
| r1.description | r2.description | together |
|---|---|---|
| Nausea | Vomiting | 87 |
| Headache | Fatigue | 77 |
| Headache | Nausea | 75 |
| Fatigue | Nausea | 74 |
| Pain | Headache | 61 |
-- Which manufacturers' primary-suspect drugs were involved
-- in fatal cases, and how many?
SELECT m.name, COUNT(ca) AS deathCases
FROM MATCH
(m:manufacturer)-[:registered]->(ca:`case`),
(ca:`case`)-[:resulted_in]->(o:outcome),
(ca:`case`)-[:is_primary_suspect]->(d:drug)
WHERE o.name = 'Death'
GROUP BY m.name
ORDER BY deathCases DESC
LIMIT 10;
| name | deathCases |
|---|---|
| CELGENE | 43 |
| ROCHE | 42 |
| BRISTOL MYERS SQUIBB | 28 |
| TAKEDA | 26 |
| PFIZER | 20 |
-- For each primary-suspect drug, how many distinct
-- reactions have been reported? (top 10)
SELECT d.primary_substance, COUNT(DISTINCT r.description) AS distinctReactions
FROM MATCH (d:drug)<-[:is_primary_suspect]-(ca:`case`),
(ca:`case`)-[:has_reaction]->(r:reaction)
GROUP BY d.primary_substance
ORDER BY distinctReactions DESC
LIMIT 10;
| primary_substance | distinctReactions |
|---|---|
| HUMAN IMMUNOGLOBULIN G | 784 |
| PREGABALIN | 322 |
| HUMAN IMMUNOGLOBULIN G\HYALURONIDASE RECOMBINANT HUMAN | 281 |
| LENALIDOMIDE | 258 |
| TOFACITINIB CITRATE | 242 |
Why one engine
Signals and records in the same database.
Safety teams also keep relational data: product master data, case workflow, regulatory submissions.
With CoraDB the report network and those tables live in one engine, so a signal query can join a case graph to a submissions table without exporting data to a separate graph store.
- One database to secure, back up and audit
- No copy of the case data to keep in sync
- SQL for the tables, PGQL patterns for the network, in one query
Try it yourself
Download the healthcare demo database, load it into CoraDB and run the queries.
The Getting Started guide shows how, step by step.
Want to try it on your own data? Talk to us.