Solution · Healthcare
Agentic AI Master Data Management for Healthcare with Merge: From Fragmented Pharmaceutical Data to Unified Clinical Intelligence
How identity-based resolution, agentic AI matching, and multi-hop graph traversal transform scattered drug records from FDA filings, SEC documents, clinical registries, and pharmacy databases into a single source of truth.

The Pharmaceutical Data Fragmentation Problem
The same drug shows up everywhere — and nowhere consistently. Lipitor appears in FDA approval documents as "Lipitor (Atorvastatin Calcium)." SEC filings reference "Pfizer Inc" as its manufacturer. Clinical trial registries list it under "PROVE-IT TIMI 22 Study." Pharmacy databases record it with an NDC code. Insurance claims use yet another coding scheme.
Now multiply this across thousands of drugs, hundreds of manufacturers, complex clinical trial networks, and disease classification systems. The same company appears as "Pfizer," "Pfizer Inc," "PFE," and "Pfizer Pharmaceuticals" depending on which database you query. Johnson & Johnson becomes "J&J" in one system and "Johnson and Johnson" in another. GlaxoSmithKline gets abbreviated to "GSK" across market data feeds.
The consequences of this fragmentation in healthcare are not merely inconvenient — they are dangerous:
- Drug safety surveillance fails when adverse event reports scatter across duplicate manufacturer records
- Clinical trial analysis breaks down when the same sponsoring company appears as three separate entities
- Formulary management becomes unreliable when pharmacy systems cannot link brand names to their manufacturers
- Regulatory reporting requires expensive manual reconciliation across source systems
Traditional solutions — manual data stewardship, rigid ETL rules, or simple string matching — cannot handle the scale and variety of pharmaceutical data. A new drug generates records across a dozen systems within days of approval. Each system has its own conventions. The data never stops flowing.
This is the exact problem Merge was built to solve. In this post, we will build a complete pharmaceutical master data graph that:
- Defines schemas with identity attributes that trigger deterministic auto-merge
- Ingests records from multiple source systems with different naming conventions
- Uses agentic AI matching to evaluate uncertain cases and route them for human review
- Connects drugs, manufacturers, conditions, and clinical trials through a traversable relationship graph
- Handles typo-tolerant search for real-time clinical lookups
By the end, you will see how fragmented pharmaceutical records from SEC filings, pharmacy databases, clinical registries, and FDA systems resolve into clean golden entities — with full provenance and zero manual wrangling.
Schema Design: The Foundation of Intelligent Resolution
Before ingesting a single record, we define what our entities look like and — critically — how Merge should resolve duplicates. The key concept is the identity attribute: a field marked with identity: true that tells the resolution engine "if two records share this value, they are definitively the same entity."
Drug Schema
Drugs are the central entities in pharmaceutical data. Each has a brand name, generic equivalent, therapeutic class, and dosage form:
curl -X POST https://merge-ai.app/v1/schemas \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entity_type": "Drug",
"attributes": [
{"name": "name", "type": "string", "required": true},
{"name": "generic_name", "type": "string"},
{"name": "drug_class", "type": "string"},
{"name": "form", "type": "string"}
]
}'
Manufacturer Schema — With Identity Attribute
This is where resolution intelligence begins. The stock_ticker field is marked as identity: true:
curl -X POST https://merge-ai.app/v1/schemas \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entity_type": "Manufacturer",
"attributes": [
{"name": "name", "type": "string", "required": true},
{"name": "headquarters", "type": "string"},
{"name": "stock_ticker", "type": "string", "identity": true}
]
}'
Why stock_ticker as the identity attribute? In pharmaceutical data, company names vary wildly across sources — "Pfizer," "Pfizer Inc," "Pfizer Pharmaceuticals," "PFE." But the stock ticker is a definitive market identifier. Every SEC filing, every financial database, every market data feed uses the same ticker. When two records both carry stock_ticker: "PFE", they are unambiguously the same company — regardless of how the name field is formatted.
This is the difference between hoping your matching algorithm figures it out and telling the system definitively: "This field is ground truth."
Condition Schema
Medical conditions anchor the therapeutic side of the graph:
curl -X POST https://merge-ai.app/v1/schemas \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entity_type": "Condition",
"attributes": [
{"name": "name", "type": "string", "required": true},
{"name": "icd_code", "type": "string"},
{"name": "body_system", "type": "string"}
]
}'
ClinicalTrial Schema
Clinical trials provide the evidence layer connecting drugs to their manufacturers and the conditions they target:
curl -X POST https://merge-ai.app/v1/schemas \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entity_type": "ClinicalTrial",
"attributes": [
{"name": "name", "type": "string", "required": true},
{"name": "phase", "type": "string"},
{"name": "status", "type": "string"},
{"name": "start_year", "type": "string"}
]
}'

