All examples By author By category About

tmthyjames

Spatial Sankey for Shared Patients Between Doctors and Hospitals

This example is inspired by yellowcap's block with many enhancements, including UI changes and rendering optimizations since I was dealing with larger data sets.

This spatial sankey graph shows the geographical flow of patients from doctors to general acute care hospitals. The selected hospital (green node) is the target hospital, which receives at least one visit from every physician (blue or red nodes). The physician nodes are colored red or blue based on their amount of patient leakage (inverse of marketshare: 1-marketshare). Leakage is defined as all visits to hospitals (usually general acute care hospitals) where the receiving hospital is not the physician's primary hospital. Blue nodes have the smallest leakage amount so they are known as loyalists because they send at least 75% of all general acute care hospital visits to the selected hospital. Light red/blue nodes are splitters because they leak out between 25% and 75% of their petients to general acute care hospitals that are not the selected hospital. You get the idea. The size of the node represents total medicare charges, so the bigger the node the more money that physician makes.

Hovering over a physician node will show patient flow to the selected hospital in blue and visits to other hospitals in red. The thickness of links represents volume of patients going from the source to the target. Hovering over a hospital node will show all inbound visits form physicians. Hovering over a link will show exatcly how many patients that link represents. Clicking a node will invoke the tooltip which shows Outflow, Total Charges, and Leakage for physician nodes and Inflow for hospital noeds. Clicking a node also adds the node to the "most recent" legend, which allows the user to isolate nodes and their links. Use the "Ignore Hover" option to ignore the hover events when isolating nodes so that the hover events won't cause the hidden nodes to become visible when trying to analyze the isolated nodes.

Some nodes form circles. This is because a lot of physicians use their hospital's address for their NPI registration. To avoid overlapping nodes, I took all nodes with the same coordinates and calculated a circle around those coordinates with the hospital having the original latitude and longitude. For more, see the radiusFromLatLon function (line 178) and its implementation (line 242) in geoflow.js.