CALIFORNIA STATE UNIVERSITY, NORTHRIDGE

IMPLEMENTATION OF -BASED IOMT ENABLED PLATFORM FOR

PEDIATRIC VENTRICULAR ASSIST DEVICES

A thesis submitted in partial fulfillment of the requirements For the degree of Master of Science in Electrical Engineering

by

Meharaj Khanam

May 2018

The thesis of Meharaj Khanam is approved:

Prof. Ashley Geng. Date

Prof. John Valdovinos. Date

Prof. Shahnam Mirzaei, Chair Date

California State University, Northridge

ii DEDICATION

I would like to thank everyone who helped me to be there, where I am now in my life.

iii ACKNOWLEDGMENT

I would like to thank my committee members who supported my efforts and gave me a chance to work on this innovative project

To my chair, Prof. Shahnam Mirzaei,

To Prof. John Valdovinos,

To Prof. Ashley Geng

iv TABLE OF CONTENTS

Signature Page ii Dedication iii Acknowledgment iv List of Tables vii Abstract viii

CHAPTER I – INTRODUCTION 1 1.1 - Statement of the Problem 1 1.2 - Purpose 1 1.3 – Research Analysis 2 1.4 – Report Organization 4

CHAPTER II – REVIEW OF LITERATURE 5 2.1 – Overview 5 2.2 – Evolution of Ventricular Assistive Devices 5 2.3 – VAD Complications 7 2.4 – Biomedical Applications and health monitoring 8

CHAPTER III – METHODOLOGY 11 3.1 – Brief Overview of Hardware Components 11 3.1.1 – Monitor 12 3.1.2 – LVAD Pump 12 3.1.3 – LVAD Controller 13 3.1.4 – Pressure Transducer 13 3.1.5 – Pressure and flow sensors 14 3.2 - Brief Overview of Hardware Components 16 3.2.1 – R-Studio 16 3.2.2 – of Things Basics 16 3.2.3 – 17 3.2.4 – Amazon Dynamodb 18 3.2.5 – Amazon Simple Storage Service(S3) 18 3.2.6 – Amazon Quicksight 20 3.2.7 – Amazon Simple Notification Service 20

CHAPTER IV – DESIGN IMPLEMENTATION 22 4.1 – Introduction 22 4.2 – Pump Setup 23 4.3 – Data Extraction 24 4.4 – Data Preparation 24 4.5 – Cloud Deployment 25 4.6 – Data Visualization 27 4.7 – Subscription and Notification 29

v

CHAPTER V – CONCLUSION 31 5.1 - Conclusion 31 5.2 – Future Work 32

REFERENCES 33

APPENDIX 36

vi LIST OF FIGURES

Figure 1: Architecture of the Implementation

Figure 2: Generation of Ventricular Assistive Devices

Figure 3: Graphical Analysis for Thrombosis

Figure 4: Biomedical Applications of IoT

Figure 5: Components of Ventricular Assist System

Figure 6: LVAD Monitor Display

Figure 7: LVAD Controller

Figure 8: Data Acquisition System

Figure 9: Flow Sensor

Figure 10: Design Flow

Figure 11: Pump Setup Mimicking Heart

Figure 12: Pressure Calibration in LabChart

Figure 13: R Analysis

Figure 14: Running Scripts through Command Line

Figure 15: Successful Deployment into Dynamodb

Figure 16: Graph Showing Pressure Difference versus Flow rate

Figure 17: Graph showing the variation of inlet and outlet pressure by time

Figure 18: Graph showing Pump Outlet pressure with respect to time

Figure 19: Graph showing Pump Outlet pressure with respect to Pump Inlet Pressure

Figure 20: Topic Subscribers

Figure 21: Email Notification received

Figure 22: Email Notification received

vii ABSTRACT

IMPLEMENTATION OF CLOUD-BASED IOMT ENABLED PLATFORM FOR

PEDIATRIC VENTRICULAR ASSIST DEVICES

by

Meharaj Khanam

Master of Science in Electrical Engineering

Healthcare is a basic human right and a privilege that aims to maintain better health and fitness. Smart medical devices help in maintaining better health since they make people aware about being fit and healthy thereby improving the human life style and their life time. In this innovative era, technologies are not still and the concept of the Internet of

Medical Things introduces many new possibilities like smart sensing devices and solutions for user applications to gain knowledge making human life better. Among the innovative suppliers, the biomedical industry is a fast-growing field that is continuously developing new applications to improve human lives. However, there are also many pros and cons that come into picture while using these smart applications like the side effects and risks at various stages of development or implantation of such devices.

This project mainly emphasizes on the patients with the cardiac insufficiency that leads to the implantation of Left Ventricular Assistive devices(LVAD) which helps the heart in its pump function. Although this technology has highly improved during the last few years, it still has also been limited by complications occurring after the transplantation which is life- threatening if it is not treated. If the pump thrombosis [1] or any clotting in the blood is

