A Simple Medical Record System of Non-Invasive Blood Glucose Level Measurement Results for Diabetes Care Using Graphical User Interface (GUI) MATLAB

Article Info Abstract Article History: Received July 25, 2021 Revised August 8, 2021 Accepted August 14, 2021 Diabetes is a chronic metabolic disorder caused by a decrease in the pancreas to produce insulin. We present a medical records system and reminders to patients of the measurement results of noninvasive blood glucose levels. Measuring blood glucose levels is vital in avoiding potential adverse health effects like diabetes. Generally, measuring blood glucose levels using the conventional method is injure the patient's finger. Currently, the non-invasive method was famous as one of the detections of blood glucose by applying the physical properties of laser absorption. In this paper, we use the photodiode as a detector, the LED as a sensor, and a signal conditioning circuit. The results showed that non-invasive glucose monitoring has the potential to measure glucose levels with sensitivity and linearity of 3.21 mg/dL and 98%, respectively. As a result of measuring the blood glucose levels of the subject was displayed on the LCD module was designed. We designed a simple application and medical record using Blynk applications and GUI MATLAB for recording the measurement results of blood glucose level. In the future, applications that have been developed can be used by doctors for monitoring the measurement of the blood glucose level and provide information to patients by mobile applications, sending an email or message the measurement results, the decision of a disease or not, and reminds the re-measurement time.


I. INTRODUCTION
The health of the patients is one of the most important parts that must be maintained. Diabetes is a chronic metabolic disorder caused by a decrease in the pancreas to produce insulin [1]. Diabetes mellitus is one of the highest causes of death, in Indonesia (2005) of 3316 deaths with a case fertility rate (CFR) of 7.9%. Besides, the world estimates in 2010 that the number of DM sufferers has increased by 50%, and will almost double by 2025 [2], [3]. World Health Organization (WHO) has classified three types of Diabetes Mellitus. Diabetes mellitus type 1 is a condition in which the body is unable to produce its insulin. Diabetes mellitus type 2 or often referred to as noninsulin-dependent diabetes mellitus (NIDDM) is Diabetes caused by the body's resistance to the effects of insulin produced by pancreatic beta cells. Gestational diabetes mellitus was defined as impaired glucose tolerance of various levels that is first recognized during pregnancy regardless of whether the patient needs to receive insulin or not [3]- [5]. The initial symptom that can be seen is that a person has Diabetes Mellitus (DM), namely an increase in blood sugar levels, reaching a value of 160-180 mg/dL [6]. Currently, the development of blood glucose sensors is an alternative for the future which is to be a point sample test and continuous glucose monitor (CGM) [7]. The CGM sensors can be used by patients affected by diabetes, and reports on some work proving the beneficial impact provided by the adoption of the CGM System. CGM is now accepted as a standard tool for intensive glucose control in patients with type 1 diabetes mellitus (T1DM) [8].
Diabetes can be identified by measuring blood glucose levels. Currently, the technique used is invasive by injuring the patient's finger and then measuring it using a tool called Easy touch. However, a non-invasive method has been developed for measuring blood glucose levels. Alternatively, approaches to measuring glucose levels in body fluids including urine, saliva, and tear fluid have great potential for the non-invasive diagnosis of diabetes (diagnosing the disease without injuring the patient's body) [4], [9]. The measured blood glucose levels should be recorded, and the results will be used as a report to the doctor during routine checks. The doctor will see the progress of health through the pattern of blood sugar levels recorded. The disadvantage is the ineffectiveness of patients who take notes manually in notebooks.
We will describe research that uses the internet for monitoring and a database of medical record results. Near-Infrared LED-based non-invasive blood glucose sensor has been developed by Jyoti Yadav et al. An in-vitro glucose measurement prototype was developed using NIR LED waves (940 nm) to check the sensitivity of the system to different glucose concentrations [6]. M. Stemmann develops a sensor calibration model for a non-invasive blood glucose measurement sensor. Blood glucose measurements are compared with reference blood glucose provided by the HemoCue Glucose Analyzer. The results from the calibration modelling lead to minimal estimation errors [10]. Siddiqui et al. created a survey of non-invasive blood sugar control methods. For monitoring blood sugar levels, it is necessary to compare the results obtained with various devices manufactured.
Giordano Lanzola from the Department of Electrical, Computer and Biomedical Engineering, University of Pavia, Italy, made a review of remote blood glucose monitoring at mhealth scenarios. The results are about how the development over time of remote monitoring, the development of Information and Communication Technology, and explain the design of the telemedicine system for monitoring blood glucose in three medical applications was designed [5]. Febrisia Lidia et al. have developed a computer-based non-invasive design for detecting and monitoring diabetes medical records. In this study, diabetes detection used urine. One of the colour sensors used is the TCS3200 and the Atmega8 microcontroller. The results of measuring blood sugar levels in urine are displayed on the LCD screen and medical record database application so that it can be continuously monitored [4]. Endang Sri Rahayu et al. developed an information system design "DIAMONS" (Diabetes Monitoring System) based on the Internet of Things (IoT). The results are a web-based blood sugar monitoring system software that is integrated with IoT so that patients can carry out examinations, consult with doctors, and view medical record data remotely [11].
Currently, many sensitive sensors and signal processing techniques have been developed to make useful blood glucose monitoring devices based on the Internet of Things (IoT). The goal is to give information on the results of these measurements and/or reminder several subjects of the blood glucose management process. It is vital to have medical records to facilitate data collection. Definition of Medical Records According to Permenkes No. 749a/MENKES/PER/XII/1989: Medical Record is a file containing notes and documents regarding the patient's identity, examination results, medication, actions, and other services received by patients at medical facilities, both outpatient and inpatient. Medical records are confidential; it is important to create a fair and systematic database to make it easier for nurses and doctors [12].
Patients need to know the measurement results and a database as a result of medical records. Medical facilities that are used to transfer data using networks without demanding human-to-human or human-to-computer interactions are known as the Internet of Medical Things (IoMT) [13]. The development of health technology for remote monitoring is called telemedicine. Telemedicine is a technology for longdistance and timely transmission of patient data so that followup and preventive interventions can be carried out. The real benefit of telemedicine is the real-time transmission of accurately organized and analysed data but telemedicine has not yet been widely adopted [14]. The paper by Amine Rghioui et al. presents a smart architecture for diabetes surveillance that will allow clinicians to remotely monitor patient health via sensors integrated into smartphones and smart portable devices. Amine Rghioui et al. designed a secure mechanism for establishing a wireless connection with a smartphone [15]. At the present, the glucose monitoring system has more benefits that might be enhanced when integrated with diet, exercise, and glucose excursion education and counseling [16].

