Mexican primary care records open a new window on diabetes trajectories

A new longitudinal electronic health record resource from Mexico is positioning primary care data for diabetes research at a scale that has been difficult to access in Latin America. DiabetIA draws from the Mexican Institute of Social Security and compiles routine care from six family medicine units in Michoacan, creating a dataset built for studying chronic disease patterns rather than a single cross-sectional snapshot.

The first release includes 136,674 adults followed between 2005 and 2020. Across that period, the repository captures more than 3.2 million visits, then organizes the information into 414,770 two-year windows with at least one visit. In practical terms, the structure gives investigators repeated observation points across time, which is exactly what diabetes research needs when the question is not just who has disease, but how risk accumulates, how care evolves, and how early signals might forecast later diagnosis.

What the dataset contains and why it matters for prediction models

Each two-year window carries a broad clinical profile: demographics, ICD-10 diagnoses, anthropometry, vital signs, laboratory results, prescriptions, and the presence of type 2 diabetes in the following year as the prediction target. That design supports supervised modeling, but it also reflects the real mechanics of primary care, where a diagnosis emerges from a sequence of weight trends, blood pressure changes, laboratory abnormalities, and medication decisions rather than from a single encounter.

At baseline, 24.4% of patients had type 2 diabetes, 37.1% had hypertension, and 32.3% had obesity. Those comorbidities are not incidental background variables. They are the metabolic context in which diabetes develops, especially in health systems where clinicians manage overlapping cardiometabolic risk in the same visit. By capturing those conditions in a longitudinal format, DiabetIA allows researchers to study how hypertension, obesity, and glucose dysregulation cluster over time in an underrepresented population.

One of the most consequential features of the release is not simply its size, but its structure. A longitudinal EHR dataset can preserve temporal ordering, which matters when trying to separate antecedents from consequences. A rise in body mass index, a prescription change, or a lab abnormality can be examined in relation to subsequent diabetes onset instead of being flattened into a single retrospective summary.

Technical validation focused on data reliability rather than raw volume

The dataset underwent technical validation examining completeness, plausibility, consistency, temporal coverage, and agreement with a state health survey. Those checks are central in EHR-based research because raw clinical data often contain missing fields, irregular sampling, coding variability, and the kind of day-to-day noise that can distort prediction work if left untested.

Validation against an external health survey adds another layer of credibility. It suggests the dataset is not merely a repository of administrative records, but one that tracks population patterns closely enough to support epidemiologic inference. For diabetes research, that matters because model performance can be misleading if the underlying prevalence or risk distribution is badly skewed by incomplete capture. A reliable dataset improves the chance that findings will generalize beyond a single clinic roster or narrow specialty population.

The public release is also unusually important for Latin America. Longitudinal primary care EHRs are scarce in low- and middle-income countries, and few comparable resources have been made available to researchers in the region. In that setting, a freely downloadable dataset from routine care can lower the barrier to work on disease trajectories, risk prediction, and health-system planning.

A resource built for an underrepresented population

Mexico’s primary care setting offers a clinically relevant view of diabetes development because it reflects the everyday setting where most patients are first identified, monitored, and treated. The IMSS network serves a large insured population, and the Michoacan family medicine units create a real-world clinical cohort rather than a curated trial sample. That distinction affects how researchers can use the data: not to infer efficacy of an intervention, but to study how disease behaves in routine practice.

The dataset may be especially useful for work on early detection algorithms, multimorbidity, and longitudinal risk stratification. Because it includes prescriptions alongside laboratory and anthropometric data, it can support analyses that ask whether medication patterns or biometric trends precede diabetes diagnosis. Because it extends over 15 years, it also creates room to examine secular change, including how patterns shift across calendar time, clinical policy, and local care delivery.

A de-identified public release also changes the research economics. Instead of relying on costly multicenter data acquisition, investigators can access a ready-made longitudinal source with a documented dictionary and tabular CSV format. The repository is hosted through the National Informatics Ecosystem for Health, making the material directly available for download without registration.

Ethics, governance, and the limits of a preprint dataset

The study protocol received approval from the Research and Ethics Committees of IMSS under registration number R-2018-785-051. Direct identifiers were removed by IMSS technical personnel, and the records were de-identified by one of the investigators acting as an honest broker before release. Consent was waived because the work used secondary de-identified data, and the public release was approved by IMSS as the data owner.

Even with those safeguards, the preprint status still matters. This is a dataset paper rather than a clinical trial, and its value depends on how researchers later use the resource, test models, and compare findings across settings. The preprint itself cannot establish causal relationships, and it does not prove that any future diabetes prediction model built from DiabetIA will perform well in other regions or health systems.

The central unanswered issue is external performance. A dataset can be technically sound and still generate models that are brittle outside its source population. DiabetIA now gives researchers the raw material to test whether diabetes prediction built from Mexican primary care records can hold up under different clinical workflows, disease burdens, and patient mixes. The next step will be less about the existence of data and more about whether that data can produce durable, transferable clinical insight.


Reporting by Dr. A.R. Athira, MBBS for Medicine World Foundation, with additional data provided by medRxiv (Clinical Preprints).
PRIMARY CLINICAL EVIDENCE & REGISTRY DATA