A machine learning dataset can make healthcare look deceptively clean.
Rows represent patients.
Columns represent variables.
Labels represent outcomes.
Models identify relationships.
But clinical data is not generated inside a laboratory.
It is generated through healthcare.
An EHR variable can be influenced by clinician behavior, workflow, documentation requirements, coding practices, test ordering, system design, patient interaction, and timing.
This creates an important distinction between a clinical signal and a documentation signal.
Suppose a diagnosis is strongly associated with an outcome.
The relationship may be clinically meaningful.
But it may also depend partly on when clinicians recognize and document the condition.
Suppose a medication variable is predictive.
Does it represent current medication use, a historical prescription, medication reconciliation, or something else?
These questions matter because machine learning models learn from the information available to them, not from our interpretation of what that information was intended to mean.
Several technical practices can help.
Data provenance should be documented.
Feature availability should be aligned with the actual prediction time.
Copied-forward information should be investigated.
Coding differences across institutions should be assessed.
Missingness should be interpreted within the clinical workflow rather than treated automatically as random absence.
Feature importance should be examined alongside clinical interpretation.
Sensitivity analyses can help determine whether model performance depends heavily on variables that reflect local documentation practices.
External validation can then reveal whether relationships persist in different environments.
This is particularly important for healthcare AI because deployment changes the data-generating environment.
New workflows can change documentation.
New systems can change coding.
Clinical adoption can change which tests are ordered.
AI itself can eventually influence the data it learns from.
That creates a feedback loop.
The central lesson is simple:
Healthcare AI should understand not only the data, but how the data came to exist.
The EHR is a valuable representation of clinical care.
It is not the patient itself.
Top comments (0)