viii detected late, an immediate treatment or a pump exchange are required. However, an early detection means that the patient can be treated immediately with anticoagulants thus avoiding dangerous interventions. Currently, patients with implanted LVAD are clinically inspected at various intervals that are long and lead to a late detection of the pump thrombosis or any other anomaly which leads to a deathly outcome. Therefore, a new approach is needed that allows the patients and the medical professionals to inspect the

LVAD on a daily routine.

It proposes a design in which the data analyzed is from the Left Ventricular Assist

Device(LVAD) attached to the heart. Data like the pressure and the flow rate of the blood is acquired through a data acquisition system in LabChart and then imported into RStudio to clean and perform exploratory analysis in R. This excel data is then pushed to the cloud, stored in the AWS Dynamodb and S3 using python. A custom Dashboard with different graphs of the parameters is developed using Amazon Quicksight and the link is shared with the subscribed users (doctors and patients) to visualize. The link is shared using Amazon

Simple Notification Service(SNS) to detect if there is an anomaly in the data like an increase in pressure, the flow rate of the blood and immediate treatment can be given in the emergency.

ix CHAPTER I

INTRODUCTION

1.1 Statement of the Problem

Heart transplantation these days is a common treatment for end-stage heart failure in all ages. Many devices, mechanical and electrical are used to maintain the function of failing heart. This Cardiac insufficiency leads to an implantation of Left ventricular assist device (LVAD) which pumps the blood to the heart replacing its failing functionality.

However, it is also limited by complications occurring after the transplantation is done which is life-threatening if it is not treated. If it is detected late, an aggressive lysis or a pump exchange are required. However, an early detection means that the patient can be treated and saved.

1.2 Purpose

This proposed study is to investigate and implement a cloud-based platform that enables wireless transfer, storage, and visualization of clinical data. This platform helps to comprehend what IoT is, analysis of data for development in the telemedicine sector [2] and implementing an application for preventing dangerous conditions like strokes, where information to be stored in a secure manner, safe from any unauthorized parties and is accessible to medical professionals, family members from anywhere, on any platform whether it be a computer or a smartphone. This platform undoubtedly generates an enormous amount of clinical data every second which would help the healthcare industry and patients in many ways.

1 1.3 Research Analysis

In this report, an effective monitoring dashboard for the Internet of Medical Things environment has been implemented to prevail over the past issues. The main intention of this project was to use the available sensors and the new technology to breakthrough in

LVAD research providing advanced solutions to the users. It focusses on the implementation of the data analysis platform using the available resources of Amazon Web

Services for sharing and monitoring the pump characteristics to prevent any serious problems due to the implantation of the LVADs.

The research was analyzed using a mock circulatory loop of PVAD pump, sensors, data

Acquisition system and bridging circuits. The architecture of the implementation is shown in Figure 1. The PVAD pump is placed in the abdomen below the diaphragm and connects to the left ventricle and gives feedback to the aorta. The flow control and pressure from the pump are read into LabChart using a data acquisition system for the flow rate of the blood and two bridge rectifiers are used one each for the pressure of the pump i.e. pump inlet pressure and pump outlet pressure. The data acquisition system transfers the raw data into the LabChart as a voltage with units L/mm. This voltage is then calibrated into the correct units which are L/min for the flow signals and mmHg for the pressure transducers using a two-point user-defined conversion technique for each channel using AD Instruments pressure gauge kit.

This raw data of pressure and the flow rate is then live recorded with respect to time and extracted into excel sheet which is then imported in RStudio for Data Preparation and Data

2 cleaning using inbuilt libraries. Resource section like what AWS resources to use is done to implement the project simple and inexpensive in accordance with the amount of data collected from the LVAD. This Cleaned Data is then deployed into the

Dynamodb and is also stored in S3 which is then imported into a cloud

Visualization Service Amazon Quicksight where a dashboard is designed to visualize different graphs showing the change in inlet and outlet pressure with respect to time and pressure, difference of pressure with respect to flow rate etc.

Figure 1: Architecture of the Implementation

Amazon Simple Notification Service(SNS) is then used for creating a topic to share the link to Amazon Quicksight dashboard to the subscribed users like the patient’s family and

Medical professionals. The subscribed users get notified with the link as an Email or SMS and the link can be opened on any smart device or a computer from anywhere if the

3 subscribed user has the Amazon web services account which helps the patients to get immediate follow ups on their treatment and can also save the patient if any issue comes up suddenly.

1.4 Report Organization

The project report is organized as follows: Chapter 2 talks about the literature review providing the related research carried out by other medical researches and engineers already. Chapter 3 describes the introduction to Pediatric Ventricular Assistive

