Full text
Universidade do Minho Escola de Engenharia Departamento de Informática Paulo Alexandre Gonçalves Pacheco Self-service Kiosk-based Anamnesis System for Emergency Departments March 2021
Universidade do Minho Escola de Engenharia Departamento de Informática Paulo Alexandre Gonçalves Pacheco Self-service Kiosk-based Anamnesis System for Emergency Departments Master dissertation Integrated Master’s in Informatics Engineering Dissertation supervised by Pedro Rangel Henriques Nuno Feixa Rodrigues March 2021
i AUTHOR COPYRIGHTS AND TERMS OF USAGE BY THIRD PARTIES This is an academic work which can be utilized by third parties given that the rules and good practices internationally accepted, regarding author copyrights and related copyrights. Therefore, the present work can be utilized according to the terms provided in the license bellow. If the user needs permission to use the work in conditions not foreseen by the licensing indicated, the user should contact the author, through the RepositóriUM of University of Minho. License provided to the users of this work Attribution-NonCommercial CC BY-NC https://creativecommons.org/licenses/by-nc/4.0/
ii STATEMENT OF INTEGRITY I hereby declare having conducted this academic work with integrity. I confirm that I have not used plagiarism or any form of undue use of information or falsification of results along the process leading to its elaboration. I further declare that I have fully acknowledged the Code of Ethical Conduct of the University of Minho. Paulo Pacheco
ACKNOWLEDGEMENTS I am deeply grateful to Professor Nuno Feixa Rodrigues, for the guidance, dedication and time provided, for all the constructive and fundamental criticisms for the achievement of this dissertation project. Your insightful feedback pushed me to sharpen my thinking. I want to express my deep gratitude to Professor Pedro Rangel Henriques, for his amazing sense of respect when helping me with the editing of the dissertation. I also thank Professor Eva Oliveira for all the support, professionalism and dedication given throughout this dissertation. I would like to thank Maria Eduarda for her contribution to the project. A warm word for my colleague, flatmate, and great friend Jacinta Santos, who have always been a major source of support when things would get a bit discouraging. I must express my very profound gratitude to my parents, Bernardino and Maria, for their sacrifices for educating and preparing me for my future, and for providing me with unfailing support and continuous encouragement throughout my years of study. I have to thank my girlfriend, Ana, for all the affection and support and for always showing how proud she is of me. The last word goes for my sister Beatriz, who has been the light of my life and who has given me the extra strength and motivation to get things done. iii
ABSTRACT Emergency departments have a higher number of visits compared to other hospital departments. Technology has played a crucial role in promoting improvements in hospital management and clinical performance. The number of visits to emergency departments has increased considerably, giving rise to crowding situations that cause several adverse effects. This situation negatively affects the provision of emergency services, impairs the quality of health care and increases the time patients wait for medical check-up. One of the leading causes contributing to the crowding is the high number of patients with low severity clinical condition. These are referred to as non-urgent or inappropriate patients, whose clinical situation should be taken care through self-care or primary health care. It is the responsibility of the institutions to analyse and quantify the possible causes of crowding to find the best solution to mitigate the adverse effects caused. It is believed that non-urgent patients can use the time spent in the waiting room more productively, namely by using a self-service kiosk to which they can provide valuable information to facilitate and accelerate the clinical processing. This work proposes a solution to be used in the waiting room of emergency departments, which aims to reduce the period of medical check-up. The solution uses a self-service kiosk for the patient to provide relevant clinical data that would otherwise have to be collected by the physician during the clinical observation process. In particular, the kiosk will collect vital signs, past medical history, main complaint and usual medication. This data will be processed and provided to the physician in a structured and uniform way before each medical check-up. The primary purpose of this solution is to reduce the period of patients’ medical check-up and thus improve the response capacity of the emergency departments with the same resources. During the Master’s work period, an Android application was implemented for patients to enter the clinical data mentioned above, and a Web application for physicians to access it. Additionally, a data warehouse was implemented to store the data in a consolidated way to discover hidden relationships and patterns in the data. The first moment of evaluation, undertaken in a non-hospital facility, shows positive acceptability by participants, with a large majority considering the system user-friendly. Due to the pandemic, it was impossible to perform the second planned evaluation moment in a real emergency environment. Keywords: Health Kiosk, Self-Service Kiosk, Emergency Department, Crowding, Primary Care iv
RESUMO Os serviços de urgência apresentam um número de visitas superior em comparação com outros serviços presentes nas instituições hospitalares. A afluência aos serviços de urgências tem vindo a aumentar consideravelmente, dando origem a situações de lotação que provocam diversos efeitos negativos nas instituições hospitalares. No geral, este fenômeno afeta negativamente a prestação dos serviços de urgência, prejudica a qualidade dos cuidados de saúde e faz aumentar o tempo que os doentes aguardam pela observação clínica na sala de espera. Uma das principais causas apontadas para o surgimento da lotação é o elevado número de doentes com condição clínica de baixa gravidade. Estes são designados como doentes não-urgentes ou inapropriados, cuja condição clínica poderia ser resolvida, idealmente, com recurso ao auto-cuidado ou a cuidados de saúde primários. É da responsabilidade das instituições analisar e quantificar as possíveis causas de lotação, de forma a encontrar a melhor solução para atenuar os efeitos negativos provocados. Acredita-se que os doentes não-urgentes tenham a capacidade de utilizar o tempo na sala de espera de forma mais produtiva, através da utilização de um quiosque self-service. Neste sentido e aliada à tecnologia, esta dissertação contextualiza uma solução para ser utilizada na sala de espera dos serviços de urgência, visando reduzir o período de observação clínico. Esta solução vem complementar a realização do procedimento inicial efetuado pelo médico, no consultório, através do uso de um quiosque. Assim, a recolha dos sinais vitais, história médica prévia, queixa principal e medicação habitual será efetuada pelos doentes no quiosque. Estes dados vão ser fornecidos de forma estruturada e organizada ao médico antes da realização da consulta. O objetivo principal desta solução é reduzir o período de observação clínico e assim melhorar a capacidade de resposta dos serviços de urgência com os mesmos recursos hospitalares. Durante o período da dissertação, foi implementada uma aplicação Android para os pacientes registarem os dados clínicos acima mencionados, e uma aplicação Web para os médicos acederem aos mesmos. Foi implementado também um data warehouse para a descoberta de relações e padrões escondidos nos dados. O primeiro momento de avaliação, realizado num ambiente não hospitalar, mostrou uma aceitabilidade positiva pelos participantes, com grande maioria a considerar o sistema user-friendly. Devido à pandemia, não foi possível realizar o segundo momento de avaliação planeado num serviço de urgências. Palavras-Reservadas: Quiosque de saúde, Self-Service quiosque, Serviço de urgências, Lotação hospitalar, Cuidados primários v
CONTENTS 1 introduction 1 1.1Context 1 1.2Motivation 3 1.3Objectives 4 1.4Research hypothesis 4 1.5Document organization 5 2 background 6 2.1Web Services 6 2.1.1RPC Web Services 7 2.1.2REST Web Services 7 2.2JSON 9 2.3Android OS 11 2.3.1Platform Architecture 11 2.3.2Activity’s 12 2.3.3Fragments 14 2.3.4Android manifest 16 2.4React 16 2.4.1Virtual DOM 17 2.4.2Components 17 2.5Node.js 20 2.6Data Warehouse 20 3 patient care kiosks 24 3.1Search method 24 3.1.1Search strategy 24 3.1.2Data items 24 3.2Search results 25 3.2.1Study characteristics 25 3.2.2Risk of bias within studies 26 3.2.3Study results 26 3.3Discussion 29 4 patient care platform 33 4.1System requirements 33 4.1.1Kiosk Requirements 33 4.1.2Web Platform Requirements 35 vi
contents vii 4.2System architecture 36 4.2.1Android client 36 4.2.2Web client 37 4.2.3Web Services 38 4.2.4Firebase 39 4.2.5Database 39 4.3Database Conceptual Model 40 5 implementation 42 5.1Kiosk Physical Components 42 5.2Database 45 5.3Web Services 48 5.3.1Authentication 48 5.3.2Web service A 52 5.3.3Web service B 53 5.3.4Web service C 55 5.4Android application 57 5.4.1First prototype 57 5.4.2Second prototype 67 5.5Web application 77 5.5.1Login 77 5.5.2SearchPatient 78 5.5.3PatientData 80 5.6Data warehouse 83 5.6.1Staging area schema 84 5.6.2Data warehouse schema 85 5.6.3Populate staging area 87 5.6.4Populate data warehouse 87 6 evaluation 88 6.1First moment of evaluation 88 6.1.1Testing Methodology 88 6.1.2Usability test results 90 6.1.3Discussion 93 6.1.4System improvement 96 6.2Second moment of evaluation 97 6.2.1Android application testing methodology 98 6.2.2Web application testing methodology 99 7 conclusion 100 7.1Conclusions 100
Acronyms xiv R REST Representational State Transfer. S SMS Short Message Service. SPO2Blood Oxygen Saturation. U UI User Interface. URI Uniform Resource Identifier. V VDOM Virtual DOM.
1 INTRODUCTION This document is a Master’s dissertation in Informatics Engineering that reports the project chosen by the author and describes all the work done, as well as discusses the results and the main contributions of the thesis defended. The Master’s project consists in a kiosk-based technological solution to mitigate the adverse effects caused by the crowding problem experienced in hospital emergency departments. 1.1 context Primary care is delivered in a variety of settings, including small or medium-sized private practices, hospital outpatient departments, community health centres, and integrated care systems. Over the years, there has been a lack of access to primary care [ 1 , 2 ], leading to increased demand for Emergency departments (ED) as a replacement. Although hospital institutions have qualified technical staff and appropriate infrastructure, this demand has created unusual hospital crowding situations [3]. According to the American College of Emergency Physicians, crowding occurs when the identified need for emergency services exceeds available resources for patient care in the ED, hospital, or both [ 4 ]. In general, this phenomenon negatively affects the delivery of emergency services, impairing the quality of health care and, consequently, the clinical outcomes of patients. When crowding is high, the time patients wait to be seen by a physician tends to increase, as does the number of patients leaving without medical advice [5]. To prevent these consequences, an effort is needed by the management entities and health care providers of the institutions to identify and quantify the recurring causes of this problem. One of the leading reasons pointed out for the emergence of crowding in ED is the high number of patients with a low severity clinical condition, designated as non-urgent or inappropriate patients [6]. In a study conducted in fifteen countries from Europe, Asia, North America and Africa, it was shown that countries with reportedly strong primary care networks, ED crowding is still a major phenomenon, as is seen in Italy, France, and Saudi Arabia. One of the major factors for ED crowding is "inappropriate use", and the rise in ED visits is often attributed to 1
1.1. Context 2 use of the ED for problems that could potentially be cared for in a physicians’ office [6]. In Portugal, ranked number 12 in overall efficiency by the World Health Organization in 2000,30% of visits to ED in 2001 could be inadequate [ 7 , 8 ]. In 2015, a report published by the National Health Service identified a 7% increase in this percentage [ 9 ]. It is believed that these patients of low clinical severity, represent internationally between 24% and 40% of all patients [10]. With the improvements in technology, new alternatives have been created to obtain health information over the Internet, television, and telephone, among other options. Moreover, it gave the population the possibility of obtaining data about health parameters and make use of this information, without having to go to a hospital or other type of medical facility [ 11 ]. There are already several hospital institutions that resort to technology to provide medical devices that can be used in waiting rooms for assessing the patient’s condition [12]. Emerging medical devices open the possibility of creating a system that can help in the collection of vital signs from patients. An instance of such a system for installation in hospitals or clinical centres are self-service kiosks [11]. Self-service kiosks are independent units that contain computer programs and provide services to patients in several domains, such as triage, face-to-face consultation replacement and disease diagnosis. They are widely portable, so they can be moved from one location to another when needed. Kiosks-based programs are primarily interactive and generally have a simplified user interface, such as a touch screen or keyboard [ 12 ]. One randomised study from Singapore conducted in 2017, over 12 months, demonstrated that by placing kiosks in waiting rooms, patients were able to use the time between registration and meeting with the physician to engage in productive tasks that aid the medical process [13]. When patients go to an emergency department, they are subjected to a triage process to identify the wristband colour that best represents their medical treatment urgency. After identification, the patient waits in the waiting room for the medical check-up. In medical check-up, the physician performs the initial procedure of collecting the patient’s vital signs, usual medication and past medical history, in a process called anamnesis. This work proposes a technological solution that aims to replace the initial procedure performed in the physician’s office, with a kiosk placed in the waiting room of the emergency department. The information associated with the initial procedure, collected through the kiosk, will be made available to the physician before each medical check-up. The expectation is that the physician will no longer need to perform the initial procedure in the office or accelerate it significantly. The primary purpose of this solution is to reduce the period of the patients’ medical check-up and thus improve the response capacity of the ED with the same resources. This work is part of a larger project developed by a team in collaboration with Jacinta Santos, who is in charge of human-computer interaction issues.
1.2. Motivation 3 1.2 motivation This thesis aims to develop a kiosk that will allow the medical staff to accelerate the clinical observation of the patient and, with this, improve the performance of the ED with the same amount of resources. Several hospital institutions already provide kiosks in their facilities. These have several objectives, such as assisting in triage processes, providing health information, disease prevention, disease diagnosis and face-to-face consultation replacement. The proposed kiosk differs from the previous ones in its purpose to assist patients’ medical consultations by replacing the anamnesis procedure. The implementation of this kiosk as a way to replace the initial procedures performed in the physician’s office will enable a reduction in the period of clinical observation. The kiosk will bring advantages primarily to patients who use the kiosk, because they are contributing to a decrease in their waiting time. However, not only those who effectively use the kiosk have advantages. Those who do not use the kiosk will have a possible reduction of time in the waiting room, caused indirectly by those who used it. The possibility of reducing patient waiting times combined with the high turnout in ED points to adherence to the kiosk. The kiosk’s anamnesis process will free up consultation time that physicians can use to focus on other essential aspects of the patient’s clinical condition, resulting in better diagnoses. The different age ranges and digital competence of patients is a significant challenge in the design of the platform. It is, therefore, necessary to focus on the experience of using the kiosk to make it as simple as possible for the patient. One of the challenges is to create the kiosk so that it can be used independently and without prior training. Another challenge is to ensure that the gathering of biometric data from patients and their clinical record is carried out in the fastest and most intuitive way, to make the duration of a full kiosk session as short as possible. With the continuous use of the kiosk by different patients, it will be possible to obtain a considerable amount of data about the clinical status of patients. In the face of a large amount of data, one can discover consistent patterns and systematic relationships. This will make possible to generate a predictive model which, through the data collected from each patient at the kiosk, will indicate the probable cause of their symptoms. As this platform is embedded in a kiosk, it is possible to easily move it to places where it is more needed. Although the focus is on emergency services, the kiosk can be improved for health care practice in remote areas, where access to these is scarce.
1.3. Objectives 4 1.3 objectives Within the scope of this project, the main goal established was to build a care platform for patients in emergency departments, capable of collecting a set of biometric data, past medical history, usual medication and main complaint, process this information and provide it to the physician before the medical check-up. This project is divided into two components. The first component consists of a mobile application that communicates with several biometric sensors. The second component will be a web application that will make the information collected in the mobile application available to physicians. The following sub-objectives can be considered: • Planning a solution that ensures the security and confidentiality of all data involved; • Development of a prototype of the solution, which should include the following points: – A system that allows the patient’s identification, and collects the past medical history, usual medication and main complaint; –A module to collect the biometric data from sensors; – A set of graphical interfaces and video tutorials, whose presentation to the patient depends directly on the state of the application; – A storage system to store patients’ health data as well as indicators to test the performance of the solution; – A back-end system to respond to requests made by the web application and the android application; – A system that allows physicians to consult the data from each patient’s clinical register; –A data warehouse for reporting and data analysis; • Implementation of the solution’s prototype; • Testing and evaluation of the system. 1.4 research hypothesis From the patients’ and physicians’ point of view, it is expected that the proposed kiosk-based platform, capable of collecting biometric data from patients and accessing their medical history data, reduces the medical check-up duration in the emergency departments.
1.5. Document organization 5 1.5 document organization This dissertation is divided into seven chapters. The second chapter, "Background" , provides the necessary knowledge that the reader must have to understand the proposed solution. The third chapter, "Patient Care Kiosks" , constitutes the state of the art of kiosks for patient care in various domains. The planning of the entire solution and the architecture of the system is carried out in the fourth chapter, "Patient Care Platform" . This chapter will cover issues associated with the identification of system requirements and database model. The fifth chapter, "System Implementation" , describes the development of system implementation based on the modelling done in the previous chapter. The sixth chapter, "Evaluation" , describes the evaluation and analysis of the system. It is checked whether the solution is suitable for the purpose for which it was built. Finally, in the "Conclusion" chapter, the results obtained are discussed, the future work identified, and conclusions are drawn about the whole solution.
2 BACKGROUND This chapter is devoted to present the background knowledge necessary to understand the problem described in the last chapter and to appraise the solution that will be proposed and implemented. The basilar concepts and technologies that will be referred along the document will be introduced so that the dissertation is as self-contained as possible. 2.1 web services Web Service is a software service used to communicate between two devices on a network, which implements and provides a set of services. “A Web service is a software system designed to support interoperable machine-to- machine interaction over a network. It has an interface described in a machine-process able format (specifically WSDL). Other systems interact with the Web service in a manner prescribed by its description using SOAP-messages, typically conveyed using HTTP with an XML serialization in conjunction with other Web-related standards. [14] ” Every Web service provides a standard protocol/format for communication, allowing multiple applications to send data to and receive data from the Web service regardless of the programming languages used in those applications. The communication between an application and a Web service happens through an intermediate language, a data transmission and representation format understood by both, such as XML, JSON, CSV, etc. A transport protocol is also used, such as HTTP, SMTP or FTP, but Hypertext Transfer Protocol (HTTP) is the most popular because it is simple, stable and widely deployed. Therefore, for example, when an application needs to send data to a Web service, the data is first serialized into an intermediate language, and then sent to the specific Web service over the Internet according to a transport protocol. When the Web service receives the request, the data is interpreted and deserialized into the Web service’s language, the necessary operations are performed, and a reply is sent to the application. This standardized way of communication allows interoperability between different applications. 6
2.1. Web Services 7 There are various communication protocols, but the most prominent’s are the SOAP protocol and the Representational State Transfer (REST) protocol. The first one uses XML as the data representation format and, generally, HTTP to transport the data. The second is a more recent communication protocol that emerged to simplify access to Web services. It also uses the HTTP protocol and allows the use of several data representation formats, such as JSON (one of the most used), XML, or others. Nowadays, there are several Web services architectures, among them RPC-style Web services architecture and RESTful Web services architecture, the latter being better in scalability, coupling and performance than the first mentioned [15]. 2.1.1RPC Web Services This type of Web service sees the server as a set of functions that can be invoked by clients. SOA (Service Oriented Architecture) is the most used architecture in RPC’s (Remote Procedure Call), and has as the main goal to abstract business services from the application, defining service contracts, and registering service into services repository so as to be queried and shared by the client. The XML-RPC and SOAP communication protocols are the most frequently used in this type of Web services. These Web services are able to meet the need of small-or-medium-scale interoperation and data sharing, but for larger-scale applications RPC-based Web services lose in scalability, complexity and performance. REST Web Services can solve these problems [15]. 2.1.2REST Web Services REST is a hybrid style of Web services architecture that defines a set of architectural constraints to be used for creating Web services. Web services built following the REST architectural style are known as RESTful Web services. Understanding the REST architecture requires an understanding of the definition of resource, representation, and state. A resource can be anything, a physical object or an abstract concept, as long as it is relevant enough to be referenced as a thing in itself, but it is usually something that can be stored in a computer as a stream of bits. A representation is any useful information about the state of a resource, which can have many different representations. In REST there are two types of states. One corresponds to information about a resource, resource state, and the other to information about the path the client went through the application, application state [15].
2.1. Web Services 8 As mentioned above, REST presents a set of architectural constraints that restrict how a server can process and respond to client requests. If any service violates these restrictions, it cannot strictly be referred to as RESTful. These restrictions are described below. •Uniform Interface : There must be a uniform way of interacting with a given server, regardless of the device or application type. Everything has to be a resource, and each has to be identified through only one Uniform Resource Identifier (URI). •Client-server : The client application and the application server must be able to evolve separately, without depending on each other. A client must know only the URIs in order to interact with the server. •Stateless : The server should not store anything regarding the last HTTP request a client made. The necessary state to handle the request is contained within the request itself. Each request is treated as if it were a new request. Because the server does not need to maintain, update or communicate the session status, statelessness enables greater availability. •Cacheable : Each server response should include information on whether or not the sent data can be cached, and if so how long it can be stored on the client-side. If a data request is made and it has been cached, then there is no need to send the request back to the server. Cacheability allows to partially or completely eliminate some client-server interactions, thus improving scalability, performance and resource efficiency. •Layered system : The existence of multiple layers between the client and the end server should not affect the request or the response. A client cannot know whether it is connected directly to the server or an intermediary along the way. The existence of servers as intermediaries can improve system availability by allowing load-balancing and shared caches. •Code on demand[optional] : A server response may contain executable code that the client can execute, e.g., JavaScript within an HTML response. REST uses HTTP methods/verbs to obtain or change data: GET, to obtain one or more resources and can cache the information received; POST, to create a resource that is sent in a request; PUT, to update an already existing resource on the server; DELETE, to delete an already existing resource on the server. The verbs GET, PUT and DELETE entails sending the resource identification in the URI request. The figure 1illustrates the RESTful Web service architecture. The client interacts with the server through a uniform interface based on HTTP verbs.
2.2. JSON 9 Figure 1: RESTful Web services architecture, adopted from [15]. One of the great advantages of REST is its performance. This performance is mainly due to its simplicity, but also its cacheability. As it is based on already existing web standards it does not require additional implementations, avoiding the dependency on a platform. Thus, by using the HTTP protocol in the data exchange, the client and the server do not need to parse the HTTP messages, reducing the processing load on both. Cacheability has a positive impact on performance, as it avoids some unnecessary client-server interactions. As everything is a resource and each resource is uniquely identified by a URI, it is easier to hide a resource by simply not revealing the URI. The use of HTTP verbs allows defining different access permissions to resources. In case a resource is read-only, it is only necessary to reveal the GET method to the client. Thus, the difficulty of implementing security is reduced [ 15 ]. 2.2 json JavaScript Object Notation (JSON) is a data-interchange format that stores information in a structured, organized and logical manner. It is easy for humans to read and write, and easy for machines to parse and generate. It has the advantage of being completely independent of language. These properties of JSON make it an ideal format for communication between applications [16]. AJSON file consists of collections of name/value pairs (realized as an object) and ordered lists of values (realized as an array) which are universal structures used by most languages. Figure 2presents a JSON object, and Figure 3exemplifies a JSON object’s array.
2.4. React 16 (a) Tablet (b) Handset Figure 7: Example of the use of activities and fragments. 2.3.4Android manifest The Android manifest file essentially presents information needed by the operating system to run the application. In this file are declared the components of the application, such as activities, services, broadcast receivers, and content providers. An Android app must request permission to access sensitive user data (such as contacts, SMS, and location) or certain system features (such as the camera and internet access). This file, as well as the hardware and software features required by the application, declare all permissions required for the application to work properly. 2.4 react React is a declarative, efficient, and flexible JavaScript library for building user interfaces or UI components. It allows composing complex UIs from small and isolated pieces of code called components. Each component is independent of each other, has its own logic, and can be reused throughout an application, thereby reducing application development time [ 22 ]. React’s main features are presented below.
2.4. React 17 2.4.1Virtual DOM Document Object Model (DOM) is a programming interface that treats an XML or HTML document as a tree structure where each node is an object representing a part of the document. Web page objects are represented in a DOM document, which is manipulated whenever the state of an object changes. React keeps in memory a lightweight representation of the "real" DOM, called the Virtual DOM (VDOM). When the state of an object changes, the VDOM only changes that object in the real DOM instead of updating all objects [23]. Figure 8: Webpage DOM example. Figure 8illustrates an example of a DOM of a webpage. Considering this figure, when the object state "TEXT:Band Info" changes in the React application, only this element will be updated in the VDOM. Then, the VDOM compares its current state with its previous state and update the real DOM with the differences only, thus avoiding updating all the objects. Using VDOM, React allows web applications to run faster. 2.4.2Components There are two types of components in React, stateful components and stateless components. Before diving into the differences between the two, it is necessary to clarify what "state" is in the context of a React component. State represents data that is normally to show the user or information about the component, subject to change. These changes may occur because the database from which they were obtained was updated, the user modified it, system-generated events, among many other reasons. Whenever there is a change in the status of the component, React will efficiently update and re-render the component [22].
2.4. React 18 A stateful component, defined as a class, can maintain internal state data and thus keep track of changing data. It also features a separate render method for returning JSX on the screen. The stateless component, defined as a function, does not have a state of its own. It simply prints what is passed to it via "props" (similar to function parameters) or always renders the same thing. Although a stateful component provides more features, it is a good practice to implement simple stateless components so they can be reused. A Web application implemented in React usually contains components that need to receive data to function properly. In order to pass data from one component to another, "props" (properties) are used, a React built-in object which stores data. Every component has a predefined set of lifecycle methods, figure 9, through which goes through. A component can be found in one of the following states, mounting, updating or unmounting, which can be thought of as the birth, growth and death of a component, respectively. •render() : It is the only method needed in a class component. Handles the rendering of a component to the UI. The render() function should be pure with no side-effects, meaning that it does not modify component state, it will always return the same output when the same inputs are passed. •componentDidMount(): This method is called as soon as the component is mounted and ready, and is commonly used to trigger data loading from a remote endpoint. •componentDidUpdate() : Is is invoked immediately after updating occurs. The most common use case is updating the DOM in response to prop or state changes. •componentWillUnmount() : This method is invoked immediately before a component is unmounted and destroyed. Once a component instance has been unmounted, it will never be mounted again. If any cleanup actions are needed, they should be done here, such as cancel API calls, or clear any caches in storage.
2.4. React 19 Figure 9: React Lifecycle Methods To demonstrate the use of components let’s consider again the example given previously by the "Encyclopaedia bands" app. Now, let’s consider that it is intended to develop a site where users, through a browser, can consult the information of several bands. Figure 10 illustrates a possible layout of two web pages of this application, one to search for a band and the other to see its information. Web page 10ais divided into three components, one containing the navigation bar (Component A), one for searching (Component B), and one for showing a list of options for selection (Component C). The web page 10bis divided into two fragments, component "Component A" and "Component D", which allows users to see the information of the band they have selected. The ability to reuse components, in this case, "Component A", illustrates one of the main advantages of using React. (a) Search and select a band. (b) Band info. Figure 10: React components usage example
2.5. Node.js 20 2.5 node.js Node.js is an open-source and cross-platform JavaScript runtime environment that executes outside a web browser. It is normally used to build network programs such as Web servers. Runs the V8engine, the core of Google Chrome, outside of the browser, makes Node.js perform well [ 24 ]. It offers a large number of libraries and frameworks for developers to use. Before presenting the main features of Node.js, it is necessary to understand the difference between synchronous and asynchronous computing. When it is said that something is executed synchronously, it means that a task Y can only be executed when a task X is finished. If each of these two tasks runs in different threads, it means that the Y-thread blocks until the X-thread ends. In turn, when something is executed asynchronously, it means that a Y task can be executed before an X task ends. In a simplistic way, synchronous means "dependency" in some way, and asynchronous means "total independence" between tasks. A Node.js app runs in a single process, without creating a new thread for every request. Provides a set of asynchronous I/O primitives in its standard library that prevent JavaScript (JS) code from blocking. Node.js functions are non-blocking, allowing different commands to run in a non-sequential way. The libraries provided by Node.js are generally written using non-blocking paradigms [24]. This set of features allows Node.js to handle numerous concurrent connections with a single server without introducing the burden of managing thread concurrency, which could be a significant source of bugs [ 24 ]. Since Node.js and most front-end technologies (React, Angular, p.e) are written in JavaScript, this allows front-end developers to write the serverside code in addition to the client-side code without the need to learn a different language. 2.6 data warehouse Data Warehouse (DW) is subject-oriented, non-volatile, integrated, time variant collection of data which helps in developing strategic decisions. It is important in statistical analysis, for the extraction of relevant information, the discovery of hidden relationships and patterns in the data. A DW can potentially provide numerous benefits to an organization with quality improvement, and decision support by enabling quick and efficient access to information from legacy systems and linkage to multiple operational data sources [ 25 ]. Over time, it builds a historical record that can be valuable to data scientists and business analysts. Because of these capabilities, a data warehouse can be considered an organization’s “single source of truth" [26].
2.6. Data Warehouse 21 In conventional DW systems, there is a set of data that is stored in Online Transaction Processing (OLTP) systems, which are periodically exported to Online Analytical Processing (OLAP) systems through an Extraction-Transformation-Load (ETL) process. OLTP systems are used to process the data that is generated daily by an organisation’s information systems (e.g., Online banking), and OLAP systems to analyse large volumes of information stored in databases. The DW stores data from a set of data sources on which an ETL process is performed. Tools that query the data can be used on DW, from which the data analysis results, such as reports and dashboards. It could be Query tools, reporting tools, Data mining tools, and others. Figure 11 illustrates the architecture of a data warehouse. Figure 11: DW architecture, adopted from [27] The ETL process of data sources for DW has three steps, Extraction, Transformation and Data Loading. Extraction means understanding, selecting and copying data from data sources into the staging area, an intermediate storage area. If data transformations occur, they are carried out in the staging area so that the performance of the source system is not degraded. The transformation step consists of the changes that are made to the data, such as cleansing the data, deleting useless fields and combining data from different sources. This step aims to improve data quality to bring more value to the business. The loading step involves loading the transformed data into DW and the physical structuring of the data [ 27 ]. The ETL process has to be repeated periodically to keep DW up-to-date. The DW is based on a multidimensional data model that sees the data in the form of a data cube, which allows the information to be modelled and viewed in multiple dimensions. A DW is formed by dimension tables and fact tables. A fact table represents an item, a transaction or a business event and is used to analyze an organization’s business process. The term fact represents a business measure, and each row in a fact table corresponds to a measurement event [ 27 ]. Figure 12 illustrates a fact table that stores the unit quantity and euros sales amount measurements for each product in each sales transaction.
2.6. Data Warehouse 22 Figure 12: Example of a DW fact table, adopted from [27] Each fact tables have two or more foreign keys that connect to the dimension tables’ primary keys. Dimensions are the elements that participate in a fact, i.e. the possible ways of viewing data. A dimension table contains the textual context associated with a business process measurement event. They describe the "who, what, where, when, how, and why" associated with the event [ 27 ]. The figure 13 illustrates a dimension table that stores the product information. Figure 13: Example of a DW dimension table, adopted from [27] The multi-dimensional modelling of a DW can be a star,snowflake or constellation schema [ 27 ]. The star schema consists of a fact table linked to a set of dimension tables and is similar to a star-like structure. This schema is not normalized, allowing only single joins to create the relationship between the fact table and any dimension tables. Normalization means efficiently organizing the data so that all data dependencies are defined, and each table contains minimal redundancies.
2.6. Data Warehouse 23 The snowflake schema is a refining of the star scheme, in which the dimension tables are normalized into smaller dimension tables similar to a snowflake. Although it provides very low-level data redundancy, the query performance is reduced due to the need to joins multiple dimension tables to fetch the data. The constellation schema integrates fact tables sharing different dimension tables, forming a group of stars. Figure 14 illustrates an example of a star scheme to store data on product orders. Figure 14: Star schema example Each fact table record stores the quantity and total price of an order, linking it to a product, supplier, employee, and the instant it was made. This data warehouse permits extracting useful business information, such as which product is most ordered in the summer, which product is least marketed by each supplier and, at which time of the day more orders are placed.
3 PATIENT CARE KIOSKS In this chapter, we will collect and analyze the several studies relevant to this work, mainly those related to kiosks that allow the collection of vital signs through sensors. The research method used is described and, through the results obtained, a general summary of the most relevant studies for this thesis is made. Finally, the results of these studies will be discussed. 3.1 search method 3.1.1Search strategy A literature search was conducted in PubMed, IEEE Xplore, Web of Science, Cochrane Library, ScienceDirect and Scopus, considering only articles published from January 2009 to October 2019. Search terms included ‘hospital kiosks’, ‘public health kiosk’, ‘health kiosk’, ‘healthcare kiosk’, ‘systematic review kiosk’, ‘hospital kiosk and medication’ and ‘urgency kiosk’. The use of Boolean operators among the terms, in addition to the keywords, was a strategy used to obtain more accurate searches. Regarding the choice of the mentioned terms, the keywords were considered, related to kiosks in health area. Publications in newspapers and books were also considered for analysis. 3.1.2Data items The extraction variables taken from each study were: (1) Domain (the process that the kiosk will perform), (2) Area (location of the kiosk), (3) Country (the country where the kiosk was tested), (4) Study period (length of the kiosk test period), (5) System Objective (purpose of the kiosk), (6) Architecture (characteristics of the system architecture), (7) Population (characteristics of the population that intervened in the use of the kiosk), (8) Study parameters (metrics used to evaluate the kiosk) and (9) Results (effects of the application of the kiosk). System architecture refers to the type of system implemented, description of the biosensors and their connectivity, use and presence of touchscreen. The population variable contains 24
3.2. Search results 25 the number of participants who used the kiosk and their average age or range of ages. It also includes the presence of support in the use of the kiosk or patient referral. 3.2 search results Assistance in the triage process, health diagnoses and replacement of face-to-face consultations are examples of domains where kiosks are applied [ 12 ]. The kiosks in the triage domain work as a pre-consultation tool with the objective of giving healthcare professionals more time to assess a larger number of patients [ 11 ]. Concerning diagnostic systems, they were designed to facilitate the diagnosis of common diseases by performing a set of pre-established physiologic and mental tests. Data obtained is then compared with the information available in the kiosk workstation [ 28 , 29 ]. Other alternatives to the location of this application would be in public places, for population triage or control, as a form of health surveillance of elderly communities [ 11 ]. Particularly in these places with difficulties in electricity, transportation, communication and shortage of doctors, medicines and other resources, this technology has been increasingly sought after, replacing the face-to-face consultation. After analysis and selection of articles, eight studies were obtained. Tables 1and 2contain a summary of these studies for later discussion. 3.2.1Study characteristics In all 8studies, 4were considered from the triage domain and 4from face-to-face consultation replacement. Of all the associated countries, 4belong to America, 2to Asia, 2to Europe and 1to Oceania. Regarding the area, 5studies were conducted in health areas (Hospital, Polyclinic, Clinic), and the remaining outside this context (Community room, Rest Homes, Private Apartments, University, Villages). The studies period varies between 8weeks and 12 months. The total number of participants was 2298 and the mean age of these ranged from 12 to 94 years. Most kiosks provided assistance. The main objective of the system in the various studies is to measure vital signs and extract health information from patients according to the domain applied. The system’s architecture type varies between Web App and Software. Most studies mentioned the biosensors (height, weight, blood pressure, pulse oximeter, pulse rate, glucometer and heart rate) present and their type of connectivity at kiosks. The use of touchscreen was predominant in most studies. The study parameters identified in the studies meet the evaluation of the effective of the kiosks. Authors of the studies were contacted to obtain missing information or confirmation of data extracted for the systematic review. In [ 30 ], the age range was clarified by contact with the author, since it was not mentioned in the article.
3.3. Discussion 32 visits and the flexibility of alternative health service options [13,33]. The kiosk may be a feasible care option; however, the studies [ 13 , 31 ] presents a low sample size, which contributes to limit the generalization of the results. In the test phase of a kiosk, one should have a heterogeneous and high sample size to obtain a study that provides well-founded evidence. In the study [ 30 ], the Brazilian patients do not need assistance makes the results of the usability of the kiosk more reliable. The identification time at the self-control kiosk was 13.6minutes faster, half the time that the standard procedure performed by health professionals would take, possibly avoiding high waiting times caused by ED crowding. Collecting the main complaint in this identification process allows nurses to prioritize triage, being able to select the patients for triage faster and more accurately [ 32 ]. The use of kiosks allowed more time for physicians to be allocated to the treatment of other patients since the system allowed performing the procedures, which would normally be performed by health professionals [ 13 , 35 ]. By utilizing a kiosk for taking blood pressure and performing other activities means the physician can spend more time talking with the patient [ 37 ], and the nurses get another 1.5minutes per patient to spend preparing documents and educational materials as well as handling telephone encounters and voicemails [ 35 ]. The participants that used citizen card took less 5.2seconds to go through the process of identification, than while those who manually entered the data, avoiding minutes-long form-filling [11]. Kiosk usage time was not highly time-consuming, which is beneficial considering the possible use cases [ 11 ]. The time of use in [ 11 ] was slightly shorter than study [ 30 ] since users had a technological background. In relation to study [ 34 ], the time of use was the longest, due to the collection of cognitive evaluation data performed at the kiosk. In addition, the study required patients to be enrolled for a period of two months, which made it more conducive to withdrawals.
4 PATIENT CARE PLATFORM This chapter presents the conceptualised system solution. First, the different kiosk functional and non-functional requirements are presented, followed by the web platform requirements used by physicians to consult the data collected at the kiosk. Based on the identified requirements, the proposed solution architecture is described as well as its components. The conceptual database model, where the data from each clinical register is stored, is explained next. 4.1 system requirements In this section, the system requirements will be presented sub-divided into kiosk requirements and web platform requirements. 4.1.1Kiosk Requirements In order to make the scope of the kiosk more perceptible, a use case diagram was drawn. This diagram explains which actors in the system, as well as which functionalities the system should have. 33
4.1. System requirements 34 Figure 15: Kiosk use-case diagram Use cases •Register identification data. - A patient must register the personal information. This registration must be carried out via a webcam which allows the data to be scanned and extracted from the citizen card. From the citizen card must be extracted the name, birth date, civil id number, profile photo and nationality. •Register past medical history - A patient manually registers the past medical history. •Register usual medication - A patient must manually register the usual medication. For each medicine, the patient must register the dose, the administration route, the frequency and the times of the day in which it is administered. •Register main complaint - A patient should manually registers the main complaint felt at the moment. The system must explore the main complaint through a set of questions concerning symptoms, relief factors and aggravating factors. •Gather biometric data - A patient should collect the biometric data using sensors. •End session - A patient may end the kiosk session at any time. Based on these use cases, the several functional and non-functional requirements of the kiosk were identified. These are presented in the Appendix section A.1.
4.1. System requirements 35 4.1.2Web Platform Requirements A use case diagram was designed to better present the web platform’s scope. Figure 16: Web Platform use-case diagram It should be pointed out that in figure 16 the use cases concerning the beginning and end of the session in the application were omitted, these functionalities being available to all users of the web platform. Use cases •Consult the patient’s clinical data - A physician can consult the patient’s clinical data collected at the kiosk. •Register diagnosis - A physician should register the diagnosis of patients. •Copy patient’s clinical register information - A physician should copy all patient register information, or parts of it. •Patient Search - The physician should be able to search for a specific patient. Based on these use cases, the various functional and non-functional requirements of the web platform were identified. These are presented in the Appendix section B.1.
4.2. System architecture 36 4.2 system architecture The idealized system architecture for the solution is based on client-server basics and was developed after the system specifications were defined. The architecture consists of an Android client and a Web client, both communicating with the same back-end server system. The back-end features three web services, which perform operations on the same database, and a Firebase server. Figure 17 depicts the different components of the architecture. Figure 17: System architecture Additionally, a data warehouse is set up to store patients’ clinical register data in a consolidated format for the discovery of hidden relationships and patterns in the data. This data warehouse should respond to the indicators and queries defined by Jacinta Santos. The data warehouse implementation can be found in Section 5.6. 4.2.1Android client The Android client allows patients to interact with the application and record their clinical condition. Figure 18 illustrates the architecture of the android application through a package diagram.
4.2. System architecture 37 Figure 18: Android architecture The "Presentation" layer contains all the activities and fragments of the application. The data collected through the sensors will be received and processed by the application activities and sent to the back-end server. All the logic involving access to the application database data was implemented on controllers in the "Application Logic" layer. The "API" component contains the several interfaces of each of the three web services used by the activities to make requests to the web services. In the "Application Logic" layer, the component "Business entities" stores object that is either created, updated or used during the course of the application, p.e, Medicine and MainComplaint. The "Data" layer is responsible for performing data operations on the application’s SQLite database (Local data source). The "Data access" component stores all the functions that permit interaction with the database. All data models are in the "Data models" component. Each of these layers deals with specific aspects of an application, providing a better organization of the code, offering an easier reading or modification of the code. 4.2.2Web client The web application allows physicians to visualise data from patients’ clinical registers. The architecture follows the Container-component pattern, where a container does data fetching and then renders it’s in the corresponding sub-component.
4.2. System architecture 38 4.2.3Web Services The correct performance of both clients requires that Web services are connected to the Internet to receive the clients’ requests. The fact that the Web services depend on this connectivity can compromise the availability of their services by making Web and Android applications inoperable. Client programming logic will be performed to decrease Web service dependency. The usual medication collection, past medical history and main complaint are the main features provided by the Android application. The web client will mostly perform data consultation operations. With only one Web service, it is possible to respond to the different requests made by the clients, but this can overload the Web service, causing an increase in the response time to requests. In order to avoid this problem, three Web services were created, Web Service A and C take requests from the android client and Web Service B takes requests from the web client. Web Service A takes requests for usual medication and past medical history, Web Service C handle requests for main complaints, and Web Service B takes all requests from the web client. This way, each Web service is accountable for responding to specific client requests allowing for better system performance. The number of users may initially be reduced, but this number may increase significantly in the future, requiring system changes. With three Web services, the system is easier to scale, and only those Web services that are overloaded with requests need to be replicated. Figure 19 shows a package diagram with the architecture of each web service. Figure 19: Web service architecture
4.2. System architecture 39 The "Authentication" component stores the files of the authentication method that allows verifying each request to the web service. The "Routes" component is responsible for defining all the routes of the web service and assigning a controller to each one. Each route has a middleware that verifies the authenticity of each request before calling the corresponding controller. The "Controller" component contains controllers responsible for invokes the appropriate action to perform into the database. The "Models" component stores the database models that the "Data access layer" component uses to interact with the database Each individual component is self-contained and unaware of who might be using it, leading to low coupling. Components in a loosely coupled system can be replaced with alternative implementations that provide the same services. Each component of the architecture and its files have distinct responsibilities, enhancing the system’s modularity and scalability. 4.2.4Firebase Cloud Storage and Realtime Database are the only Firebase services used in this solution. The Cloud storage service is used to store the patient’s citizen card profile images, and the Realtime Database service to store the patient clicks’ coordinates. Cloud Storage for Firebase is a powerful, simple, and cost-effective object storage service, and lets upload and share user generated content, such as images and video. The data is stored in a Google Cloud Storage bucket, an exabyte scale object storage solution with high availability and global redundancy. Cloud Storage lets securely upload these files directly from mobile devices and web browsers, handling spotty networks with ease. If the network connection is poor, the client is able to retry the operation right where it left off, saving users time and bandwidth [38]. Realtime Database service is a database hosted in the cloud. This database allows to store and synchronize data in JSON with the Firebase NoSQL cloud database. They are synchronized in all clients, in real-time, and remain available when the application is offline [39]. 4.2.5Database The database stores all the data from patients’ clinical registers. The only components that will interact with this database are the three Web services previously presented. The database is a relational database as the data do not change frequently and consistency must be ensured whenever a new clinical register is stored.
4.3. Database Conceptual Model 40 4.3 database conceptual model For designing the database, the main steps of a complete database project were followed. The Conceptual model is covered in this section, and the Physical data model in Chapter 5. The objective of database was defined, bearing in mind the project functional and nonfunctional requirements: The database shall store information concerning the clinical register and diagnosis of each patient, ensuring total data integrity. Each clinical register must include health problems, usual medication, biometric data, main complaint, and relief factors, aggravation factors and symptoms of it. Indicators to evaluate the system usability and the digital skills of each patient should also be stored in the database. Looking again at the above-mentioned database goal, the following entities were identified: Clinical Register, Biometric Data, Diagnosis, Medical History, Medicine, Patient, Main Complaint, Relief Factor, Symptom and Aggravation Factor. Considering each entity and what it symbolizes in the context of the problem, the attributes that characterize them were identified. After the entities, relationships and attributes were identified, the Entity- Relationship model was constructed. Figure 20 illustrates the graphic representation of the database conceptual model. Figure 20: Conceptual model
4.3. Database Conceptual Model 41 Some attributes and entities were created to assess the usability of the kiosk. The "kioskUsageTime" and "interfaceTime" attributes represent the duration of a complete kiosk session and the time of the first visit to each interface, respectively. The "Technological Skills" entity was created to store information that permits to evaluate the digital skills of each patient. The "Technological Skills" entity stores the answers given to a set of specific questions whose analysis, performed by Jacinta Santos, will allow the system to adapt the interface to each patient’s digital skills. The "picture" attribute, in the "Patient" table, stores the link to the citizen card profile picture of each patient.
5.3. Web Services 48 5.3 web services The Web services’ implementation is presented in this section, the three being similar in how they develop. The Web services follow the RESTful architecture, i.e., everything is considered a resource, and JSON is used as the data transmission format between the client and Web services. Each Web service has its API that gives access to its resources and responds to specific requests from specific clients. Android and Web clients only make HTTP GET and POST requests, as they only need to get resources and create resources. Visual Studio Code was the tool used for the development since it offers features that allow simplifying and accelerate the development process. To implement each web service was used the technologies stack Node.js,Express.js,Sequelize. Express is a minimal and flexible Node.js framework with utility methods and HTTP middleware, creating a robust API quickly and easily. Sequelize is a promise-based Objectrelational mapping (ORM) for Node.js. It supports the dialects PostgreSQL, MySQL, SQLite and MSSQL and features solid transaction support, relations, read replication and more. The used libraries will be mentioned throughout this section. 5.3.1Authentication The three Web services contain endpoints that allow access to personal data or patient clinical register information. Improper access to this information may have serious consequences for the patient and may lead to theft and destruction of private data, or the theft of the patient’s identity. It is necessary to ensure that only authorised entities have access to Web services resources in order to avoid security breaches. Blocking unauthorized access plays a crucial role in preventing data breaches. Requests from the Android client and the Web client are the only ones that the Web services must accept, and all others must be ignored. Before presenting the authentication method implemented, it is important to note that Authentication is different from Authorization, despite being used interchangeably many times. Authentication is the process of verifying who a user is, while authorization is the process of verifying what they have access to. Authentication is usually done before authorization. Token Based Authentication Token based authentication was the authentication method implemented. A token is a piece of encrypted data, which when combined with the correct tokenization system becomes a vital player in securing an application. This authentication method works by ensuring that each request to a server is accompanied by a signed token which the server verifies
5.3. Web Services 49 for authenticity and only then responds to the request. In Token based authentication, the client sends its credentials (e.g., mail and password) to the server and the server replies with a token. Since then, instead of sending the credentials to the server along with each new request, the client only sends the token for authentication. Each token is self-contained and contains all the information it needs for authentication, which gives the tokens the stateless feature. This feature is great for scalability as it frees the server from having to store session state. The token has an associated lifetime and expires after a set amount of time, forcing a client to authenticate again. JSON Web Token There are several types of tokens the one used in the implementation was the JSON Web Token. It is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between applications as a JSON object. This information can be verified and trusted because it is digitally signed. The JSON Web Token consists of three parts: Header,Payload and Signature. Header is the first part of JWT and consists of two parts: the type of the token (typ), which is JWT, and the signing algorithm being used (alg), usually HMAC SHA256 or RSA. The HMAC SHA256 was used for the implementation. Figure 26: JWT Header The payload is the second part of JWT, which contains the claims. Claims are the statements that are sent, typically statements about the authenticated user and additional data. As Web and Android application users do not need to register to access the functionalities, it is not possible to obtain information that uniquely identifies each user, such as username or email, for example. As an alternative, the payload illustrated in figure 27 was implemented. This payload contains two objects, tokenPass and tokenUser, each one’s value is pre-stabilised. Therefore, for a request to be accepted by the server, the attached token must contain the pre-established values of these fields. Figure 27: JWT Payload
5.3. Web Services 50 The Signature part is the last part of the JWT. To create the signature part it is necessary the encoded header, the encoded payload, a secret, and the algorithm specified in the header. For the HMAC SHA256 algorithm, the signature is generated through the formula shown in figure 28a. The result of this formula will be a JWT token, as shown in figure 28b. (a) JWT signature (b) JWT token Figure 28: JWT signature and JWT token This signature makes it possible to verify the integrity of the token to ensure that the message has not been modified along the way. This prevents man-in-the-middle attacks, where an attacker could intercept a request and modify its content. The secret plays a crucial role because only those in its possession can create, modify and validate a token. Web services will be the only parties to have access to the secret. All generated tokens have a maximum expiration time of twelve hours. The library jsonwebtoken was used to implement these features of the JWT token. This library has a set of pre-defined methods and callbacks, which can speed up the JWT token implementation. The sequence diagrams of the figures 29 and 30 summarise the authentication process carried out for each request performed to each web service. Figure 29 illustrates the sequence of steps that are performed for a client to request and receive a token, and figure 30 the sequence of steps undertaken to authenticate each request. Figure 29: Sequence diagram illustrating the interactions between the client and the Web service in order to obtain a token
5.3. Web Services 51 The steps in figure 29 are performed whenever a client does not have a token store, or the token is not valid (the 12 hour period has expired, p.e.). When a client receives the token, the client will store it for future use in new requests. In the Web client case, the token is stored in the local browser storage, and in the Android client case, it is stored in memory. When a client already has a valid token stored, the steps shown in the sequence diagram of figure 30 are performed for each request. Figure 30: Sequence diagram showing the interactions between the client and the Web service performing a request Figure 30 shows the sequence of events that are done by each Web service to respond to each request. The diagram is being applied to the request to get the list of all medicines, but it can also be applied to any other request. The token is sent to each Web service API via the HTTP Authorization header of each request. If the token is not valid an error message with response code 401 is sent to the client. The 401 Unauthorized Error is an HTTP response status code that indicates that a request has not been accepted because the authentication credentials are not valid to obtain an intended resource.
5.3. Web Services 52 5.3.2Web service A The Web service deals with part of the android client’s requests. Respond to requests related to the patient’s usual medication and medical history is the main responsibility of this Web service. All requests are to consume Web service resources. Tables 3and 4shows the API endpoints that allow interaction with the Web service A. HTTP method Resource URI Response GET /medicine/ Returns all medicines [{"medicineID":1,"medicineName":"Zoloft"}, {"medicineID":2,"medicineName":"Brufen"}, ... ] GET /administrationRoute/ Returns all administration routes [{"administrationRouteID":1,"administration Route":"Oral"},{"administrationRouteID":2, "administrationRoute":"Intravenous"}, ...] GET /medicineAdministration/ Returns all the associations between each medicine and its administration routes [{"medicineFK":2,"administrationRouteFK":1}, {"medicineFK":2,"administrationRouteFK":2}, {"medicineFK":3, "administrationRouteFK":}, ...] GET /healthProblem/ Returns all health problems [{"healthProblemID":1,"nameHealthProblem": "Asthma"},{"healthProblemID":2,"nameHealth Problem":"Tuberculosis" }, ...] Table 3Web Service API A description
5.3. Web Services 53 Table 4Web Service API A description [continuation] HTTP method Resource URI Response GET /answerType/ Returns all questions types name [{"answerTypeID":1,"answerType":"Relief factor"},{"answerTypeID":2,"answerType":"Aggrava tion factor"}, ...] GET /frequency/ Returns all medicines taking frequencies [{"frequencyID":1,"frequencyDescription": "Everyday"},{"frequencyID":2, "frequencyDescription": "3times a week"}, ...] GET /interfaceName/ Returns the identification name of all Android application interfaces [{"interfaceNameID":1,"interfaceName":"Healt problems"},{"interfaceNameID":2, "interface- Name":"MainComplaint"}, ...] GET /answerName/ Returns all answer options [{"answerNameID":1,"answerName":"Yes"}, {"answerNameID":2,"answerName":"No"}, {"answer- NameID":3,"answeName":"Less than 7days"}, ... ] GET /login/ Allows authentication on the Web service, returns a JWT token {"token":"eyJhbGciOiJIUzI1NiIsInR5cCI.eyJzdW IiOiIxMjM0NTY3ODkwIwibmFtZSI6IkpvaG4g RG9lIiIyfQ.SflKxwR4fwpMeJf36POk6y JV_adQssw5c"} All resources are represented by a single URI. The /login/ URI is the only one that is available without the need for the Android client to be authenticated. 5.3.3Web service B The Web service B only handles requests from the Web client. Almost all operations performed by the Web service are data queries on patients’ clinical registers. The only POST operation is triggered when the physician submits the diagnosis of each patient. Most requests involve joining data from different tables in the database, which implies further processing by the database server. Tables 5and 6presents the API endpoints that the Web client consumes to provide the patient’s clinical register data to the physicians.
5.3. Web Services 54 HTTP method Resource URI Response GET /patients?patient={patientID} Return a specific patient {"patientID":45,"name":"Manuel Cunha","healthNumber":"00000001","bornDate": "1970-10-10","nationality":"Portugal","picture": "https://firebasestorage.googleapis.com/nnn", "age":50,"sex":’M’,responsesFK:45} GET /measurements?measurement= {measurementID} Returns a specific measurement {"measurementID":45,"oxygenSaturationBlood": 96,"heartRate":86,"sys":108,"dis":69,"sendMail":’N’, "sendSMS":’S’} GET /clinicalRegisters/ Returns all clinical registers not yet diagnosed [{"clinicalRegisterID":45,"patientID":45,"name": "Manuel Cunha","healthNumber":"00000001","bornDate": "1970-10-10","nationality":"Portugal","picture": "https://firebasestorage.googleapis.com/nnn", "age":50,"sex":’M’,responsesFK:45}, ... ] GET /clinicalRegisters/register/register= {clinicalRegisterID} Returns the data from a specific clinical register {"patientID":45,"name":"Manuel Cunha","healthNumber":"00000001","bornDate": "1970-10-10","nationality":"Portugal","picture": "https://firebasestorage.googleapis.com/nnn", "age":50,"sex":’M’,responsesFK:45, "nameMainComplaint":"Muscular pain","measurementFK":45,"name":"Chest"} GET /clinicalRegisters/healthProblems? clinicalRegister={clinicalRegisterID} Returns health problems associated with a clinical register [{"nameHealthProblem":"Asthma"}, {"name- HealthProblem":"Tuberculosis"}, {"nameHealth- Problem":"Anxiety"}] GET /clinicalRegisters/usualMedication? clinicalRegister={clinicalRegisterID} Returns the usual medication associated with a clinical register [{"medicineName":"Cloxam","dayTime": "Breakfast","medicineDose":1,"activeSubstance": "Cloxazolam","frequencyDescription":"Every day","administrationRoute":"Oral"}, ...] Table 5Web Service B API Description All resources are represented by a single URI. The /login/ URI is the only one that is available without the need for the Web client to be authenticated.
5.3. Web Services 55 Table 6Web Service B API Description [continuation] HTTP method Resource URI Response GET /login/ Allows authentication on the Web service, returns a JWT token {"token":"eyJhbGciOiJIUzI1NiIsInR5cCI.eyJzdW IiOiIxMjM0NTY3ODkwIwibmFtZSI6IkpvaG4g RG9lIiIyfQ.SflKxwR4fwpMeJf36POk6y JV_adQssw5c"} POST /diagnosis?diagnosis={diagnosisID} &clinicalRegister={clinicalRegisterID} Records a patient’s diagnosis. The diagnosis name is already stored in the database {"Inserted"} 500, Internal Server Error, Erro ao registar o diagnóstico POST /diagnosis/newDiagnosis?diagnosis Name={name}&clinicalRegister= {clinicalRegisterID} Records a patient’s diagnosis. The diagnosis name is not stored in the database {"Inserted"} 500, Internal Server Error, Erro ao registar o diagnóstico In the diagnostic register request, if an error occurs during the request processing, the client will receive an error code 500 and description, as shown in the table. 5.3.4Web service C The Web service C handles the remaining requests that the Android client performs. This Web service allows storing the data that each patient enters in the kiosk. The remaining requests are for query main complaint data. Table 7shows the API endpoints that allow interaction with the Web service C.
5.3. Web Services 56 HTTP method Resource URI Response GET /mainComplaint/ Returns all main complaints [{"mainComplaintID":1,"nameMainComplaint": "Muscular pain","newInsert":’N’},{"mainComplaintID":2, "nameMainComplaint": "Headache","newInsert":’N’}, ...] GET /mainComplaintAggravationFactor/ Returns the aggravating factors associated with each main complaint [{"mainComplaintAggravationFK":1,"aggravation QuestionFK":27},{"mainComplaintAggravation FK":1,"aggravationQuestionFK":28} ...] GET /mainComplaintBodyPart/ Returns all body parts associated with each main complaint [{"mainComplaintFK":1,"bodyPartFK":1}, {"mainComplaintFK":1,"bodyPartFK":2}, ...] GET /mainComplaintReliefFactor/ Returns all the relief factors associated with each main complaint [{"mainComplaintReliefFK":1,"reliefQuestionFK": 20},{"mainComplaintReliefFK":1, "reliefQuestionFK":21}, ...] GET /mainComplaintSymptomQuestion/ Returns all symptoms associated with each main complaint [{"mainComplaintFK":1,"symptomQuestionFK": 4},{"mainComplaintFK":1,"symptomQuestionFK":5}, ...] GET /question/ Return all questions [{"questionID":1,"question":"When did the complaint begin?","description":null}, {"questionID":2,"question":"Do you feel intense pain overnight?","description":"Intense pain is a pain that"}, ...] GET /login/ Allows authentication on the Web service, returns a JWT token {"token":"eyJhbGciOiJIUzI1NiIsInR5cCI.eyJzdW IiOiIxMjM0NTY3ODkwIwibmFtZSI6IkpvaG4g RG9lIiIyfQ.SflKxwR4fwpMeJf36POk6y JV_adQssw5c"} POST /saveInfos/ Allows to store the information that the patient registered in the kiosk {"Transaction has been committed."} {"Transaction has been rolled back."} Table 7Web Service API C Description All resources are represented by a single URI. The /login/ URI is the only one that is available without the need for the Android client to be authenticated.
5.4. Android application 57 The response to the POST /saveInfos/ request indicates whether the data has been committed to the database or rolled back. 5.4 android application The Android application was developed using the Android Studio IDE. The application aims to collect and store a set of specific information on each patient’s clinical condition for further access by physicians. This set of information can be broken down into, personal information, medical history, usual medication, main complaint, and biometric data. The Visiomed BluethoodLE framework provided by BewellConnect is used to search, connect and transmit data via BLE. The features of this application are implemented in the Java programming language. During the Master’s work period, two Android application prototypes were implemented. The first prototype aimed to test the first user interface designed and to identify difficulties and problems using the sensors. The tests of this prototype provided a set of relevant findings taken into account for the implementation of the second prototype. The results of these tests and their discussion can be seen in Section 6.1. In this section, the implementation of each prototype is presented. 5.4.1First prototype The main objective of this version is to gather a set of indicators that, after analysis, allow the identification of difficulties experienced by users whilst interacting with the application. This version was implemented bearing in mind that no third party system’s needs to access the data from the clinical registers. The data from each clinical register is processed and stored in the application itself, unlike in the second version, where there is a back-end system that processes and stores the data for later access by the web client. The architecture of the application is presented in Fig. 31, depicting a built-in android application that communicate with three biometric devices.
5.4. Android application 64 (a) Medicines number dialog (b) Medicine activity Figure 37: First version, medicine interfaces The next two activities are related to the main complaint. Each activity contains a set of main complaints that the patient can choose (fig. 38a). If none of these main complaints is the one the patient feels, the patient registers the new main complaint through a dialog (fig. 38b). The choice of one of the main complaints provided by the system or the registration of a new one has an impact on the activities launched next. The system only has symptoms, relief, and aggravation factors associated with the pre-populated main complaints. If a new complaint is entered, the patient goes directly to the activities of the biometric sensors as it is not possible to explore the new main complaint. (a) Main complaint activity (b) Other main complaint dialog Figure 38: First version, main complaint interfaces
5.4. Android application 65 The exploration of the main complaint takes place in three activities. The first activity is divided into two fragments and performs a set of questions about symptoms that the patient may have felt (fig. 39a). The fragment on the left is responsible for asking the questions and dealing with the answers. The fragment on the right provides descriptions of the questions, similar to what happens in the fragment present in the health problem activities. The next two activities are related to relief and aggravation factors. Both will expose a set of factors that may or may not be selected by the patient (fig. 39b). (a) Symptoms activity (b) Relief factors activity Figure 39: First version, symptoms and relief factors interfaces The next activities allow the measurement of vital signs (fig. 40a,40b,41a). Before each activity, an instructional video is shown illustrating the various steps the patient must follow. All the activities present an image with the default values and conditions of alert so that the patient can analyse the values obtained in each measurement. Whenever an error occurs, the UI displays a dialog box with information that the patient must follow to prevent it from happening again. (a) Oximeter activiy (b) Temperature activity Figure 40: First version, oximeter and temperature interfaces
5.4. Android application 66 The patient was allowed to receive the measurement values by e-mail, although it was not necessary for clinical registration. After the last measurement, the blood pressure measurement, the patient indicates in a dialog the target e-mail (fig. 41b). The e-mail is sent asynchronously through Gmail’s SMTP (Simple Mail Transfer Protocol) server. The primary purpose of this server is to send, receive, and/or relay outgoing mail between e-mail senders and receivers. An e-mail from Gmail was created for the project and defined as the sender of all e-mails. (a) Blood pressure activity (b) Send email dialog Figure 41: First version, blood pressure interface Figure 42: First version, final interface The last activity, FinalActivity, marks the end of the session and will stay on the screen for 15 seconds (fig. 42). During this time a message is displayed indicating that the patient should go to the waiting room and wait there for their turn. In the background occurs the storage of data that is in memory into the database. When reached the 15 seconds limit, the data in memory is deleted, and the application launches the MainActivity activity again so another patient can start a new session.
5.4. Android application 67 5.4.2Second prototype Observations obtained during the testing phase of the first prototype prove that the development of a new version of the application is reasonable. The user interface was adapted to a larger screen, the data storage changed, and the process of searching, connecting and transmitting sensor data is the same as in the first prototype. This version was implemented taking into account that the data will be accessed by external entities, in this case, the web clients. The storage of the data will be on a back-end server that is also accessed by the web client, as explained in Section 4.2. All clicks made by the patient on each activity will also be stored to better evaluate the application’s usability. The application will communicate with the back-end server through the A and C Web service’s APIs. Data storage During each session, the data entered by patients are stored in memory to allow quick access throughout the session, and their storage is performed only in the last activity, as in the first version. However, in this version, the data are stored in the back-end server database. The sequence diagram in figure 43 illustrates the data storage process. Figure 43: Sequence diagram illustrating the data storage process of the second version of the android application
5.4. Android application 68 To prevent data loss due to lack of internet connectivity, the application will store the patient’s clinical register data in its database before sending it to the server. The clinical register data will be deleted from this database only after the application receives the acknowledgement from the server. This way, each patient’s clinical register is not lost if the application has no internet or has lost its connection during sending. The data is stored by two threads, one of which is responsible for sending the clinical register data to the web service C, and the other is responsible for sending the session click’s history to Firebase service. Whenever a clinical register is sent, possible clinical registrations from other kiosk sessions that have not been registered in the server database are also sent. The clinical registers are sent to the Web service C asynchronously using the Retrofit library. Retrofit is type-safe REST client for Android and Java which aims to make it easier to consume RESTful web services. Retrofit performs and handles a request execution in a separated thread and forces to implement a Callback that is executed once the request finishes, not blocking the main thread. Each request response will dictate whether it is possible to delete the sent clinical register data from the application database. In parallel, the session click history is sent to the Firebase Realtime Database service. This data is not previously stored in the application database because Firebase itself resends any writes when network connectivity is restored. Database As in the previous version, an SQLite database was developed to store each clinical register data in the application. This database will also store all medicines, health problems, main complaints, symptoms, and relief and aggravation factors. The application could make requests to the back-end server during the kiosk session to obtain any of these data, but internet connectivity problems or a weak one would compromise the response to requests. Even in the case of a stable connection, the response time to the requests suffers from the data serializations that have to be performed to exchange data between the several back-end server components. Alternatively, the application will request this data from the back-end server the first time the application is launched and insert it into its database. Thus, whenever the application needs any of this data it only needs to query its database. Fig44 illustrates the SQLite database present in the android application.
5.4. Android application 69 Figure 44: SQLite database of the second Android application prototype The database contains the same tables and attributes as the back-end server database, except the tables Diagnosis,ActiveSubstance and ActiveSubstanceMedicine. These three tables are only operated by the web client and do not need to be stored in the application database. Application Flowchart The application contains eleven activities in total, and all except SplashActivity,MainActivity and FinalActivity present a progress bar that provides constant information to patients about their progress in the overall clinical register process, allowing them to envision and estimate the end of the kiosk session. As in the first version, the activities will contain buttons that allow the patient to navigate between activities and end session. When the patient ends the session, the data entered so far will not be sent to the back-end server to be stored, only deleted from memory. The SplashActivity activity is first to be launched (fig. 45a). This activity is responsible for the process of populating the application database. This process starts with the verification of the application’s internet connection, followed by the request of a token to the back-end server. Once obtained the token, the application will launch a set of asynchronous GET requests to the endpoints of the Web services A and C APIs that provide the data. When all requests return the requested data, the data is stored in the application database and the MainActivity activity is launched. The MainActivity activity allows the patient to start the clinical register session, accept or decline the privacy policy, and answer the questions about digital skills (fig. 45b).
5.4. Android application 70 (a) SplashActivity (b) MainActivity Figure 45: Second version, main activity interface Once the privacy policy consent is granted, the activity CCdataActivity is launched, which allows the collection of the patient’s personal data (fig. 46). Unlike the first version, where personal data are entered by the patient, the data will be extracted from the patient’s citizen card by the application via Webcam. For this, the patient must move the front of the citizen card closer to the webcam. The application will scan and extract the following data from the citizen card, first name, last name, gender, date of birth, age, nationality, citizen card number, profile photo and card front image. The data extraction process was implemented using the Regula Document Reader framework provided by Regula. This framework allows scanning and extracting data from identity documents using machine learning techniques. The extraction process is done entirely on-device, meaning that personal information never touches a third-party server. The Document Reader features a simple yet powerful interface guiding users step-by-step through the scanning process. This form of extraction avoid minutes-long form-filling. All personal data is stored in memory during session, except the profile photo and the front image of the citizen card, which are sent in a asynchronously request to Firebase to be stored in Google Cloud Storage. The answer to this request contains the URI of the profile photo, which is kept in memory to be sent during the data storage process.
5.4. Android application 71 Figure 46: Second version, personal information interface Next activity, MedicalHistoryActivity, is launched as soon as the extracted data is stored in memory. This activity will contain on the left a fragment responsible for presenting a list of health problems. All health problems are shown only in this activity, and not over several activities as in the first version. The insertion of new health problems is done directly in the activity through a text field. All activities from this one will contain on the right side a fragment that allows the patient to consult and edit the responses given throughout the session. This fragment accesses the data in memory that the patient has entered so far, processes it and shows it to the patient. When the patient clicks on a question’s edit button, the application directs the patient to the activity in which the question is performed to make the change. Figure 47: Second version, health problems interface
5.4. Android application 72 In the next activity, QuestionMedicineActivity, is questioned whether the patient takes any usual medication or not (fig. 48a). If not, it goes directly to the main complaint register else the activity MedicinesActivity is launched, in which the patient indicates the name of the medicines (fig. 37b). The patient enters as many medicines as desired without being limited to a maximum number. To assist the patient in writing the medicines’ names a fragment was implemented which receives the letters as the patient inserts them in a text filed, and provides a list with all the medicines’ names that contain those letters as a substring. The list contains a set of checkboxes with medicine names that could be selected. (a) QuestionMedicineActivity (b) MedicinesActivity Figure 48: Second version, medicines names interface In the activity MedicineInfosActivity the patient is asked to insert the dose, frequency, periods of the day of taking, and administration route for each medication indicated in the previous activity (fig. 49a). A fragment was implemented to collect this information for a medicine. The activity will create an instance of this fragment for each registered medicine. The periods of the day images were changed to more representative ones, and there was the addition of the "bedtime" period of the day (fig. 49b). The patient is presented with a set of dose frequencies to select one and is asked for the administration route if the medicine has several.
5.4. Android application 73 (a) MedicineInfosActivity (b) MedicineInfosActivity continuation Figure 49: Second version, medicines infos interface The MainComplaintActivity is the next activity to be launched allowing the patient to register the main complaint (fig 50b). A fragment was implemented to allow patients to select the main complaint from an illustration of the human body to avoid the massive set of buttons with main complaint names from the first version. The illustration is displayed in two images (front and back of the human body), and a male or female illustration body is shown according to the gender of the patient. The patient starts by selecting the human body area associated with discomfort and a dialog with the main complaints associated only with the chosen area is presented. The patient selects one of the complaints provided or writes a new main complaint in the text field of the dialog. (a) Clickable areas (b) MainComplaintActivity Figure 50: Second version, main complaint interface Several clickable areas were defined in each of the images to make the association between each area of the body and the main complaints, using the library ClickableAreasImages. This library allows a clickable area of an image to be defined from a point’s coordinates and a width and length from the point, and assign an object which is checked when the area is touched.
5.5. Web application 80 Figure 59: SearchInput component The list is filtered as the physician enters the name or citizen card number into the SearchInput componente, figure 59, and only the patients with the name or citizen card number written as sub-string are displayed. When the physician clicks on a patient, the application sends the patient’s id to the PatientData page, which shows the patient’s clinical register data. 5.5.3PatientData The PatientData page, figure 60, allows physicians to visualise in an organised and structured way the clinical condition of a patient. This page comprises eight main elements: a navigation bar, a card that provides the patient’s personal data and allows to copy all clinical data and register diagnosis, and six cards that provide the patient’s clinical condition. The health data is presented to the physician divided into the following subjects: Clinical History, Medication, Biometric Data, Main Complaint, Relief Factors and Aggravation Factors. All these elements were implemented as a React component, and the NavBar component presented in the previous section was reused.
5.5. Web application 81 When this page is launched, the life-cycle method componentDidMount() makes a GET request to the server to obtain some data associated with the patient register to be passed to the components via props. Once the server response, all components except the NavBar component will request the server to obtain their respective data to show on an card element. These requests run asynchronously. Figure 60: PatientData web page The PatientDetails component has a button, "Copy all", that when clicked copies to the clipboard all the health data from the patient’s clinical register. If physicians only want to copy a specific set of data, they can use the "Copy" button on the other components, which copies to the clipboard only the data present on the card. The BiometriData component checks each measured value, and in case it is an abnormal value, a danger icon is presented next to the value. The UsualMedication component builds a sentence for each medicine with information about its taking. Each sentence has the following structure: [medicine name] [dose] [active substance] [periods of the day] [administration route] [frequency]. The Symptoms component colourizes green, yellow and red to the answers "Yes"," I don’t know", and "No", respectively.
5.5. Web application 82 The physician records the patient’s diagnosis by clicking on the "Record Diagnosis" button, figure 61, which displays a dialog with an input text. This dialog was implemented as a stateful React component which initially makes a GET request to the server to obtain the list of all diagnoses. The application presents to the physician diagnostic name suggestions as the physician writes a diagnostic name into the input text. If no diagnostic suggestions match the diagnosis entered, the physician can register the diagnosis in the same input text. Figure 61: Dialog that allows the patient’s diagnosis to be registered When the physician presses the "Submit" button, it is checked whether it is a new diagnosis, and if so, a POST request is performed to the server on which the clinical register id and diagnosis name are sent. If it is one of the listed diagnoses, are sent only the diagnostic id and the clinical register id. The patient is redirected to the SearchPatient web page after the diagnosis is successfully registered. The dialog shown in figure 62 was created to prevent the physician from forgetting to register a patient’s diagnosis before returning to the SearchPatient page. This dialog signals the physician that a patient’s diagnosis is missing. If the physician clicks on the "yes" button the application redirects the physician to the SeachPatient page, otherwise it removes the dialog so that the physician can register the patient’s diagnosis.
5.6. Data warehouse 83 Figure 62: Attention dialog 5.6 data warehouse The purpose of the data warehouse is to store patient clinical register data in a consolidated format for the discovery of hidden relationships and patterns in the data. The back-end server database will periodically undergo an ETL process, in which the data will be stored in a temporary database, staging area, and then transformed and loaded into the data warehouse. This section describes the implementation and population of the staging area and the data warehouse. Some issues to which the data warehouse is intended to respond was defined by Jacinta Santos, resulting in the indicators presented in Appendix section F. Below are some of these indicators: • What is the average time of use of the kiosk? • Which age range and gender have the longest kiosk usage times? • What are the most common health problems for each age range and gender? • What is the average time of use of the kiosk by age range and education level? Indicators of this kind make it possible to identify the kiosk parts where patients experience the most difficulties associated with their digital competence, as well as the health characteristics of all patients. This is important to identify patient clusters with similar data and to find patterns and relationships between these data.
5.6. Data warehouse 84 For example, if elderly patients frequently register a particular medicine, the interface can be adapted for these users to display that medicine as soon as it is launched. 5.6.1Staging area schema The relevant information for the data warehouse was selected after the analysis of the backend server database. The tables allowing the storage of questions, answers, active substances, administration routes, body parts, frequency, and periods of the day were discarded as they did not contain relevant information for the data warehouse. The remaining tables belong to the staging area, which is composed of the following tables: •patient: Table concerning the patients who performed the clinical register; •measurement: Table concerning the measurements taken at the kiosk; •technological_questionnaire: Table concerning the answers to the questionnaire; •medicalHistory: Table on health problems provided by the kiosk; •medicine: Table concerning the medicines provided by the kiosk; •interfaceName: Table concerning the kiosk interfaces; •diagnosis : Table concerning the diagnoses provided to physicians by the web platform; •mainComplaint: Table concerning the main complaints provided by the kiosk; •interfaces: Table concerning the length of stay at each kiosk interface; •clinicalRegisterMedicine: Table concerning the medicines in each clinical register; •clinicalregisterMedicalHistory : Table concerning the health problems in each clinical register; •clinicalRegister: Tabela referente aos registo clinicos realizados pelos pacientes; After selecting the tables, it was necessary to carry out the same data selection process, but for the attributes. The final logical model of the staging area is shown in figure 63.
5.6. Data warehouse 85 Figure 63: Staging Area The clinicalRegisterMedicine table does not store the dose of the medicine, and the Diagnosis table does not store the newInsert attribute. In the Patient table only the age and gender of the patient is stored. The excluded attributes are due to their irrelevance to the analysis. 5.6.2Data warehouse schema The data warehouse was modelled as a star scheme since it is intended to evaluate only one business event, the clinical registers, and get the best possible query performance. The data warehouse is composed of the following fact and dimension tables, and its logical model is shown in figure 64: • Facts tables: – facts_clinicalRegister: Table on clinical registers performed by patients; • Dimensions tables: – dim_mainComplaint: Table on main complaints; – dim_medicalHistory: Table on health problems; – dim_measurements: Table concerning measurements; – dim_interfaces: Table concerning the time spent at each kiosk interface; – dim_patient: Table concerning patients;
5.6. Data warehouse 86 – dim_diagnosis: Table concerning diagnoses; – dim_medicines: Table concerning medicines; – dim_questionnaireResponses: Table concerning the questionnaire responses; – dim_time: Table with dates used for the clinical registers submission dates; Figure 64: Data warehouse All dimension tables have a timestamp relative to the moment of each new register insertion. Although no data updates are expected, all dimension tables except the dim_time table have the attribute id_original for manual data update issues. The dimension time table presents a low level of granularity to obtain answers with greater time detail. The clinicalregisterMedicalHistory and clinicalRegisterMedicine tables allow associating each clinical register to its health problems and medicines, respectively. The fact table stores three indicators, the total time of the kiosk session and the number health problems and medication. These last two attributes will have a null value when no health problems or medications are registered. The aggregate functions (MIN, MAX, SUM, COUNT, and AVG) all do the "right thing" with null facts.
5.6. Data warehouse 87 5.6.3Populate staging area The population of this temporary database is carried out through triggers SQL, created in the back-end server database, which stipulates that whenever something is entered in the database, it is also entered in the staging area. This is a fast process, which decreases the time the back-end server database is busy. After the data warehouse is populated, the data is removed from all tables in the staging area, using the DROP TABLE statement followed by the creation of all tables again. This ensures that the temporary database always has the "new" data from the back-end server database. 5.6.4Populate data warehouse The data warehouse is populated using cursors, which copy the data from the staging area to the corresponding tables into the data warehouse. The tables dim_mainComplaint, dim_medicalHistory,dim_medicine and dim_diagnosis are pre-populated with all the main complaints, health problems, medicines and diagnostics registered in the back-end server database. An extra entry was added to the table dim_diagnosis to be used when a clinical register does not have a registered diagnosis. First, all the dimension tables are populated and then the fact table. The value of the attribute id_original of each dimension table is set to be the primary key of the associated register. The fact table is populated by a procedure using a cursor. The cursor goes through the clinicalregister table of the staging area and for each entry, queries SQL will find the primary keys of the dimension tables associated with the attributes of that entry. These primary keys are stored in auxiliary variables, created at the beginning of the procedure, and then inserted in the fact table as foreign keys. If a clinical register does not have a diagnosis registered, the diagnosisFK attribute will store the primary key of the additional register created in the table dim_diagnosis, described above.
6 EVALUATION The evaluation of the self-service kiosk occurs in two moments. First, the first prototype of the Android platform at University of Minho and in a National Digital Competences Conference (Forum INCoDe.2030 1 ) is tested. At the end of each kiosk session, users are invited to conduct a system usability questionnaire. In the second moment, the second prototype of the Android application is evaluated at Centro Hospitalar Universitário de São João (CHUSJ 2 ) with patients at a real emergency facility. Patients and some nurses are invited to conduct a system usability questionnaire. The prototype of the web platform is evaluated at this moment with physicians from the hospital centre. After using the web platform in consultations, the physicians are invited to conduct a questionnaire about the system. Due to the pandemic, it was not possible to perform the second evaluation moment. The following sections describe the moments of the evaluation in more detail. 6.1 first moment of evaluation The first moment of the evaluation is a pilot with healthy participants. This phase aims to test the designed user interface and all system features to identify problems that may arise and minimize errors in real environment evaluations. To test the Android application a Samsung Galaxy Tab S5e (10.5")3was used. 6.1.1Testing Methodology The evaluation of the kiosk’s usability was carried out taking into account the following indicators: (I) average time per screen, (II) average time of a complete kiosk session, (III) application design, (IV) devices interaction, and (V) interaction with the system. These last three indicators will be evaluated through methods (B) and (C), presented below, following 1https://www.incode2030.gov.pt/. 2https://portal-chsj.min-saude.pt/. 3 https://www.samsung.com/pt/tablets/galaxy-tab-s/galaxy-tab-s5e-10-5-inch-black-64gb-wi-fi-sm- t720nzkatph/ 88
6.1. First moment of evaluation 89 a methodology similar to the one presented in [ 11 ]. To obtain these indicators, we divided the usability test into three parts: (A) kiosk usage time, (B) final questionnaire, and (C) observation report. To facilitate data analysis, PowerBI and Google forms were used to generate statistical graphs. Kiosk Usage Time The usage time of the kiosk will be analyzed taking into account the usage time per screen and the time of a complete session. The time used per screen allows taking into account which screens the user found more difficulty in terms of interaction, since these will have longer times. The time of a full session will help to reach the overall objective of reducing the session time as much as possible, which can be accomplished both in terms of application design and interaction with the sensor devices. Questionnaire At the end of each kiosk session, users were invited to conduct a system usability questionnaire. The initial questions consist in determining the user’s age range, gender, education level and zip code. These questions are particularly relevant because the system is intended to be used, and was tested, by a very diversified range of users, from which one intends to understand how different factors influence the ability to use the system. To this extent, we are particularly interested in understanding how age and education level influences kiosk usage, and how effective can system design options be in overcoming general usage barriers of digital systems. The following questions were adapted from the Post-Study System Usability Questionnaire (PSSUQ). It was specifically designed for use at the completion of usability studies [ 40 ]. The PSSUQ assesses overall user satisfaction with 16 aspects of the system and interface, such as system utility, information quality and interface quality. The response scale ranges from 7response options (fully agree, agree, partly agree, neither agree nor disagree, disagree, partly disagree, fully disagree) and not all questions have to be answered, as there may be non-applicable questions. The questionnaire can be found in the Appendix section C.1. Observation Reports During the test phase of the kiosk, there were two observers watching and creating reports on user interaction with the system. These observations and reports provide valuable information about participants behaviour that cannot be captured by questionnaires nor interface digital monitoring alone. These were particularly insightful to identify and provide a deeper understanding of system interaction problems, difficulties in understanding the
6.1. First moment of evaluation 96 not consider that they have a health problem even if they are taking medication associated with the problem. Showing the user possible health problems will remind them of their problems, allowing them not to skip this stage. In the usual medication, a dropdown has been added to the text box where the user enters the name of their medication to avoid mistakes and help you remember the name of your medication. However, we realize that the dropdown has not been able to help participants with a higher age range and low levels of education. The possible reason for this will be the lack of digital competence and not being used to using this type of elements. Simpler and more common elements such as buttons may be a more feasible option for these cases. During the exploration of the main complaint, several questions are asked to the user regarding the main complaint. Ascertain medical terms are not common knowledge in society, it is important that the questions asked to the user are rewritten in a simple way with a common vocabulary. When questions, even rewritten, may cause the user to have doubts, the user should be given the opportunity to know more about the terms in doubt, through a simple click and an AlertDialog, for example. 6.1.4System improvement The system improvements presented in this section were directly drawn from the analysis of the obtained results and they amount both to the digital interface as well as to the medical sensor devices. Table. 8summarizes the differences between the current system and future system improvements. One such improvement involves the use of a citizen card reader to extract personal information quickly, thus replacing the need for the user to enter this data. The clinical history screens will be reduced to one, allowing the user to view and select all possible health problems they may have, and taking him immediately to the daily medication phase. The implementation of this improvement demands a larger tablet for the necessary visualization and organization of the information. In the daily medication, the writing of the name of the medication will undergo a process of correction and automatic search without the use of a dropdown. Dose writing will be replaced by a set of buttons associated with the various possible doses of each drug, so that less proficient users understand the information they are asked for. The parts of the day will be associated with the description as a part of the button. On the device screens, instructions will be displayed at the same time as the measurement, so that the user has always access to the next step to take, thus reducing errors of use due to forgetfulness of steps during measurement. The blood pressure monitor will also be changed to a device that reduces measurement errors. To allow a larger number of participants to receive their measurement results, the possibility of sending an SMS) will also be added.
6.2. Second moment of evaluation 97 The device’s keyboard will also be replaced by a simpler and easier to use keyboard so that users with less digital competence will not be in doubt. Table 8: Current System Versus System Improvement Current System System Improvement Manual entry of the personal information Extract personal information by Citizen Card Smaller tablet Larger tablet Four clinical history screens Only one clinical history screen Manual medication search Automatic medication search and medication names correction Manual dose entry Select dose button Device instructions before measurement Device instructions during measurement MyTensio Wrist BW-BW1Model A new one with less measurement errors Email measurement results Email and SMS measurement results Tablet keyboard Simple and easier to use keyboard 6.2 second moment of evaluation After obtaining feedback from the evaluations of the first prototype, some features of the Android platform were corrected and improved, the user interface changed and the web platform implemented. This evaluation moment aims to evaluate these components in a real environment, and comprises several phases that can be consulted in the testing protocol established with CHUSJ, which is in Appendix section E. To encourage patients to use the kiosk, nurses will offer a flyer during triage and encourage patients to take advantage of the kiosk during the waiting time. The flyer can be found in Section Dof the Appendix. Physicians who will evaluate the platform are provided with the hyperlink and password before the consultation so that they can use the application on the office computer. They are also provided with a poster explaining the platform’s features. The poster is shown in Section Dof the Appendix.
6.2. Second moment of evaluation 98 6.2.1Android application testing methodology The evaluation of the kiosk’s usability was carried out taking into account the same indicators as in the previous version. However, another method, method (D), was added to evaluate user interaction with the device. To obtain the indicators intended, the usability test was divided into four parts: (A) kiosk usage time, (B) final questionnaire, (C) observation report, and (D) coordinates of the user clicks. The methods (A) and (C) follows the same methodology used in the previous version. B. Questionnaire Similar to the previous version, patients were invited to conduct a system usability questionnaire at the end of kiosk session. This questionnaire is essentially made up of questions to assess the functionalities of the application, error messages quality and help information quality. The response scale varies between 4response options (agree, neither agree nor disagree, disagree, not applicable). This scale was reduced from the previous version to obtain more concise and accurate answers. Since all questions are mandatory, the possibility of "not applicable" answers for questions not applicable to the user was added. Some nurses are asked to use the kiosk and also to complete a questionnaire. The nurses as health professionals could providing us with a professional point of view about the system, which the patient could not transmit. The questionnaire conducted to the nurse differs from the questionnaire conducted to the patient in only one question. Questionnaires to patients and nurses in the emergency department are presented in the Section Cof Appendix. D. Coordinates of the User Clicks The kiosk application was instrumented to log clicks made by the patient in order to check whether actual user interaction is done according to the design expectations. This allows not only to check if users have any problems with the application but also to group all clicks made by the patients to evaluate whether the flow of the application is simple and if there are interactions that should not exist or were not envisioned. These interactions reflect the frustrations and difficulties felt by the patient regarding some interface elements. By grouping all the clicks made by the patients on each screen, it’s possible to evaluate the usability of that screen. For example, if patients try to interact with unintended parts of the interface, changes could be performed to fix that issue, improving the flow of the application.
6.2. Second moment of evaluation 99 6.2.2Web application testing methodology The evaluation of the web platform usability was carried out taking into account the following indicators: (I) effectiveness evaluation of the interface, (II) interface design, and (III) interaction with the system. To obtain these indicators is conducted a questionnaire to emergency department physicians who used the web platform during their consultations. Questionnaire After using the web platform in consultations, physicians are invited to conduct a questionnaire about the system. This questionnaire is divided into two parts. The first part evaluates the effectiveness of the interface, i.e. whether the application correctly stored the data entered by patients at the kiosk. The second part contains questions to assess web platform usage satisfaction. This questionnaire also contains questions adapted from the PSSUQ. The response scale varies between 4response options (agree, neither agree nor disagree, disagree, not applicable ). Since all questions are mandatory, the possibility of "not applicable" answers for questions not applicable to the user was added. Questionnaire to the physicians in the emergency department is presented in the Section C of Appendix.
7 CONCLUSION After the scope of the project and the problem it aims to solve have been presented, and after reporting the conceptualization, implementation and evaluation of the proposed solution, it is then possible to summarize the dissertation and draw the main conclusions about the work carried out. 7.1 conclusions Crowding in emergency departments has increased over the years due to inappropriate visits by low clinical severity patients, negatively affecting the delivery of emergency services and increasing the waiting time for patients to be seen by a physician. This project proposes a kiosk-based solution which aims to improve both the time and quality of the clinical consultation performed by ED medical staff and thus improve the response capacity of the ED with the same resources. The state of the art study provides a comprehensive overview of the most relevant accomplishments in the hospital self-service kiosks field to improve clinical care on health services. The study revealed application areas where kiosks, like the one proposed in this dissertation, can provide suitable solutions that haven’t been explored. The high levels of kiosks acceptance and satisfaction observed, points to a relevant opportunity for the introduction of self-service kiosks in several healthcare contexts. The specification of the solution was done considering the defined objectives and all functional and non-functional requirements of the system were identified. Based on the requirements, the solution architecture was proposed, a client-server architecture. The implementation of the proposed solution is divided into five parts: database, web-services, android application, web application, data warehouse. The database follows the relational model, and a transaction was defined to ensure the consistency of each clinical register insertion into the database. The Web services follow the RESTful architecture and each one is responsible for dealing with part of the requests that the clients perform. Two prototypes of the android application have been developed, the first one aimed at testing the first user interface designed and to identify difficulties and 100
7.2. Prospect for future work 101 problems using the sensors. Observations taken from testing the first prototype led to the development of a new prototype. The functionalities of the web application were implemented using the JavaScript React library. Requests not coming from Portugal or requests that may constitute a threat to the system are blocked. The data warehouse was modelled as a star scheme. The usability evaluation of the first prototype of the self-service kiosk allowed to understand the aspects that should be improved in this first tested prototype. The heterogeneity of participants allowed to understand in a more global way the difficulties felt during the use of the system. In general, there was positive acceptability by participants, with a large majority considering the system user-friendly. All participants were able to complete a kiosk session from start to finish without any help, with the exception of the screens of the devices for collecting vital signs, for which one it was found a series of improvements based on the carried analysis. The time for a full kiosk session was less than expected, even though it is necessary to take into account that the kiosk was not tested in a real ED. Unfortunately, it was not possible to carry out the solution evaluation in a hospital setting with patients due to the pandemic situation. The primary purpose of this solution has not been verified and the results of the usability assessment were not obtained. As it was not possible to carry out the data collection, the intelligent system that adapts the interface to each patient’s digital skills was not created. 7.2 prospect for future work Although it was not possible to test the solution in a real environment, there are some suggestions for future work, namely: • Develop an Android and iOS application for smartphones that allows patients to enter the same data requested by the kiosk. • Use an API that provides the medicines and their details always updated. In this dissertation, the database has to be populated manually with all medicines, which requires a periodic re-population to refresh them. • Creating a decision support diagnostic system to help physicians to achieve more accurate diagnoses. • The ED can be visited by the same patient more than once, so the self-service kiosk should present the patient’s history from previous visits, avoiding that the patient has to select again the same health problems or usual medication for example. • Carry out the second moment of the idealized evaluation;
7.2. Prospect for future work 102 • Since patients of different ages and digital competence are expected, the creation of a UI/UX system that intelligently adapts to the user is fundamental. • The web platform could also present a dashboard page of each patient’s history of anamnesis information so that the physician could view any past patient information more quickly and intuitively and get support in determining the patient’s diagnosis. • The determination of patterns between health problems, medicines and demographic indicators through data mining techniques could allow health problems to be suggested to the patient for selection through their demographic data and the selected medication. • A system of main complaint suggestions would also facilitate the patient’s interaction with the kiosk application. The determination of patterns between major complaints and past medical history, medication, vital signs, and demographic data through data mining techniques may allow the creation of this system. • Replacing punctual measurements in the self-service kiosk with continuous monitoring of the patient’s vital signs from the time the patient starts the kiosk’s session until leaving the ED, providing physicians with the relevant biosignals data of each patient in real-time. This continuous monitoring would inform the physicians of possible worsening or improvement of the health status of the patients during their stay in the ED. The use of a smart all-in-one device to measure vital signs can be a solution for this continuous monitoring. • The implementation of a solution that allows interoperability between the hospital system and the patient care platform will certainly facilitate the interchange of clinical information of patients between systems. This interoperability will also provide the possibility for the patient care platform to have access to patients’ past clinical register. • The creation of a modular self-service kiosk is fundamental since it can be easily adapted to different use cases, allowing the clinical staff to choose which functionalities the self-service kiosk should have at any given time.
7.3. Contribution 103 7.3 contribution The Master´s work contributes with: • A systematic review about health kiosks for patient care; • The implementation of an Android application capable of collecting vital signs (temperature, blood pressure, blood oxygen saturation), past medical history, usual medication, main complaint as well as reliefs and aggravation factors; • The implementation of a Web application that provides to physicians the above mention data, in a structured and uniform way, before each medical check-up; • The implementation of a back-end system to respond to requests made by the applications; • The implementation of a data warehouse for reporting and data analysis of the patients clinical data; • A well-defined Test Protocol to test the solution developed in an emergency department environment; Additionally, this Master ´ s work also has scientific outcomes, namely a conference publication and the submission of a systematic review to the International Journal of Medical Informatics with the following references, respectively: • Pacheco, P., Santos, F., Coimbra, J., Oliveira, E., Rodrigues, N. F. (2020, August). Designing Effective User Interface Experiences for a Self-Service Kiosk to Reduce Emergency Department Crowding. In 2020 IEEE 8th International Conference on Serious Games and Applications for Health (SeGAH) (pp. 1-8). IEEE. • Pacheco, P., Santos, F., Coimbra, J., Oliveira, E., Rodrigues, N. F. The role of kiosks on health services: a systematic review (to be accepted)
BIBLIOGRAPHY [1] Thomas Bodenheimer and Hoangmai H Pham. Primary care: current problems and proposed solutions. Health Affairs,29(5):799–805,2010. [2] Roger A Rosenblatt and L Gary Hart. Physicians and rural america. Western Journal of Medicine,173(5):348,2000. [3] Jesse M Pines and Richard T Griffey. What we have learned from a decade of ed crowding research. Academic Emergency Medicine,22(8):985–987,2015. [4] Crowding, american college of emergency physicians. policy statement: crowding [internet] [accessed on 21 september 2019]. 2013. http://www.acep.org/patient-care/ policy-statements/crowding/. [5] Peter McKenna, Samita M Heslin, Peter Viccellio, William K Mallon, Cristina Hernandez, and Eric J Morley. Emergency department and hospital crowding: causes, consequences, and cures. Clinical and experimental emergency medicine,2019. [6] Jesse M Pines, Joshua A Hilton, Ellen J Weber, Annechien J Alkemade, Hasan Al Shabanah, Philip D Anderson, Michael Bernhard, Alessio Bertini, André Gries, Santiago Ferrandiz, et al. International perspectives on emergency department crowding. Academic Emergency Medicine,18(12):1358–1370,2011. [7] Ajay Tandon, Christopher JL Murray, Jeremy A Lauer, and David B Evans. Measuring overall health system performance for 191 countries. Geneva: World Health Organization, 2000. [8] Sofia Pereira, António Oliveira e Silva, Manuel Quintas, Jorge Almeida, Cristina Marujo, Manuel Pizarro, Vítor Angélico, Luisa Fonseca, Eunice Loureiro, Sofia Barroso, et al. Appropriateness of emergency department visits in a portuguese university hospital. Annals of emergency medicine,37(6):580–586,2001. [9] Simoes J de Almeida, Gonçalo Figueiredo Augusto, I Fronteira, and C Hernández- Quevedo. Portugal: health system review. Health systems in transition,19(2):1,2017. [10] Philip McHale, Sara Wood, Karen Hughes, Mark A Bellis, Ulf Demnitz, and Sacha Wyke. Who uses emergency departments inappropriately and when-a national cross-sectional study using a monitoring data system. BMC medicine,11(1):258,2013. 104
bibliography 105 [11] João Silva, Pedro Brandão, and Rui Prior. Usability assessment of a health kiosk. pages 260–265,2017. [12] Ashish Joshi and Kate Trout. The role of health information kiosks in diverse settings: a systematic review. Health Information & Libraries Journal,31(4):254–273,2014. [13] Grace Ng, Sze Wee Tan, and Ngiap Chuan Tan. Health outcomes of patients with chronic disease managed with a healthcare kiosk in primary care: protocol for a pilot randomised controlled trial. BMJ open,8(3):e020265,2018. [14] Web services glossary [internet] [accessed on 21 october 2020]. https://www.w3.org/ TR/2004/NOTE-ws-gloss-20040211/#webservice. [15] Xinyang Feng, Jianjing Shen, and Ying Fan. Rest: An alternative to rpc for web services architecture. pages 7–10,2009. [16] Introducing json [internet] [accessed on 21 october 2020]. JSON. https://www.json. org/json-en.html. [17] Mobile operating system market share worldwide [internet] [accessed on 21 october 2020]. StatCounter Global Stats. https://gs.statcounter.com/os-market-share/ mobile/worldwide. [18] Firebase realtime database [internet] [accessed on 21 october 2020]. Google. https: //firebase.google.com/docs/database?hl=pt. [19] Platform architecture : Android developers [internet] [accessed on 21 october 2020]. Android Developers.https://developer.android.com/guide/platform. [20] Understand the activity lifecycle : Android developers [internet] [accessed on 21 october 2020]. Android Developers. https://developer.android.com/guide/components/ activities/activity-lifecycle. [21] Fragments : Android developers [internet] [accessed on 21 october 2020]. Android Developers.https://developer.android.com/guide/components/fragments. [22] React – a javascript library for building user interfaces [internet] [accessed on 21 october 2020]. – A JavaScript library for building user interfaces.https://reactjs.org/. [23] Virtual dom and internals [internet] [accessed on 21 october 2020]. React. https: //reactjs.org/docs/faq-internals.html#what-is-the-virtual-dom. [24] Introduction to node.js [internet] [accessed on 21 october 2020]. Node. https://nodejs. dev/learn/introduction-to-nodejs.
B WEB PLATFORM REQUIREMENTS In this appendix, the functional and non-functional requirements of the web platform are presented. b.1 functional requirements Requirement no. : 1 Requirement type: Functional. Use case: Consult the patient’s clinical data. Description: The physician should be able to consult a patient’s clinical data. Reason: Since a patient’s diagnosis is dependent on their clinical data, the physician must be able to consult them. Requirement no. : 2 Requirement type: Functional. Use case: Consult the patient’s clinical data. Description: The physician should be able to consult the patient’s medical history. Reason: A patient’s medical history can have an impact on their diagnosis. Requirement no. : 3 Requirement type: Functional. Use case: Consult the patient’s clinical data. Description: The physician should be able to consult the patient’s usual medication. Reason: A patient’s usual medication can have an impact on the prescription. Requirement no. : 4 Requirement type: Functional. Use case: Consult the patient’s clinical data. Description: The physician should be able to consult the patient’s main complaint. Reason: The patient’s main complaint may have an impact onthediagnosis. Requirement no. : 5 Requirement type: Functional. Use case: Consult the patient’s clinical data. Description: The physician should be able to consult the patient’s blood pressure. Reason: Knowledge of the patient’s blood pressure can influence their diagnosis. 112
B.1. Functional Requirements 113 Requirement no. : 6 Requirement type: Functional. Use case: Consult the patient’s clinical data. Description: The physician should be able to consult the patient’s temperature. Reason: Knowledge of the patient’s temperature can influence their diagnosis. Requirement no. : 7 Requirement type: Functional. Use case: Consult the patient’s clinical data. Description: The physician should be able to consult the patient’s heart rate. Reason: Knowledge of the patient’s heart rate can influence their diagnosis. Requirement no. : 8 Requirement type: Functional. Use case: Consult the patient’s clinical data. Description: The physician should be able to consult the patient’s blood oxygen saturation level. Reason: Knowledge of the patient’s blood oxygen saturation level may influence their diagnosis. Requirement no. : 9 Requirement type: Functional. Use case: Register diagnosis. Description: The physician should be able to register the patient’s diagnosis. Reason: Diagnosis is recorded to identify patterns between patient data, collected at the kiosk, and their clinical diagnosis. Requirement no. : 10 Requirement type: Functional. Use case: Copy patient’s register information. Description: The physician should be able to copy patient’s register information. Reason: Copying the information from patients’ clinical records speeds up the medical check-up. Requirement no. : 11 Requirement type: Functional. Use case: Login. Description: The system should check whether the credentials entered by the user are valid. Reason: Validation of the data entered by the user is necessary to avoid undue access to the system. Requirement no. : 12 Requirement type: Functional. Use case: Logout. Description: A user logs out of the system. Reason: When the user has no more tasks to do in the system, it may be the user’s wish to log out.
B.2. Non-Functional Requirements 114 Requirement no. : 13 Requirement type: Functional. Use case: Patient Search. Description: The physician may search the patient. Reason: This action is essential so that the doctor can consult the correct patient’s clinical register. b.2 non-functional requirements In this section, the non-functional web platform requirements collected are presented, each describing a restriction imposed on the system. Usability requirement Requirement no. : 14 Requirement type: Usability requirement. Description: The system shall use terms appropriate to the context in which the system operates. Reason: The system must use terms and vocabulary appropriate to the context in which it is inserted to facilitate its understanding by physicians. Requirement no. : 15 Requirement type: Usability requirement. Description: The system should be easy to use. Reason: The system should be user-friendly for all physicians. Performance requirements Requirement no. : 16 Requirement type: Performance requirement. Description: The system should provide answers to physician requests in a fast way. Reason: The interaction of the physician with the system should be smooth so that the use of the system is pleasant. Requirement no. : 17 Requirement type: Performance requirement. Description: The system should always be available. Reason: The system should always be available so as not to impede its use by physicians. Security requirements Requirement no. : 18 Requirement type: Security requirement. Description: The application should protect information about patients. Reason: It is essential that patients feel secure about the privacy of their data.
B.2. Non-Functional Requirements 115 Legal requirements Requirement no. : 19 Requirement type: Legal requirement. Description: The system must comply with the General Data Protection Regulations, in force since 25 May 2018. Reason: The system must comply with current laws.
C QUESTIONNAIRES In this appendix, all the questionnaires created for the self-service kiosk evaluation are shown. c.1 questionnaire of the first self-service kiosk prototype • Overall, I am satisfied with how easy it is to use this system? • It was simple to use this system? • I was able to complete the tasks and scenarios quickly using this system? • I felt comfortable using this system? • It was easy to learn to use this system? • I believe I could become productive quickly using this system? • The system gave error messages that clearly told me how to fix problems? • Whenever I made a mistake using the system, I could recover easily and quickly? • The information (such as help, on-screen messages, and other documentation) provided with this system was clear? • It was easy to find the information I needed? • The information was effective in helping me complete the tasks and scenarios? • The organization of information on the system screens was clear? • The interface of this system was pleasant? • I liked using the interface of this system? • This system has all the functions and capabilities I expect it to have? • Overall, I am satisfied with this system? c.2 questionnaires of the second self-service kiosk prototype In this section two questionnaires will be described for two different types of users. c.2.1Patient Questionnaire • Do I believe that the use of the citizen card was a good way to collect personal information? • Did the response history help me to remember and edit the answers given? • Did the selection of a body part help me identify my main complaint more quickly? 116
C.3. Questionnaire of the Web Platform Prototype 117 • The measurement through step-by-step videos, helped me to make the measurement? • I believe that having assistance is indispensable? • Overall, am I satisfied with the ease of use of this system? • I was able to complete the tasks quickly? • It was easy to learn to use this system? • The system gave error messages that clearly told me how to fix problems? • Whenever I made a mistake using the system, I could recover easily and quickly? • The information (such as help, on-screen messages, and other documentation) provided with this system was clear? • Overall, I am satisfied with this system? c.2.2Nurse Questionnaire • Do I believe that the use of the citizen card was a good way to collect personal information? • Did the response history help me to remember and edit the answers given? • Did the selection of a body part help me identify my main complaint more quickly? • The measurement through step-by-step videos, helped me to make the measurement? • I believe that having assistance is indispensable? • Do I believe that the information collected was sufficient? • Overall, I am satisfied with how easy it is to use this system? • I was able to complete the tasks quickly? • It was easy to learn to use this system? • The system gave error messages that clearly told me how to fix problems? • Whenever I made a mistake using the system, I could recover easily and quickly? • The information (such as help, on-screen messages, and other documentation) provided with this system was clear? • Overall, I am satisfied with this system? c.3 questionnaire of the web platform prototype In this section a two-part questionnaire will be described, which will be answered by physicians. c.3.1Evaluation Effectiveness - First Part • Have all health problems been registered by the patient (If the patient only registered A and did not register B)? • Have all health problems been registered correctly (If the patient registered A and should have registered B )? • Has all the usual medication been registered by the patient (If the patient only registered A and did not register B)?
C.3. Questionnaire of the Web Platform Prototype 118 • Has all the usual medication been registered correctly (If the patient registered A and should have registered B )? • Were all measurement values reliable (No major discrepancies between measurements at the kiosk and measurements in the query)? • Were the responses from the exploration of the main complaint similar to the responses given in the consultation? c.3.2Satisfaction - Second Part • Was it easy to research the patients? • Has the patient’s usual medication been clearly presented? • Did the danger signs present in the biometric data of the patients help me to have an immediate perception of the abnormal values of the patients? • Did the colors in the answers to the questions of the exploration of the main complaint help me to have an immediate perception of the positive and negative responses? • Has the need to scroll become uncomfortable? • Was the functionality of the "Copy" and "Copy all" buttons useful? • Did the registers collected help me determine the diagnosis more quickly? • The presence of a dropdown with several diagnoses allowed me to insert the diagnosis faster? • Was the information collected from the patient sufficient? • Overall, I am satisfied with how easy it is to use this system? • It was easy to learn to use this system? • The information provided with this system was clear? • Overall, I am satisfied with this system?
D FLYER AND POSTER This appendix shows the flyer designed for patients, Figures 70 and 71, and the poster created for physicians, Figure 72. Figure 70: Flyer to help patients (front) Figure 71: Flyer to help patients (back) 119
120 Figure 72: Poster to support physicians
E TEST PROTOCOL In this appendix, the test protocol is presented. e.1 introduction According to the American College of Emergency Physicians, crowding in the emergency department (ED) occurs when the need for emergency services exceeds the resources available for the care of patients in the ED, hospital or both. In general, this phenomenon negatively affects the provision of emergency services, impairing the quality of health care and, consequently, the clinical outcomes of patients. When capacity is high, the time patients wait to see a physician tends to increase, as does the number of patients leaving without medical advice. One of the main reasons for crowding in the ED is the high number of non-urgent or inappropriate patient presentations. Emerging medical devices open up the possibility of setting up systems that can help collect health information from patients in hospitals or health centres. Examples of such systems are self-service kiosks, independent units that contain computer programs and provide services to patients. In general, these systems are largely portable, interactive and have simple user interfaces such as a touch screen or keyboard. A study by Grace Ng showed that by placing kiosks in waiting rooms, patients were able to use the time between registration and consultation with the physician to engage in productive tasks that help the medical process. This technological solution aims to improve both the time and the quality of the anamnesis procedure performed by healthcare professionals in the ED by introducing a self-service kiosk placed in the ED waiting room. Information on medical history, medication, main complaint, symptoms and vital signs collected by patients through the kiosk will be made available to the physician before each clinical observation. The hypothesis considered is that by providing a selective, structured and uniform presentation of the anamnesis information of each patient, the physician’s observation can proceed much faster and more accurately, focusing on confirmação of the most relevant aspects. The main objective of this solution is to reduce the period of clinical observation of patients and thus improve the response capacity of the ED with the same resources. e.2 project description This platform, will be provided by the Universidade do Minho, consisting of a set of sensors (thermometer, finger oximeter and pulse blood pressure monitor) from Bewell Connect, a keyboard, a TBee Box, a webcam and a touchscreen monitor. The patient will access the kiosk via an Android application, where various questions will be asked in accordance with the initial clinical observation procedure carried out by the physicians (anamnesis). Thus, the system integrated in the kiosk should allow the quick registration of this clinical data in an intuitive way, so that the patient is able to use the application independently and without prior training. 121