ELECTROCARDIOGRAM RHYTHM SIMULATION IN OPEN
SOURCE ENVIRONMENT
A Contribution to Training in Biomedical Sciences
A. Cardoso Martins, P. Dias Costa, J. Miguel Marques and R. Cruz Correia
Department of Biostatistics and Medical Informatics, Faculty of Medicine, University of Porto, Portugal
Keywords: Electrocardiogram, ECG, Training, Software, Open source, Computer simulation.
Abstract: Considering the importance of training and the need to identify some important electrocardiographic
patterns, our aim was to develop a software-based electrocardiogram rhythm simulator, able to generate
signals for purposes of training health care professionals, freely available. Additionally we intended to
implement a training assessment and the ability to configure specific rhythms/patterns with user-defined
settings.
In order to achieve the availability requirement we decided to develop our tool as open source. All the
software was developed in Linux platform, but releases are available in binary format for Linux and
Microsoft Windows platform.
The result was a functional signal simulator which satisfied all the requirements we proposed in our aim.
The final result of our work is presented and available at Sourceforge.
1 INTRODUCTION
Electrocardiographic signal is a graphic
representation of the electrical activation
(depolarization) and repolarization of cardiac cells,
as a result of the expression of main activation
vector in each lead. In an electrocardiogram (ECG)
strip it is possible to identify several incidents, that
concern specific electrical activity. Additionally it is
possible to define a number of intervals and
segments between these main incidents, that concern
stimuli conduction and that do have clinical
correspondence, with a determined “normal”
duration, amplitude and morphology (Lipman and
Cascio, 2001; Wagner, 2006).
Presently, and more than 100 years passed over its
introduction in clinical practice by Willem
Einthoven (Moukabary , 2007), the ECG is still a
valuable diagnostic instrument. The astonishing
technological evolution felt in the medical field in
the past 50 years, with particular relevance in
Cardiology, created the misconception that newer
techniques have replaced electrocardiography. Not
only is the electrocardiogram an important
diagnostic tool, but also to guide the treatment of
common severe cardiac conditions, and determine
patients prognosis(Hurst, 2003).
Training of biomedical professionals is crucial for
patient care. The ability to train procedures, establish
diagnosis and define prognosis of a disease prior to
applying that knowledge in real-life patients is an
enormous advantage for both professionals and
patients, with clinical, legal, and ethical
implications. In terms of ECG, the wide variety of
normal patterns, sometimes quite different from each
other, and the difficulty to identify some subtle
abnormal patterns makes prior training not only
necessary but also imperative. The
acknowledgement of training needs, lead to the
development of a joint guideline for training in
electrocardiography (Kadish et al., 2001).
A wide variety of ECG simulators, electronic or
software-based, both commercial and non-
commercial, are currently available. A series of
commercial devices, using just an electronic
approach, were built especially for ECG rhythm
simulation and training. Nowadays they are
currently in use, but only for specific training and
maintenance of medical equipment. With the
explosion of computer technology back in the
1970's and 1980's several computer programs
6,7
were
developed for ECG and pacing rhythm training and
512
Cardoso Martins A., Dias Costa P., Miguel Marques J. and Cruz Correia R. (2010).
ELECTROCARDIOGRAM RHYTHM SIMULATION IN OPEN SOURCE ENVIRONMENT - A Contribution to Training in Biomedical Sciences.
In Proceedings of the Third International Conference on Health Informatics, pages 512-516
DOI: 10.5220/0002766805120516
Copyright
c
SciTePress
simulation. Those systems seem to have been
abandoned (at least for what concerns free software
implementations), with a few exceptions, probably
due to severe limitations namely in scientific
contents. Conversely, a series of well developed
ECG rhythm simulation programs is currently
available for commercial use. Additionally, an
unaccounted number of advanced life support (ALS)
manikins are also available, allowing the chance to
diagnosis and treat malignant arrhythmias (Mueller
et al., 2005; Schlindwein et al., 2002; Gordon,
1974). However these training manikins are
somewhat limited in their ability to deliver and
simulate certain electrocardiographic patterns as
they are more emergency training oriented.
As far as we know, there is presently no ECG
simulation tool widely available to everyone, able to
receive suggestions and improvements from a wide
variety of professionals of medical and other
scientific areas, that can be freely improved and
reviewed by experts. As stated before, some
exceptions (Karthik, 2002) are available, but with
limitations, like the requirement of a third party
software license (Matlab) or lacking usability for
everyday usage.
Considering the importance of training and the need
to identify some important electrocardiographic
patterns, our aim was to develop a software-based
ECG rhythm simulator, able to generate ECG
signals to train health care professionals, freely
available. Additionally we intended to implement a
training assessment and the ability to configure
specific rhythms and patterns with customizable
settings. In order to achieve the availability
requirement we decided to develop our tool as open
source, therefore we have chosen the GNU Public
License (GNU General Public License, 2009) GPL
v3 license model.
2 METHODS
We performed a search in the Pubmed (PubMed,
2009) reference database regardless of the type of
publication. For addressing the database, we used
the query: “electrocardiogram [MeSH] AND
training [MeSH] AND simulator” with limits
selected for “English language” and “Humans”. The
query was performed on the 15
th
May 2009 and
returned 6 articles for analysis. The analysis was
performed by all investigators. Selection criteria
were defined prior to the query and included: 1) type
of study; 2) critical analysis of the results, and 3)
suitability to our subject. After applying the above
criteria, we selected two articles (Fukushima e tal.,
1984; Gordon, 1974). This method, despite its
scientific reliability, does not take into account the
existence of other not so formal initiatives. To
understand the state of development of commercial
and non-commercial ECG simulation tools we
performed a qualitative survey using the same terms
on Google search engine. The result, with the
limitations of being a qualitative survey, made clear
that a wide variety of tools is available but not with
the type of development we tried to implement.
2.1 Implementation
As the first task of the project, we tried to find a
simple and flexible way to generate signals that
could be similar to those of human ECG with
different patterns. Fourier series were selected for
representing ECG signals, as any periodic functions
which satisfy Dirichlet's condition can be expressed
as a series of scaled magnitudes of sin and cos terms
of frequencies which occur as a multiple of
fundamental frequency. ECG signal is periodic with
fundamental frequency determined by the heat beat
(Karthik, 2002). Each significant feature of ECG
signal can be represented by shifted and scaled
versions of waveforms.
Figure 1: simECG version 1.0 screenshot showing custom
settings.
2.2 Environment
The Qt 4 development framework was chosen to
implement the project, as it is very flexible, uses
C++ as the programming language with easy-to-use
graphical user interface support, and is available in
many different operating system platforms. Another
ELECTROCARDIOGRAM RHYTHM SIMULATION IN OPEN SOURCE ENVIRONMENT - A Contribution to
Training in Biomedical Sciences
513
Figure 2: simECG activity (downloads and traffic) on Sourceforge.
reason, was that Qt (Qt4 cross-platform application
and user interface framework, 2009) version 4 has a
licensing model that allows the use of GPL to
develop an open source software solution. The
software was developed using many tools, however
the most important ones were Qt Creator (Qt Creator
Integrated Development Environment, 2009) as the
integrated development environment (IDE), and
Sourceforge (Sourceforge, 2009) as the project
management system that provided a complete
software build platform, that includes .svn for source
code repository, package release file system
repository, mailing lists and forum for developer
discussion, bug and feature tracking system, and a
project web page. All these resources are publicly
available (simECG sourceforge project page, ).
2.3 Programming
The architecture of the project lead to C++ classes
that implemented the intended block behavior.
“Signal Plotter” displays an ECG signal in a typical
ECG strip format, which was in turn created by
“ECG generator”, that calculates the signal based on
the above described Fourier series, adjusted by the
user settings. In turn, every setting, preset or custom,
is stored as an “ECG Presets” class. Every time the
user runs an assessment, its corresponding class is
instantiated. The assessment controls a set of 10
questions which the user should select the correct
one displayed. Three presets are randomly chosen,
but only one is accordingly displayed. The
myMainWindow class, implements the main
program window, menu toolbar, docking toolbar
with a tab separator, and all the graphical widgets
present. It is the class that glues all the code, mainly
through the concept of signals and slots, that is very
well known in Qt development.
2.4 Dissemination
The simECG application was disseminated via the
Sourceforge, with the first beta released on the 29
th
of May 2009. The simECG project included bugs,
features, and users/developers forum was created to
help disseminating the application. In the next
section we report the tracker activity since the first
release.
3 RESULTS
3.1 Application Features
simECG has several features, that allows the user to
display predefined ECG signals such as: sinus
rhythm, bradycardia or tachycardia; junctional
rhythm; accelerated junctional rhythm;
idioventricular rhythm; accelerated idioventricular
rhythm; supraventricular tachycardia; monomorphic
ventricular tachycardia (VT); ventricular fibrillation;
first degree atrio-ventricular (AV) block; and AV
dissociation. Additionally the user can also define
some custom settings, such as heart rate; PR
interval; P, QRS and T waves duration, amplitude
and polarity. Nevertheless, some bugs still persist
and are being corrected specially through the
Sourceforge community infrastructure.
The activity in the project, despite being considered
a recent release, seems to reflect the good adherence
from the community.
4 DISCUSSION AND
CONCLUSIONS
The simECG is able, as stated in our aim, to
HEALTHINF 2010 - International Conference on Health Informatics
514
generate ECG signals, for purposes of training
health care professionals as an open source solution,
freely available to the community from now on.
The final result of our work is presented and
available at Sourceforge (Sourceforge, 2009) in the
simECG project page (simECG sourceforge project
page, ) as version 1.0. All the software was
developed in Linux platform, but releases are
available in binary format for Linux and Microsoft
Windows platform.
With the release of simECG 1.0 the first steps
towards the building of a community were taken,
based on the premises that: all the components of the
project should be developed on Open Source
applications; all the contribution should be “non-
paid”; all the releases should be free; and the source
code should be available for everybody to read,
interpret and re-write. All those premises along with
the idea that the authors alone could not support
such a project, lead to the creation and maintenance
of simECG at Sourceforge.
With just a few months online, the authors think the
project as a good chance of succeed. The download
and traffic rates are quite reasonable. Feedback from
users and participants has been good, although until
now we could only recruit one new contributor.
Nevertheless the project will audited at six months
in order to compare the web traffic with other
projects, namely in healthcare related projects, and
potential contributors. This is allow the authors to
identify more accurately the directions the project
should take.
4.1 Limitations and Future
Perspectives
At the moment simECG cannot be integrated in
other solutions, as it was designed to be a standalone
interface and does not provide “standards-based”
interface.
Authors also recognize that more experimental
results are needed, and a comparative evaluation
should be performed.
Future work includes implementation of some
features and custom settings, such as premature
atrial or ventricular contractions, atrial fibrillation
and some special conditions (second degree AV
blocks and polymorphic VT) that were implemented
in this version due to time constraints. For that same
reason, was not possible to implement the atrial
fibrillation pattern. The implementation of ECG
motion (rolling) needs further advanced research. In
future versions the authors intend to provide
additional features in the training presets and include
additional settings.
All pending bugs and requested features are
described in detail in the Sourceforge tracker
service, and need to be object of close attention in
future versions.
simECG will always be an unfinished project. In the
future authors intend to build and support a
community, with the intention of releasing new
improved versions.
ACKNOWLEDGEMENTS
The authors wish to thank R. Karthik, Sandra Jardim
and Ernesto Aranda for their help in the
development of this project.
REFERENCES
Lipman B, Cascio T, editors. ECG - avaliação e
interpretação. Loures: Lusociência; 2001. p. 1-22.
Wagner GS, editor. Marriott's Practical
Electrocardiography. 10th ed. Philadelphia: Lippincott
- Raven; 2006. p. 1-69.
Moukabary T.Willem Einthoven (1860-1927): Father of
electrocardiography. Cardiol J 2007;14(3):316-7.
Hurst JW. Current status of clinical electrocardiography
with suggestions for the improvement of the
interpretive process. Am J Cardiol 2003; 92(9):1072-9.
Kadish AH, Buxton AE, Kennedy HL, Knight BP, Mason
JW, Schuger CD, et al. ACC/AHA clinical competence
statement on electrocardiography and ambulatory
electrocardiography: a report of the American College
of Cardiology/American Heart Association/American
College of Physicians-American Society of Internal
Medicine Task Force on Clinical Competence
(ACC/AHA Committee to Develop a Clinical
Competence Statement on Electrocardiography and
Ambulatory Electrocardiography). Circulation 2001;
104: 3169-78.
Fukushima M, Inoue M, Fukunami M, Ishikawa K, Inada
H, Abe H. Computer-assisted education system for
arrhythmia (CAESAR). Comput Biomed Res 1984;
17(4):376-88.
Battersby EJ. Computer assisted instruction in the
diagnosis of cardiac arrhythmias. In: Fuller HW, Ward
JE, Bonn JE, Clippinger RF, Burrows JH, Connelly
ME, et al, editors. American Federation of Information
Processing Societies - Spring Joint Computer
Conference; 1969 May 14-16; Boston, Massachusetts.
New Jersey: AFIPS Press; p.703-8.
Mueller MP, Christ T, Dobrev D, Nitsche I, Stehr SN,
Ravens U, Koch T. Teaching antiarrhythmic therapy
and ECG in simulator-based interdisciplinary
ELECTROCARDIOGRAM RHYTHM SIMULATION IN OPEN SOURCE ENVIRONMENT - A Contribution to
Training in Biomedical Sciences
515
undergraduate medical education. Br J Anaesth 2005;
95(3):300-4.
Schlindwein M, von Wagner G, Kirst M, Rajewicz M, Karl
F, Schöchlin J, Bolz A. Mobile patient simulator for
resuscitation training with automatic external
defibrillators. Biomed Tech 2002;47 (Suppl 1):559-60.
Gordon MS. Cardiology patient simulator. Development
of an animated manikin to teach cardiovascular
disease. Am J Cardiol 1974; 34(3):350-5.
Karthik R. ECG Simulation using Matlab – Principle of
Fourier Series. Anna University, 2002.
PubMed [serial online]. 2009 [cited 2009 May 15; 1(1):48
screens]. Accessible at: http://www.pubmed.gov.
GNU General Public License [serial online]. 2009.
Accessible at: http://www.gnu.org.
Qt4 cross-platform application and user interface
framework [serial online]. 2009. Accessible at:
http://www.qtsoftware.com/products.
Qt Creator Integrated Development Environment [serial
online]. 2009. Accessible at:
http://www.qtsoftware.com/products/developer-tools.
Sourceforge [serial online]. 2009. Accessible at:
http://sourceforge.net.
simECG sourceforge project page [serial online].
Accessible at: http://sourceforge.net/projects/simecg
HEALTHINF 2010 - International Conference on Health Informatics
516