The integration of real-time data (RTD) in the electronic health records (EHRs) is transforming the healthcare of tomorrow. In this work, the common scenarios of capturing RTD in the healthcare from EHRs are studied and the approaches and tools to implement real-time solutions are investigated. Delivering RTD by representational state transfer (REST) application programming interfaces (APIs) is usually accomplished through a Publish-Subscribe approach. Common technologies and protocols used for implementing subscriptions are REST hooks and WebSockets. Polling is a straightforward mechanism for obtaining updates; nevertheless, it may not be the most efficient or scalable solution. In such cases, other approaches are often preferred. Database triggers and reverse proxies can be useful in RTD scenarios; however, they should be designed carefully to avoid performance bottlenecks and potential issues. The implementation of subscriptions through REST hooks and WebSocket notifications using a Fast Healthcare Interoperability Resources (FHIR) REST API, as well as the design of a reverse proxy and database triggers is described. Reference implementations of the solutions are provided in a GitHub repository. For the reverse proxy implementation, the Go language (Golang) was used, which is specialized for the development of server-side networking applications. For FHIR servers a python script is provided to create a sample Subscription resource to send RTD when a new Observation resource for specific patient id is created. The sample WebSocket client is written using the "websocket-client" python library. The sample RTD endpoint is created using the "Flask" framework. For database triggers a sample structured query language (SQL) query for Postgres to create a trigger when an INSERT or UPDATE operation is executed on the FHIR resource table is available. Furthermore, a use case clinical example, where the main actors are the healthcare providers (hospitals, physician private practices, general practitioners and medical laboratories), health information networks and the patient are drawn. The RTD flow and exchange is shown in detail and how it could improve healthcare. Capturing RTD is undoubtedly vital for health professionals and successful digital healthcare. The topic remains unexplored especially in the context of EHRs. In our work for the first time the common scenarios and problems are investigated. Furthermore, solutions and reference implementations are provided which could support and contribute to the development of real-time applications.
Read full abstract