When clinical epidemiologist and microbiologist researcher Matthijs Berends (UMCG) started exploring whether AI could uncover hidden infectious disease signals in GP records, he and his colleagues were tackling a fundamental challenge in public health: how can we detect outbreaks before traditional surveillance systems do?
The result is ERNIE, an AI-powered framework that analyses anonymized free-text notes from general practitioners across the Northern Netherlands. It identifies unusual patterns recorded during consultations that may indicate emerging infectious diseases, potentially weeks before laboratory-based monitoring systems raise the alarm.
This gives ERNIE a significant advantage over traditional surveillance methods. Most infectious disease surveillance relies on the golden standard of laboratory confirmations. While reliable, those data only become available after a patient has visited a doctor, undergone testing, and received a diagnosis.
“The earlier you can detect something, the more options you have to respond,” Berends explains. “GP notes are often the earliest signal available.”
Built on Trusted Primary Care Data
A crucial ingredient behind ERNIE is access to high-quality primary care data. The project was made possible through collaboration with the Academic General Practice Development Network (AHON), a UMCG-affiliated network of general practices across the Northern Netherlands. Participating practices securely share clinical data for scientific research through a dedicated research infrastructure. Two PhD candidates from this group, Maarten Homburg (a GP) and Gijs Danoe (a computational linguist) have gathered, analysed and modelled on hundreds of thousands of GP records.
According to Berends, this collaboration was indispensable: “Without access to these longitudinal GP records, developing and validating ERNIE would not have been possible.”
Working with healthcare data also meant navigating strict privacy, governance and ethical requirements. Before any modelling could begin, the team had to obtain approvals, secure ethical clearance and develop the models within a protected research environment isolated from the public internet. “When working with healthcare data, privacy and medical ethics are not optional considerations: they are fundamental requirements.”
Four AI Models Working Together
What makes ERNIE particularly interesting is that it is not a single AI model, but a sequence of four models operating as a pipeline.
The first step uses language models to transform free-text clinical notes into numerical representations that capture meaning rather than simply words. Context matters: the system understands that the word “bank” can refer to a financial institution or a piece of furniture depending on how it is used. In medical texts, this contextual understanding is essential.
Next comes anomaly detection. The model continuously monitors these language representations and identifies concepts that suddenly occur more frequently than expected. Setting the right thresholds is critical: too sensitive and the system generates excessive false alarms; too strict and important signals are missed.
A third model clusters related anomalies together, grouping symptom patterns that may belong to the same emerging outbreak. Finally, a fourth step translates the machine-readable patterns back into human-interpretable information, highlighting the words and symptom descriptions that drove the alert.
Importantly, ERNIE does not diagnose diseases. “It only signals that something unusual is happening,” Berends says. “Human experts still need to assess whether a signal is clinically relevant.”
Testing ERNIE Against COVID-19
The team began developing ERNIE in 2022 using historical GP data dating back to 2015. One obvious question guided the first validation study: could the system identify COVID-19? “If it couldn’t find COVID, it would have been the most useless model ever built,” Berends jokes. It did far more than that.
The system detected COVID-like clusters in GP records from January and February 2020, so before widespread testing was available and before laboratory surveillance could provide a clear picture of what was happening. By identifying patterns such as loss of smell, loss of taste, fever, and headache directly from consultation notes, ERNIE demonstrated the value of language-based surveillance, even weeks before the first confirmed COVID case in the Netherlands.
Where the Bootcamp Made the Difference
Ironically, the AI techniques behind ERNIE differ substantially from the machine-learning focus of the Biomedical AI Bootcamp. “The bootcamp primarily focused on machine learning, while ERNIE relies heavily on language models,” Berends notes.
Yet, he still sees a clear impact of the bootcamp on his work. The programme helped him develop the skills needed to supervise AI projects, communicate effectively with technical specialists, and bridge the gap between clinicians and data scientists. Those skills proved invaluable when developing ERNIE and publishing its results.
“One of the biggest challenges was explaining highly technical methods to medical audiences without losing scientific rigour,” he says.
The Future of Infectious Disease Surveillance
Berends hopes ERNIE will become an operational service within the UMCG region over the coming years, providing continuous monitoring of emerging infectious disease threats. Longer term, he sees even greater potential.
Berends: “The framework has been published as open-source software, meaning other regions can deploy it using their own GP datasets.” In the longer term, similar approaches could contribute to national early-warning systems for future pandemics.
For Berends, the lesson extends beyond epidemiology. AI in healthcare is no longer just about prediction models and statistics. “Language models are opening entirely new possibilities for extracting knowledge from the vast amount of unstructured clinical text generated every day. And when the next infectious disease threat inevitably emerges, those insights may prove invaluable.”