A. Experimental Setup
In this section, we describe the medical record system of the non-invasive blood glucose levels measurement. The aiming system was to record several personal data of the subject and the measurement result of blood glucose levels. In this paper, the proposed scenario for simple medical record of blood glucose level measurement as shown in figure 1. The proposed scenario of our system consists of a module of blood glucose measurement and the processing unit using a smartphone android and database server. The module of blood glucose measurement is wearable devices contained glucose sensors and is controlled by a microcontroller. The processing unit included a smartphone that receives data information from the module via wi-fi. The subject's smartphone application was designed will receive data information after take a blood glucose measurement. A database server can use for monitoring the glucose level of the subject.

1) Materials and Tool
The materials used include green LEDs, photodiode sensors BPW34, capacitors, resistors, IC TL072CP, IC LM324, IC LM358, IC 7809, DC to DC step-down module, transformer, battery, ON/OFF switch, push-button ON, project board, jumper cables, power supply cables, point PCB and single PCB. The component that used includes Arduino Uno as a microcontroller, LCD as a display for measurement results, wifi module ESP8266 for data transfer to the smartphone application. In this study, the research tools used were the Multimeter, Android Smartphone, and Easy Touch GCU.

2) Experiment
We took blood glucose level data by comparing the design module and Easy Touch GCU as much as five data with random time. This experiment utilized five subjects with ages of between 22 and 25 years. Data were collected before eating using the blood glucose module 5 times with a data collection range of 1 minute. After that, the measured results were compared with an easy touch GCU blood measuring device 1 time. There are differences in data collection because easy touch is an invasive measuring instrument, so it is not possible to take blood 5 times at the same time.  Figure 2 shows that after the introduction of Arduino, the module will be utilized, the program will analyze a finger that is set on the sensor. When the finger is placed on the probe between the photodiode and the LED, there will be an absorbance of the LED light received by the photodiode. The LED sensor will detect the potential differences in our bodies as an indicator of the blood glucose level. The photodiode converts the light absorbance into an electric current, processed by a signal conditioning circuit. In this process, the electric current is converted into a voltage and filtered to get the desired signal frequency, an analogue signal. The output of an analogue signal is processed by the microcontroller of the Arduino to be converted to the digital signal. The processed digital signal is displayed on the LCD as a blood glucose level measurement result.

