I. Introduction
Several studies have shown that real-time relevant information helps guide the healthcare decision-making process in daily clinical practice as well as the management and optimization of healthcare processes. Internet of Things (IoT) systems help monitor daily patient parameters in home health-care [
1]. The drug supply chain benefits from the use of real-time monitoring systems [
2]. Mobile health (m-Health) technologies may provide appropriate follow-up support services for patient groups with post-treatment conditions [
3]. Big data-based diagnostic performance dashboards help to operationally monitor diagnostic quality and safety [
4]. Electronic dashboards support evidence-based decision-making to overcome hospital capacity inefficiencies [
5].
However, obtaining real-time decision-making information from clinical data is not straightforward. For a healthcare facility to become data-driven, both organizational and technical decision-making process aspects must be addressed [
6]. The organizational part of the decision-making process involves adopting a business decision-making strategy, notably defining strategic objectives and their correspondent key performance indicators [
7]. The technical part of this process involves investing in technical infrastructure, business intelligence solutions, and staff training.
Activity-centered information system solutions intended for Electronic Health Records systems, laboratory information systems, radiology information systems, or pharmacy information systems offer perimeter-restricted and specific-functionalities dashboards and only partially fulfill facility decisional needs, which also require investment in business intelligence solutions [
8]. Indeed, business analytics techniques have been recently used to address these decisional needs [
9].
Studies of personal developed solutions or proprietary-based real-time dashboards as business intelligence solutions to monitor healthcare activities have been recently published [
5,
10]. Nevertheless, recent data science tools, such as Python and Jupyter offer a free, time-saving learning curve and user-friendly data exploring and data visualization toolkits, which could assist a large community of users in managing their own healthcare facilities.
This paper describes our experience in designing and implementing a real-time healthcare monitoring system solution through the use of data science tools.
II. Case Description
1. Project Settings
The psychiatric emergency unit of the University Psychiatric Center in Casablanca is the reference unit in the western region of Morocco for urgent and serious psychiatric disorders of patients with suicidal behavior or aggression risk. It receives 30 to 40 patients daily. The initial management of a patient must be efficient to establish a rapid assessment with minimum patient–caregiver contact. Implementation of an Electronic Medical Record (EMR) system since November 2018 has improved access to patient records, but to provide real-time monitoring of received patients and obtain quick access to their clinical notes summary, a real-time monitoring system was needed.
2. Real-Time Monitoring System Design
1) System design
The system was designed to respond to three questions: how many patients are waiting, who is the next patient, and how were patients distributed during the previous day. It was developed as a minimal-content and simplified wall-mounted dashboard. Thus, three dashboards were designed: a wall-mounted wait-time dashboard, a clinical summary dash-board, and a 24-hour managerial dashboard.
When physically received in the emergency room (ER), a patient is identified in the EMR system and his or her data is processed in real time to be retrieved in the ER dashboard. The main computed key metrics are waiting time in minutes, sociodemographic factors (age, sex), recorded clinical notes summary (established diagnosis, if one exists; history of suicidal behavior or aggression; prior hospitalization and consultation count and dates; last prescribed drugs).
Technically, we set up three physical servers running the free Linux distribution Ubuntu server.
Figure 1 shows the design of the implemented real-time monitoring system.
2) Data processing
The Extract Transform Load (ETL) server runs automated ETL transformations to query EMR data, to compute key metrics, and to store results in the data warehouse (DHW) server as illustrated in
Figure 2. To manage ETL transformation, we installed the free community Pentaho Data integration (Kettle). Using the graphical user interface (GUI) of Kettle, information technology (IT) users periodically manage ETL transformations. To manage DWH databases we installed the free database management system MySQL and its free management web client phpMyAdmin.
3) Data visualization
We set up a decision support system (DSS) server running the data science programming language Python and its packages to manage and visualize dashboards. We used Jupyter to create and run Python command lines within web pages called notebooks as shown in
Figure 3. A Jupyter notebook is a user-friendly high-level web development environment where we import Python packages and run Python scripts for various tasks, such as data visualization or statistical operations. To create dashboard graphics, we used the Python Plotly [
11] package. The Python package Sqlalchemy (
https://www.sqlalchemy.org) is used to connect to the data warehouse database and to query data with the structured query language (SQL) from within a Jupyter notebook. IPython (
https://ipython.org) display and Ipython html are used to render html text and webpages within a dashboard.
Dashboards created within a Jupyter notebook are shared as code-free web pages through another Python package, Voila [
12], which allows healthcare professionals to visualize and interact with dashboards using only web browsers.
Figure 4 shows the ER waiting time dashboard.
4) Real-time processing
To ensure real-time data processing, we configured an Ubuntu server cron job file to run automatically implemented ETL transformations and notebooks every 5 minutes as shown in
Figure 5.
3. Results
1) Real-time emergency waiting time monitoring
The ER waiting time dashboard shown in
Figure 6 visualizes the next patient information, namely, the patient’s identifier, waiting time, and relative difference in waiting time compared to the waiting time annual median. Colored thresholds represent the waiting time annual median, the 3rd quartile, and 80th percentile. The next waiting patients are represented on a table according to arrival date and waiting time.
2) Next patient on demand clinical notes summary
By clicking on the next patient’s identifier on the ER waiting time dashboard, the caregiver directly accesses a summary of supportive key clinical notes, allowing the caregiver to have an idea of the patient’s history as shown in
Figure 7.
3) Last 24-hour ER activity monitoring
ER staff have access through the ER last 24-hour dashboard to key managerial information on patient count, characteristics, waiting time distribution, and administered psychiatric drugs as shown in
Figure 8.
4) Implementation statistics
Since implementation on April 6, 2020, 2,018 cases were processed corresponding to 1,482 patients. The waiting time dashboard was trigged 1,569 times by health professionals to obtain insights into patient history through the clinical notes summary dashboard.
III. Discussion
A focus-group of the psychiatric emergency unit’s health professionals perceives the system positively and is convinced of its positive contribution to manage the activity of psychiatric emergencies, especially in the fall period when there is a significant flow of patients into the ER. They concluded that this real-time monitoring system impacts patients’ visits to the psychiatric emergency unit as follows:
The ER waiting time dashboard (Figure 6) allows them to assess the flow of patients even remotely (lunch break, hospital units visit) and thus better manage time and anticipate actions (patient records consultation, asking for reinforcements or supplies);
The summary of patients’ key clinical notes, which gathers and represents pertinent information according to the patient flow in real time (Figure 7) allows healthcare providers to avoid reading through all patient records or to repeat from scratch patient interrogation to create a patient history. It also strengthens the relationship with the patient as he/she has the impression that we already know him/her;
The ER last 24-hour dashboard (Figure 8) is very useful to intervene quickly in business processes, such as switching time planning, providing reinforcements for heavy flow periods, and planning break times (lunch time).
Free business intelligence software can drastically reduce technological investment cost and appears to be a good alternative to proprietary solutions. It offers great flexibility and active community support. However, decision-making systems key success is based on investment in human resources, business intelligence skills training, the organizational aspect of the decision-making process, and data production quality insurance.
The main challenge encountered in implementing this DDS was data modeling because we used an SQL-based database management system. Recent NO-SQL data management solutions, such as MongoDB (
https://www.mongodb.com) offer more flexibility because no prior data modeling is required; however, expertise and handling skills are needed before production environment utilization.
This study had some limitations. Because the system was implemented fairly recently, we were not able to conduct a long-term technical and operational evaluation. The evaluation of the impact of such a decision support system is complex as outcomes and business processes are multifactor-dependent. All positive assessment of the proposed system was based on the user focus-group’s declarative affirmations; thus, these findings should be taken as preliminary.
To conclude, this free business software-based real-time monitoring system supports mental health emergency unit health professionals in their daily practice and could be an example for other health facilities with limited resources to embrace business intelligence systems.