Devices(PVAD) and its connected sensors, devices. Further it defines the basics of and amazon web services, its general architecture, and technical aspects.

Chapter 4 illustrates the evaluation of data, resource selection, deployment to the cloud, implementation of the design, development of the dashboard application and the working functionality of the application as a prototype with all the results. Chapter 5 concludes with the design implementation purpose and the future work.

4 CHAPTER II

REVIEW OF LITERATURE

2.1 Overview

In this section, the study of various ventricular assist devices which are available for patients with advanced heart diseases, is briefly elaborated. In addition to this, many issues involving the intensive research on these devices and the problems faced are discussed.

This chapter will also give an overview to the history of pediatric ventricular assist devices and its complications at various stages of implantation.

2.2 Evolution of Ventricular Assistive Devices

The early VADs started with the first generation VADS [3] which followed the principle of “pulsatile" action where LVAD is placed below the abdomen and blood flows into the pump from the left ventricle then pumps out the oxygenated blood into the aorta to imitate the pumping behavior of heart. More recent studies have said that continuous-flow pumps which are second generation pumps are classified as centrifugal pumps. It does the same thing, maintaining the constant blood flow resulting in better survival rates [4]. These systems are being proved to significantly improve the quality of life for patients and reduce complications such as strokes and device malfunction. Third generation VADs were significantly smaller than the other two VADs. These also work on the principle of centrifugal force with electromagnetic impellers pumping the blood, thus eliminating the need for extra parts thereby reducing the size of the pump [5]. An overview of all the generations of VADs is shown in the figure 2: Generation of the Ventricular Assist Devices

5 [6]. This picture shows the implantation of all the generations of LVADs which clearly shows the size and the look of them.

Figure 2: Generation of Ventricular Assistive Devices

Although originally designed to implant temporarily to bridge the short term until heart transplantation, statistics prove that VADs have shown good results for longer terms [7]

Due to the world-wide organ scarcity, VAD have a very promising future perspective and are becoming popular due to its accuracy, smaller size and efficiency with the fast progress in the technology. LVAD has transformed the biomedical field by increasing the mortality rate and the human population. Another research was carried out using a cuff that inflates the aorta allowing it to expand, becoming a second ventricle thus reducing the risk of infection and the need to take consequent follow up actions.

6 2.3 LVAD Complications

The most devastating complication of LVAD is said to be the formation of a blood clot within the pump [8]. Many researches have been done on this problem named as

Thrombosis. The data from the LVAD was studied for all patients, power consumption and rotation speed were analyzed using an algorithm which detects the given upper or lower limit (Figure 3) violations by measuring their mean [9]. An alert message was set if couple of data points in a row lie above or below the mean of successive readings or if they change suddenly. These analyses helped to develop an early thrombosis detection system. Alert settings were also done of one-watt deviation for the power consumption.

Figure 3: Graphical Analysis for Thrombosis

The other side effect with the implantation of LVAD is Acute Right Ventricular Failure.

According to statistics proven, Right Ventricle failure is a frequent complication which occurs in approximately 20–50 % of patients after the implantation of LVAD. This again leads to the need for RVAD implantation after LVAD surgery [10]. Reduction in the

Pulmonary Vascular Resistance (PVR) results in diminishing the capacity of the right

7 ventricle [11] because of sudden fallout in the diastolic pressure thereby dropping the left pulmonary capillary wedge pressure. This affects the function of the right ventricle.

Therefore, it is recommended for the patients to repeat echocardiographic studies for few days after the pump is implanted and adjusting the pump speed according to the systolic movement and size of the left and right ventricle. Right Ventricle failure also leads to cardiogenic shock [12]. It is said that up to 15 % of patients with acute Right Ventricle failure will require right VAD implantation [12]. This can also lead to any body organ dysfunction.

Gastrointestinal Bleeding is another common side effect of the LVADs. It is approximated that 1/4th of LVAD implanted patients suffer from this problem [12] where the bleeding is originated from the upper GI tract. Stress and peptic ulcers are also common in these patients.

2.4 Biomedical Applications and health monitoring

Nowadays, the most demanding applications are live streaming of smart sensor’s data placed across the body. This demand thereby guides to a novel implementation of integration of Internet of Medical Things, Data Science (enormous amount of data captured by the sensors) and the cloud resources [13]. This implementation can be done by many traditional methods choosing any of the resources available. All interconnected blocks create a platform that can supervise the health of a patient [14]. These supervisory approaches tackle the communication ability of smart devices in parallel with wearable devices to develop effective monitoring and visualization strategies. The other research

8 techniques deal with the tracking of social and physical activities, mood detection, stress levels, etc.

