13
GUI for SERVO-i - Analysing patient data from a medical ventilator Jacob Hellman Department of Engineering Sciences, Uppsala University December 22, 2013 Mentors: ar Emtell Fredrik Jalde Examinator: Alexander Medvedev Abstract MAQUET is a global leader in medical systems for advanced critical care. Their medical ventilator SERVO-i uses feedback from the patient’s vital signs as well as the electrical activity of the diaphragm to give synchronized respiratory support in hope of reducing the patients time to recovery. As part of the course Project in System and Control a software GUI was developed, written in MATLAB and Java, to aid physician and researchers evaluate recorded patient data in order to further improve respiratory support.

GUI for SERVO-i - it.uu.se

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: GUI for SERVO-i - it.uu.se

GUI for SERVO-i- Analysing patient data from a medical ventilator

Jacob HellmanDepartment of Engineering Sciences,

Uppsala University

December 22, 2013

Mentors:Par EmtellFredrik Jalde

Examinator:Alexander Medvedev

Abstract

MAQUET is a global leader in medical systems for advanced critical care. Theirmedical ventilator SERVO-i uses feedback from the patient’s vital signs as well asthe electrical activity of the diaphragm to give synchronized respiratory support inhope of reducing the patients time to recovery. As part of the course Project inSystem and Control a software GUI was developed, written in MATLAB and Java,to aid physician and researchers evaluate recorded patient data in order to furtherimprove respiratory support.

Page 2: GUI for SERVO-i - it.uu.se

Contents

1 Introduction 11.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.3 Goal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2 Theory 22.1 Inspiration and expiration . . . . . . . . . . . . . . . . . . . . . . . . . . 22.2 NAVA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.3 Synchrony . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

3 Methods 33.1 SERVO-i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33.2 Available data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33.3 MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43.4 GUIDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43.5 Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

4 Results 64.1 SERVO-i Analysis Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64.2 SERVO-i Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74.3 Structure and Flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

4.3.1 Console Window . . . . . . . . . . . . . . . . . . . . . . . . . . . 84.3.2 Load Patient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84.3.3 Analyse Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84.3.4 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94.3.5 Create Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

5 Conclusion 10

6 Bibliography 106.1 Literature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106.2 Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

7 Appendix 117.1 Flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Page 3: GUI for SERVO-i - it.uu.se

1 Introduction

This project has been a part of the course Project in System and Control and focused onthe development of two Graphical User Interfaces (GUIs) on behalf of MAQUET CriticalCare AB. One for analysing data gathered from the medical ventilator SERVO-i, and theother for displaying the same data as the true monitor would (like a playback function).

1.1 Background

Breathing is often simplified as just being about air in and out of lungs. But there isa complex system behind, focused around the respiratory center which is located nearthe brainstem at the base of the brain. Many of the body’s organs are also involved inthis process. Based on the feedback from these organs the respiratory center determinesthe respiratory demand and regulates the rate and depth of breathing. The respiratorycenter that neurally controls this process is part of the central nervous system. 1

It is essential to understand the whole process behind breathing when it comes to respi-ratory support and to deliver it in synchrony with the patients own efforts. It has beenshown for neonates (newborns) that respiratory support delivered asynchronously canprolong the stay in the ICU (Intensive Care Unit) and the need for mechanical ventila-tion.

The main muscle behind respiration is the diaphragm which is located just below thelungs and controls breathing by contractions. The electrical activity of the diaphragm(Edi) can be measured using a catheter, which is placed close to the diaphragm. From thefiltered Edi signal the ventilator can determine when the patient has made an effort forrespiration and assists accordingly. This is called NAVA (Neurally Adjusted VentilatoryAssist).2

1.2 Problem

How well did the ventilator perform? Was the assisted respiration in synchrony withthe patients own effort? How did the SERVO-i monitor display the data? These arequestions that scientists and physicians working with NAVA sometimes face but they donot always have the necessary tools or technical skills to answer.

1.3 Goal

The goal of this project was to develop a GUI with a front-end based on Java Swingcomponents and with a back-end for signal processing and plot appearance based onMatlab. The GUI should load all relevant patient data and display it visually in graphs.The user should be able to analyse the data for different time periods and also be ableto get a visual view of the SERVO-i monitor at the given time period.

1MAQUET Critical Care AB, ’Anatomy & Physiology of Respiration’, 2013.2MAQUET Critical Care AB, ’Ventilation: SERVO-i for Neonates: Synchrony for those who need it