The Identity Attribute Explained
The identity: true configuration on stock_ticker instructs the resolution engine:
| Behavior | What Happens |
|---|---|
Two records share stock_ticker: "PFE" |
Deterministic auto-merge — no AI evaluation needed |
One record has stock_ticker: "PFE", other has none |
AI evaluates remaining attributes (name, headquarters) |
| Neither record has a ticker | AI evaluates on name similarity, attribute overlap, context |
This layered approach means you get instant, guaranteed resolution where identity keys exist — and intelligent probabilistic matching where they do not.
Defining Relationships: Connecting Your Master Data
Entities in isolation answer simple questions. Connected entities answer complex ones. We define four relationship types that form the edges of our pharmaceutical master data graph:
# Drugs are manufactured by companies
curl -X POST https://merge-ai.app/v1/relationships \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"relationship_type": "manufactured_by",
"from_entity_type": "Drug",
"to_entity_type": "Manufacturer"
}'
# Drugs treat medical conditions
curl -X POST https://merge-ai.app/v1/relationships \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"relationship_type": "treats",
"from_entity_type": "Drug",
"to_entity_type": "Condition"
}'
# Clinical trials are conducted by manufacturers
curl -X POST https://merge-ai.app/v1/relationships \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"relationship_type": "conducted_by",
"from_entity_type": "ClinicalTrial",
"to_entity_type": "Manufacturer"
}'
# Clinical trials study specific drugs
curl -X POST https://merge-ai.app/v1/relationships \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"relationship_type": "studies",
"from_entity_type": "ClinicalTrial",
"to_entity_type": "Drug"
}'
Multi-Hop Traversal Paths
These four relationship types enable powerful multi-hop queries:
ClinicalTrial → (studies) → Drug → (treats) → Condition ← (treats) ← Other Drugs
| |
v v
(conducted_by) (manufactured_by)
| |
v v
Manufacturer Manufacturer
A single 3-hop query from Lipitor can reveal: which company makes it, what condition it treats, what other drugs treat the same condition, who manufactures those drugs, and what clinical trials have studied it. This is the kind of relational intelligence that no flat database can provide.
Loading Pharmaceutical Data
Now we populate the graph with real pharmaceutical entities. We begin with manufacturers, then conditions, then drugs with their relationships, and finally clinical trials.
Manufacturers with Stock Tickers
Five major pharmaceutical companies, each carrying their definitive market identifier:
curl -X POST https://merge-ai.app/v1/entities/batch \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entity_type": "Manufacturer",
"source_system": "pharma-registry",
"records": [
{"name": "Pfizer", "headquarters": "New York, USA", "stock_ticker": "PFE"},
{"name": "Johnson & Johnson", "headquarters": "New Brunswick, USA", "stock_ticker": "JNJ"},
{"name": "GlaxoSmithKline", "headquarters": "London, UK", "stock_ticker": "GSK"},
{"name": "Novo Nordisk", "headquarters": "Bagsvaerd, Denmark", "stock_ticker": "NVO"},
{"name": "Eli Lilly", "headquarters": "Indianapolis, USA", "stock_ticker": "LLY"}
]
}'
Medical Conditions
The conditions these drugs target, with ICD diagnostic codes and body system classifications:
curl -X POST https://merge-ai.app/v1/entities/batch \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entity_type": "Condition",
"source_system": "icd-registry",
"records": [
{"name": "Type 2 Diabetes", "icd_code": "E11", "body_system": "Endocrine"},
{"name": "High Cholesterol", "icd_code": "E78.0", "body_system": "Cardiovascular"},
{"name": "Pain", "icd_code": "R52", "body_system": "Nervous System"},
{"name": "Rheumatoid Arthritis", "icd_code": "M06.9", "body_system": "Musculoskeletal"}
]
}'
Drugs with Relationships
Each drug is ingested with its relationships to manufacturer and condition — building the graph edges as data flows in:
# Lipitor — the blockbuster statin
curl -X POST https://merge-ai.app/v1/entities \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entity_type": "Drug",
"source_system": "fda-registry",
"attributes": {
"name": "Lipitor",
"generic_name": "Atorvastatin",
"drug_class": "Statin",
"form": "Tablet"
},
"relationships": [
{"relationship_type": "manufactured_by", "to_entity_id": "<pfizer_id>"},
{"relationship_type": "treats", "to_entity_id": "<high_cholesterol_id>"}
]
}'
# Ozempic — the GLP-1 diabetes drug
curl -X POST https://merge-ai.app/v1/entities \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entity_type": "Drug",
"source_system": "fda-registry",
"attributes": {
"name": "Ozempic",
"generic_name": "Semaglutide",
"drug_class": "GLP-1 Receptor Agonist",
"form": "Injection"
},
"relationships": [
{"relationship_type": "manufactured_by", "to_entity_id": "<novo_nordisk_id>"},
{"relationship_type": "treats", "to_entity_id": "<type_2_diabetes_id>"}
]
}'
# Metformin — first-line diabetes treatment
curl -X POST https://merge-ai.app/v1/entities \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entity_type": "Drug",
"source_system": "fda-registry",
"attributes": {
"name": "Metformin",
"generic_name": "Metformin HCl",
"drug_class": "Biguanide",
"form": "Tablet"
},
"relationships": [
{"relationship_type": "manufactured_by", "to_entity_id": "<eli_lilly_id>"},
{"relationship_type": "treats", "to_entity_id": "<type_2_diabetes_id>"}
]
}'
# Tylenol — OTC pain reliever
curl -X POST https://merge-ai.app/v1/entities \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entity_type": "Drug",
"source_system": "fda-registry",
"attributes": {
"name": "Tylenol",
"generic_name": "Acetaminophen",
"drug_class": "Analgesic",
"form": "Tablet"
},
"relationships": [
{"relationship_type": "manufactured_by", "to_entity_id": "<jnj_id>"},
{"relationship_type": "treats", "to_entity_id": "<pain_id>"}
]
}'
# Advil — NSAID pain reliever
curl -X POST https://merge-ai.app/v1/entities \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entity_type": "Drug",
"source_system": "fda-registry",
"attributes": {
"name": "Advil",
"generic_name": "Ibuprofen",
"drug_class": "NSAID",
"form": "Tablet"
},
"relationships": [
{"relationship_type": "manufactured_by", "to_entity_id": "<pfizer_id>"},
{"relationship_type": "treats", "to_entity_id": "<pain_id>"}
]
}'
# Humira — biologic for autoimmune conditions
curl -X POST https://merge-ai.app/v1/entities \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entity_type": "Drug",
"source_system": "fda-registry",
"attributes": {
"name": "Humira",
"generic_name": "Adalimumab",
"drug_class": "TNF Inhibitor",
"form": "Injection"
},
"relationships": [
{"relationship_type": "manufactured_by", "to_entity_id": "<jnj_id>"},
{"relationship_type": "treats", "to_entity_id": "<rheumatoid_arthritis_id>"}
]
}'
Clinical Trials
The evidence layer — connecting research to manufacturers and the drugs they study:
# SUSTAIN-6: Novo Nordisk's landmark Ozempic cardiovascular outcomes trial
curl -X POST https://merge-ai.app/v1/entities \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entity_type": "ClinicalTrial",
"source_system": "clinicaltrials-gov",
"attributes": {
"name": "SUSTAIN-6",
"phase": "Phase 3",
"status": "Completed",
"start_year": "2013"
},
"relationships": [
{"relationship_type": "conducted_by", "to_entity_id": "<novo_nordisk_id>"},
{"relationship_type": "studies", "to_entity_id": "<ozempic_id>"}
]
}'
# PROVE-IT: Pfizer's statin superiority trial
curl -X POST https://merge-ai.app/v1/entities \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entity_type": "ClinicalTrial",
"source_system": "clinicaltrials-gov",
"attributes": {
"name": "PROVE-IT",
"phase": "Phase 3",
"status": "Completed",
"start_year": "2001"
},
"relationships": [
{"relationship_type": "conducted_by", "to_entity_id": "<pfizer_id>"},
{"relationship_type": "studies", "to_entity_id": "<lipitor_id>"}
]
}'
After all records are ingested, the entities list shows our complete pharmaceutical dataset:

Data Summary
| Entity Type | Count | Examples |
|---|---|---|
| Manufacturer | 5 | Pfizer, Johnson & Johnson, GlaxoSmithKline, Novo Nordisk, Eli Lilly |
| Condition | 4 | Type 2 Diabetes, High Cholesterol, Pain, Rheumatoid Arthritis |
| Drug | 6 | Lipitor, Ozempic, Metformin, Tylenol, Advil, Humira |
| ClinicalTrial | 2 | SUSTAIN-6, PROVE-IT |
| Total | 17 |
Identity-Based Auto-Merge: The Stock Ticker Signal
With base data in place, we simulate what happens when data arrives from additional source systems — each using different naming conventions for the same companies.
Test: "Pfizer Inc" from SEC Filings
An SEC filing processor sends a manufacturer record with the name "Pfizer Inc" and ticker "PFE":
curl -X POST https://merge-ai.app/v1/entities \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entity_type": "Manufacturer",
"source_system": "sec-filings",
"attributes": {
"name": "Pfizer Inc",
"headquarters": "New York, NY",
"stock_ticker": "PFE"
}
}'
Result: Instant auto-merge. The resolution engine sees stock_ticker: "PFE" on both the incoming record and the existing Pfizer entity. Because stock_ticker is marked identity: true, no further evaluation is needed. The records are merged immediately.
Test: "Johnson & Johnson" from Pharmacy Database
A pharmacy network database sends the same company with a slightly different headquarters format:
curl -X POST https://merge-ai.app/v1/entities \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entity_type": "Manufacturer",
"source_system": "pharmacy-db",
"attributes": {
"name": "Johnson & Johnson",
"headquarters": "New Brunswick, NJ",
"stock_ticker": "JNJ"
}
}'
Result: Instant auto-merge. The ticker JNJ matches the existing entity. Name difference ("New Brunswick, USA" vs "New Brunswick, NJ") is irrelevant — the identity key is authoritative.
Viewing the Merged Entity
After both identity merges, the Pfizer entity now consolidates records from two source systems:
curl https://merge-ai.app/v1/entities/ent_6408b2c2-4790-4618-8306-3af7e3d56593/sources \
-H "X-API-Key: $MERGE_API_KEY"
{
"sources": [
{
"raw": "{\"headquarters\":\"New York, USA\",\"name\":\"Pfizer\",\"stock_ticker\":\"PFE\"}",
"source_id": "src_fa4a6e6e-c59c-4522-b019-fb05bad29ae2",
"source_system": "pharma-registry"
},
{
"raw": "{\"headquarters\":\"New York, NY\",\"name\":\"Pfizer Inc\",\"stock_ticker\":\"PFE\"}",
"source_id": "src_81eaca52-95d7-49e9-8dab-f1bfbdfd64f2",
"source_system": "sec-filings"
}
]
}