B. The Diagram Block
The block diagram to explain the hardware design of measuring blood glucose levels consists of glucose sensors, namely LED and photodiode, signal conditioning, Arduino program, and LCD is illustrated in figure 2. The input of the system is the blood glucose level is detected by the LED sensor, a light source with a wavelength of light of 940nm. The photodiode circuit as a detector to receive the signal emitted by the LED sensor. The signal conditioning circuit was consisting of a high pass filter and a low pass filter to process signals from the sensor.

C. The Flow Chart
The flow chart of the Matlab GUI program is shown in Figure 4. The Matlab GUI receives data that has been sent by the smartphone via a wifi connection. On the home page, there are 3 options, name, registration, medical record, and close. Patients need to register by entering their name, date of birth, gender, address, telephone number, and email address. After the data are complete, select the registration button, the clear button is used to delete the data. After completing registration, select the home button to return to the initial menu, then select a medical record. Measurement data such as name, time, result, and measurement information will appear on the screen. We can save the measurement results by pressing the save button. To return to the main menu, select home. And to exit the application, you can select the exit button.

D. Hardware Design
We will explain the hardware design made to build a noninvasive measuring device of blood glucose level. Previously, electronic circuit simulations were carried out using Proteus Software to ensure that the circuit could run, as shown in figure  2. The analogue circuit on figure 3 contained photodiode sensor, high pass filter and low pass filter as described. The photodiode is a type of diode that resistance varies when exposed to light sent by the transmitter of LED. The resistance of the photodiode is influenced by the intensity of the light it receives, the lighter it receives, the smaller the resistance of the photodiode and, conversely. The photodiode sensor will change the amount of light received by the sensor into a change in conductance, namely the ability of an object to conduct an electric current from a material. The photodiode sensor used will be equipped with a 39kΩ resistor to protect it, the circuit output sends to the filter circuit.

E. Application Design
The smartphone application and medical record system were built using Blink and GUI MATLAB, respectively. Blynk is a new platform quickly building interfaces for controlling and monitoring hardware projects from iOS and Android devices which can transmit, save, and data monitoring. There are three mains in the Blynk platform, namely Cloud Blynk, Blynk application, and Blynk database, as shown in the following figure 6. After downloading the Blynk application, we can make project dashboards and helpers, sliders, charts, and other widgets onto the screen.

Send data
Convert data from apps (csv) to excel format The measurement data of blood glucose levels can be input into a medical record system that has been designed. A simple medical record system built using the MATLAB GUI. Graphical User Interface (GUI) is a display application from MATLAB that contains tasks, commands, or program components that make it easier for users to run a program in MATLAB. Users have a facility to create program application interfaces such as database applications. In this paper, a database based on local data becomes the privacy of the subject's medical data. The following is the program syntax in the MATLAB GUI to design the home display.
Listing program 1. The home display of medical record system % ---Executes on button press in pushbutton1. function pushbutton1_Callback(hObject, eventdata, handles) % hObject handle to pushbutton1 (see GCBO) % eventdata reserved -to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) close; guidata(Registration) % ---Executes on button press in pushbutton2. function pushbutton2_Callback(hObject, eventdata, handles) % hObject handle to pushbutton2 (see GCBO) % eventdata reserved -to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) close; guidata(Medical_Record) % ---Executes on button press in pushbutton3. function pushbutton3_Callback(hObject, eventdata, handles) % hObject handle to pushbutton3 (see GCBO) % eventdata reserved -to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) close;  Figure 9 is a display for the medical record of blood glucose level measurement which contains the registered patient's name, recording time, measurement results, and information for the patient whether blood sugar is normal, low, or high. For measurement data to be recorded, it needs to be stored so that it can be viewed as a patient's medical record.

