for Pharma
Toggle menu
Blog

AI in pharma, drug discovery, and clinical trials is only as good as the data you check on arrival

AI in drug discovery, clinical trials and commercial pharma inherits whatever your data deliveries contain. Check every delivery on arrival, before it reaches a model.

AI in pharma, drug discovery, and clinical trials is only as good as the data you check on arrival

Key points

  • The FDA refused to file Zogenix's Fintepla application in 2019, and an incorrect version of a clinical dataset was one of the reasons cited.
  • AI models give confident answers on bad data with the error built in, so checks must run on every delivery before a model sees it.
  • Tests written from the rules in protocols, specs, and data transfer agreements catch what profiling-generated tests miss: none of the 75 pre-1900 payment dates in the CMS Open Payments 2024 file.
  • eCOA removes paper problems such as illegible entries and back-filled diaries, but daily device feeds from every site still need checks on arrival.
  • Clinical trial data arrives from EDC systems, EHRs, labs, and CROs in many formats on many schedules, and a delivery check can test only some of the nine ALCOA+ principles.
  • A data quality foundation has four layers: tests from the rules, checks on arrival, hold and alert, and a record of every check as audit evidence.

In 2019 the FDA refused to file Zogenix’s application for Fintepla. As OntoForce describes it, the reasons included missing nonclinical toxicology studies and an incorrect version of a clinical dataset. The stock fell sharply. No model was involved. The wrong version of a clinical dataset was one of the reasons the FDA cited.

Now you’re being asked to get your data “ready for AI,” whether it’s commercial pharma data, drug discovery data, or clinical trial data, and the pitches are for platforms, catalogs, and AI tools. Meanwhile, the authors of a 2024 JAMA paper (Franklin et al.) say the way trial data is accessed, acquired, and used has evolved very little, leaving a “fragmented and inefficient system.” AI goes on top of that system. A model doesn’t hesitate on bad data. It gives a confident answer with the error built in. What the model needs underneath is a data quality foundation: checks that run on every delivery.

Drug discovery data

Discovery data sits in internal archives, clinical institutions, and external partners. Each has its own naming and storage conventions, according to Drug Discovery Trends. A scientist who hits that mess in a query works around it, because they know which archive uses which name.

One compound appears under three names in an internal archive, a partner lab and a clinical institution; a scientist works around it, a model cannot Figure 1: One compound, three names. A scientist works around it; a model learns it. (Illustration.)

A model has no such knowledge. It trains on what you hand it. Ardigen points out that imaging and multi-omics data often isn’t normalized or curated, which makes it hard to query and hard to train on. Models trained on unrepresentative or poorly structured data can learn correlation instead of biology. You won’t see that in a log. You’ll see it months later in a target that doesn’t hold up.

Clinical trial data

EDC systems, EHRs, labs, CROs, and partner platforms often don’t connect cleanly. Data arrives from many places, in many formats, on many schedules.

EDC, EHR, labs, CROs and partner platforms feed one trial, next to the nine ALCOA+ principles Figure 2: Many systems, many formats, many schedules, measured against ALCOA+.

Then there are the human errors. Nubilaria lists transcription mistakes, missing entries, misconfigured EDC forms, and inconsistent execution across sites. The standard they measure against is ALCOA+: attributable, legible, contemporaneous, original, accurate, complete, consistent, enduring, available.

Manual review and source data verification catch these problems, but slowly and late. By then the data has moved into analyses. And when an auditor asks what was checked and when, you need the answer, not a recollection.

The JAMA authors add that trial data collection “remains expensive and labor intensive” while demand for evidence grows. They call for collecting and evaluating multiple data sources and types, and for reusing health data for more than one purpose. That means more feeds, more joins, and more places for a wrong version to slip in.

eCOA and decentralized trials

Electronic clinical outcome assessment (eCOA) captures patient-reported and clinician-reported outcomes on a device instead of paper. Clario says that when parameters and time windows are set in advance, data entry errors are minimized and data transfers in real time. It also says patients using electronic diaries show higher protocol compliance than with paper, citing Stone et al., 2002.

Fourteen days of eCOA entries for four patients and a site, showing three missing days, entries outside their window, a scale shifted by an app update and a stopped feed Figure 3: eCOA fixes paper. The daily feed still needs checks on arrival. (Illustration, not client data.)

We agree. eCOA fixes the paper problems: illegible entries, back-filled diaries, transcription. But it moves the quality question downstream. A daily stream from every site and patient still needs checks on arrival, and it is too much to check by hand.

Here are illustrations, not client stories. A patient’s diary has three missing days. A batch of entries lands outside its time window. An app update shifts a scale, and last month’s scores no longer compare to this month’s. A site submits duplicates. Another site’s data just stops. A model trained across the app update would read the shifted scale as a real change in patient outcomes.

Decentralized trials add wearables, apps, telehealth, and remote reporting, all high-frequency. eCOA is a better source. It is not a substitute for testing the feed.

Trial data can be pooled and reused only as far as consent and governance allow. Wildiers et al. in JAMA Oncology looked at 29 breast cancer registrational studies that led to a new drug approval from 2017 to 2024. None led to biomarker research that restricted the approved indication. The authors call data and biospecimen sharing from registrational trials “suboptimal” and propose consent forms that state data will be shared.

Three datasets, each tagged with the uses consent allows and the uses it does not cover Figure 4: Check what each dataset may be used for before an AI project touches it. (Illustration.)

For you, the lesson is practical. Know what each dataset may be used for before an AI project touches it.

The root cause

