It’s no secret that hospitals can sometimes transmit illnesses as well as heal them. A survey by the Centers for Disease Control, for instance, found that patients acquired nearly 722,000 infections in U.S hospitals in 2011, leading to about 75,000 deaths, and hospitals are also a known hotbed for drug-resistant bacteria such as methicillin-resistant Staphylococcus aureus (MRSA). But while efforts are under way to prevent MRSA and other hospital-acquired infections, there’s a lot that’s not known about how microbes—both harmful and benign—travel from person to person or carve out a niche on a hospital surface.

Now, that question is being studied from a different perspective: an ecological one. A growing number of ecologists and microbiologists are studying hospitals as ecosystems, to try to understand which microbes live there, how they get around and how they interact with their environment, one another and the patients and staff who share the space.

“There’s a fundamental knowledge gap about where hospital-associated infections come from,” says Jack Gilbert, an ecologist at the University of Chicago.  Infection control measures, such as washing hands or sanitizing tools, often focus on specific sites of transmission. But these interactions play out in a larger environment. Though clinicians aren’t used to thinking about nonpathogenic microbes in the environment, “they are the ones that shape this ecosystem in which these pathogens find themselves,” Gilbert says.

Gilbert is leading the Hospital Microbiome Project, an ambitious effort at the University of Chicago to catalogue a new medical environment from the ground up.  The site is two floors of a newly constructed clinical building. Gilbert’s team spent 365 consecutive days sampling microbial DNA from 10 patient rooms and nursing stations. The researchers also swabbed the nostrils, hands and armpits of around 400 patients visiting the hospital and 20 staff members. “It’s a brand new ecosystem that is being colonized,” says Gilbert, who is analyzing the data. The project is one of several funded by the Alfred P. Sloan Foundation’s Microbiology of the Built Environment program, which promotes an emerging field of research about the living environment of indoor spaces.

As an ecologist, Gilbert is trying to get a basic understanding of how the hospital works as an ecosystem. But he says that this kind of research could also yield insights about which places in hospitals harbor infections, and how management practices influence them.

Studies suggest that hospitals are homes to thousands of distinct types of bacteria, with the mix of species varying according to how rooms are used. A 2012 study led by Jessica Green, director of the Biology and the Built Environment Center at University of Oregon, found that hospital rooms with fresh air had more diverse microbes than those with mechanical ventilation—and that the mechanically ventilated rooms had more types of bacteria that were potential pathogens.  A study in Spain found greater diversity of bacteria in a hospital entrance hall than in confined ICUs.

What’s not clear is whether these different bacterial communities affect human health. A recent study compared microbes in a neonatal intensive care unit with a series of fecal samples from two premature babies staying there, and found evidence that the types of bacteria in the room influenced the microbes that took residence in the babies’ digestive tracts. A healthy microbiota is known to be important for newborn health, but more research is needed to confirm how much the environment affects it.

Green and other scientists are also exploring a radical, related idea—that it may be possible to design and manage buildings to encourage beneficial communities of bacteria to live in them. The right mix of good bacteria might discourage the spread of pathogens. A probiotic approach to hospital design might be a tough sell for hospital managers, however, who are focused on keeping spaces as sterile as possible. But at the very least, understanding how a hospital’s design influences its microscopic residents could yield more informed strategies to keep from making patients sicker.