Emergency department overcrowding is a complex problem that persists globally. Data of visits constitute an opportunity to understand its dynamics. However, the gap between the collected information and the real-life clinical processes, and the lack of a whole-system perspective, still constitute a relevant limitation. An analytical pipeline was developed to analyse one-year of production data following the patients that came from the ED (n = 49,938) at Uppsala University Hospital (Uppsala, Sweden) by involving clinical experts in all the steps of the analysis. The key internal issues to the ED were the high volume of generic or non-specific diagnoses from non-urgent visits, and the delayed decision regarding hospital admission caused by several imaging assessments and lack of hospital beds. Furthermore, the external pressure of high frequent re-visits of geriatric, psychiatric, and patients with unspecified diagnoses dramatically contributed to the overcrowding. Our work demonstrates that through analysis of production data of the ED patient flow and participation of clinical experts in the pipeline, it was possible to identify systemic issues and directions for solutions. A critical factor was to take a whole systems perspective, as it opened the scope to the boundary effects of inflow and outflow in the whole healthcare system.