Keeping hospitals safe from infectious diseases
Brief Summary
To understand how infectious diseases spread through a hospital, it helps to move away from averages and look at individuals instead.
Hospitals in the UK are fighting a constant battle against infectious diseases. Flu and colds, COVID-19, and bugs such as MRSA can pose a significant risk to people who are already vulnerable. It was estimated that in 2016/2017 infections acquired in hospitals in England accounted for 28,500 patient deaths and cost the NHS £2.7 billion. These include infections coming from non-communicable diseases (for example, acquired from equipment during surgery) but still, the figures give an idea of the scale of the problem.
Most hospitals have dedicated infection prevention and control (IPC) teams, who use their clinical expertise to mitigate and prevent infections, for example through testing and isolating, the use of PPE, and cleaning regimes.
But some decisions can be too tricky to call, even for experts. For example, it seems reasonable to house vulnerable patients all together in the same part of the hospital, to be cared for by staff that don't come into contact with other patients. However, were an infection to enter such a protected ward anyway, the consequences for those vulnerable patients could be devastating. Would isolation therefore increase the risk?
To answer such difficult questions such as this one it's best to consult the data. Luckily hospitals routinely collect a lot of information about their patients and staff. But IPC practitioners aren't data processing machines. What is more, to get answers from a range of different data streams, you need a framework which shows how different processes within a hospital interact.
This is where mathematical modelling enters the picture. A mathematical model uses equations to describe the processes that are involved in the transmission of a disease. The structure and parameters of a model are informed by the available data. A model can be used to project how a particular outbreak might play out, to compare different interventions against each other, and to estimate the values of important quantities. If done well, mathematical modelling can provide a powerful tool for learning from data.
Hospitals versus the wider world
Modelling is used widely in epidemiology. When modelling the spread of an infectious disease through a city, a country, or even the whole world, scientists usually take a compartmental approach. This goes back to a comparatively simple model first proposed in the 1920s by W. O. Kermack and A. G. McKendrick.
The idea is that each individual in a population belongs to one of three disease status classes. They can either be susceptible to the disease (S), or they can be infected (I), or they can be recovered or removed from the population (R). People pass from one class to another at particular rates whose values you can estimate from the data. Using this setup, represented by a suitable set of equations, you can simulate how a disease might spread through a population under different scenarios. (You can find out more about the so-called SIR mode in this brief introduction.)
Simple as it may seem, the SIR model can already answer important questions, but you can also make it more sophisticated. One way of doing this is to add more classes. For example, modellers often include an E class for people who have been exposed to the disease but are not yet infectious. You can also sub-divide each class to reflect people's vaccination status or age group.
This approach doesn't take account of the fact that every individual comes with a unique set of circumstances. But that doesn't matter. In a large population individual variations tend to cancel each other out, so it's fine to think in terms of averages.
A hospital, however, contains a much smaller population of people. This means that the statistical approach no longer has the same power, as individual variations matter more. But this also represents an opportunity: hospital populations are small enough for a model to keep track of every single individual. Models which do this are called agent-based models or individual-based models.
From averages to individuals
One way of implementing an agent-based model is to adapt the compartmental approach as exemplified by the SIR model. In addition to sorting people into groups according to broad brush characteristics like age group or vaccination status, each individual may be described by a list of other characteristics specific to them — which ward they are in, whether the staff on that ward also work on others wards, and whether they use PPE, for example. A modeller may come up with a rule for translating such a set of characteristics into an estimate of the probability that an individual will catch the disease, that they will become severely ill or even die, or other relevant probabilities. These will then feed into the model, determining how an individual might flow through the SEIR classes.
The purpose of such a model is not to predict an individual patient's risk of infection with certainty — indeed, agent-based models often include some randomness (they are stochastic models). Instead, the model will give a broader sense of how an infection may sweep through a hospital under different circumstances, enabling researchers to compare the likely effect of interventions, assess whether an outbreak poses a severe threat, or retrospectively figure out what sparked or enhanced such an outbreak.
An interesting example of the latter comes from a 2023 study which looked at data from a large acute-care hospital in the UK, covering a four-week period during the first wave of the COVID-19 pandemic in 2020. Using a sophisticated agent-based SEIR model, which took account of the hospital's staff rota, spatial lay-out, and contact networks, the researchers behind the study were able to reverse-engineer, on a computer, the COVID epidemic that had swept through the hospital. This allowed them to assess the proportion of patients who caught COVID in hospital (as opposed to before they were admitted) and to identify the key factor in transmission within the hospital: it appeared to be the movement of staff between wards.

Challenges and opportunities
Designing and running a mathematical model for use in a particular hospital is a complex task that can only be achieved in collaboration. Input from clinicians is crucial — to ensure that the information the model provides is meaningful and also to ensure that outputs are communicated clearly so that clinicians can react quickly and appropriately. A high level of modelling expertise, and a lot of data, are needed to develop the model mathematically. Running the model on-site requires a suitable computational infrastructure.
Despite these challenges, modelling in hospital settings has an important role in the fight against infections in hospitals. Some modellers, including the authors of the study mentioned above, have suggested that every large hospital in the UK could in the future be equipped with its own mathematical model through the NHS, designed in a collaboration between modellers and IPC teams. The model would take in (routinely collected) data on patients and staff in real time. IPC teams could in theory interact with such a model through a desktop app, which would serve as an early-warning system and decision-making tool. Artificial intelligence in the form of machine learning could play a useful role in drawing a maximal amount of information from the data.
There is no replacement for the clinical expertise of hospital staff. But if done well, mathematical modelling can provide invaluable support in a high-pressure environment where high-stakes decisions often need to be made quickly.
This article is based on an interview with Jessica Bridgen, Lecturer in Mathematical AI at Lancaster University. Bridgen is co-author of the paper A Bayesian approach to identifying the role of hospital structure and staff interactions in nosocomial transmission of SARS-CoV-2 which models the spread of COVID-19 in a large acute-care hospital in the UK during the first wave of the COVID-19 pandemic in 2020. Bridgen also co-authored a perspective article, together with clinicians, called Model-based methods for hospital infection prevention and control: potential and challenges.
Marianne Freiberger, Editor of Plus, interviewed Brigden in December 2025.
This article is part of our collaboration with JUNIPER, the Joint UNIversities Pandemic and Epidemiological Research network. JUNIPER is a collaborative network of researchers from across the UK who work at the interface between mathematical modelling, infectious disease control and public health policy. You can see more content produced with JUNIPER here.