Two records, two source systems, two different name formats — one golden entity. The ticker PFE made this resolution instant and guaranteed.
How Identity Resolution Works
┌─────────────────────────────────────────────────────────┐
│ Incoming Record │
│ name: "Pfizer Inc" │
│ stock_ticker: "PFE" ← identity attribute │
└───────────────────┬─────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ Resolution Engine │
│ 1. Check identity attributes against existing entities │
│ 2. Found match: existing entity has stock_ticker "PFE" │
│ 3. Decision: DETERMINISTIC AUTO-MERGE │
└───────────────────┬─────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ Golden Entity: Pfizer Inc │
│ source_count: 2 │
│ Sources: pharma-registry, sec-filings │
└─────────────────────────────────────────────────────────┘
Agentic AI Matching: When Identity Keys Are Absent
Not every record arrives with a clean stock ticker. Market data feeds may abbreviate company names. Pharmacy networks use shorthand. Clinical registries have their own formatting conventions. When there is no identity key to anchor the match, Merge's agentic AI evaluator steps in — analyzing name similarity, attribute overlap, acronym patterns, and contextual signals to determine whether records represent the same entity.
Test: "GSK" Without a Ticker
A market data feed sends a manufacturer record using only the abbreviation "GSK" — with no stock_ticker field:
curl -X POST https://merge-ai.app/v1/entities \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entity_type": "Manufacturer",
"source_system": "market-data",
"attributes": {
"name": "GSK",
"headquarters": "London, UK"
}
}'
Result: AI auto-merge. Without an identity key, the AI evaluator compares the incoming "GSK" against existing manufacturers. It recognizes that "GSK" is the established abbreviation for "GlaxoSmithKline" — same headquarters (London, UK), matching acronym pattern. Confidence exceeds the auto-merge threshold.
After the merge, the GlaxoSmithKline entity shows both sources:
{
"sources": [
{
"raw": "{\"headquarters\":\"London, UK\",\"name\":\"GlaxoSmithKline\",\"stock_ticker\":\"GSK\"}",
"source_id": "src_f1bbc7d0-4dd5-4f10-852e-577f9d4fc666",
"source_system": "pharma-registry"
},
{
"raw": "{\"headquarters\":\"London, UK\",\"name\":\"GSK\"}",
"source_id": "src_5bdb1af0-2d04-4507-ab30-0dada5c73fc1",
"source_system": "market-data"
}
]
}
The AI correctly resolved "GSK" → "GlaxoSmithKline" without any identity key — using acronym matching and headquarters concordance as evidence.
Test: "J&J" Abbreviation → Human Review
A pharmacy network sends a record using the common abbreviation "J&J":
curl -X POST https://merge-ai.app/v1/entities \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entity_type": "Manufacturer",
"source_system": "pharmacy-network",
"attributes": {
"name": "J&J",
"headquarters": "New Brunswick"
}
}'
Result: Routed to review. The AI evaluator finds a probable match with "Johnson & Johnson" but the confidence score lands at 0.72 — below the auto-merge threshold. Here is why:
{
"id": "aae79dda-708a-4bca-9cb7-a5a1a93082a7",
"status": "pending",
"confidence_score": 0.72,
"entity_type": "Manufacturer",
"source_attributes": {
"name": "J&J",
"headquarters": "New Brunswick"
},
"comparison_details": {
"name_sim": 0.76,
"alias_sim": 1,
"acronym_sim": 1,
"attr_overlap": 0.48,
"contextual": 0
},
"candidate_entity_id": "ent_ac32ae4a-e072-4698-97bd-5cc9ea26ede3"
}
The signals tell the story:
- name_sim: 0.76 — "J&J" vs "Johnson & Johnson" has moderate lexical similarity
- acronym_sim: 1.0 — Perfect acronym match (J&J = Johnson & Johnson)
- alias_sim: 1.0 — Known alias pattern recognized
- attr_overlap: 0.48 — Partial headquarters match ("New Brunswick" vs "New Brunswick, NJ")
- Overall confidence: 0.72 — Above the create-new threshold but below auto-merge
This is exactly the kind of case where a human data steward adds value. The AI is 72% confident but not certain enough to merge autonomously.
Test: "Johnson and Johnson" → AI Auto-Merge
An insurance claims system sends the full name with "and" instead of "&":
curl -X POST https://merge-ai.app/v1/entities \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entity_type": "Manufacturer",
"source_system": "insurance-claims",
"attributes": {
"name": "Johnson and Johnson",
"headquarters": "New Brunswick, USA"
}
}'
Result: Routed to review, then accepted. The name similarity between "Johnson and Johnson" and "Johnson & Johnson" is 0.91 — the AI recognizes this as a formatting variant. After human review confirmed the match, the entity now consolidates three source systems.

