iOS Mobile App for ECG Viewing and ECG DICOM file Generation

iOS Mobile App for ECG Viewer and ECG DICOM file Generator

Project Description

The Context

The electrocardiogram (ECG) has been an integral part of cardiac diagnostics for the better part of the last century.  There has been a trend over the past decade towards smaller, more compact ECG monitoring systems. These systems come with a distinct advantage in that they can be used either inside a hospital or clinic, on the road with a visiting nurse or on a cart for mobility between patient rooms. These small box systems can convert a standard PC or tablet computer into an ECG monitoring system. Tismo was approached by a prominent German medical products innovator to develop an iOS mobile app to display ECG data and convert it to ECG DICOM files. 

The Problem

The task before Tismo was to develop an iOS mobile app, compatible with iPhones and iPads, that communicated with an ECG monitoring system. The app would support login for users and initiate the test with the ECG device. The app would have to display a 12-channel ECG, update the patient and doctor details, as well as convert the ECG data to DICOM files. The challenge before the Tismo team was the limited availability of resources for ECG DICOM format. Additionally, only a limited number of libraries and tools supported ECG DICOM data and were compatible with iOS. 

Related Read: End to End Development of a Wearable Gastro-recorder

The Solution

Tismo developed an iOS mobile app using Swift, to communicate with an ECG monitoring system. The app was designed to first connect to the client server, retrieve patient information, connect to the ECG device and initiate the test with the ECG device. Raw ECG data would be transmitted to the app and would be processed before plotting the 12-channel ECG. Communication with the server was enabled through REST APIs. The app communicated with the ECG device via Bluetooth, using the external accessory framework. The iOS app also featured an option to capture information such as Patient ID, Patient name, Date of birth, Weight, ECG test type, Sex, Patient case information, Differential diagnosis, Clinical questions and answers. 

Architecture Diagram of iOS Mobile App for ECG Viewer and ECG DICOM file Generator

The iOS app converted data received from the ECG device, into DICOM file format. DICOM-ECG consists of several elements, such as tags, data types, data length, and data values, each represented by numbers. Some mandatory tags for ECG-DICOM include File Meta Information Version, Media Storage SOP Class UID, Media Storage SOP Instance UID, Transfer Syntax UID, Implementation Class UID, SOP Class UID and SOP Instance UID.  Information retrieved from client servers, like patient ID, ECG study ID, examination date, examination time, ECGsampling rate, and waveform data, are transformed into the corresponding DICOM elements based on the definition of DICOM. 

Due to the limited documentation for ECG DICOM format, Tismo had to undertake considerable R&D to identify the best suited DICOM library, the DICOM format for ECG files and mandatory tags necessary for the DICOM files. Imebra library was chosen due its sole dependency on default OS libraries and its compatibility with multiple platforms (Linux, Windows, macOS, iOS, Android). The Imebra SDK could act as Service Class User (SCU), Service Class Provider (SCP) or both and recognizes all the composite and normalized DICOM messages (DIMSE). It is licensed under GPLv2. Tismo used Imebra SDK as a Service Class User for this project. 

The catch was that Imebra was a C++ library and hence could not be directly used for the development of the iOS mobile app. The Tismo team extended the interaction of the library using a wrapper class based on Facade design pattern, which encapsulated the DICOM wrapper class based on Objective C. The generated DICOM file data could be shared with a doctor through the hospital database and could be viewed on multiple ECG compatible DICOM viewers such as MedDream DICOM ECG Viewer, Cordiana Dx16 DICOM ECG Viewer etc. 

The iOS mobile app developed by Tismo was compliant with IEC 62304, which specifies life cycle requirements for the development of medical software. 

Related Read: A Walk-Through of FDA 21 CFR Part 11

DICOM and the Advancement of ECG

One of the most frequent medical examinations is the 12- channel ECG. Currently the exchange of ECGs is limited to users of the same manufacturer’s application. In recent years, greater interoperability in health IT systems has been a major reform in healthcare. In contrast to medical imaging data that has standardized on DICOM, ECGs rely on an array of file formats including XML, TIFF, JPEG, GDT, PDF, ZIP etc. This causes interoperability issues when attempting to save ECGs to or retrieve ECGs from a Cardio-Vascular Information System (CVIS), or if attempting to data-mine patient information for ECG reports saved as JPEGs. To enhance interoperability, an ECG system can use DICOM for standards-based data exchange with clinical information systems.

Snippet of an ECG DICOM file

Summary

Tismo developed an iOS mobile app using Swift, that communicated with an ECG monitoring system via Bluetooth. The app displayed a 12-channel ECG and also converted the ECG data into DICOM file format, that could be viewed on multiple ECG compatible DICOM viewers. The Imebra library was used for the DICOM file generation. The iOS mobile app developed by Tismo was compliant with IEC 62304

Back to Top