Managing patient flow in emergency departments (EDs) is a challenging task, due to high variability in arrivals and limited available resources. Early prediction of patients' outcomes, such as discharge or hospitalisation, represents an effective strategy to improve resource allocation and planning. In this study, we investigate the application of Large Language Models (LLMs) to tackle this challenge. In particular, this study explores a pipeline for transforming structured clinical event logs into narrative texts. Each patient trace is converted into a clinical story that embeds context such as triage severity, concurrent patient load, care shift, and day of the week. The narrative generation process is based on prompt-based interaction with LLMs, with prompts tuned to ensure semantic accuracy. These narrative texts are then encoded using pre-trained transformer models to produce fixed-length embeddings, which serve as input to classifiers. Applied to real-world ED data collected over a one-month period, the pipeline demonstrates how narrative episodes derived from event logs can bridge process mining and language processing, enabling outcome prediction in a format that is both informative and accessible for clinical decision-making.
From Clinical Event Logs to Narrative-Based Outcome Prediction with Large Language Models: A Case Study
Roberto Nai
;Emilio Sulis;Laura Genga;Adriana Boccuzzi
2026-01-01
Abstract
Managing patient flow in emergency departments (EDs) is a challenging task, due to high variability in arrivals and limited available resources. Early prediction of patients' outcomes, such as discharge or hospitalisation, represents an effective strategy to improve resource allocation and planning. In this study, we investigate the application of Large Language Models (LLMs) to tackle this challenge. In particular, this study explores a pipeline for transforming structured clinical event logs into narrative texts. Each patient trace is converted into a clinical story that embeds context such as triage severity, concurrent patient load, care shift, and day of the week. The narrative generation process is based on prompt-based interaction with LLMs, with prompts tuned to ensure semantic accuracy. These narrative texts are then encoded using pre-trained transformer models to produce fixed-length embeddings, which serve as input to classifiers. Applied to real-world ED data collected over a one-month period, the pipeline demonstrates how narrative episodes derived from event logs can bridge process mining and language processing, enabling outcome prediction in a format that is both informative and accessible for clinical decision-making.| File | Dimensione | Formato | |
|---|---|---|---|
|
nai_10_1007_978-3-032-18408-5_34.pdf
Accesso aperto
Tipo di file:
PDF EDITORIALE
Dimensione
1.07 MB
Formato
Adobe PDF
|
1.07 MB | Adobe PDF | Visualizza/Apri |
I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.