There is also a study presenting the communication between the smartphone and a wearable device in daily life by providing an ease to monitor blood glucose levels, insulin levels, physical activity directly from the wrist. This advantage of smart technology is being applied for monitoring a person at risk, from an elderly to a kid. ECG data can also be collected using a wearable smart device and is sent directly to the cloud using a wireless network. Figure 4 shows a picture of the use of upcoming technology [15]. This Fast-paced technology continuously gives us challenges to perform extra and something innovative in the same amount of time to make human life better.

Figure 4: Biomedical Applications of IoT

9 There are uncountable techniques developed using the smart sensors and the cloud [16].

These methods collect data from sensors every few seconds and use various applications or databases to store, process, display, visualize and share data to the cloud. AWS services are the key in handling the data since they make the data available at any corner of the world [17]. The data is then exported to AWS resources to be visualized by medical professionals. In this system, smart sensors are able read patient data and deploy it to smart devices.

10 CHAPTER III

METHODOLOGY

3.1 Brief Overview of Hardware Components

The HeartWare System works on the principle of a centrifugal blood pump, the

LVAD Pump implanted below the abdomen for left ventricular support as shown in Figure

5[18]. The inflow pressure conduit integrated with the pump and the other graft attached to the pump. This tube connects to the aorta allowing blood to flow out of the pump.

Another connection is from the pump to an external controller. The controller can be powered by the DC batteries or electricity(AC) from the wall outlet, which helps in proper functioning of the pump and characteristics monitoring. The external monitor can be used to display system characteristics if there is any need to change controller operating parameters.

Figure 5: Components of Ventricular Assist System

11 3.1.1 Monitor

This component shown in Figure 6 can be externally designed using a Raspberry Pi technology which consists of a touchscreen and a Raspberry Pi kit. Raspbian as an operating system can be used and scripted using programming languages like python to display the graphical analysis of the power consumption, blood flow and speed of the pump.

Figure 6: LVAD Monitor Display

3.1.2 LVAD Pump

It is a centrifugally-configured magnetic repelled with a rotor assembly device so that the paths of the entering and exiting blood flow are perpendicular to the pump’s axis. The pump runs by an external power source. The pump operates in parallel with the heart, such that it can supply oxygenated blood to the aorta. Blood enters the pump from the left ventricle through an inflow inlet. Blades inside the rotor move the blood through the pump to an outflow cannula using centrifugal force. The speed of the pump can be changed using the controller.

12 3.1.3 LVAD Controller

The controller is a unit that manages pump operation. It basically is used to provide power to the blood pump for functioning. The output from the pump is sent to the controller, which must always be connected to the power supply or batteries. A “No Power” alarm is turned ON when there is no power supply. The controller can also be connected to the monitor for monitoring its functioning.

Figure 7: LVAD Controller

3.1.4 Pressure Transducer

In this project, the raw data like pressure is obtained from TN1012/ST pressure device that has an electric sensor to convert the blood flow into an electrical signal. This is connected to the NI data acquisition system through BNC connector. These pressure readings must be calibrated to appropriate units by applying external pressure using two-point user defined conversion technique for each channel. [17].

Following steps can be followed to avoid noisy signals:

13 • placing the sensor at a different place on the pump.

• Tighten the transducer strap.

• Trying to keep the transducer still to avoid any disturbances

3.1.5 Pressure and Flow Sensors

Flow sensors were used at the post-LVAD which measures the bulk flow of the system, flow passing through aorta and LVAD. Since these sensors produce a change in voltage they can be calibrated to their correct readings. Each sensor was attached to the

PowerLab/30 Series unit (AD Instruments) and assigned a channel through LabChart software (AD Instruments). The Power lab transferred the raw data into the LabChart as a voltage reading. These voltages were converted into the correct units: L/min for the flow signals using a flow meter.

Figure 8: Data Acquisition System

14 The pressure sensors were connected to the bridge circuits. After amplification, these signals were sent to the AD Instruments PowerLab /30 series through a coaxial cable.

Similarly, the flow sensors (Figure 9) were connected to a Transonic 400-Series

Multichannel Flowmeter (Transonic Systems, Inc., Ithaca, NY) which then also sends the signal to the PowerLab. The sensors were then attached to the Data Acquisition system, all sensors were calibrated using a 2-point calibration technique to ensure accuracy. The pressure sensors are calibrated using a syringe, with the calibration occurring through

LabChart at various intervals ranging from 0 mmHg and 100 mmHg. These reading need to be calibrated prior to any data recording through LabChart. This data is then recorded through LabChart which was again transferred to Excel software.

Figure 9: Flow Sensor

15 3.2 Brief Overview of Software Components

3.2.1 R-Studio