most ’, 2011.

1

Page 4: GUI for SERVO-i - it.uu.se

2 Theory

This section will cover some fundamentals of breathing and the theories behind the anal-ysis tool and what conclusions they can bring. Some part of the theory is general signalprocessing while other parts have been specifically developed for, and may only be appli-cable to, respiratory support.

2.1 Inspiration and expiration

A breath, or breathing interval, is divided into an inspiration and one expiration part.An inspiration can be classified by several different indicators, such as the pressure in thelung increases, or the flow of air is positive (air goes in to the lungs). When a ventilatoris in pressure control mode, it uses these indicators when delivering respiratory supportas a way of telling if the patient is trying to breath. A typical breathing interval hastwice as long expiration part as inspiration.

2.2 NAVA

The method to use the electrical signal of the diaphragm (Edi) as feedback in a ventilatoris called Neurally Adjusted Ventilatory Assist (NAVA). The ventilator uses the capturedEdi signal in order to give synchronised and proportional respiratory assist. By observingthe Edi signal a breath can be detected by a so called Edi trigger which specifies howmuch the signal has to increase in order for the ventilator to classify it as an attemptedbreath.3

2.3 Synchrony

Respiratory support is delivered in synchrony when the patients own efforts determineswhen the ventilator gives support. For total synchrony, both timing and assist (deliveredsupport) have to meet the patients need. NAVA is an example of synchronised respiratorysupport. In Figure 1, a simple example of synchrony is demonstrated using two sinusoids.Green and red dots represent synchrony and asynchrony respectively.

Figure 1: Two sinusoids displays synchrony and asynchrony.

3MAQUET Critical Care AB, ’Ventilation: SERVO-i with NAVA: Freeing the full potential of syn-chrony ’, 2010.

2

Page 5: GUI for SERVO-i - it.uu.se

3 Methods

This section will cover the technical specifications of the medical ventilator SERVO-i andthe gathered data. It will also mention the different programs and languages used in thisproject.

3.1 SERVO-i

Figure 2: TheSERVO-i ventila-tor.

MAQUET’s medical ventilator SERVO-i can be seen in Figure 2. Itcomes in three configurations; Infant, Adults and Universal. Commonfor these configurations is that they have modes for pressure supportas well as NAVA (among others). Pressure support uses the infor-mation measured by the ventilator of the pressure and flow in thelungs to determine when a breath is being initiated and give sup-port accordingly. A physician can manually set the ventilator atwhich values it should consider a breathing effort, these values arecalled triggers. When the ventilator is in NAVA mode there is alsoa trigger for the Edi signal. For example when the Edi signal hasincreased by at least 2 microvolts the ventilator should consider it abreathing effort and give ventilatory support until the Edi signal de-creases. These ventilator modes are of course only meaningful if thepatient is in a condition to attempt a breath. For severely injuredpatients the respiratory support consists of periodically and predeter-mined breaths and gives no consideration for either pressure, flow orEdi.

In Figure 3 the monitor of a SERVO-i ventilator is shown. This monitor currently dis-plays pressure, flow, volume and Edi. In the right side panel there is also values for endtidal CO2 which implies that there is a CO2 measurement. However, the monitor canonly display a maximum of four curves at each given moment, which is why the CO2

curve is not displayed.

3.2 Available data

There are large amounts of recorded data but not enough time or the right tools toanalyse it all. The available data has been collected during medical trials and stored inan ASCII file format. It originates from the medical ventilator SERVO-i through the PCsoftware Servo Tracker which can be used to log the data during SERVO-i runtime.

Pressure - The pressure inside the lungs.

Flow - The flow of air in and out of the nostril.

Volume - The volume of air inside the lung. Attained by integrating the flow.

CO2 - Measured CO2 level.

Edi - A filtered signal that represents the electrical activity of the diaphragm.

3

Page 6: GUI for SERVO-i - it.uu.se

Figure 3: The actual SERVO-i monitor displaying pressure, flow, volume and Edi

Accompanied by these are several other parameters that tells the mean value, maximumand minimum values over a certain interval (typically a breathing interval). Several oftheses parameters are shown in Figure 3 in the panel at the right hand side.

3.3 MATLAB