III. RESULTS
This section will explain the results of the experiment that has been done. The results of the research on the design of measuring blood glucose levels based on the Internet of Things (IoT) database are in the form of prototype measuring instrument modules, module performance specifications, IoTbased applications, medical records of measurement results. This research was conducted to obtain a blood glucose measuring device that is easy to use with a non-invasive method and can be used for monitoring the health of blood glucose levels. The android application was created using Blynk, and the database of medical records for blood glucose measurements was designed from the MATLAB GUI with the results of storing databases in the form of data on Ms. Excel.
In this study, sensor testing was carried out on the designed module. Photodiode sensor testing is done by placing the probe on the tip of the subject's finger. The LCD will display the output voltage from the photodiode sensor. Testing using the AVO meter, the value of the voltage generated by the photodiode sensor circuit in the with and without the finger of 0.03V and 5V, respectively. Principally, the non-invasive method is that the light from the LED will penetrate the human skin and blood vessels, then the transmitted light is received by the photodiode sensor, and the value is converted into blood glucose levels. So, the thickness of the finger will affect the intensity of light received by the sensor.
Measurement of blood glucose levels was carried out three times with data collection with five subjects aged 22-25 years on before meals conditions. The results of measuring blood glucose levels using the module that has been made are compared with the measurement results of the invasive Easy Touch measuring instrument. The measurement results were carried out by validating the value of blood glucose as measured by measuring blood glucose.
The first experiment was to measure glucose levels using Easy touch and showed the value of the ADC microcontroller circuit. The results used to create a program to determine the value of glucose parameters, as shown in figure 9. Figure 9 shows the relationship between ADC values and the results of measuring blood glucose levels. The measurement result of blood glucose levels are higher, the higher the ADC output value.
Based on table 1, the results of measuring blood glucose levels for the five subjects showed that the minimum standard deviation and accuracy of 0.008 and 99.2%, respectively. The results showed, as shown in figure 10 that non-invasive glucose monitoring has the potential to measure glucose levels with sensitivity and linearity of 3.21 mg/dL and 98%, respectively. The resolution of the module for blood glucose levels measurement of 0.002 mg/dL. We consider the Blynk application installed in the subject mobile. Particularly, the installation of the wireless nodes is based on module Wi-Fi (ESP8266). After the blood glucose measurement module is activated, the application is operated by an Android smartphone. First, check the android connection with Wi-Fi, the Blynk application, set it as a tool interface that displays the measurement results of the blood glucose levels. The blood glucose levels information was inputted into the medical record system as a local database at the same time. The microcontroller will send the data digital via the ESP8266 module contained in the Node-MCU via a wireless network between the device and the Android smartphone. The ESP8266 module is a microcontroller integrated with a Wi-Fi connection. It can connect directly to make a TCP/IP connection and affordable solution for Internet of Things applications. ESP8266 module sends data in the form of string data received by the Blynk application server using a Wi-Fi connection. The results are displayed on an android smartphone using the Blynk application are shown in figure 12. To re-measure it by pressing the OK button on the module was designed. The measurement results displayed in the Blynk application will be saved in the Blynk cloud of each subject. The use of smartphone applications for health monitoring has been widely practiced in everyday life. The designed application is wearable devices. This smartphone application can give the visualization of the measured values.
However, there is no medical record of the measurement results and personal data of the subject. It is challenging to monitor measurement results and provide information related to the analysis of these results. The medical record will make it easy to warn the subject to take routine measurements. In this paper, the medical record system will be built using the GUI MATLAB is shown in figure 9.
This system consists of personal data of the subject and medical records of measurement results. The medical record application that was built aims to have a database of subjects used by doctors to monitor health. The results of medical records are confidential so that they can use them as a reference in providing appropriate action to patients. With this simple medical record application, personal subject information such as name, birth date, gender, phone number, and email, measurement results can be obtained. They can write down the patient's condition. They can record the next measurement in real-time. Doctors can use the number phone and email to give information or reminder to the patient about the health and the result of blood glucose level.

IV. DISCUSSION
In this paper, a simple medical record system for blood glucose measurement was proposed. The results showed that non-invasive glucose monitoring has the potential to measure glucose levels with sensitivity and linearity of 0.86 mg/dL and 99%, respectively. We designed a simple application and medical record using Blynk applications and GUI MATLAB for recording the measurement results of blood glucose level. The designed application is wearable devices and able to give the visualization of the measured values. In the future, applications that have been designed can be used by doctors for monitoring the measurement of the blood glucose level and provide information to patients by mobile applications, sending an email or message the measurement results, the decision of a disease or not, and reminds the re-measurement time.
The performance of this work also compared to other works [4], [11], [17]. The results of this study were compared with research by Lidia et al who made a computerized diabetes detection and monitoring system. The results show it has the advantage of having two systems, namely real-time monitoring with an android application and medical records with database storage [4]. The results of research an diabetes monitoring system based on Internet of Things, where the results of measuring blood sugar levels can be displayed on a web-based application [11]. The further research that can be done is by measuring blood glucose levels based on non-invasive with a hybrid system, namely real time measurements, monitoring by doctors, database storage in patients and reminders of examination times.

V. CONCLUSION
This study has demonstrated the development of the noninvasive blood glucose level from a subject with real time. This study was built based on an Arduino microcontroller and some analogue circuit and a internet transmitter to connect to the android device. This study has proofed that the accuracy is feasible to be used to monitor the blood glucose level in real time and the data recording can be read from the android device.
In the future, this study can be fabricated and used in the small clinic in the villages at a low cost.