RStudio is a development environment in R which enables the creation and rendering of plain-text documents that contain R code. With RStudio, the code and the analyzed data can be encapsulated within the text, fostering research transparency and replicability of results. These tools are free and will run on any computer platform. R statistical programming language allows the users to perform data cleaning, exploratory analysis, predictive analysis and the application of various algorithms and clustering techniques for better analysis of data.

3.2.2 basics

Internet of Things is said to be a wide umbrella that covers every field like medical, biomedical, technical focusing on better human lifestyle. It basically is the usage of smart devices to track all the activities every day and interact with the tracked data to better well- being.

IoT is a network to connect people with the help of smart devices across the world. It is proven to benefit users. The whole Internet of Things infrastructure is the concept in which all the sensors track the data, internet securely processes the data and the outcome helps humans in daily life to monitor their activities. The sensing devices range from the tiny sensors to robots to help humans in every possible way. It can also be considered as

Artificial intelligence. The advantage of these devices is that they perform all the work within no time while consuming very less resources like energy, power and integration

16 with the cloud resources makes it even more effective for the prevention of problems and risks due to the implantation of the sensors at the early stage.

3.2.3 Amazon Web Services

The Amazon Web Services (AWS) is a cloud computing platform with a wide variety of resources owned by amazon.com. It provides a platform where it can be used as an infrastructure by building applications. AWS also helps in building applications using its infrastructure (IAAS) (PAAS). All the services ranging from cloud storage to relative database to data sharing constitute the cloud platform offered by amazon free for a 1-year tier. List of customers for AWS include , Ge Predix,

CSUN, Airbnb, Nasdaq, Netflix. It is believed there are more than 300K professionals in the world actively using AWS [18]. It is one of the innovative developments that bought together cloud computing, big data resources helping startup companies to grow their business.

Amazon is a fast-developing organization in various fields like e-commerce, groceries and especially in the biomedical field. The other advantage is that AWS helps in running number of virtual machines on the single platform saving the memory, time and complexity. In addition to that these virtual machines can be of any platform like Linux, ubuntu, windows etc. Similarly, there are diverse resources provided by AWS like its temporary storage, permanent storage, SMS service, notifications, database. The following resources are the most popular ones:

• Amazon Elastic Compute Cloud (EC2)

17 • Amazon Pipeline

• Amazon Redshift

• Amazon Lambda

• Amazon Simple Queue Service (SQS)

• Amazon Simple Storage Service (S3)

• Amazon Dynamo DB

3.2.4 Amazon Dynamodb

There are many databases on AWS platform that store large amounts of data in the form of tables with just a primary key access. For these type of services, such as those that provide large amounts of data with various fields (columns), the common application of using a relational database like Amazon Redshift would become expensive leading to pay more when compared to Dynamodb which is a simple database resource with only one primary-key in the table to make it user friendly and inexpensive. It widely achieves scalability and availability using well known techniques: Data is partitioned using an algorithm hashing [19] and replicating the tables is done by versioning each time the table is changed to make note of all the changes [20]. Dynamodb is a Reliable database system with minimal cost or free for a free tier user. AWS CLI or the GUI can be used to create tables, modify, delete tables from the Amazon Dynamodb making it user friendly.

3.2.5 Amazon Simple Storage Service(S3)

Amazon’s S3 is a simple storage resource on cloud to store the data as objects in the buckets. These buckets can explicitly contain photos, documents, videos, large data.

18 Bucket names must always be global, if any bucket name matches with the old bucket name, an error is shown as the name is already in use and the bucket is not created. S3 also has its own API through which the users can create the S3 bucket using AWS CLI. Access to these buckets can also be set using IAM for security and privacy of the data.

S3 is designed in such a way that whenever any bucket is encountered with any problem, it fails its request needing to retry until it is succeeded. These are the common failures that can occur: when an HTTP PUT is issued, the service is failed thus forcing a retry called as

Write Retry. The other kind of failure is Read Retry which occurs when S3 data is requested which generated error and forces retry. S3 also allows various requests such as PUT, GET, and DELETE requests but not DELETE request. It only lets the user to have multiple buckets similar to each other by different versions.

3.2.6 Amazon Quicksight

Amazon Quicksight is one of the AWS resources to provide cloud-based Business

Intelligence and Analytics solution. It provides a fast, reliable and inexpensive way to analyze and visualize large amounts of data. The engine followed by Quicksight is called as SPICE (Super-fast, Parallel, In-memory, Calculation Engine) which helps the users to work on large data sets in short period of time with the benefit of sharing the work done.

Amazon Quicksight can import the data sources from various AWS’s services like

Redshift, EMR, Kinesis, S3 and can also import from any of the external databases like

MySQL, Oracle, PostgreSQL or directly from the computer. It also has various features

