
AI and health data
Artificial intelligence is no longer a futuristic promise: it is rapidly becoming embedded in hospitals, clinics, laboratories, and mobile applications that monitor our daily lives. From systems that help detect tumors in medical images to algorithms that predict cardiovascular risks or personalize treatments, AI relies on a key resource: data. And when that data relates to our health—diagnoses, medical records, genetics, habits, or biometrics, the potential is enormous, but so are the implications.
This article explores the relationship, as powerful as it is delicate, between AI and health data. We will analyze why this information is considered particularly sensitive, the challenges it raises in terms of privacy, security, and bias, and how the regulatory framework (data protection and AI regulation) shapes its use. Because innovation in healthcare is essential, but doing it properly is not optional—it is the only way technology can advance without putting fundamental rights at risk.
Risks of bias when using AI in healthcare
The use of artificial intelligence in healthcare raises a particularly significant risk: algorithmic bias. AI systems learn from large volumes of data, and if those datasets are not representative or contain existing inequalities, the system may reproduce them or even amplify them. In healthcare, where decisions can directly affect diagnosis, access to treatments, or the prioritization of patients, this issue becomes critically important.
A common example is diagnostic systems trained on medical datasets that do not adequately reflect the diversity of the population. If an algorithm has been trained primarily on data from certain demographic groups, for example, patients of a predominant sex, age group, or ethnic background, t may produce less accurate results when applied to other populations. This can lead to delayed diagnoses, less effective treatments, or poorer risk assessments for certain groups.
Moreover, biases do not always originate solely from the data used to train the system. They can also arise during the algorithm design phase, in the selection of relevant variables, or even in the way results are interpreted. In the healthcare sector, where professionals increasingly rely on AI-based decision-support tools, there is a risk that automated or semi-automated decisions may introduce errors that are difficult to detect without adequate human oversight.
Compliance with the GDPR and the AI Regulation
In healthcare, the use of AI almost always involves processing particularly sensitive data, which means that the GDPR requires a solid legal basis and reinforced safeguards. It is not enough to claim that data are “anonymous” if they are in fact pseudonymized, nor is it sufficient to rely on a generic legitimate interest. Organizations must justify the legal basis for processing and the specific exception that allows the use of health data, while ensuring compliance with principles such as data minimization, purpose limitation, transparency, security and access control. In practice, many projects also require a data protection impact assessment because they involve special category data, new technologies, and potentially significant effects on individuals.
At the same time, the European AI Regulation (AI Act) classifies many healthcare-related AI uses as “high risk”, which introduces additional obligations aimed at ensuring the safety and reliability of AI systems. These include requirements relating to data quality and governance, technical documentation and traceability, risk management, human oversight, robustness, and cybersecurity. In simple terms, the GDPR primarily protects individuals’ rights with respect to personal data, while the AI Act focuses on the risks associated with the AI system itself. Complying with one without considering the other often leaves important regulatory gaps.
How to ensure legal compliance when processing data with AI
Proper compliance begins with clearly defining the purpose of the AI system and identifying who actually determines the purposes and means of processing, since this determines responsibilities, contractual arrangements, and legal obligations. It is also necessary to identify what types of data are processed—including health-related inferences—select the appropriate legal basis and specific authorization for processing health data, and provide clear information to individuals about the use of AI, its purposes, and its limitations. From an operational perspective, compliance largely depends on security, governance and proper documentation, including real technical safeguards, oversight of service providers, limited retention periods, and evidence that the system has been validated and is subject to ongoing monitoring.
Finally, it is essential to recognize that AI systems are not static. Models that are retrained, updated, or that drift over time require continuous review. For this reason, compliance is not limited to documentation but must involve an ongoing cycle of evaluation and improvement, including bias and accuracy checks, effective human oversight, and the ability to detect and manage incidents. Only in this way can innovation in healthcare progress without compromising privacy, security, and fairness.

Paula Ferrándiz es abogada especialista en Propiedad Intelectual e Industrial, Nuevas Tecnologías y Derecho de la Competencia.
Apasionada del sector digital y las redes sociales presta asesoramiento legal a todo tipo de clientes tanto nacionales como internacionales en materia de protección de datos, comercio electrónico, publicidad y marketing digital entre otras.