The Three-Tier Resolution Strategy
These examples demonstrate Merge's layered approach to entity resolution:
┌─────────────────────────────────────────────────────────┐
│ Tier 1: Deterministic (Identity Match) │
│ stock_ticker exact match → instant auto-merge │
│ Speed: <1ms | Confidence: 100% │
│ Example: "Pfizer Inc" with PFE → merged to Pfizer │
├─────────────────────────────────────────────────────────┤
│ Tier 2: Agentic AI High-Confidence │
│ Multi-signal evaluation → auto-merge │
│ Speed: ~50ms | Confidence: >85% │
│ Example: "GSK" → merged to GlaxoSmithKline │
├─────────────────────────────────────────────────────────┤
│ Tier 3: Agentic AI Uncertain → Human Review │
│ Probable match, insufficient confidence → review queue │
│ Speed: human-dependent | Confidence: 50-85% │
│ Example: "J&J" → review against Johnson & Johnson │
└─────────────────────────────────────────────────────────┘
In healthcare, this layered approach is essential. False merges can have patient safety consequences. The system confidently auto-merges where evidence is strong and routes genuinely uncertain cases to human expertise.
Force Merge: Manual Override for Known Duplicates
Sometimes you discover duplicates through domain knowledge that the automated system cannot infer from attributes alone. A regulatory specialist knows that "Pfizer Pharmaceuticals" from a supplier portal is the same company as "Pfizer Inc" — but without a stock ticker and with a different name suffix, the AI flags it for review rather than merging.
After rejecting the review (creating "Pfizer Pharmaceuticals" as a separate entity), we demonstrate the force-merge API to manually override:
# Force merge: absorb "Pfizer Pharmaceuticals" into Pfizer Inc
curl -X POST https://merge-ai.app/v1/entities/ent_6408b2c2-4790-4618-8306-3af7e3d56593/merge/ent_018f527e-3bbd-4d76-b419-a2cbaa477c3c \
-H "X-API-Key: $MERGE_API_KEY"
{
"from": "ent_018f527e-3bbd-4d76-b419-a2cbaa477c3c",
"merged_into": "ent_6408b2c2-4790-4618-8306-3af7e3d56593",
"status": "queued"
}
The merge is queued and processed asynchronously. After completion, the Pfizer entity now consolidates three source records:
{
"entity_id": "ent_6408b2c2-4790-4618-8306-3af7e3d56593",
"name": "Pfizer Inc",
"source_count": 3,
"attributes": {
"headquarters": "New York, NY",
"name": "Pfizer Inc",
"stock_ticker": "PFE"
}
}
Viewing the full source lineage:
{
"sources": [
{
"raw": "{\"headquarters\":\"New York, USA\",\"name\":\"Pfizer\",\"stock_ticker\":\"PFE\"}",
"source_system": "pharma-registry"
},
{
"raw": "{\"headquarters\":\"New York, NY\",\"name\":\"Pfizer Inc\",\"stock_ticker\":\"PFE\"}",
"source_system": "sec-filings"
},
{
"raw": "{\"headquarters\":\"New York\",\"name\":\"Pfizer Pharmaceuticals\"}",
"source_system": "supplier-portal"
}
]
}
Three source systems, three different name variants — all correctly unified into a single golden entity with full provenance. Every downstream system that references Pfizer now gets the complete picture regardless of which source originated the data.
Relationship Traversal: Discovering Hidden Connections
With entities resolved and relationships established, the master data graph enables multi-hop discovery. Starting from Lipitor and traversing three relationship edges outward, we uncover the full network of pharmaceutical connections:
curl "https://merge-ai.app/v1/entities/ent_43cda1ea-aea6-48a0-bdcc-4dd3c93bf906/graph?hops=3" \
-H "X-API-Key: $MERGE_API_KEY"
What 3 Hops from Lipitor Reveals
Hop 1 — Direct connections:
- Pfizer Inc (manufactured_by)
- High Cholesterol (treats)
- PROVE-IT (studies ← clinical trial)
Hop 2 — One step removed:
- Advil (also manufactured_by Pfizer)
- PROVE-IT → Pfizer (conducted_by)
Hop 3 — Two steps removed:
- Pain (Advil treats Pain)
- Tylenol (also treats Pain)
- Johnson & Johnson (manufactures Tylenol)
The full traversal path that makes this powerful:
Lipitor → (manufactured_by) → Pfizer Inc → (manufactured_by) ← Advil → (treats) → Pain
↑
(conducted_by)
|
PROVE-IT → (studies) → Lipitor
Pain ← (treats) ← Tylenol → (manufactured_by) → Johnson & Johnson