19 making it very powerful, reliable and flexible. These filters help in visualizing the interested data and highlighting the answers that drive decision making. It also has the feature of adding “calculated field/column” to manage raw data sets by calculating the interested fields and analyze better results. Sharing of the work is the most important feature for the analysis of any data. Quicksight lets the user to share the data sets, visualize stories and the dashboard in a secure way to let the other subscribed users to also manipulate analytics and visualizations dynamically and interactively.

3.2.7 Amazon Simple Notification Service(SNS)

Amazon SNS is a service that is used to send alerts and notifications using protocols like

HTTP. Notification system success rate is differentiated with four types namely bounce rate, complaint rate, content issues and delivery rate that are explained below:

• If the email address of the receiver is misspelled by the sender, this service bounces

the email back increasing the bounce rate.

• Spam emails are considered as the complaints by this service.

• If the message in the email is spam or malefic, content issue is raised.

• The number of messages successfully sent are counted towards the delivery rate.

Text messages and emails are widely used notification and alert methods by various applications. The main advantage of this service is that there is no pre-installation or any extra tool to use this service rather than creating an account on AWS. This service can be used to send text messages on the subscribed smart phone. AWS Lambda service can also be used to trigger the SNS topic to send messages or alerts which helps to apply threshold

20 to any data for the alarm to beep when the readings are higher than the threshold. An email notification can also be sent to the subscribed users securely using HTTP protocol.

21 CHAPTER IV

DESIGN IMPLEMENTATION

4.1 Introduction

This chapter discusses the design flow of the project implemented as shown in Figure below. It describes extraction of data from the sensors, evaluation of data, resource selection, deployment to the cloud, implementation of the design and development of the dashboard application.

Figure 10: Design Flow

22 4.2 Pump Setup

LVAD pump is connected to the system which mimics the functionality of heart and all the sensors like flow sensor, pressure sensors are connected to the pump and thereby to the

Data Acquisition System as shown in the Figure 11. The transducers are calibrated to zero before recording signals to remove the small offset produced by default. The fluid filled transducers dome is filled with fluid prior to calibration and then it is made sure that there are no air bubbles within the dome and then recording Chart readings is done by increasing the pressure using the syringe in frequent intervals.

Figure 11: Pump Setup Mimicking Heart

23 4.3 Data Extraction

The readings are then captured in LabChart (Figure 12). The reading read are pump inlet pressure, pump outlet pressure and flow rate. This data is then recorded and exported into an excel sheet with the readings as different columns.

Figure 12: Pressure Calibration in LabChart

4.4 Data Preparation

This excel data is then imported into RStudio to study and perform data cleaning if necessary. The Extra column was removed from the sheet and all the columns were converted to numeric data frames using the R, all the rows containing null values or the missing values were also omitted by installing the required packages, importing the package and applying the required method on the data . A sample graph was also drawn in

R using the library named as ggplot2 to check the results.

24

Figure 13: R Analysis

4.5 Cloud Deployment

The cleaned data obtained from the RStudio is deployed to the cloud using AWS CLI which is configured into the computer by downloading Python SDK since all the deployment is done using python. First, the excel data is converted to json table using the python program named as Json_data.py and then a table is created in the AWS Database called as

Dynamodb using the code Create_table.py and the data is added into the above table using

Add_data.py.

25

Figure 14: Running Scripts through Command Line

This Excel data is also stored in as a bucket to retrieve it for later use. Figure

15 proves that the data table is successfully created in Amazon Dynamodb and patient’s data is added in the table created.

Figure 15: Successful Deployment into Dynamodb

26 4.6 Data Visualization

Data from S3 is imported into Amazon Quicksight and the graphs were designed to visualize. The various graphs drawn are as shown in the following figures. These graphs were designed using drag and drop feature of Amazon Quicksight to select the x and y axis.

The other graph of Pressure difference versus Flow rate was create by adding a calculated field in Quicksight shown in Fig: 16.

Figure 16: Graph Showing Pressure Difference versus Flow rate

27

Figure 17: Graph showing the variation of inlet and outlet pressure by time

Figure 18: Graph showing Pump Outlet pressure with respect to time

28

Figure 19: Graph showing Pump Outlet pressure with respect to Pump Inlet Pressure

4.7 Subscription and notification

A topic is created for the subscribed users using the protocol HTTP in Amazon Web

Services SNS service by adding the email addresses and contact numbers of the users. The link to Amazon Quicksight Dashboard is attached in the message with the name of the patient and all details. The following figures shows the Subscribed users and the alert messages sent to the subscribed users.

Figure 20: Topic Subscribers

29

Figure 21: Email Notification received

Figure 22: SMS Notification received

30 CHAPTER V

CONCLUSION

5.1 Conclusion

A distributed monitoring dashboard for Internet of Medical Things environments has been implemented in this study. The aim of the project was to use the biomedical sensors like pulse transducers, pressure sensors and AWS resources to develop a platform for effective healthcare applications.

