Artificial Diabetes Treatment 19314

Redefining Diabetes Management for a Brighter Future.

Let AI help you 😉

?? units

Abstract

There is no doubt that the leak of the health care system in Egypt is one of the challenges that is represented as a priority for the country and the citizens. The Egyptian healthcare system faces multiple challenges in improving and ensuring the health and well-being of the Egyptian people and facilitating disabilities and chronic diseases. One of the most effective variables or branches in that journey is diabetes which affects 15.2% of adults in Egypt. Type 1 diabetes is very different from your standard disease. Insulin requirements vary greatly from one day to another and there is no way patients can know what they need. Of course, diabetes treatment is based on many backgrounds and following the prior solutions and making some modifications that improve the function of the solutions. One of these important backgrounds is a research group, of Roman Hovorka, a Professor at the University of Cambridge, who is working on the development of an algorithm that can accurately predict insulin requirements for a specific patient in real-time, it started firing from the USA which can be used to control insulin delivery via an insulin pump. This mechanism is not used because of the manual control of the system. The modification is represented in a sustainable monitoring measurement and treatment system related to a pre-trained AI prediction model. Also, the Diabetes Prevention Program (DPP) worked on diabetes type 2 and aimed to assess the effectiveness of different interventions in preventing its development and reducing its risk. This solution is not used as it worked on diabetes type 2 treatment. The modification done is working on diabetes type 1 which is more harmful for the patient. The main challenge is to make an ICT (information and communication technology) system that connects between pre-trained AI model and a hardware system that facilitates the life of the patient and is districted with specified design requirements: 77:90 % accuracy of the output due to the prototype, and 15 minutes as a maximum for the time response. So, the solution was dependent on 1- sustainable monitoring of glucose measurement, 2- A pre-trained AI model for insulin dose prediction, and 3- An insulin pump representing taking the action and the design requirements were achieved: 87.5% accuracy was achieved comparing with the standard insulin injunction in real life due to glucose blood percentage, and time response of 1 minute facilitating the chronic disease patients.

Introduction

Egypt's grand challenges are the obstacles that hinder its development and nourishment. These challenges include Urban congestion, Water scarcity and healthcare problems. The real challenge is to administer the public health problem that can be found in chronic diseases or disabilities which have a significant effect on the country's economy and society Directly which represents the cost of direct medical care, health care facilities, and hospitals. It also leads to decreased labor participation due to disability, and productivity losses due to early retirement and mortality. Annual cost analysts indicated in 2010 that the economic loss due to type 2 diabetes in Egypt is $1.29 billion per year (regardless of the cost associated with prediabetes and reduced productivity). The emergence of the insurance market will have a significant impact on the private healthcare sector and may also drive, as seen in many other markets, the need for more cost-effective practices and greater efficiencies in the sector. Universal Health Insurance (UHI) was launched in 2018 to reform the fragmented healthcare system in Egypt. By 2030, there will be an additional demand for 88,000 doctors, 73,000 nurses and 18,000 pharmacists. Furthermore, to improve the provision of healthcare services in Egypt, the country needs to adopt new medical technologies. The main objective is to solve this problem using an AI decision-making system to facilitate the life of the patient. Our solution was chosen for a chronic disease which is Diabetes mellitus. Diabetes is a chronic disease that occurs either when the pancreas does not produce enough insulin or when the body cannot effectively use the insulin it produces. Data regarding the epidemiology of DM in Egypt are sparse. Nevertheless, according to the IDF, Egypt ranks ninth in the prevalence of DM worldwide, and the number of adult diabetic patients was 8,850,400 in early 2020, with a prevalence of 15.2% (R.Abouzid et al., 2022). We were inspired by the invention of a scientist called Roman Hovorka at Cambridge University. He could make a successful insulin pump which was called an (Artificial pancreas) (Nishat, 2022). The artificial pancreas consists of a subcutaneous glucose monitor, a control algorithm, and an insulin pump. Our solution includes the development of computer-based simulations for pre-clinical evaluation and optimization of the artificial pancreas. After analyzing the problem and the prior solution, we concluded that the solution should have a rapid effect on the patient’s blood glucose when it rises quickly. Also, the insulin pump should be accurate enough to reduce blood sugar levels in the blood. So, the design requirements were set: 1-The whole system will start injection after 1 minute of its action 2-The accuracy of injection should be 77%–100% of all delivered boluses per system were within ±15% of the intended bolus volume (Freckmann et al., 2019).

Materials

Materials

Methods