MATLAB is a numerical computing environment developed by MathWorks that allowsmatrix and vector operations, plotting of functions and data and implementation ofalgorithms. MATLAB also has a lot of numerical tools for solving all sort of mathematicalproblems like differentials equations, integrals, derivatives etc. MATLAB is intendedprimarily for numerical computing and is mostly used by academics and scientists. Toexecute a Matlab program file (.m-file), MATLAB need to be installed and therefore thefile cannot be executed on a computer without MATLAB. It is a proprietary product ofMathWorks and requires a license.

3.4 GUIDE

GUI Design Environment (GUIDE) is a MATLAB tool that offers aid in creating MAT-LAB based GUIs interactively. It has a ”drag and drop” interface which makes it easyto create basic GUIs with buttons, plots and text labels. Every component in GUIDE isbased on Java Swing components which makes it possible for the programmer to manip-ulate the look and behaviour of the GUI in more ways then GUIDE offers by accessingthe underlying Java component.

4

Page 7: GUI for SERVO-i - it.uu.se

3.5 Java

Java is a programming language originally developed by Sun Microsystems (which hasmerged into Oracle Corporation). Java is known to be a general-purpose, class-based,object-oriented language that is designed to have as few implementation dependenciesas possible. The intention is to let application developers ”write once, run anywhere”,meaning that making a program that runs on one platform does not need to be recompiledto run on another. Java is currently one of the most popular programming languages inuse.4 Java Swing is a Java GUI toolkit that is widely used for displaying graphics anduser controls. MATLAB is one example of many programs that implements the JavaSwing toolkit.

4TIOBE software, TIOBE Programming Community Index for May 2013, 2013.

5

Page 8: GUI for SERVO-i - it.uu.se

4 Results

Two GUIs were created using MATLAB and Java Swing components. The SERVO-iAnalysis Tool is supposed to aid when analysing data gathered from the medical ventilatorSERVO-i and the SERVO-i Monitor is a GUI that mimics the look of the actual SERVO-imonitor at the given time. The first idea was to create both GUIs with the MATLABtool GUIDE but it could not provide all the necessary components. Although some partsof the monitor GUI has been developed using GUIDE, most parts of it and the completeanalysis tool has been created by standard coding in MATLAB.

4.1 SERVO-i Analysis Tool

In Figure 4 a print screen of the SERVO-i Analysis Tool is shown. In the top toolbarthere are two toggle buttons, the first one is connected to the Console Window (see sec-tion 4.3.1) and is enabled when the console is visible. The second toggle button executesthe load function that lets the user specify a directory and then it loads the files withinthat directory. The name of the directory is then displayed in the text label ”Workingdirectory”.

Figure 4: SERVO-i Analysis Tool.

The next toolbar contains the available analysing tools and the ”SERVO-i view” button.After loading data from a patient, the user selects which analysis to perform and overwhich interval. The action is performed by pressing ”Execute”. By pressing ”SERVO-iview” the monitor GUI opens over the chosen interval.

The axes below the toolbars display a time-line over all available data. The text overthe axes (in this case only ”NAVA”) states which ventilation mode the ventilator was inat the specified time. The blue area displays between the part of the total time periodthat is visible in the analyse window. The data is divided into interval of 2 hours each

6

Page 9: GUI for SERVO-i - it.uu.se

to enhance the performance of the tool (the data is sampled at 100 Hz which means thattwo hours contain 720 000 datapoints for each curve).

In the analysis window the user can zoom, pan, delete, find values and select inter-vals by using the toggle buttons in the toolbar at the left. In Figure 4 the interval tool isin use and the user is about to select an interval. The time axes at the bottom displayswhich time has been selected and how many seconds there are in the interval.

The tool has two sliders, one on the right hand side that enables the tool to add alarge number of curves (proven to work for 25+). By scrolling down the view will changeand the pressure curve will disappear whilst another will emerge from the bottom. Belowthe time axes there is another slider which is tied to the displayed time. When scrolledthe x-axis limits will change and if the limits are changed by zooming or panning theslider will update its position to match the limits.

4.2 SERVO-i Monitor

The SERVO-i Monitor GUI is launched by pressing the button SERVO-i view. If theinterval tool has been used the monitor displays the data for that selected interval, oth-erwise it will display the interval corresponding to time period specified by the blue areain Figure 4. The monitor GUI can display up to five different data curves and it is set toread and show every available curve for that specific patient and time interval.

In Figure 5 the SERVO-i Monitor GUI has been loaded with the time interval shownin the background as light red. The displayed data, in order from the top, are pressure,flow, volume, CO2 and Edi.

Figure 5: Selected interval in SERVO-i Analysis Tool is here visible in the monitor GUI.

