{"title":"Capture of real-time data from electronic health records: scenarios and solutions.","authors":"Nikola Kirilov","doi":"10.21037/mhealth-24-2","DOIUrl":null,"url":null,"abstract":"<p><strong>Background: </strong>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.</p><p><strong>Methods: </strong>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.</p><p><strong>Results: </strong>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.</p><p><strong>Conclusions: </strong>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.</p>","PeriodicalId":74181,"journal":{"name":"mHealth","volume":"10 ","pages":"14"},"PeriodicalIF":2.2000,"publicationDate":"2024-04-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC11058599/pdf/","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"mHealth","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.21037/mhealth-24-2","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2024/1/1 0:00:00","PubModel":"eCollection","JCR":"Q2","JCRName":"HEALTH CARE SCIENCES & SERVICES","Score":null,"Total":0}
引用次数: 0
Abstract
Background: 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.
Methods: 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.
Results: 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.
Conclusions: 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.