The prototype has three parallel systems or structures that form a hybrid closed loop: First: The glucose monitoring system - Second: The microcontroller system -And third: the insulin pump. First, the glucose monitoring system: It consists of an ESP32 Cam (shown in Figure 1) that will take live photos for the screen of the glucometer and will represent the reading of the glucose sample in the form of numbers on the screen. Connection and uploading code: This will be done by connecting the ESP32 Cam to FTDI. The connection is done by connecting the TX pin of the FTDI (shown in Figure 2) to the VOR pin of the ESP32 (shown in Figure 3) cam and connecting the RX pin of the FTDI to the VOT pin of the ESP32 cam. Connecting the ground of the FTDI to the ground of the ESP32 cam. Connecting the VCC pin of the FTDI to the 5-volt or 3.3-volt pin of the ESP32 cam. Connecting the IO0 pin of the ESP 32 Cam to the ground of the ESP32 cam. Using Arduino IDE application to program the ESP32 cam using a code uploaded on it for connecting it to the internet network using the SSID of the network and the password for the second stage of our system. (“ https://github.com/nnnkjoioi/ESP32-Camera-connecting-to-wifi.git ”) The second stage of our system: it is represented in the OCR system (open cv libraries). This OCR can extract numbers from the images that are sent to the OCR code by the ESP32 cam by linking the OCR to the code of the ESP32 cam. The images will be sent by Wi-Fi module attached with ESP32 cam. This was achieved by following this code: ( “ https://github.com/nnnkjoioi/ESP32-Camera-and-Text-Recognition-Code/tree/2f45852d7dfd88e2ea182d6b0ccc88fbfb247119”) The microcontroller system (the third step): where the OCR sends the extracted number from the image as a numerical reading to our microcontroller (ESP32 chip), which sends the received reading to the fourth stage of our system. The fourth stage of the system: is the pre-trained AI( Sklearn) (dose prediction), which was programmed using Python language, ( the code link: “ https://colab.research.google.com/drive/136r--3UYWwQWG1Q16_Ix5g29ViowyPqf#scrollTo=FygSMZAFCEAI”). Using a code that is uploaded to the ESP32 chip by using the Arduino IDE application provides linkage to the pre-trained AI into the code. After the reading is sent to the pre-trained AI it will have the ability to decide according to the sent measurements as it has trained on the variables (the age, the glucose reading, and the time of this intake). This AI model (name) was trained in Python language using an application (name). This decision-making will be represented in insulin doses, which will be sent in the form of readings to the fifth step of our system, The fifth step: which is the ESP32 chip. It is programmed using the Arduino IDE application. Using an ordinary (if) condition code (name of code). This ESP32 chip will be connected to a servo motor which is calibrated by the code to rotate with a specific angle according to the reading that comes with the insulin dose from the AI to the ESP32 chip. The insulin pump (shown in figure 4) : This servo motor is connected to a syringe and would be set on a gear plastic rack, connected to a 5-volt battery. This syringe will consist of insulin and connected to an infusion set which will be injected into the patient's abdomen. This pump will have the ability to be refilled if needed from an insulin tank by using a hose that can be re-directed to the tank instead of the infusion set that is involved in the pump itself, the pump will be provided with the cool face of the Peltier under the insulin tank.

Test Plan

The test is conducted by making different samples of glucose solutions, A control sample is prepared to simulate the standard concentration of glucose in the blood. Other samples with different amounts of glucose were prepared. Drops from each sample are put in glucose strips, and then strips are embedded in the glucometer allowing it to start its glucose level measurement. The whole system starts to function ending up with the action of insulin injection. The time of action is measured, and the amount of insulin injected is calculated to determine the accuracy of the actual injection relative to the intended bolus of insulin.

Results

According to the test plan, after the prototype was built, it was tested to make sure that it achieved the design requirements or not: First test: in the first trial, The AI model was sustained with data for old people which made a distortion in the insulin dose. The accuracy of the injection action was 50% accuracy. It was considered a negative result as it didn’t achieve the design requirements. Second test: After the data supplied for the AI model was fixed, and by repeating the same procedures. The accuracy of injection was flourished to be approximately 87.5% representing a positive result.

Analysis

The grand challenge of public health in Egypt is revealed in a diverse array of issues, Egypt, with its rich history and cultural heritage, faces a pressing dilemma as it faces a dual burden of Chronic diseases and permanent disabilities. Within this complex problem, diabetes has emerged as a central point, significantly impacting the health and well-being of the Egyptian population. The complex interaction of genetic problems, lifestyle factors, and socioeconomic factors has contributed to the rapid spreading of diabetes, Diabetes type 1 is growing at 6.7% per year in Egypt and affecting 15.2% of the Egyptians presenting a terrible obstacle to public health challenges (Type 1 Diabetes Index, 2022. As we navigate this many-sided view, this exploration seeks to shine a spotlight on the diabetes epidemic in Egypt. In an attempt to solve the issues of this pressing public health challenge, our focus turns to Diabetes 1, a chronic disease affecting many lives. Our innovative solution, an automatic hybrid loop consisting of sensation, management center and decision-making prototype, holds promise in transforming the management of diabetes and achieving our design requirements. The pancreas is the organ located behind the stomach and is approximately six inches long. It produces hydrophilic insulin which is often referred to as an "anabolic hormone", because it promotes the synthesis of complex molecules, such as proteins and glycogen. It encourages cells to take up nutrients for growth and energy storage. When blood sugar rises, insulin is released to attach to cell surfaces, particularly in muscles and fat. This triggers processes allowing glucose to enter cells, lowering blood sugar by storing it inside. (BI.3.07), Insulin acts just like a controller, preventing high blood sugar. Insulin lowers blood glucose levels by stimulating nearly all body cells outside the brain to take up glucose from the blood. It's made specifically by beta cells in pancreatic islets of Langerhans. Only 1–2% of the pancreas consists of hormone-secreting cells (BI.3.08). Glucose test strips used in the glucometer (shown in figure 5) can measure the blood level in a subtle mechanism: First, the enzyme glucose oxidase catalyzes the oxidation of glucose forming hydrogen peroxide by the reaction: Glucose + Oxygen (Glucose Oxidase) Gluconic Acid + Hydrogen Peroxide (CH.3.15) The test strip contains electrodes, and the generated hydrogen peroxide participates in an electrochemical reaction producing a measurable electrical current or voltage change. (CH.3.14) The change in electrical signal is proportional to the amount of hydrogen peroxide, which, in turn, reflects the original glucose concentration in the blood sample. The glucometer interprets this signal and displays the corresponding glucose level on the device (shown in figure 6) The Rx pin is used to receive data. The Tx pin is used to transmit data. When two devices are connected using a UART, the Rx pin of one device is connected to the Tx pin of the second device. Power Supply Pins: VCC, this pin serves as the power supply input, typically connected to a 3.3V power source (shown in figure 7). A cloud API is a software interface that allows applications to interact easily and quickly with cloud-based services, such as storage and database solutions. The cloud is used for AI training because it provides scalable and cost-effective access to high-performance computing resources, enabling efficient and flexible model training. A glucose stock solution was made to mimic real human blood conditions, starting with a standard glucose concentration of 90 mg/dL (5 mmol/liter), which is typical in the human body. To achieve this, 0.09 milligrams (0.5 mmol) of glucose were measured and mixed Equation: M= (number of moles of solute / volume of the solution) With 100 ml of water and different concentrations were prepared using formula of Equation(1). (CH.3.04) A glucometer was used to measure glucose levels, and excess glucose was added to simulate the state of a patient with high blood sugar (A.urry et al., 2016). Prediabetes is considered when blood sugar is between 100 to 125 mg/dL (5.6 to 6.9 mmol/L), while diabetes is diagnosed at 126 mg/dL (7 mmol/L) or higher. The experiment compared the amount of insulin needed to decrease glucose levels, with 1 unit of novo insulin reducing 2.76 mmol of glucose per liter of blood. This helps us understand how much insulin would be required in a normal human body to restore glucose levels. In the decision-making phase of our prototype, the insulin pump incorporates a medical syringe filled with Novo-Rapid insulin. This insulin type acts swiftly, taking effect in 5 to 15 minutes, peaking in 1 to 2 hours, and lasting for 4-6 hours (Luis Bedini et al., 2015). To translate the servo's angular motion into the syringe's linear motion, we introduced a plastic gear rack. This connection is designed to enhance the moment of motion, and we optimized it using the formula M=F*L (where M is the moment, F is the force, and L is the radius) (ME.3.01). The servo motor, guided by information from the ESP, ensures precise control. The servo translates the dose amount in a multi-step process: unit of insulin corresponds to a 0.3-degree rotation. This rotation translates to a 0.2 mm movement on the plastic racket. The racket's movement presses on the syringe, injecting 0.01 ml of insulin, equivalent to 1 unit. Trial 1 didn't meet our design requirements, marking it as a negative outcome. We know that ageing and average blood glucose levels in people with diabetes are linked. For every decade increase in age, there's a 0.154 mmol/L rise in fasting plasma glucose (TC ko et al., 2006). This happens because as people age, their pancreas function gradually declines, leading to reduced insulin secretion and higher blood glucose levels. Integrating such information for old people into our AI model would result in a significantly incorrect prediction for the insulin dose. Unfortunately, the prototype's final accuracy was only 50%, making it unsuitable for diabetes patients. Trial 2 was conducted; Information was gathered about a variety of ages to give the AI model a strong base to predict. The AI model could predict the amount precisely giving a 90% accurate result. The result was positive, achieving the design requirements.

Conclusion

Throughout the process of constructing our prototype and following the various positive and negative outcomes along the way, Similar to any prosperous project, the production of an artificial has resulted in certain findings that could help in future research. The artificial pancreas project offers better Blood Glucose Control, precise Insulin Dosing and significant reduction in Severe Hypoglycemia. It also offers a cheap way for dominating the blood glucose level throughout the day. Diabetes mellitus patients have to use rapid insulin, especially diabetes type 1 as the quick action of rapid insulin allows individuals to adapt their insulin dose to the size and composition of each meal. Information supplied to AI model have to be cover the medical case for a wide range of life stages. As narrowing the field of data into a very specific range can results in wrong outputs. When the accuracy of insulin injection increases the likelihood of insulin wastage, as the prescribed amount is delivered efficiently and avoiding hypoglycemic episodes contributes to overall well-being and prevents potential complications associated with low blood sugar. Finally, opting for rapid-acting insulin is crucial, irrespective of other insulin types, as it swiftly lowers blood glucose levels during meals due to its quick onset of action.

Recommendation

During the execution of our prototype, numerous challenges and opportunities for project enhancement arose. However, constraints such as a limited budget and other obstacles prevented the implementation of certain improvements. Therefore, it is advisable to consider the following:

• Using nRF52840 as a microcontroller instead of ESP32, which is designed for wireless communication and IoT applications.

• Using a stepper motor provides a simple design with excellent low-speed torque and smoothness.

• Using an open-source data glucometer in glucose measurement, like a free-style libre device to make a direct connection with the prediction of the AI model.

• Using Raspberry Pi, which is a small and affordable single-board computer, has proven to be an excellent platform for AI development.

• Using a glass syringe instead of plastic to decrease friction and make a more precise calibration.

Literature Cited

A.urry, L., Reece, J., L.Cain, M., V.Minorsky, P., & A.Wasserman, S. (2016). Hormones and the endocrine system. In L. A., Urry, J. Reece, M. L.Cain, P. V.Minorsky, & S. A. Wasserman, Campbell biology (pp. 1045-1050). Pearson.

An Overview of Diabetes Mellitus in Egypt and the Significance of Integrating Preventive Cardiology in Diabetes Management. (2022). https://doi.org/10.7759/cureus.27066

Freckmann, G., Kamecke, U., Waldenmaier, D., Haug, C., & Ziegler, R. (2019). Accuracy of Bolus and Basal Rate Delivery of Different Insulin Pump Systems. Mary Ann Liebert. https://doi.org/10.1089/dia.2018.0376

Luis Bedini, J., F. Wallace, J., Pardo, S., & Petruschke, T. (2015). Performance Evaluation of Three Blood Glucose Monitoring Systems Using ISO 15197: 2013 Accuracy Criteria, Consensus and Surveillance Error Grid Analyses, and Insulin Dosing Error Modeling in a Hospital Setting. Sage , 10(1). https://doi.org/10.1177/1932296815609368

Nishat. (2022, January 20). The artificial pancreas uses an algorithm to protect the body from diabetes. openaccessgovernment. https://www.openaccessgovernment.org/artificial-pancreas-2/127932/

R.Abouzid, M., Ali, K., ELkhawas, I., & M.ELshafei, S. (2022). An Overview of Diabetes Mellitus in Egypt and the Significance of Integrating Preventive Cardiology in Diabetes Management. National Library of Medicine. https://doi.org/10.7759/cureus.27066

TC ko, G., PS WAI, H., & SF Tang, J. (2006). Effects of Age on Plasma Glucose Levels in Non-diabetic Hong Kong Chinese. National Library of Medicine. https://pubmed.ncbi.nlm.nih.gov/17042062/

Type 1 Diabetes Index. (2022, September 8). EGYPT - Type 1 Diabetes Index. t1dindex. https://www.t1dindex.org/countries/egypt/

Our Results

Test Plan
0
Accuracy

Design Requirements

0
Activity time

our team

Abdallah Ashmawy

1921014

Omar Homouda

1921023

Mohammed Rabee

1921029

Thanks for your Attention!

Mohammed Rabee mohamed.1921029@stemgharbiya.moe.edu.eg
Abdallah Ashmawy abdallah.1921014@stemgharbiya.moe.edu.eg
Omar Homouda omar.1921023@stemgharbiya.moe.edu.eg