Use Cases /

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
11,381

nodes: cases, drugs, reactions, outcomes, manufacturers and more

61,453

edges linking each report to its drugs, reactions and outcome

24

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;
graph pattern (PGQL)From a drug, through its cases, to the reactions reported.
Result15 rows, first 5 shown
descriptionreports
Pneumonia34
Diarrhoea24
Dyspnoea16
Rash16
Fatigue16
-- 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;
graph pattern (PGQL)Co-occurrence is a two-hop pattern around each case.
Result15 rows, first 5 shown
r1.descriptionr2.descriptiontogether
NauseaVomiting87
HeadacheFatigue77
HeadacheNausea75
FatigueNausea74
PainHeadache61
-- 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;
graph pattern (PGQL)Three relationships of one case, matched in a single pattern.
Result10 rows, first 5 shown
namedeathCases
CELGENE43
ROCHE42
BRISTOL MYERS SQUIBB28
TAKEDA26
PFIZER20
-- 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;
graph pattern (PGQL)Graph traversal and SQL aggregation in the same statement.
Result10 rows, first 5 shown
primary_substancedistinctReactions
HUMAN IMMUNOGLOBULIN G784
PREGABALIN322
HUMAN IMMUNOGLOBULIN G\HYALURONIDASE RECOMBINANT HUMAN281
LENALIDOMIDE258
TOFACITINIB CITRATE242

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.

Get the healthcare database

Want to try it on your own data? Talk to us.