Every team in commercial pharma, drug discovery, and clinical trials can tell you where a dataset lives. Far fewer can tell you whether today’s delivery matches the rules it’s supposed to follow. Fewer still can prove it afterward.

Three questions: where the data lives, whether today's delivery follows its rules, and whether you can prove it, answered by fewer and fewer teams Figure 5: Every team knows where the data lives. Far fewer know whether today’s delivery is right.

Nothing checks the values against their rules on arrival, holds the delivery when they fail, or records the result. So the wrong version, the missing entries, the changed code, and the stopped feed all pass through to the analysis, the model, or the submission.

Commercial pharma data shows the same pattern. A test of the CMS Open Payments program year 2024 general payments file, 15,498,687 rows worth $3.42 billion, found 75 rows with a payment date before 1900, three of them dated in the year 2. Those dates parse, so schema validation passes. Tests generated by profiling the data caught none of them. Sixteen tests written from the rules flagged two kinds of rows. The first kind is plainly invalid values: 13,890 physician records missing an NPI, license state, or specialty, alongside the pre-1900 dates. The second kind is threshold flags: 6,562 entertainment payments worth $634,978 and 3,450 meals over $500 per person. A flag marks a row for review, not a confirmed error.

What a data quality foundation looks like

Whether the data is commercial, discovery, or trial data, start with tests written from the rules it is supposed to follow: the protocol, specs, data transfer agreements, and regulations. Tests built only from what the data looked like last month learn the errors along with everything else. The rules catch the date in the year 2. They also catch a wrong version: compare the delivered dataset’s version identifier or manifest against what the data transfer agreement specifies.

Four stacked layers: tests from the rules, checks on arrival, hold and alert, and a record of every check Figure 6: Build from the bottom up: rules, checks on arrival, hold and alert, then the record.

Add checks on every feed arrival. Did the file show up on time? Are the counts in line with the last delivery? Did the schema or a code list change? Did a distribution shift? Set the thresholds per feed to match how that data behaves: holiday weeks and restated prior periods in commercial data, expected changes in an eCOA stream.

Then hold and alert. When a check fails, the data stops before it reaches an analysis, a model, or a submission, and a named owner hears about it that day. A new delivery lands in a staging area and is published to the tables that analyses and models read only after its checks pass. A failed delivery stays in staging.

Finally, keep a record of what was checked and what passed for every delivery. That record is your audit evidence, and nobody should rebuild it by hand.

Why DataKitchen

Buying a tool doesn’t give you anyone to write and run the checks. That’s the job we do.

You bring in a dedicated data team from DataKitchen, and you choose the feeds to start with: CRO trial deliveries, eCOA streams, discovery partner files, commercial feeds. We write the tests from your protocol, specs, and data transfer agreements, and run them on each delivery in your own cloud. A failed delivery stays in staging, and the named owner gets the alert. We keep the record of what was checked. You keep the tests and the history. The published example of this approach is the Open Payments test above, and it is commercial data, not trial or discovery data.

If you want to see where this breaks first on the commercial side, read our posts on the commercial data most likely to be wrong and small files with a big blast radius.

Talk to us at /contact/.


FAQ

What are the key points in this blog?

The key point is that AI needs checks on every delivery underneath it. Tests written from the rules in protocols, specs, and data transfer agreements catch errors like the 75 pre-1900 payment dates in the CMS Open Payments file that profiling-generated tests missed. A failed delivery is held in staging, and a record of every check serves as audit evidence.

Does eCOA solve clinical trial data quality?

No. eCOA fixes the paper problems, such as illegible entries and back-filled diaries, but the device feed still needs checks on arrival. Clario says preset parameters and time windows minimize entry errors and that data transfers in real time. A daily stream from every site can still have missing diary days, out-of-window entries, duplicate submissions, a scale shifted by an app update, or a site that goes quiet. Those are illustrations, and each is a test you run on every delivery.

What is ALCOA+ and how do you test for it?

ALCOA+ is a set of data integrity principles: attributable, legible, contemporaneous, original, accurate, complete, consistent, enduring, and available. You can’t test all nine on a delivery. You can test several: completeness (are required entries present), consistency (do values agree across systems), and contemporaneity, as a proxy (are timestamps within the expected window). A timestamp inside its window doesn’t prove when the entry was made, and a delivery check can’t. Attributable and original stay mostly out of reach, because they depend on the source system’s audit trail. A check can confirm a user ID field is filled in, but not who actually entered the value. Legible is a paper concern.

How do you test data from CROs and partners you do not control?

You test it on arrival, against the rules in your data transfer agreement and against the previous delivery. That means checking timing, counts, schema, and code lists, and holding the data when a check fails. You can’t make a partner fix their system. You can stop their bad delivery from reaching an analysis or a model before anyone has looked at it.

Do we need a catalog before data quality testing?

No. You can start testing the feeds that matter most, such as trial data from CROs, eCOA streams, and discovery partner files, before a catalog exists. A catalog helps you find and describe data. Tests tell you whether a delivery follows its rules. While you wait for a finished catalog, your feeds go unchecked.

What did testing the CMS Open Payments file find?

Sixteen tests written from the rules flagged two kinds of rows in the 2024 general payments file of 15,498,687 rows. Invalid values included 13,890 physician records missing an NPI, license state, or specialty. Tests generated by profiling caught none of the 75 pre-1900 payment dates. Threshold flags, such as 3,450 meals over $500 per person, mark rows for review, not confirmed errors.

Talk to the team that wrote this.

Half an hour on your stack, your launch window, and what the first sprint would look like.