The raw data of pressure and flow rate live recorded in LabChart using the sensors was extracted into excel sheet, processed in RStudio for data preparation and data cleaning using libraries. This cleaned data is then deployed to Dynamodb and S3. Amazon

Quicksight was used to design a dashboard to visualize different graphs showing the change in inlet and outlet pressure with respect to time and pressure, difference of pressure with respect to flow rate etc. The visualization of the heart pump data is done in the cloud and the notifications are being sent successfully to medical professionals using this approach from anywhere anytime thus reducing the risk to strokes and the device malfunction in patients.

31 5.2 Future Work

Future work can be done on this project using blood or a solution with the consistency of blood in the pump instead of using water. Raspberry Pi which is said to single board computer can be used to automate the process. It can be automated using LabView in

Raspberry Pi eliminating the need to record the readings manually.

32

REFERENCES

[1] Birati EY, Quiaoit Y, Wald J, et al. Ventricular assist device thrombosis: A wide spectrum of clinical presentation. J Heart Lung Transplant 2014 Dec 24

[2] Kirill Lazarev. Internet of Things for personal healthcare Study of eHealth sector.

Smart wearable design. 2016 Dec

[3] Samuel J. Tolpen. A Thesis on Aortic Valve Opening Measurements in The LVAD

Assisted Heart. Spring 2015

[4] J. M. Stulak, M. E. Davis, N. Haglund, S. Dunlay, J. Cowger, P. Shah, F. D. Pagani,

K. D. Aaronson, and S. Maltais, “Adverse events in contemporary continuous-flow left ventricular assist devices: A multi-institutional comparison shows significant differences,” J. Thorac. Cardiovasc. Surg., vol. 151, no. 1, pp. 177–189, Jan. 2016.

[5] Stix, Madeleine. "Living without a Pulse: Engineering a Better Artificial Heart."

CNN. Cable News Network. Last modified December 4, 2013. http://www.cnn.com/2013/ 12/04/health/permanent-artificial-heart/.

[6] http://jtd.amegroups.com/article/viewFile/8418/html/68581

[7] Thoratec Corporation. "About HeartMate II." Thoratec Corporation. Accessed

December 2, 2014. http://www.thoratec.com/patients-caregivers/aboutHeartMateII.aspx

[8] Starling RC, Moazami N, Silvestry SC, et al. Unexpected abrupt increase in left ventricular assist device thrombosis. N Engl J Med 2014;370:33–40.

[9] Christian Winkler1* , Jonathan K. Stock2,3 , Rachel Hards3 , Fabiano Zallot2 , Anna

Biermann2,3 , Andre R. Simon3,4 , Ulrich A. Stock2,3,4. Early Detection of Developing

Left Ventricular Pump Thrombosis: Design of a Portable Monitoring Device

33 [10] Meineri M, Van Rensburg AE, Vegas A. Right ventricular failure after LVAD implantation: prevention and treatment. Best Pract Res Clin Anaesthesiol 2012;26:217–

29.

[11] ventricular function. J Heart Lung Transplant 2013;32:398–403. 52. Atluri P,

Fairman AS, MacArthur JW, et al. Suarez Continuous flow left ventricular assist device implant significantly improves pulmonary hypertension, right ventricular contractility, and tricuspid valve competence. J Card Surg 2013;28:770–5.

[12] MacGowan GA, Schueler S. Right heart failure after left ventricular assist device implantation: early and late. Curr Opin Cardiol 2012;27:296–300.

[13] Draper KV, Huang RJ, Gerson LB. GI bleeding in patients with continuous-flow left ventricular assist devices: a systematic review and meta-analysis. Gastrointest Endosc

2014;80:435–46

[14] Gil, D.; Ferrández, A.; Mora-Mora, H.; Peral, J. Internet of Things: A Review of

Surveys Based on Context Aware Intelligent Services. Sensors 2016, 16, 1069.

[15] https://www.dreamstime.com/stock-images-modern-medical-app-smartphone- stethoscope-illustration-design-over-white-image30305104

[13] Colom, J.F.; Mora, H.; Gil, D.; Signes-Pont, M.T. Collaborative building of behavioural models based on internet of things. Comput. Electr. Eng. 2016, 58, 385–396.

[14] Banerjee, A.; Gupta, S.K.S. Analysis of Smart Mobile Applications for Healthcare under Dynamic Context Changes. IEEE Trans. Mob. Comput. 2015, 14, 904–919.

[15] Ogunduyile, O.O.; Olugbara, O.O.; Lall, M. Development of Wearable Systems for

Ubiquitous Healthcare Service Provisioning. APCBEE Procedia 2013, 7, 163–168.

[16] HeartWare® Ventricular Assist System Instructions for Use.