Insights from Graph Traversal
From a single 3-hop query starting at Lipitor, we discover:
| Insight | Path | Business Value |
|---|---|---|
| Pfizer makes both Lipitor and Advil | Lipitor → Pfizer ← Advil | Portfolio analysis |
| Lipitor and Tylenol share a condition neighbor | Lipitor → Pfizer → Advil → Pain ← Tylenol | Cross-therapeutic mapping |
| PROVE-IT validates Lipitor | PROVE-IT → studies → Lipitor | Evidence traceability |
| J&J and Pfizer both have drugs for Pain | Pain ← Advil (Pfizer), Pain ← Tylenol (J&J) | Competitive landscape |
| Two manufacturers connect through Pain | Pfizer → Advil → Pain ← Tylenol ← J&J | Market overlap detection |
This kind of relational intelligence powers drug interaction databases, competitive landscape analysis, formulary optimization, and clinical decision support — all from a single API call.
Graph Structure
PROVE-IT
/ \
conducted_by studies
/ \
Lipitor ←─manufactured_by─→ Pfizer Inc
| |
treats manufactured_by
| |
v v
High Cholesterol Advil
|
treats
|
v
Pain
^
treats
|
Tylenol
|
manufactured_by
|
v
Johnson & Johnson
Search: Typo Tolerance and Unified Results
Real users misspell drug names. Pharmacists abbreviate. Researchers type partial queries. Merge's search handles all of this gracefully — and crucially, returns the resolved golden entity rather than individual source fragments.
Typo Search: "Acetaminofen"
A user searches for "Acetaminofen" — a common misspelling of "Acetaminophen" (the generic name for Tylenol):
curl "https://merge-ai.app/v1/entities/search?q=Acetaminofen" \
-H "X-API-Key: $MERGE_API_KEY"
{
"results": [
{
"entity_id": "ent_e2238bb7-e110-4e73-b91d-07537f9419e9",
"score": 1,
"source": {
"entity_type": "Drug",
"name": "Tylenol",
"source_count": 1,
"attributes": {
"name": "Tylenol",
"generic_name": "Acetaminophen",
"drug_class": "Analgesic",
"form": "Tablet"
}
},
"match_signals": ["lexical"]
}
]
}
Despite the misspelling ("Acetaminofen" vs "Acetaminophen"), Merge's search engine uses edit-distance algorithms and phonetic matching to return the correct result. The search matches against all attributes — including generic_name — so clinicians can find drugs by either brand or generic name.

Merged Entity Search: "Pfizer"
Searching for "Pfizer" returns the unified golden entity — not three separate records:
curl "https://merge-ai.app/v1/entities/search?q=Pfizer" \
-H "X-API-Key: $MERGE_API_KEY"
{
"results": [
{
"entity_id": "ent_6408b2c2-4790-4618-8306-3af7e3d56593",
"score": 1,
"source": {
"name": "Pfizer Pharmaceuticals",
"source_count": 3,
"attributes": {
"headquarters": "New York",
"name": "Pfizer Pharmaceuticals",
"stock_ticker": "PFE"
}
},
"match_signals": ["lexical"]
}
]
}
One result. Three sources consolidated. Full attribute set. This is what downstream applications need — a single authoritative record for "Pfizer" regardless of which source system originated the query.

