Pharma AI evaluation · · 9 min read
WHODrug coding AI: how to evaluate auto-coding in trials
Acumen Editorial · Updated November 28, 2026
Concomitant medication coding is one of the most repetitive jobs in clinical data management. Sites type what the patient takes, often a trade name, a misspelling or a local brand. Coders map each entry to a WHODrug record and an ATC class. AI coders now automate most of that work, and the question for sponsors and CROs is how to prove the automated share is right.
What does WHODrug coding AI actually do?
WHODrug Global is the drug dictionary from the Uppsala Monitoring Centre. The FDA's Study Data Technical Conformance Guide describes it as typically used for concomitant medication coding in submissions.
An AI coder reads the verbatim term plus any context fields, such as route, indication and country, and returns one of three outcomes. It codes the entry with high certainty, offers a short list of candidate records, or leaves it for a human. That three-way split matters for evaluation. Each outcome needs its own accuracy number, and the coded share is only as valuable as its error rate.
This is a different problem from billing code assignment, which we cover in our guide to evaluating AI medical coding. Drug coding turns on product identity: trade names, salts, combinations and country of sale.
What does the published evidence show?
The largest public test is a 2022 study in Drug Safety of WHODrug Koda, the Uppsala Monitoring Centre's AI coding engine. Koda was built for concomitant medication coding in trials. The study ran it on adverse event reports in VigiBase: 1,936,062 reports from 181 countries and territories, giving 4,845,505 drug inputs.
The results set a useful benchmark for any vendor claim:
- 89% of inputs were coded at high certainty, 6% got suggestions and 5% were left uncoded. A simple direct-match baseline coded 61%.
- High-certainty codes were 97% accurate against the existing encodings.
- 76% of suggestion lists contained the correct record.
- Overall accuracy was 86.0%, against 60.4% for the baseline.
The manual review is the more instructive part. When reviewers checked cases where Koda disagreed with the reference, its high-certainty codes were as good or more precise in over 90% of sampled cases. Over 80% of the inputs Koda left uncoded had reference codes that were incorrect or needed review. Reviewer agreement, measured by Cohen's kappa, ran from 0.81 to 0.89.
Two lessons follow. Your existing coded data is not a clean gold standard. And the cases an AI coder declines are often the cases where humans also got it wrong.
Where does auto-coding go wrong?
The hard cases are predictable. Build your test set around them.
- Shared trade names. The same brand can contain different active ingredients in different countries.
- Salt forms and formulations. One ingredient can carry many records, and reformulated products change identity.
- Combinations. Amoxicillin and amoxicillin with clavulanate code differently.
- Missing context. In the Koda study's masking experiment on ambiguous inputs, removing route, indication and country demoted 246 of 2,124 high-certainty codes to suggestions. Removing country alone demoted 129. If your sites leave those fields blank, expect lower automation than the brochure.
- Dictionary versions. WHODrug ships regular releases. A product added mid-study may be missing from the version locked for your trial, which forces recoding.
- Free-text noise. Misspellings, abbreviations and entries like "blood pressure pill" need a query to the site, not a guess.
How should you build the gold set?
Start from real verbatims, not cleaned lists. Pull a sample from completed studies across regions and therapeutic areas, then oversample the ambiguous categories above.
Have two experienced coders code each entry independently against the WHODrug version you will use. Route disagreements to a pharmacist or a senior coder for adjudication, and record the reason. Measure agreement between your own coders first. If humans disagree on 15% of entries, an AI that agrees with one of them 85% of the time may be performing at expert level. Our piece on inter-rater reliability in medical AI explains how to read kappa before you set an acceptance threshold.
Keep the gold set fixed and versioned. You will rerun it whenever the dictionary or the model changes.
Which metrics should you report?
| Metric | Why it matters |
|---|---|
| Automation rate | Share coded without a human, the source of the time savings |
| High-certainty precision | Error rate on entries nobody will look at again |
| Suggestion hit rate | How often the correct record is in the shortlist |
| Uncoded share | Workload left for coders |
| ATC agreement | Whether therapeutic class is right even when the record differs |
| Precision on ambiguous inputs | Performance where errors concentrate |
| Agreement vs. human coders | The baseline the AI has to beat |
Set the acceptance bar on high-certainty precision. A coder will review suggestions and uncoded entries. Nobody reviews a confident wrong code, and it flows straight into your safety tables.
What should you ask a vendor?
AI coding vendors usually quote one automation figure. Ask for the numbers behind it.
- Accuracy by outcome. Ask for precision on high-certainty codes, the suggestion hit rate and the uncoded share, reported separately. One blended figure hides where errors sit.
- The reference set. Ask what the gold standard was and who built it. As the Koda study showed, existing coded data contains errors, so a vendor scoring against an uncorrected legacy set may understate or overstate performance.
- Ambiguous inputs. Ask for results on shared trade names, salts and combinations, and on entries with route, indication or country missing.
- Dictionary versions. Ask which WHODrug releases the tool supports, how quickly it moves to a new one and how it handles a study locked to an older version.
- Configuration. The published study tested only a default configuration. Ask which rules and synonym lists your deployment will use, and test that setup, not the demo.
- Audit trail. Ask whether every automated code records the model version, the inputs used and the confidence, so an inspector can trace it.
A vendor who answers these clearly is easier to validate. One who cannot is handing the validation burden to your team.
A pre-rollout checklist
- Gold set drawn from real verbatims across countries and therapeutic areas
- Ambiguous trade names, salts and combinations oversampled
- Two independent coders plus adjudication, with reasons recorded
- Human-to-human agreement measured before setting thresholds
- Metrics reported separately for coded, suggested and uncoded outputs
- Context fields tested present and absent
- Retest planned for each dictionary release and model update
- Validation documented for your quality system and audit trail
The last item is where most teams lose time. Our guide to AI in clinical data management covers how coding fits into wider data review, and our validation service describes how we document expert review.
How Acumen helps
We build WHODrug evaluation sets with experienced clinical coders and pharmacists. They code real-world-style verbatims independently, adjudicate disagreements and grade AI outputs, with reviewer credentials and reasons on every item. Our medical affairs and regulatory data service delivers it as a versioned test set for validation files.
For related reading, see how we approach evaluating AI in pharmacovigilance, GxP AI validation and AI model change control in pharma.
FAQ
What is WHODrug coding AI?
It is software that maps the medication names entered in a clinical trial or safety report to records in WHODrug Global, the Uppsala Monitoring Centre's drug dictionary, along with ATC classes. Most tools code confident matches automatically, offer suggestions for uncertain ones and leave the hardest entries for a human coder.
How accurate is AI drug coding?
In a 2022 Drug Safety study of WHODrug Koda on 4.8 million adverse event drug inputs, 89% were coded at high certainty with 97% accuracy, and overall accuracy was 86.0% against 60.4% for a simple baseline. Accuracy on your own studies depends on verbatim quality and context fields, so test locally.
Can AI replace human WHODrug coders?
Not entirely. Published tools are designed as human-in-the-loop systems. They automate clear entries and route ambiguous ones to coders. The value is fewer entries to review, not zero review. Keep experienced coders on suggestions and uncoded entries, and spot-check high-certainty codes during validation.
How do you build a gold set for concomitant medication coding?
Sample real verbatims from completed studies across countries and therapeutic areas, oversample ambiguous trade names, salts and combinations, and have two experienced coders code each entry independently. Adjudicate disagreements with a pharmacist or senior coder, record the reason and lock the set to the WHODrug version you will use.
Which metrics should you use to evaluate automated WHODrug coding?
Report automation rate, precision on high-certainty codes, suggestion hit rate, uncoded share, ATC agreement and precision on ambiguous inputs. Compare all of them with agreement between your own human coders. Set the acceptance threshold on high-certainty precision, since those codes are rarely reviewed again.
How often should WHODrug coding AI be revalidated?
Rerun your gold set whenever the WHODrug release changes for a study, when the vendor updates the model and when you add regions or therapeutic areas with new products. Keep the gold set versioned and document each run in your quality system so the validation history is ready for audit.