34 https://www.heartware.com/clinicians/instructions-use

[17] Choi, Seongjin, J. Robert Boston, and James F. Antaki. "Hemodynamic Controller for Left Ventricular Assist Device Based on Pulsatility Ratio."Artificial Organs 31, no. 2

(2007): 114-25.

[18] http://en.wikipedia.org/wiki/Amazon Web Services.

[19] . http://www.oracle.com/us/solutions/cloud/overview/index.html.

[20] Sql server. http://www.microsoft.com/sqlserver/en/us/default.aspx.

35

APPENDIX

Source Codes:

Data.r:

setwd(choose.dir()) install.packages("xlsx") install.packages("xlsxjars") install.packages("rJava") library(xlsx) # Install package first as stated above

# Dependencies and system gives error to download rJava library(rJava) # Install package first library(xlsxjars)

Hsb = read.xlsx("Final.xlsx",sheetName="Sheet1")

View(Hsb)

Hsb$NA. = as.numeric(Hsb$NA.) install.packages("dplyr") library("dplyr") names(Hsb)[names(Hsb) == "NA."] <- "Id" rename(Hsb, Hsb$NA. = 'Id')

##mean(Hsb$pump_inlet_pressure)

##head(Hsb)

#deleting the last column

36 Hsb$NA.<-NULL

## All the rows which have NA values will be removed.

HMII_Final = na.omit(Hsb)

View(HMII_Final)

# close the connection close(zz) ncol(HMII_Final) write.xlsx(Hsb, "C:/Development/Project_sem_5/1st_try/Final.xlsx") class(Hsb$Id) getwd() ls() ggplot(HMII_Final,aes(x = HMII_Final$pump_inlet_pressure, y = HMII_Final$time))

Pressure1 = HMII_Final$pump_outlet_pressure - HMII_Final$pump_inlet_pressure plot(y = Pressure1, x = HMII_Final$flow_rate ) correlation = cor(HMII_Final)

View(correlation) install.packages("corrplot") library(corrplot) # Please install this package first. corrplot(correlation) class(Hsb) ncol(HMII_Final)

37

Json_data.py:

import xlrd from collections import OrderedDict import simplejson as json

# Open the workbook and select the first worksheet wb = xlrd.open_workbook('Final.xlsx') sh = wb.sheet_by_index(0)

# List to hold dictionaries

Heart_data = []

# Iterate through each row in worksheet and fetch values into dict for rownum in range(1, sh.nrows):

data = OrderedDict()

row_values = sh.row_values(rownum)

data['Id'] = row_values[0]

data['time'] = row_values[1]

data['pump_inlet_pressure'] = row_values[2]

data['pump_outlet_pressure'] = row_values[3]

data['flow_rate'] = row_values[4]

data['Pressure_difference'] = row_values[5]

Heart_data.append(data)

# Serialize the list of dicts to JSON

38 j = json.dumps(Heart_data)

# Write to file with open('Final_data.json', 'w') as f:

f.write(j)

Create_table.py:

from __future__ import print_function # Python 2/3 compatibility import os os.environ["TZ"] = "UTC" import boto3

dynamodb = boto3.resource('dynamodb', region_name='us-west-2')

table = dynamodb.create_table(

TableName='Heartmate',

KeySchema=[

{

'AttributeName': 'Id',

'KeyType': 'HASH'

},

{

39 'AttributeName': 'time',

'KeyType': 'RANGE'

},

],

AttributeDefinitions=[

{

'AttributeName': 'Id',

'AttributeType': 'N'

},

{

'AttributeName': 'time',

'AttributeType': 'N'

},

],

ProvisionedThroughput={

'ReadCapacityUnits': 10,

'WriteCapacityUnits': 10

}

)

print("Table status:", table.table_status)

40

Add_data.py:

from __future__ import print_function # Python 2/3 compatibility import boto3 import json import decimal

dynamodb = boto3.resource('dynamodb', region_name='us-west-2')

table = dynamodb.Table('Heartmate')

with open("sample_data.json") as json_file:

Heart_data = json.load(json_file, parse_float = decimal.Decimal)

for data in Heart_data:

Id = int(data['Id'])

time = data['time']

pump_inlet_pressure = int(data['pump_inlet_pressure'])

pump_outlet_pressure = data['pump_outlet_pressure']

flow_rate = data['flow_rate']

Pressure_difference = data['Pressure_difference']

print("Adding data:",pump_inlet_pressure , pump_outlet_pressure)

41

table.put_item(

Item={

'Id': Id,

'time':time,

'pump_inlet_pressure': pump_inlet_pressure,

'pump_outlet_pressure': pump_outlet_pressure,

'flow_rate': flow_rate,

'Pressure_difference':Pressure_difference,

}

)

42