Using graph theory to flexibly construct patient journeys in linked healthcare data - Powell, Ian; Sa, Zhisheng; Igic, Branislav; Alfaro-Ramirez, Maria; Farber, Rachel; Nelson, Michael (International Journal of Population Data Science, 2025)
Introduction Studies of epidemiology and health system use that use linked admitted patient data benefit from understanding the patient journey, particularly when it spans multiple records within or across multiple datasets. Objectives To develop a flexible method for grouping together administrative admitted patient records into periods of hospital care that follow patients from admission to discharge. Methods We describe a flexible and generalisable graph theoretic algorithm for grouping patient records into periods of hospital care. The algorithm can account for a variety of complex hospitalisation patterns involving multiple transfers and overlapping records. An R package, journeyer, that implements this algorithm, is included in the Supplementary Material. Results This algorithm was applied to the New South Wales Admitted Patient Data Collection, finding 21,405,451 periods of hospital care from 22,794,746 hospital records. The parameters and decisions required for this algorithm were assessed and found appropriate for this dataset, but we offer some advice for generalisation to other datasets. Conclusions Our method assists in preparing data for epidemiological research in New South Wales and can be generalised to inpatient data in other jurisdictions. The method can be extended to include ambulance and emergency department data.