Search Capabilities
| Feature | Example | Behavior |
|---|---|---|
| Exact name | q=Lipitor |
Direct lexical match on entity name |
| Generic name | q=Atorvastatin |
Matches across all attributes |
| Typo tolerance | q=Acetaminofen |
Edit-distance correction finds Acetaminophen |
| Abbreviation | q=GSK |
Finds GlaxoSmithKline entity |
| Merged results | q=Pfizer |
Returns single golden entity (not individual sources) |
| Entity type filter | q=Pfizer&entity_type=Manufacturer |
Scoped results |
Clean Master Data: The Final Picture
After all resolution processing — identity merges, agentic AI matching, human review, and force merge — here is the final state of our pharmaceutical master data graph:
Analytics Summary
curl https://merge-ai.app/v1/analytics/summary \
-H "X-API-Key: $MERGE_API_KEY"
{
"creates": 18,
"decisions": 26,
"merges": 4,
"reviews": 3,
"reviews_accepted": 1,
"reviews_rejected": 1,
"pending_reviews": 1
}
What These Numbers Mean
- 18 source records ingested from 6 different systems (pharma-registry, fda-registry, clinicaltrials-gov, sec-filings, pharmacy-db, market-data, insurance-claims, pharmacy-network, supplier-portal)
- 26 resolution decisions — every incoming record evaluated against the existing entity graph
- 4 automatic merges — identity matches (2) and AI high-confidence matches (2)
- 3 reviews created — cases where confidence fell between auto-merge and create-new thresholds
- 1 accepted, 1 rejected — human decisions that refined the graph
- 1 pending — the "J&J" review awaiting data steward review
Resolution Summary Table
| Entity | Type | Sources | Resolution Method | Key Signal |
|---|---|---|---|---|
| Pfizer Inc | Manufacturer | 3 | Identity (1) + Force merge (1) | stock_ticker: PFE |
| Johnson & Johnson | Manufacturer | 3 | Identity (1) + Review accepted (1) | stock_ticker: JNJ |
| GSK | Manufacturer | 2 | Agentic AI auto-merge | Acronym match + headquarters |
| Novo Nordisk | Manufacturer | 1 | — | Single source |
| Eli Lilly | Manufacturer | 1 | — | Single source |
| Lipitor | Drug | 1 | — | Single source |
| Ozempic | Drug | 1 | — | Single source |
| Metformin | Drug | 1 | — | Single source |
| Tylenol | Drug | 1 | — | Single source |
| Advil | Drug | 1 | — | Single source |
| Humira | Drug | 1 | — | Single source |
| Type 2 Diabetes | Condition | 1 | — | Single source |
| High Cholesterol | Condition | 1 | — | Single source |
| Pain | Condition | 1 | — | Single source |
| Rheumatoid Arthritis | Condition | 1 | — | Single source |
| SUSTAIN-6 | ClinicalTrial | 1 | — | Single source |
| PROVE-IT | ClinicalTrial | 1 | — | Single source |
Entity Counts After Resolution
| Entity Type | Created | After Merges | Relationships |
|---|---|---|---|
| Manufacturer | 5 (+5 duplicates) | 5 golden entities | manufactured_by, conducted_by targets |
| Drug | 6 | 6 golden entities | manufactured_by, treats, studies targets |
| Condition | 4 | 4 golden entities | treats targets |
| ClinicalTrial | 2 | 2 golden entities | conducted_by, studies |
| Total | 17 base + 5 duplicates | 17 golden entities | 16 relationships |
Tips for Production Healthcare Data Pipelines
1. Choose Identity Attributes That Represent Ground Truth
The biggest leverage in entity resolution comes from selecting the right identity key. In healthcare and pharma:
- Stock tickers for manufacturers (PFE, JNJ, GSK, NVO, LLY)
- NDC codes for drugs (National Drug Code — unique to dosage form and packaging)
- NPI numbers for healthcare providers
- ICD codes for conditions
- NCT numbers for clinical trials (ClinicalTrials.gov identifiers)
Every record that carries a valid identity key resolves instantly without AI evaluation.
2. Layer Your Resolution Strategy
Do not rely on a single approach. Healthcare data is too varied and the stakes are too high:
- Deterministic for records with trusted identifiers (instant, zero false-positive risk)
- Agentic AI auto-merge for high-confidence pattern matches (handles "GSK" → "GlaxoSmithKline")
- Human review for edge cases where abbreviations or formatting create ambiguity (the "J&J" case)
- Force merge for domain-knowledge overrides discovered after initial processing
3. Use Source Tagging for Regulatory Compliance
Every record in our graph carries its source_system tag. This provenance chain is critical for:
- FDA audit trails — proving where data originated
- Data lineage for GDPR/HIPAA compliance
- Source priority when attributes conflict (SEC filings may override supplier data)
- Quality scoring based on source reliability
4. Design Relationships for Clinical Queries
The four relationship types we defined enable the exact traversal patterns clinical systems need:
- "What drugs treat the same condition as Ozempic?" → Ozempic → treats → Type 2 Diabetes ← treats ← Metformin
- "Who manufactured and studied this drug?" → Lipitor → manufactured_by → Pfizer ← conducted_by ← PROVE-IT
- "What's the competitive landscape for pain?" → Pain ← treats ← Advil/Tylenol → manufactured_by → Pfizer/J&J
5. Monitor the Review Queue
A growing review queue signals data quality issues upstream:
- Too many reviews? Your source systems may lack identity keys. Work with providers to add NDC codes or tickers.
- Many rejected reviews? Your entity types may need disambiguation. Consider adding distinguishing attributes.
- Reviews always accepted? Your auto-merge threshold may be too conservative. Consider tuning confidence.
6. Plan for Splits
Incorrect merges happen. A generic "Metformin" from one manufacturer is not the same product as "Metformin ER" from another. Merge's split API lets you undo mistakes:
curl -X POST https://merge-ai.app/v1/entities/{entity_id}/split \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"source_id": "src_to_separate"}'
7. Use Webhooks for Real-Time Downstream Updates
When a merge or new entity is created, push events to downstream clinical systems immediately:
curl -X POST https://merge-ai.app/v1/webhooks \
-H "X-API-Key: $MERGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-ehr.com/hooks/entity-updates",
"events": ["entity.merged", "entity.created", "review.pending"]
}'
8. Build Semantic Search for Clinical Decision Support
Beyond lexical search, Merge supports semantic search for natural-language clinical queries:
curl "https://merge-ai.app/v1/entities/semantic?q=diabetes+medication+injectable" \
-H "X-API-Key: $MERGE_API_KEY"
This enables clinicians to find entities using clinical reasoning rather than exact terminology — essential for point-of-care applications.
Why This Matters for Healthcare
Patient Safety
When adverse event reports scatter across "Pfizer," "Pfizer Inc," and "Pfizer Pharmaceuticals" as three separate manufacturer records, safety signals fragment. Entity resolution ensures all events are attributed to the correct unified entity — making it possible to detect patterns that could save lives.
Clinical Trial Transparency
Regulators need complete lineage: which company sponsored which trial, which drug was studied, what conditions were targeted. A resolved master data graph provides this without manual cross-referencing across databases.
Formulary Management
Health systems managing drug formularies need to know that Lipitor and Advil share a manufacturer (Pfizer), that Tylenol and Humira share a manufacturer (J&J), and that multiple drugs target the same condition. Graph traversal makes formulary decisions informed by the full relational context.
Supply Chain Resilience
When a manufacturing facility has a compliance issue, you need to instantly identify every drug affected. Graph queries like "all drugs manufactured_by this entity" answer this in milliseconds — but only if the manufacturer entity is properly resolved across all source systems.
Conclusion
We started with pharmaceutical data scattered across SEC filings, FDA registries, clinical trial databases, pharmacy networks, insurance claims, and supplier portals — each using its own naming conventions and levels of completeness. "Pfizer," "Pfizer Inc," "Pfizer Pharmaceuticals." "Johnson & Johnson," "J&J," "Johnson and Johnson." "GlaxoSmithKline," "GSK."
Through Merge's three-tier resolution engine, we produced a clean master data graph with:
- 17 golden entities — deduplicated, enriched, and confidence-scored
- 4 relationship types — creating a traversable multi-hop pharmaceutical graph
- 6 nodes visible from a single 3-hop query starting at Lipitor
- 4 automatic merges — identity matches and agentic AI combined
- Full provenance — every golden entity traces back to its original source records
- Zero false merges — uncertain cases routed to human expertise
The pharmaceutical industry cannot afford fragmented entity data. Drug safety, clinical research, regulatory compliance, and supply chain management all depend on knowing that "Pfizer Inc" and "Pfizer Pharmaceuticals" are the same company — and that different manufacturers making drugs for the same condition are connected through the conditions they treat.
Merge handles all of this through a single API: schemas define your domain model, identity attributes trigger deterministic matching, agentic AI evaluates the uncertain middle ground, and human review catches the genuinely ambiguous edges. No ML models to train. No complex ETL pipelines to maintain. No manual data stewardship required for the 80% of cases where the system is confident.
Ready to resolve your pharmaceutical data? Start building at merge-ai.app.
Built with Merge — Entity resolution and master data graph platform for healthcare and pharmaceutical data.