Insights

Buying Clinical Data for AI: The Legal Basis Question Most Teams Miss

Author
Aleksander Cudny
Published
August 11, 2026
Last update
August 13, 2026

Table of Contents

EXCLUSIVE LAUNCH
AI Implementation in Healthcare Masterclass
Start the course
Device mockup, tablet

Key Takeaways

  1. How clinical data was obtained decides what it can legally be used for afterward, regardless of how clean the technical pull was.
  2. Data pulled under a treatment purpose is tied to that purpose. Repurposing it for commercial AI training is where legal exposure appears.
  3. Data a patient pulls under their own right of access has a cleaner basis for commercial or product use, including training AI models, where the patient has consented and it's legally permitted.
  4. Adding a clinician to a treatment-based data flow doesn't change the purpose it was obtained under if the underlying goal is commercial.
  5. De-identification is a real option when identified data isn't usable for the intended purpose, but it's a distinct engineering workstream, not a checkbox.
  6. The question to ask before scoping any AI-training data pipeline isn't which connection method to use. It's which legal purpose the data will be obtained under.

Is Your HealthTech Product Built for Success in Digital Health?

Download the Playbook
Playbook ebook illustration

Teams building AI products on top of health data tend to start with a technical question: which EHRs do we connect to, and how. That's the wrong first question. The answer that actually determines what you can do with the data downstream is a legal one, and it gets decided before a single API call is made.

Under TEFCA (the Trusted Exchange Framework and Common Agreement, the US national framework for health data exchange), there are six recognized purposes for exchanging data: treatment, payment, healthcare operations, individual access, public health, and government benefits determination. For AI product teams, two of these matter far more than the rest, and the difference between them decides whether the data you've collected can be used to train a commercial model at all.

This is also where HIPAA and AI training requirements actually intersect. TEFCA governs how the data moves; HIPAA governs what can be done with it once it arrives, and the two rulesets have to be satisfied together, not treated as separate checklists.

The purpose you invoke, not the tool you use

It's tempting to think of this as a tooling decision: an aggregator connection means treatment-purpose data, a patient-facing gateway means individual access. That's a useful simplification, but it isn't quite right. A network aggregator can operate under either purpose depending on how the connection is set up. The constraint that actually matters is which purpose the data is pulled under, not which technical path delivered it.

Data obtained under a treatment purpose, the mode most provider-facing tools run in, is tied to that purpose. It's well suited to supporting care and difficult to repurpose. Using treatment-obtained data to train a commercial AI model is exactly where legal exposure shows up, because the purpose the data was collected under and the purpose it's now being used for no longer match.

Why a doctor in the loop doesn't fix this

A pattern we see often: a team building a commercial AI product proposes routing their data connection through a clinician, reasoning that a treatment relationship unlocks broader access to records. It can, technically. What it doesn't do is change the underlying purpose of the data once collected.

If the real goal is training a model for commercial use, framing the connection as treatment because a doctor happens to be involved doesn't change what the data can legally be used for afterward. It just obscures the actual purpose being invoked, which is the riskier part of that approach, not a workaround for it.

The cleaner path: individual access

Individual Access Services, the TEFCA purpose covering a patient obtaining their own records, requires strict identity proofing but offers a materially cleaner legal basis for commercial use. When a patient consents to their own data being used for a specific purpose, including AI training, and that use is otherwise legally permitted, the basis is the patient's own consent rather than a borrowed treatment relationship.

This is also why patient-facing connectivity, whether through direct FHIR integrations or a patient-mediated gateway, tends to be the right architecture for AI products that need clinical data specifically for training or product features, rather than for supporting an active episode of care. The connection method matters less here than the purpose the resulting data carries with it.

When de-identification actually helps

If a use case genuinely needs identified data and the underlying purpose doesn't support that use, de-identification is a real option, not a workaround to avoid the purpose question. HIPAA offers two routes: Safe Harbor, which means removing eighteen specified identifiers, and Expert Determination, where a qualified statistician certifies that re-identification risk is very small.

Safe Harbor is mechanically simpler but blunt, and it runs into trouble fast with free-text clinical notes, where names and dates hide inside narrative text rather than sitting in structured fields. De-identifying notes at scale in practice means OCR on scanned documents plus natural-language processing to scrub free text, which is a meaningfully larger engineering lift than redacting structured fields. For most consumer-facing data products, explicit user consent to a clearly stated use, where legally permitted, is the more practical route than building a full de-identification pipeline, though that call ultimately sits with the client's own counsel.

