Mapping the diagnostic journey for suspected Covid-19 patients with Synthea and Neo4j

Kineviz
Kineviz
5 min readNov 18, 2021

--

By: Ana Areias & Alex Law

The wealth of data generated by the medical health record system provides a unique opportunity to improve patient care. Mapping events in the healthcare space (i.e. from one diagnosis to another) makes it possible to spot clues that wouldn’t be apparent from a single examination. The collective data of an individual’s visits to the doctor is sometimes referred to as the “patient journey,” and we are just scratching the surface of the research and clinical applications of this data. More often than not, it requires multiple views to paint a big picture. A popular visualization to mark patient journeys is the event-based Sankey diagram. Inspired by Neo4j’s blog post, the patient’s journey can be visualized in several ways, from a Sankey diagram to a graph. In this blog, we string together quick hacks for visualizing the patient journey using synthetic healthcare data, Neo4j, and GraphXR to tell the story of suspected Covid-19 patients.

Modeling with “realistic but not real” healthcare data

To build a proof of concept, we started with open-source synthetic patient data generated by Synthea. This enabled the Neo4j healthcare team to simulate the complexity of healthcare data by building the following data model connecting medical visits — labeled as encounters — to the patients, conditions, procedures, and drugs to which they are connected. This allowed for optimization when it came to analyzing these encounters over time at scale. For example, it streamlined our understanding of how one encounter led to the next by simply adding the relationship [NEXT]. This informative article by Neo4j illustrates the steps taken to create this data model for visualization and graph analysis.

Looking at evolving conditions with Sankey

In our example, we focus on 484 patient-doctor encounters which resulted in a diagnosis of “Suspected COVID-19,” meaning the patient presented symptoms that are indicative of a Covid-19 infection subject to confirmation with a diagnostic test.

We pull these 484 initial “Suspected COVID-19” encounters and we aggregate them to build a Sankey diagram of procedures following 60 days of an initial “Suspected COVID-19” diagnosis.

The below Sankey diagram shows diagnoses across medical visits following the initial “Suspected Covid-19” diagnosis. The “_#” at the end of each diagnosis is indicative of when — in order — the medical visits took place. The blue category on the far left marks the initial population of 484 patients with suspected Covid-19 and aggregates the total number of diagnoses that emerge from the 1st medical visit as indicated in the “_1” column.

Mapping events, not individuals

This Sankey diagram, framed around patients diagnosed with “Suspected COVID-19,” is a way to see the likelihood of one diagnosis evolving into another over time. It does not track individual patients nor does it show patients with overlapping conditions. During a medical visit, a patient may be diagnosed with multiple conditions, which is why 484 suspected Covid-19 patients translates into 590 diagnoses on the 1st visit.

Diagnoses in this dataset can range from symptoms like fever, headache or fatigue to disorders like acute deep venous thrombosis. Tracking the likelihood of one diagnosis to evolve into another can be done by following one path down the Sankey line. For example, out of 484 patients, 28% are diagnosed with pneumonia on their 1st visit, of which roughly 3% progress to acute respiratory failure on their 2nd visit.

One Patient’s Journey

We can also narrow our view by illustrating one patient’s journey as observed via the conditions, procedures, and drugs used 90 days after the patient’s “suspected Covid-19” diagnosis. In the view below, we use GraphXR’s geometric layout feature to display Encounter nodes (in blue) across time from left to right with procedure, condition, and drug nodes interconnected throughout the timeline.

Interact with this view on GraphXR

To customize our analysis, we leverage GraphXR’s extension, Grove, to query by patient and to simplify the user experience. For this example, we created a dashboard to walk through the following workflow that enables one to search by patient, pull in encounters (and any other data) connected to these encounter nodes, which you can then visualize as a connected graph.

Interact with this view on GraphXR

In the dashboard linked above, just enter a patient name (or SSN) in the appropriate search field, click the checkbox to select the patient, and then click to query and load the data to GraphXR.

Whether it’s one patient’s journey or a high-level Sankey diagram, GraphXR & Neo4j together provide the ability to easily visualize and communicate patient journeys. It provides quick insight as to what patients are experiencing, how patient journeys evolve, and — perhaps even show lack of oversight. Through intuitive data visualization and end-to-end analytic workflows, graph technology enables more rapid insights for R&D support while also making healthcare data more easy to navigate and visualize.

Check out these graph applications for healthcare below and/or contact us to learn more!

REFERENCES

Holford, Matt. “Modeling Patient Journeys with neo4j.” Medium, Neo4j Developer Blog, 8 June 2020, medium.com/neo4j/modeling-patient-journeys-with-neo4j-d0785fbbf5a2.

Kumar Kaushal, Kulendra & Kaushik, Shruti & Choudhury, Abhinav & Viswanathan, Krish & Chellappa, Balaji & Natarajan, Sayee & Pickett, Larry & Dutt, Varun. (2017). Patient Journey Visualizer: A Tool for Visualizing Patient Journeys. 10.1109/MLDS.2017.19.

“Synthetic Patient Generation.” Synthea by the Standard Health Record Collaborative, synthetichealth.github.io/synthea/.

--

--

Kineviz
Kineviz

Kineviz, Inc. is the leader in cutting-edge human interfaces for data visualization that unite art and humanity with technology.