NYP Advances Analysis to Track Infections with Neo4j
Stopping the spread of infection is a critical concern for hospitals.
Michael Zelenetz, Analytics Project Leader at NewYork–Presbyterian Hospital, set out to devise a way to track the spread of infection. Zelenetz and his team sought to identify connecting points so hospital staff could focus their efforts to reduce or eliminate the infection.
But tracking contagions requires knowing both where an infected patient was and when the patient was there. “It was important to us to be able to look at events across both time and space,” said Zelenetz. “We wanted to be able to ask questions like, ‘Who got an infection during their stay?’ and ‘Who was sharing a room with them at the time they contracted that infection?’ We had difficulty modeling the relationship of space and time.”
Maps pinpoint where events happened, but not when. A time series captures the sequence of events, but not where they happened.
Tracking infections requires combining this data. “The problem we kept running into was that we wanted to know what happened to patients during their visit and where they were at the time that a certain event happened,” said Zelenetz.
Graph technology offers a flexible way to connect all the dimensions of an event: what, when and where it happened.
The team proposed using Neo4j to graph space and time. They wanted to log every event that took place in the hospital – from the time a patient was admitted to all of the tests they undergo and their release from the hospital.
First Zelenetz looked for ways to create a time tree to model time series data in Neo4j. He used code he found in a Neo4j blog post to create a time tree. He then created a location tree to model all the rooms in the facility.
Data modeling is a key part of any Neo4j project. Visualizing their initial model revealed a massive number of relationships, but that alone did not meet their goals. Zelenetz decided to add an event entity to connect the time and location trees.
The event entity includes time, space, place and duration, with timestamps for the beginning and end of an event.
Including an event entity made the data model flexible; the graph they created could serve multiple use cases and ultimately position NYP’s analytics team to analyze everything that happened in its facilities.
Zelenetz fed the graph dataset he created into a community detection graph algorithm. The algorithm grouped events into various specialties such as oncology and pediatrics, validating the team’s work.Download Case Study