What this means for scoping an AI data pipeline

Before any technical scoping starts, three questions settle the legal foundation the rest of the project sits on: who authorizes the data connection, what purpose it's being obtained under, and whether that purpose actually supports the intended AI use. Teams that answer these upfront avoid discovering, mid-build, that the data they've spent months connecting can't legally be used for what they built the pipeline for.

This is also where readying healthcare data for AI use goes beyond data quality and normalization. A technically perfect, well-structured dataset pulled under the wrong purpose is still the wrong dataset for training a commercial model. The purpose question comes first, and it shapes every architecture decision that follows, including how AI models get built securely around that data once it's in hand.

Momentum scopes the legal-basis question as part of every EHR and clinical-data integration engagement, alongside the technical architecture. If you're building an AI product on clinical data and haven't yet mapped which purpose your data connection runs under, that's the conversation worth having before the integration work starts.

Frequently Asked Questions

Can data collected for patient treatment be reused to train an AI model?
Generally not without addressing the purpose mismatch directly. Data obtained under a treatment purpose is tied to that purpose, and repurposing it for commercial AI training is where legal exposure typically appears. The purpose the data was collected under has to support the intended reuse.
Does involving a doctor in the data flow make treatment-purpose data usable for AI training?
No. Adding a clinician to the process can technically unlock broader record access, but it doesn't change the underlying purpose the data was obtained under. If the real goal is commercial AI training, that purpose mismatch still exists regardless of who's in the loop.
Is patient-consented data always safe to use for AI training?
It has a cleaner legal basis than treatment-purpose data, provided the use is one the patient actually consented to and it's otherwise legally permitted. Consent scope matters. Broad, vague consent language doesn't automatically cover every downstream use.
What's the difference between HIPAA Safe Harbor and Expert Determination for de-identification?
Safe Harbor means removing eighteen specified identifiers and is mechanically simpler but blunt, particularly with free-text notes. Expert Determination has a qualified statistician certify that re-identification risk is very small, offering more flexibility at the cost of more overhead.
Why is de-identifying clinical notes harder than de-identifying structured data?
Structured fields like demographics or lab values are straightforward to redact. Clinical notes contain identifiers embedded in free text, so de-identifying them at scale typically requires OCR on scanned documents plus natural-language processing to scrub the text, a substantially bigger engineering effort than field-level redaction.
Should we just ask patients for consent instead of building a de-identification pipeline?
For most consumer data products, explicit, clearly scoped user consent is the more practical route than a full de-identification build, where that use is legally permitted. That said, the right approach depends on the specific use case and should be confirmed with legal counsel.
Does Momentum help scope the legal side of clinical data integrations, or just the technical build?
Both. Momentum's EHR and clinical-data integration engagements include mapping the purpose-of-use question alongside the technical architecture, since the two decisions shape each other from the start of a project.
What is TEFCA and why does it matter for AI training data?
TEFCA is the Trusted Exchange Framework and Common Agreement, the framework governing how health data moves between systems in the US. It defines six exchange purposes, and which one a data flow runs under determines what that data can legally be used for afterward, including whether it can go toward training a commercial AI model.
How does HIPAA affect using patient data for AI training?
HIPAA and AI training intersect at the purpose-of-use question. HIPAA doesn't ban using patient data for AI outright, but it does require that the data's collection purpose, and any consent obtained, actually covers that use. Treatment-purpose data reused for commercial AI training without addressing that mismatch is where HIPAA exposure tends to appear.

Written by Aleksander Cudny

Business Analyst
Aleksander helps HealthTech founders make sense of complex interoperability requirements, integration strategies, and product costs. With a background in healthcare data systems and a sharp analytical mindset, Alek translates regulatory and technical nuance into actionable insights.

See related articles

Green background with decorative circles

Scoping an AI product on clinical data?

Let's Create the Future of Health Together

We help teams map the legal basis for their data pipeline alongside the technical architecture, before either becomes a rebuild.

Looking for a partner who not only understands your challenges but anticipates your future needs? Get in touch, and let’s build something extraordinary in the world of digital health.

Newsletter

Aleksander Cudny