In the monitor GUI it is possible to jump between time periods using the overview curveat the top seen in Figure 5. In that graph the pressure during the selected interval can

7

Page 10: GUI for SERVO-i - it.uu.se

be seen and abnormalities can be identified. It is possible to change which data theoverview graph should show by changing combo box’s that is located in the toolbar,which is currently set to Pressure.

4.3 Structure and Flowchart

The flowchart in the Appendix (section 7) illustrates the structure and main functionsfor both the SERVO-i Monitor and SERVO-i Analysis Tool. The arrows determines thechoices a user can make and straight lines indicates help functions or objects.

4.3.1 Console Window

The Console Window is a separate window that displays text. It can be seen in Figure6 where the outputs are displayed just after the loading of a new patient. The consoleis initiated by a static method and therefore it can be reached from every other functionor object in the program. The purpose of the console is to give feedback to the user forprogresses, results and error messages. It is constructed using a Matlab figure (JFrame)and a uilistbox (JPanel with a JTextArea).

Figure 6: Console Window for showing results and progress.

4.3.2 Load Patient

One of the most essential functions in the program is responsible for loading all availabledata (from .nta files) and also for some evaluation. The patient object (objPatient.m)determines time and date, it integrates flow to get volume, loads trend data and evaluatesbreath data such as ventilation mode, inspirations and expirations, etc.

4.3.3 Analyse Mode

This is not a function, but rather a state that the SERVO-i Analysis Tool is in whenpatient data has been successfully loaded. In this mode it is possible to zoom, pan andselect intervals. The user can also perform calculations on the data using the availablefunctions and it is also possible to select a data interval and go to SERVO-i Monitor view.

8

Page 11: GUI for SERVO-i - it.uu.se

4.3.4 Functions

The current diagnostic tools lets the user analyse the breathing. By dragging and drop-ping, data sets can be superimposed by placing them on top of each other which enablesthe user to discover both synchrony and asynchrony. This has been done in Figure 7where the Edi curve has been dropped in the pressure curve. From the blue bar at thetop it can be seen that the current ventilation mode is NAVA which means that the Edisignal should be the trigger. By inspection of both curves in the Figure 7, and using theinterval tool, a slight delay can be observed in the pressure with respect to the Edi signal.

Figure 7: Analysing synchrony using the SERVO-i Analysis Tool.

4.3.5 Create Curves

The objCurve class object handles all data and plots in the SERVO-i Monitor. It containsthe objects objPatient, objInfoPanel and objScrollBar which are each responsible fordifferent parts and functions of the GUI. Vital functions such as play, pause and draggingare also defined in this object.

9

Page 12: GUI for SERVO-i - it.uu.se

5 Conclusion

The goal was accomplished and the two GUIs meets the requirements set up by MA-QUET. Both tools are working and can be used to analyse and display patient datagathered from the medical ventilator SERVO-i. The design of the program enables MA-QUET to add additional data analyses and functions in MATLAB.

6 Bibliography

6.1 Literature

1. MAQUET Critical Care AB, ’Anatomy & Physiology of Respiration’, 2013.

2. MAQUET Critical Care AB, ’Ventilation: SERVO-i for Neonates: Synchrony forthose who need it most ’, 2011.

3. MAQUET Critical Care AB, ’Ventilation: SERVO-i with NAVA: Freeing the fullpotential of synchrony ’, 2010.

4. TIOBE software, TIOBE Programming Community Index for May 2013 http:

//www.tiobe.com/index.php/content/paperinfo/tpci/index.html, 2013, (ac-cessed 29 May 2013).

6.2 Figures

Figure 1: Ventilator Plus, MAQUET SERVO-i, http://www.ventilatorsplus.com/servo-i.html, (accessed 19 May 2013).

10

Page 13: GUI for SERVO-i - it.uu.se

SERVO-i Analysis Tool

(AnalysisTool.m)

SERVO-i Monitor

(ServoiGUI.m)

Console Window

(Console.m)

Load Patient

(objPatient.m)

Load

Create Curves

(objCurve.m)

Load

Error

Error

Analyse Mode

SERVO-i view

Info Panel

(objInfoPanel.m)

Scrollbar

(objScrollBar.m)

o Play

o Pause

o Zoom

o Scroll

Functions

o Mean Breath

o Synchrony

o …

o Zoom

o Pan

o Interval

o Delete

o Drag and drop

7 Appendix

7.1 Flowchart