# A Visual Analytics Framework for Inter-Hospital Transfer Network of Stroke Patients
## 4 PatientFlow: The Visual Analytics Framework
### Dynamic Query and Community Detection  
In PatientFlow, a user can filter hospitals and links in the interactive charts on the leftmost side of the screen (T1, T2, and T4). The task analysis result indicated that the  
Figure 6: Analysis of provincial-level patient transfers. (**a**) The province of interest (i.e., KWJ) lies in the center, and other linked provinces encircle it. One can notice that KWJ receives many patients from CLN province, judging from a thick link on the left and the longest bar on the right. (**b**) As for CLN province, it mostly sends patients to others except for three provinces. (**c**) The table on the left shows the complete list of hubs in the area. One can identify the hub with the most significant number of patients in the stacked bar chart on the right (i.e., hospital ID 425). When one clicks the row or bar, the cluster with the hub becomes highlighted, and one can locate them in the cluster view. (**d**) The chord diagram shows that hospital ID 425 mostly receives patients from hospitals within the cluster but sends patients to hospitals outside the provinces judging from the bar chart in (**c**). (**e**) One can confirm it in the topology view by selecting the cluster and hovering a mouse on the hub. There are connected dark gray nodes outside the province. collaborating researchers demanded exploratory analysis. Thus, we introduced several filters for links, hospitals, and clusters and placed chips at the top of the screen to check the currently applied filtering conditions. It could also aid in fine-tuning the conditions. As a starter, one can filter links within a specific range by brushing a bar chart (Figure 2a). [PERSON] et al. [PERSON] et al. (2018) assumed that patient transfers over an excessively long distance are uncommon because stroke is a time-sensitive disease. Therefore, prior work excluded the outliers after inspecting the distribution of travel distances. However, such a long-distance transfer could be meaningful for identifying defective communities. There are also no clear standard threshold values for filtering: users might have to apply various thresholds. With our tool, one can interactively adjust the range of transfer distances depending on the purpose of analysis. We added a brushable chart at the bottom of the histogram to provide an enlarged view of the selected range on top. Upon selection, the Louvain algorithm derives new communities with filtered links. There are also filters for hospitals. Regarding the bar chart for hospital type, one can click on each bar to toggle selection. The bar for selected types becomes highlighted with red outlines. As the filtering affects every visualization in our tool, only the selected types of hospitals appear in other views. Thus, it could aid in analyzing the distribution of specific types of hospitals. For instance, if only the A-SCHs are selected, the A-SCHs and only the patient transfers between them become visible in the topology view. Users can click the apply button to update the community detection result with filtered hospitals (Figure 2a). Since the interaction includes or excludes hospitals in the network, it took relatively longer to come up with clustering results. Thus, we added a button on top to execute the clustering algorithm instead of updating the community in real time. It is also possible to filter hospitals by centrality. One can select only hub or spoke hospitals by brushing on the bar chart (Figure 4b). However, it does not derive new communities since it aims to find a hospital satisfying a specific condition without updating the clustered result. Lastly, one can interactively filter clusters. One can find clusters with solid or weak hub-and-spoke structures by brushing a bar chart for group degree centralization. In the bar chart of inter-cluster density, users can identify highly interconnected clusters. Moreover, brushing the bar chart for the longest transfer distance within the cluster could reveal abnormally large clusters.