The Use of Web Technology and IoT to Contribute to the Management of Blood Banks in Developing Countries

: Health-care-sector-related activities are more accessible and faster as a result of technological development. Technology such as the Internet of Things (IoT) can work with blood bank services to manage and provide healthy blood in emergencies. However, there are many problems in blood bank management and inventory monitoring, especially in developing countries as compared to developed ones. The lack of an adequate and safe blood supply is a major limitation to health care in the developing world. The instability of the electric power in developing countries may lead to a temperature departure from the recommended for keeping blood inventory, and the use of manual systems, which are characterized by time and resource exhaustion and human mistakes, augments the management problems. This study aims to introduce a reliable, practical application to manage and organize the blood bank, manage donor information, monitor inventory, and obtain matching blood types as quickly as possible. The proposed system was designed and implemented in two parts: using Web technology for enhanced data management and using an IoT sensor for blood inventory temperature monitoring in real time. The test stage helped us to measure the Web application’s functionality with sensors, and the results were encouraging. Obtaining and monitoring blood bank data were made easier in real time by using the black box method for functionalities testing. The evaluation step was performed using a questionnaire instrument based on three parameters: Satisfaction, Effectiveness, and Efﬁciency. The questionnaire was answered by 22 participants working in the blood bank management ﬁeld. The results indicated that end users generally responded positively to the system which improved blood bank administration and services. This indicated efﬁciency of the application and the desire to adopt it. Integrating the two technologies can enhance usability and applicability in the health care sector.


Introduction
Annually, more than one million units of blood are donated worldwide. Even at this rate, the need for blood is still severe and far from being met [1]. It is estimated that about 80% of the world's population has access to only 20% of the world's blood supply [2]. Blood is a necessary resource for special treatments and emergency surgeries following natural disasters, accidents, armed conflicts, etc. The blood bank system (BBS) is a vital and rare resource in health care systems that must be properly, accurately, and directly managed [3][4][5][6]. Good management can help the wounded and patients with life-threatening diseases, reducing the risk of death. The significance of the blood bank system is emphasized in emergencies, disasters, and wars [7]. It is also responsible for providing a range of services on an ongoing basis, such as the process of donating blood, its preservation, and its transfusion, and for providing reserves of blood and its products [8].
All that is needed is the development of health care software and its integration with different technologies, such as using IoT technics based on mobile or Web applications.
In ref. [27], the researchers introduced an application that connects the givers and the blood requesters who live in Nineveh province, Iraq. The blood requester can search and directly contact donors without any third-party involvement. The Google Firebase Real-Time database and one WebSocket two-way channel were used, and data were stored a JavaScript object notation (JSON) file. Another study in [28] showed how important it is to use model inventories, both probabilistic and non-probabilistic, to help blood banks to find the optimal quantity of blood and product required while trying to make the total cost lower. Additionally, some researchers in [29] discussed solving the problem of blood group transfusion in the National Bank of Iraq using multi-models consisting of a transfusion model, particle swarm optimization algorithm, and analytic hierarchy process to find the best transfusion from the donors to the persons who need it. However, none of these studies designed or developed a blood bank system to improve the traditional paperwork system.
The Central Blood Bank of Salah El-Din in Iraq is responsible for collecting blood in the city and providing it to patients in hospitals, banks, and sub-centers. It is a traditional, paperwork-based system that is faced with human mistakes, delays in the retrieval of information, and the absence of a central database of donors' records, which may cause confusion or real obstacles owing to the lack of an automated computer system or an effective electronic mechanism for communication between the central bank and branch centers. Such problems endanger patients' lives and may lead to death, especially in critical times. The main objectives of this study are to: 1.
Study and analyze the existing system (the Central Blood Bank of Salah ad-Din); 2.
Design and implement the proposed system Iraq Red Wings (IRW) using Web technology and (IoT) technics; 3.
Test and evaluate the proposed system.
The contributions of this paper can be summarized as follows: • A detailed and applicable framework in the field of BBS systems that contributes to developing this field in developing countries; • A proposed solution to the instability of the electricity supply in developing countries that monitors the temperature of blood refrigerators in real time and stores a local copy; • An analysis and assessment of the requirements of the Iraqi blood bank structure; • The design, development, and implementation of a BBMS for a city in Iraq with a total area of 23,398 km 2 and a population of 1,595,235 that has suffered from terrorism and wars for more than 40 years [30]; • An evaluation of the system during the parallel operation period, which lasted one month, by 22 experts in the field of blood banking.
The significance of the proposed system is manifested in its ability to manage and organize the blood bank without human interaction, avoid errors, maintain a high level of accuracy and reliability, monitor the blood inventory for hazards, such as unsuitable temperatures or being out of date, etc., and improve the functionality in storing, retrieving, and analyzing information, which will be helpful, especially in emergencies.
This article is divided into sections: (1) Introduction, which contains an overview of the new technology that affects the health care sector; (2) Related Works, which discusses traditional vs. automated systems, IoT-technology-based systems, and the gap study; (3) Methodology, comprising the analysis and design of the proposed system; (4) The Implementation of the Proposed System in two parts: the Web application part and the IoT technics part; (5) System Testing and Evaluation, which contains the functionality testing and temperature sensor testing; and, finally, (6) Conclusion.

Related Works
It is crucial to present an overview of the various types of current blood bank system, the problems they face, and their limitations, especially in developing countries. Addition-implement the databases since it provides a technique for data storage and retrieval. Some researchers proposed both Web-and mobile-based applications for improved and more efficient blood bank information handling and to establish a direct connection between the donor and the beneficiary [31,33]. However, despite the efforts made to design applications based on smartphones, the Web, and other technologies, these studies did not involve Internet of Things technologies in the development of the blood bank, monitoring, and tracking systems.
The Internet of Things (IoT) has attracted the interest of researchers and engineers worldwide as a vital component of the next generation of intelligent information technology [34] which can contribute to improving people's lives. It can also help to save time and money by making suitable decisions quickly [25]. The medical sector is a fundamental area in which to implement IoT technologies, and it is the most popular area for IoT-enabled applications [35]. IoT devices are shared via a Web server, and various sensors, which are easily customizable and have a low cost, are used to collect data, as well as the IoT system, which can be linked to mobile applications [18]. Smartphones and other IoT devices are critical for extending and utilizing this new IoT domain [35].
To enhance blood bank systems, a practical method for an intelligent blood management system was introduced in [36] based on new IoT techniques, Web services, and mobile apps that improve the communication between different blood banks and attempt to solve the weaknesses in management and awareness, especially in traditional systems. The study in [37] provided a total solution by designing an intelligent system that improves automation via the IoT and connects blood banks, donors, and patients when donating and supplying blood. It can be used to alert the nearest blood banks in emergencies to ensure the availability of safe blood for the needy with minimal effort via GPS data technics. In [32], a smart, IoT-based network and an intelligent app for blood banks, MOH hospitals, and donors were improved. The system includes Web and mobile apps.
Future Internet of Things technology will provide smart devices with environmental sensors and reinforce next-generation networking and radio frequency identification technology (RFID). RFID devices and sensors are among the most advanced technologies developed in recent years, having a significant impact on the physical communication layer of the Internet of Things (IoT), as well as on logistics and robotics. It has taken a significant amount of research to integrate them with various technologies, such as freight systems, and to improve the efficiency of supply chains [38,39]. An L-resonator-based, chipless RFID tag was used in ref. [10] for detection and tracking in a blood bank management system and identifying blood bags and also as a blood group identifier smart label for donors and patients.
However, for essential tasks of either tracking or tracing, RFID alone cannot meet the financial and practical requirements of building an extensive and costly infrastructure of readers [38]. Another technique is a Raspberry Pi has been used with an Android app in [40] to build a system and provide the result on a real-time basis. Additionally, in ref. [41], an automated blood bank system based on an Android app and Raspberry Pi was suggested for getting blood donors together in one location. A message is delivered to a specific blood donor via a GSM modem. A proposal was made in ref. [42] to notify blood bank officials and donors about the need for blood donation using IoT technologies. Ultrasonic sensors are used for distance measuring connected to blood bank refrigerators, allowing a mobile application to determine the condition of any blood type. An LCD monitor in each refrigerator displays the current amount of each blood group via built-in sensors and is integrated with the IoT system.
Despite this, there have been continuous losses of acquirable blood from individuals or in inventory because most existing blood bank systems are manual and cannot download the latest update of the donation data and are severely susceptible to human mistakes. Additionally, previous studies have not provided satisfactory solutions to the problem of irregular electric current in developing countries and the risks resulting from temperature deviations from the recommended range. So, providing safe and reliable blood requires a system based on a desktop app, Web app, or mobile app to work with recent technology to manage blood bank processes, avoiding staff errors successfully.

Iraqi Blood Bank System Structure
It is essential to clarify that the Iraqi Ministry of Health is responsible for supervising, managing, and issuing instructions for the working mechanism in blood banks, blood donation centers, and sub-blood banks in all Iraqi governorates, including the National Center for Blood Transfusion in Baghdad, which is responsible for managing health care blood transfusion services. It is also considered the reference center for blood transfusion services in Iraq under the supervision of the Iraqi Ministry of Health, and it represents the first level in the structure of Iraqi blood bank work. The second level includes blood banks, blood donation centers, and the sub-blood banks of hospitals in the 18 Iraqi governorates, which also follow the policies of the Iraqi Ministry of Health. Lastly, the third level of this hierarchy, as shown in Figure 1, includes the blood banks, blood donation centers, and subblood banks in each governorate separately, such as those in the Salah ad-Din governorate.
The Salah ad-Din governorate is one of the Iraqi governorates located in the center of Iraq, north of Baghdad. Its population is 1,595,235 million. Tikrit city is considered the center of this governorate and includes three blood donation entities: First, the Central Blood Bank of Tikrit, which was selected as a case study for this work. It is responsible for blood transfusions for all parts of the governorate, as well as for four primary operations (blood tests, blood draws, production, and blood supply). Second, four blood donation centers, which are responsible for three operations (blood tests, blood draws, and blood supply) distributed over four cities (Samarra, Balad, Doz, Sharqat). Third, sub-blood banks in each hospital and some medical centers, which are responsible for two operations (blood store, blood supply) in addition to the cross-matching operation.
All these banks and centers work with the same mechanism so that the blood and its components can be exchanged, especially in critical times when a shortage occurs in a particular blood group. In addition, they cooperate with the National Center for Blood Transfusion in Baghdad. All the information above was sourced from the official guide [43]. banks in each hospital and some medical centers, which are responsible for two operations (blood store, blood supply) in addition to the cross-matching operation.
All these banks and centers work with the same mechanism so that the blood and its components can be exchanged, especially in critical times when a shortage occurs in a particular blood group. In addition, they cooperate with the National Center for Blood Transfusion in Baghdad. All the information above was sourced from the official guide [43].

Methodology
This section introduces the methodology of the study, as shown in Figure 2 below.

Methodology
This section introduces the methodology of the study, as shown in Figure 2 below.

The Analysis of the Existing Paper-Based System
At this point, it was necessary to analyze the existing blood bank system to recognize and define the problem. This step involved dividing the system into stages to facilitate analyzing the situation, detect the main goals, select what needs to be created, and engage the manager and medical staff to define the new system requirements. Tikrit's Central Blood Bank was chosen as an actual case study to collect all the data required to design the new system. It is considered the authority responsible for managing and distributing blood and its components within the governorate.

The Analysis of the Existing Paper-Based System
At this point, it was necessary to analyze the existing blood bank system to recognize and define the problem. This step involved dividing the system into stages to facilitate analyzing the situation, detect the main goals, select what needs to be created, and engage the manager and medical staff to define the new system requirements. Tikrit's Central Blood Bank was chosen as an actual case study to collect all the data required to design the new system. It is considered the authority responsible for managing and distributing blood and its components within the governorate.
The following techniques were used to gather the information: 1.
In this study, a structured and semi-structured interview has been conducted. The structured interviews conducted with a limited set of pre-prepared questions, with the manager and the medical staff. In addition, semi-structured interviews were conducted to obtain more intensive information. This type of interview is characterized by adaptability, allowing new questions, along with the pre-prepared ones, to be raised in response and discussion of what the interviewees say [44,45]; 2.
Documentation: the official document (the official guide) [43] provides the work policies and rules that the blood banks should apply under the supervision of the Iraqi Ministry of Health and was adopted as the source of required information in this study.
These techniques helped us to analyze the existing system, which is described as follows.

The Flow of the Existing System
The three blood donation entities in the Salah ad-Din governorate are managed manually. Every day, the existing systems must maintain nearly a hundred records. In an emergency, it can be difficult to find an exact match between the blood groups of the donor and the patient. This may cause a delay in blood transfusion within the specified time, which may lead to a severe error.
The current mechanism is described in detail for the Central Blood Bank in Appendix A, which is summarized as follows: 1.
All blood bank procedures and operations (blood tests, blood wasting, blood production, blood supply, blood group matching, blood production) are managed and monitored through a paper-file-based, traditional system; 2.
The information on blood donations and donors is saved via an Excel file; there is no central digital database; 3.
The bank's management relies on traditional methods to store blood bags and inventory control; 4.
The daily updated data (between the three entities) are manually recorded and displayed via the WhatsApp application; 5.
The daily donation process is followed by all details of the preparation of the patients in hospitals or sub-centers through the paper record, which is produced daily by the responsible employee in the reception unit; 6.
The communication process between the three entities is conducted via WhatsApp.
Finally, it is worth declaring that, in the analysis phase, we chose to use the parallel operation method to convert the paperwork-based system into the new, proposed system with an initial period of one month for operating and for testing. This conversion occurred because the old system's technology was obsolete. Parallel running is defined as the strategy to convert from the current (old) system to the new one after studying its problems and flaws by running the two systems alongside each other, entering the same data, and executing the same processing steps. The outputs are then compared, and the new system's reliability and performance are verified [46]. If the new system is accepted after the indicated time, the existing system will stop operating and will be replaced by the new system. Figure 3 illustrates the parallel running method.

The Proposed IRW System Design
The design stage of the system was essential for choosing the suitable technologies: hardware such as sensors and microcontrollers, and software, including Hypertext Prepro-cessor (PHP), a server-side scripting language for designing website pages, and BootStrap, a powerful front-end framework which is used to create modern websites and Web applications. SQL language was adopted for accessing and manipulating databases; MySQL for storing the database; and a QR code technique for automatically saving the blood bag information. Another part of this stage included designing the flowcharts, activity diagrams, and interfaces design.

5-
The daily donation process is followed by all details of the preparation of the patients in hospitals or sub-centers through the paper record, which is produced daily by the responsible employee in the reception unit; 6-The communication process between the three entities is conducted via WhatsApp.
Finally, it is worth declaring that, in the analysis phase, we chose to use the parallel operation method to convert the paperwork-based system into the new, proposed system with an initial period of one month for operating and for testing. This conversion occurred because the old system's technology was obsolete. Parallel running is defined as the strategy to convert from the current (old) system to the new one after studying its problems and flaws by running the two systems alongside each other, entering the same data, and executing the same processing steps. The outputs are then compared, and the new system's reliability and performance are verified [46]. If the new system is accepted after the indicated time, the existing system will stop operating and will be replaced by the new system. Figure 3 illustrates the parallel running method.

The Proposed IRW System Design
The design stage of the system was essential for choosing the suitable technologies: hardware such as sensors and microcontrollers, and software, including Hypertext Preprocessor (PHP), a server-side scripting language for designing website pages, and Boot-Strap, a powerful front-end framework which is used to create modern websites and Web applications. SQL language was adopted for accessing and manipulating databases; MySQL for storing the database; and a QR code technique for automatically saving the blood bag information. Another part of this stage included designing the flowcharts, activity diagrams, and interfaces design.

Unified Modeling Diagrams
Unified Modeling Language (UML) is a standard language for visualizing, defining, creating, and documenting software used in the development of software. A UML diagram is based on the UML to visually represent a system and its main actors, roles, actions, or classes to understand, alter, maintain, or document information about the system [47,48].
After software and hardware requirements were met, we designed the proposed system using the Unified Modeling Language, as described below. The use case diagram of the proposed system is shown in Figure 4.

Unified Modeling Diagrams
Unified Modeling Language (UML) is a standard language for visualizing, defining, creating, and documenting software used in the development of software. A UML diagram is based on the UML to visually represent a system and its main actors, roles, actions, or classes to understand, alter, maintain, or document information about the system [47,48].
After software and hardware requirements were met, we designed the proposed system using the Unified Modeling Language, as described below. The use case diagram of the proposed system is shown in Figure 4.  The flowcharts in Figure 5 show the work flow of the proposed system. The flowcharts in Figure 5 show the work flow of the proposed system.  The flowcharts in Figure 5 show the work flow of the proposed system. Finally, Figure 6 shows the flowchart of the sensor work flow. Finally, Figure 6 shows the flowchart of the sensor work flow.

1-Use Case Diagram
A use case is a scenario that describes how a system is used in a specific situation. Each use case includes an elaborate description of the activities, allowing quick understanding of the system's requirements. To create a use case, the various types of people (or devices) who use the system, as well as the functional requirements of the proposed system, must first be identified. In addition, we must determine the actors representing the roles that people, devices, subsystems, or other systems play as the system operates. An actor is anything that communicates or interacts with the system and is external to the system itself. Figure 4 illustrates the use case diagram of the proposed system and describes the interactions between the actors and the system.
The actors involved in the use case diagram are listed in Table 1, along with a brief description of each, as well as the description of the use cases of the proposed system are listed in Table 2.

Use Case Diagram
A use case is a scenario that describes how a system is used in a specific situation. Each use case includes an elaborate description of the activities, allowing quick understanding of the system's requirements. To create a use case, the various types of people (or devices) who use the system, as well as the functional requirements of the proposed system, must first be identified. In addition, we must determine the actors representing the roles that people, devices, subsystems, or other systems play as the system operates. An actor is anything that communicates or interacts with the system and is external to the system itself. Figure 4 illustrates the use case diagram of the proposed system and describes the interactions between the actors and the system.
The actors involved in the use case diagram are listed in Table 1, along with a brief description of each, as well as the description of the use cases of the proposed system are listed in Table 2. Table 1. Descriptions of the actors in the proposed system.

Actor Description
Admin Actors in this role have the authority to manage the system and ensure that the needs of all other actors involved in this system are met. It is also the primary actor in the system (the only primary actor).
IoT Gateway IoT subsystem sends alarm notifications to the system. It is the secondary actor (the only secondary actor). Table 2. Description of the use cases of the proposed system.

Use Case Description
Login The main use case that allows the authorized admin or user to enter the system.
Donor Info. Management The system responsible for managing the donors' information.
Enter Safety Blood Bags to the System The system responsible for entering safety blood bags after checking the blood result to ensure the donor's eligibility for donation.

Blood Supply
The system responsible for providing safe blood to those in need (patients, hospitals, blood donation centers, sub-blood banks).

User Control Policy
The system that controls the account policies for each user, blood donation center, and sub-blood bank.

Generate Reports and Statistics
The system that can generate and display a list of reports and statistics related to donors and donation information.

Manage Sub-Blood Banks and Centers
The system that manages the information about the blood donation centers and sub-blood banks.

Warning Dashboard
The system that provides an alarm if there is any error or problem.
The following is a list of the eight primary use cases, along with a brief description of each.

Flowcharts of the Proposed System
At this stage, a flowchart design was created. It was used to explain and simplify multistep processes or procedures based on the order of steps [49,50].
Two flowcharts were established for the proposed system to carefully illustrate the process. One was for the entire system, as shown in Figure 5, and the second, as shown in Figure 6, was for the temperature sensor, including the essential system functions and other system features.
In order to facilitate the proposed system design, it was divided into two parts.

Web Application Development
The proposed Web application will be implemented in the Iraqi governances, as it will be given to every central blood bank, with full administrator permission given to the managers who are authorized to use the app. The Web app contains the following: 1.
The Main Dashboard of IRW: monitors the state of the system information and the status of the blood bank donation information: number of donors and blood group quantities, as shown in Figure 7; 2. Blood Bank Tab: the super admin can add the new central blood bank with the expiration date; 3.
Blood Branch Tab: the admin in the central blood bank can add sub-blood centers in the city, with limited permissions; 4.
Donors Tab: contains several windows to control the donor information: the Add donor button, Donor information window, Note window, Donor history window, Donor report window, and additional buttons for entry number, search, status, editing, and report download; 5.
Blood Bank Setting Tab: Contains the information of blood banks that have been created by admin with the ability to update information and generate reports in the document style of the blood center or hospital; 6.
Add User Tab: allows the addition of multiple users and selection of the user role, admin, sub-admin, editor, research, and addition and editing of additional information; 7.
System Policy Tab: selects the effective duration date of the blood bank account in the system and the number of users in the account; 8.
Change Policy Tab: manages the roles of the registered users in the system; 9.
QR Code Reader: responsible for reading the blood bags during insertion into and removal from refrigerators and saving the quantities into the database system.
Appl. Syst. Innov. 2022, 5, x FOR PEER REVIEW 12 of 28 9-QR Code Reader: responsible for reading the blood bags during insertion into and removal from refrigerators and saving the quantities into the database system.

IoT Requirements
Some equipment, such as microcontrollers and sensors, were used to build the proposed system, as shown below.

1-ESP8266, a microcontroller
This is a low-cost development board that combines GPIOs, I2C, UART, ADC, PWM, and WiFi for fast prototyping, as shown in Figure 8. The ESP8266 module, which is powered by a 3.3 V supply and includes a voltage regulator and a USB-to-serial converter, was packaged as the ESP-12 module [51]. It was used to transfer the temperature readings from the DHT-11 sensor to the proposed system at all times.

IoT Requirements
Some equipment, such as microcontrollers and sensors, were used to build the proposed system, as shown below.

ESP8266, a microcontroller
This is a low-cost development board that combines GPIOs, I2C, UART, ADC, PWM, and WiFi for fast prototyping, as shown in Figure 8. The ESP8266 module, which is powered by a 3.3 V supply and includes a voltage regulator and a USB-to-serial converter, was packaged as the ESP-12 module [51]. It was used to transfer the temperature readings from the DHT-11 sensor to the proposed system at all times.

IoT Requirements
Some equipment, such as microcontrollers and sensors, were used to build the proposed system, as shown below.

1-ESP8266, a microcontroller
This is a low-cost development board that combines GPIOs, I2C, UART, ADC, PWM, and WiFi for fast prototyping, as shown in Figure 8. The ESP8266 module, which is powered by a 3.3 V supply and includes a voltage regulator and a USB-to-serial converter, was packaged as the ESP-12 module [51]. It was used to transfer the temperature readings from the DHT-11 sensor to the proposed system at all times.

2.
Temperature and Humidity Sensor (DHT-11) The DHT-11 sensor combines temperature and humidity sensors into a single unit, as shown in Figure 9. It contains a thermistor, a humidity-sensing component, and an integrated circuit for measuring the surrounding air. This sensor was used in the proposed system to measure the temperature, which helps to maintain blood bags' and blood components' temperature within an acceptable range from 2 to 6 • C (threshold degree) in the refrigerators and monitors them throughout the system in real time, 24/7. The temperature sensor has an accuracy of ±2.0 • C [52]. Additionally, it was installed in the refrigerators and sends readings to the system through the ESP8266 board as a gateway [26]. The DHT-11 sensor combines temperature and humidity sensors into a single unit, as shown in Figure 9. It contains a thermistor, a humidity-sensing component, and an integrated circuit for measuring the surrounding air. This sensor was used in the proposed system to measure the temperature, which helps to maintain blood bags' and blood components' temperature within an acceptable range from 2 to 6 °C (threshold degree) in the refrigerators and monitors them throughout the system in real time, 24/7. The temperature sensor has an accuracy of ±2.0 °C [52]. Additionally, it was installed in the refrigerators and sends readings to the system through the ESP8266 board as a gateway [26].

The Implementation of the Proposed System
This study offered a practical, efficient approach based on a Web app combined with IoT techniques to facilitate blood bank work. It was designed using a MySQL database, the PHP programming language, and a QR code storage technique to provide simple interfaces which avoid complicated steps in entering and collecting the data (donors, hospitals, blood banks) and fulfilling and securing blood bag management. It also uses a temperature sensor (DHT-11) to monitor the blood bag temperature. In addition, a proper mobile application, the Blynk app, was used because it has a user-friendly interface and can work efficiently with ESP8266 for either monitoring or controlling via mobile phone [53]. The process of recording donor's data and blood bag information was made easier with the Web pages and QR code reader and ensured the efficiency of the save process. The Central Blood Bank of Tikrit was the actual case study used to build this system. Figure 10 shows the overview of the entire proposed system.

The Implementation of the Proposed System
This study offered a practical, efficient approach based on a Web app combined with IoT techniques to facilitate blood bank work. It was designed using a MySQL database, the PHP programming language, and a QR code storage technique to provide simple interfaces which avoid complicated steps in entering and collecting the data (donors, hospitals, blood banks) and fulfilling and securing blood bag management. It also uses a temperature sensor (DHT-11) to monitor the blood bag temperature. In addition, a proper mobile application, the Blynk app, was used because it has a user-friendly interface and can work efficiently with ESP8266 for either monitoring or controlling via mobile phone [53]. The process of recording donor's data and blood bag information was made easier with the Web pages and QR code reader and ensured the efficiency of the save process. The Central Blood Bank of Tikrit was the actual case study used to build this system. Figure 10 shows the overview of the entire proposed system.
To illustrate how the proposed system works, it was divided into two parts.
perature sensor (DHT-11) to monitor the blood bag temperature. In addition, a proper mobile application, the Blynk app, was used because it has a user-friendly interface and can work efficiently with ESP8266 for either monitoring or controlling via mobile phone [53]. The process of recording donor's data and blood bag information was made easier with the Web pages and QR code reader and ensured the efficiency of the save process.
The Central Blood Bank of Tikrit was the actual case study used to build this system. Figure 10 shows the overview of the entire proposed system. Figure 10. The overview of the entire proposed system. Figure 10. The overview of the entire proposed system.

1.
A login process is undertaken by the admin (the manager or medical employee) to enter the donor's initial data (name, blood type, etc.) in the reception unit; 2.
A clinical test of the donor's blood sample is conducted to ensure that the blood is eligible for donation (free from transitional blood diseases); 3.
If the blood test result is positive, the donor is not qualified to donate, and their information is recorded in the database. If the blood test result is negative, the donor can donate and complete the rest of the steps; 4.
After the actual donation, the donor completes the registration process, including all the information required by the receptionist employee; 5.
A donor QR code is generated in the form of a label to be affixed to the blood bag of that donor; 6.
The QR code label is affixed to the blood bag.
The reading of the QR code label on the blood bag was carried out by the code reader for inclusion in the database and then the blood bag was kept in the refrigerator. The saving of the blood bag information via QR code was an automated process (more accurate and free from human error, obtaining accurate statistics and reports at any time). When the blood bag was removed to provide blood to the person in need, the code reader performed the opposite process.

IoT Section for Temperature and Power Failure Monitoring
Using Internet of Things technologies, the blood bag storage refrigerators (eight refrigerators for the four blood groups with factors of RH + , RH − ) were connected to eight temperature sensors (DHT-11) for maintaining and monitoring the blood bag temperature 24/7 within the acceptable temperature range (4 to 6 • C).
The acceptable temperature limit for storage depended on the product type (whole blood, red blood cells, platelets, plasma, cryoprecipitate, antibodies, white blood cells, and blood substitutes). In this study, the whole blood product type was chosen to implement the test.

7.
The temperature sensor reads every ten seconds, about six readings per minute, and sends these values continuously via the ESP8266 microcontroller as a gateway using Internet technology; 8.
The system sends the data (temperature values) via ESP8266 in two ways: 8-a For local storing, the data are sent to the computer device by the PLX-DAQ tool to view and store the values via Excel sheets, so the administrator can view them at any time; 8-b For online storing, the data are sent to and stored in the cloud in real time;

9.
These data are read with the Blynk application, then, the notifications (warning messages) are sent to the mobile phone via email at any time and from any place. The temperature value ranges specified by the code to send warning messages are: -The ideal temperature value range is 4 to 6 • C; - The acceptable temperature value range is 2 to 8 • C; -Outside of the acceptable temperature value range is lower than 2 • C or higher than 8 • C.
Temperature values (data) outside the assigned range predict problems such as the following: electrical faults, refrigerator malfunctions, the refrigerator door not closing correctly, etc.; the values are then sent to the cloud, and a warning is sent by the Blynk app to the administrator via email on their mobile phone. In addition, these values are sent to the computer device (for the Excel sheet) via PLX-DAQ tool and stored locally in the database. If 15 min pass and the issue is not solved, the system resends the alert several times more until the problem is solved; 10. All data are sent, saved, and retrieved via the database of the proposed system; 11. The admin can interact with all data through the Web app dashboard. 10-All data are sent, saved, and retrieved via the database of the proposed system; 11-The admin can interact with all data through the Web app dashboard. Figure 11 below shows the connection of the temperature sensor with the refrigerator that supplies the O+ blood group. The link could be one sensor unit connected with one refrigerator or eight sensor units connected with eight refrigerators. Figure 11. The connected temperature sensor inside the blood bag refrigerator. Figure 12a,b shows how the monitoring process of the blood bag refrigerators was achieved via the Blynk app. Blynk was used due to the ease of development of the smartphone application, so it was used for model setup and configuration and real-time monitoring [54].
In (a), the temperature degree within an acceptable range (5 °C) is shown, whereas (b) shows the warning message received on the mobile phone if the blood temperature is outside of the ideal or acceptable ranges. Figure 11. The connected temperature sensor inside the blood bag refrigerator. Figure 12a,b shows how the monitoring process of the blood bag refrigerators was achieved via the Blynk app. Blynk was used due to the ease of development of the smartphone application, so it was used for model setup and configuration and real-time monitoring [54].
In (a), the temperature degree within an acceptable range (5 • C) is shown, whereas (b) shows the warning message received on the mobile phone if the blood temperature is outside of the ideal or acceptable ranges.
To ensure that the IoT devices worked during power failure, a backup Panasonic NCR18650B 3.6 V lithium-ion battery was used. It is a rechargeable battery with a high energy density, long stable power, and long run time and is ideal for portable devices. Both the power supply and the backup power supply were left outside the blood cooling device. Figure 12a,b shows how the monitoring process of the blood bag refrigerators was achieved via the Blynk app. Blynk was used due to the ease of development of the smartphone application, so it was used for model setup and configuration and real-time monitoring [54].
In (a), the temperature degree within an acceptable range (5 °C) is shown, whereas (b) shows the warning message received on the mobile phone if the blood temperature is outside of the ideal or acceptable ranges.
(a) (b) Figure 12. The monitoring process: (a) shows the temperature degree within an acceptable range; (b) shows the warning message if the temperature is outside of the acceptable range.

System Testing and Evaluation
The most important part of the system development cycle is system testing, which helps to detect errors or ensure that the system behaves as expected. It also identifies the location of the system failure. As a result, flaws can be repaired during the initial phases. In addition, a qualitative evaluation via questionnaire was adopted in this study. The testing process and the evaluation questionnaire for the proposed system, as shown in Figure 13, were performed by two groups: the first group was the managers and medical staff in the Central Blood Bank of Tikrit, and, in the second group, were information technology experts at Tikrit University.

Web Application
The black box method was used to test the proposed Web application "Iraq Red Wings (IRW)" to check whether it could run correctly based on the defined functional system requirements [55]. Table 3 shows the functionalities of the IRW Web app that needed to be tested following the system implementation stage by the black box method. The tester was only aware of the input and was unaware of the output. If the application met the functional system requirement, the column was marked Yes ( ). However, if it was the other way around, the column was marked No ( ). helps to detect errors or ensure that the system behaves as expected. It also identifies the location of the system failure. As a result, flaws can be repaired during the initial phases. In addition, a qualitative evaluation via questionnaire was adopted in this study. The testing process and the evaluation questionnaire for the proposed system, as shown in Figure  13, were performed by two groups: the first group was the managers and medical staff in the Central Blood Bank of Tikrit, and, in the second group, were information technology experts at Tikrit University.

1-Web Application
The black box method was used to test the proposed Web application "Iraq Red Wings (IRW)" to check whether it could run correctly based on the defined functional system requirements [55]. Table 3 shows the functionalities of the IRW Web app that needed to be tested following the system implementation stage by the black box method. The tester was only aware of the input and was unaware of the output. If the application met the functional system requirement, the column was marked Yes (). However, if it was the other way around, the column was marked No ().

1.
The system can process blood donation data. -2.
The system provides the ability to manipulate master data. -

3.
The system may display contact information, donor history, and blood type. -

4.
The system includes a feature for verifying blood donor orders. -

5.
The system provides a facility for searching blood inventory information based on a specific blood type. -6.
The system is capable of automatically updating the blood inventory. -

7.
The system has the ability to monitor the temperature of the blood inventory using (IoT) technologies. -

8.
The system has the ability to send notifications in the case of a shortage of a certain blood group. -9.
The system can be used to document blood examination results. -

10.
The system includes the ability to generate reports for blood donation and blood inventory daily, monthly, or annually. -

2.
Temperature Sensor Testing Figure 14 below shows the temperature sensor testing results (DHT-11). It was tested in two stages: first, a test of one unit sensor; and, second, a test of eight sensor units together.
The test was performed in refrigerators with different temperature settings. The test process was conducted by connecting the temperature and humidity sensor (DHT-11), ESP8266 module, breadboard, and colored wires. Then, the temperature data were read in the Excel sheet via Arduino IDE 1.8. 19 software, and the screen results were as shown. Figure 14 below shows the temperature sensor testing results (DHT-11). It was tested in two stages: first, a test of one unit sensor; and, second, a test of eight sensor units together. The test was performed in refrigerators with different temperature settings. The test process was conducted by connecting the temperature and humidity sensor (DHT-11), ESP8266 module, breadboard, and colored wires. Then, the temperature data were read in the Excel sheet via Arduino IDE 1.8.19 software, and the screen results were as shown. This test helped to ensure that the sensors were correctly connected and that all components were not damaged. Both functioned properly and successfully, integrating with the proposed Web application, as indicated in Table 4. This test helped to ensure that the sensors were correctly connected and that all components were not damaged. Both functioned properly and successfully, integrating with the proposed Web application, as indicated in Table 4.

Evaluation: Qualitative Evaluation Instrument-Questionnaires
Qualitative evaluation allows one to fully and deeply understand a program or process. The qualitative evaluation instrument in this study was a questionnaire based on the usability aspect used to collect accurate results. It also reflected whether the application was acceptable or not according to the users. According to [56], usability is the ability of users to use a product to achieve specific goals with satisfaction, efficiency, and effectiveness in a specific use context. As a result, the questionnaire was divided into these three major parameters to evaluate the new application: Satisfaction, Effectiveness, and Efficiency. Each factor had its own items, and the answers were collected using Google Forms.

The Pre-Questionnaire Step
The pre-questionnaire focused on gathering information about the user's years of experience, training courses, skills in using this type of application, the estimated time to find a donor using such applications based on IoT technics in blood banks, and the application's continuation of use.
The study was conducted with 22 participants, university graduates (90%) and institute graduates (9%), at both the Tikrit Central Blood Bank and Tikrit University.
All participants completed the questionnaire, and their demographic information is summarized in Table 5. In the second step, the participants answered a questionnaire consisting of multiple text questions (items) and also considered questions which were used by previous studies [57]. There were 15 questions that covered domains related to the study objectives and information, usability, application functionality, user behavior, and their impacts. They were divided into three sets based on the three parameters Satisfaction, Effectiveness, and Efficiency, as shown in Table 6, which represented a reasonable assessment of using the application. For the analyzing step, a five-point Likert scale method was used, where the participant was asked to indicate their level of agreement with each item as "Completely Agree", "Agree", "Neutral", "Disagree", or "Completely Disagree" [42]. All participants completed the questionnaire.

Statistical Analysis of the Result
The participants' feedback was analyzed using the study evaluation instrument (questionnaires). This analysis assisted in explaining the most important aspects of our proposed system evaluation. It was mainly performed using the Statistical Package for the Social Sciences (SPSS) software. The study's results are discussed below.

1.
The analysis of the pre-questionnaire Table 3 explains the analysis of the pre-questionnaire. Of the total participants, 54% had 15-20 years of experience, 27% had 5-10 years, and the percentage was equal for those with 1-5 and more than 20 years of experience, which was 9%. The participants' skills in using this type of application were 31% excellent, 54% good, 13% fair, and no one had no skills. Regarding the question about estimating the time taken to find a suitable donor using this type of application, their answers were 45% needed 3 h, 31% needed 6 h, 18% needed 1 day, and 4% needed more than that. Furthermore, for the question about the usage of such a system or application in work, the answers were 31% yes and 68% no. Finally, all the answers regarding whether the application would be used continuously were yes. Table 6. The three implementing parameters and their item sets.

Implemented
Parameter Definition Measured Items

Satisfaction
Everything related to the positive attitudes and feeling comfortable using the system or application [56,58] • The Web-based app and Internet of Things (IoT) is useful; • The app user interface is easy to browse and navigate within tabs; • It is a good idea to allow use of the app by donors to directly manage their data; • Providing a similar app that supports mobile devices is a good idea.

Efficiency
Measuring the efficiency of the application in terms of saving time, effort, and cost [58] • The application helps to save time, costs, and reduce the employee effort; • The time in retrieving data is significantly shortened through the use of the app; • The storing of blood bags automatically with the QR code method is an effective mechanism for saving time and effort; • Alert notifications sent by the app to donors contribute to reducing patient waiting time and overcoming inventory shortage cases.

Effectiveness
Measuring the target in terms of accuracy, completeness, and output accuracy [58] • The application helps in efficiently monitoring the temperature of the blood stock using IoT technology; • The app helps in overcoming obstacles during crises and emergency situations; • The information about the blood bank is correctly digitally placed; • This app works to achieve the correct storage of blood bags.

•
The use of such types of apps contributes to the success of the institution's work; • The app helps in providing accurate and integrated statistics; • Linking the app with social media is an important process and contributes to the app's success.

The analysis of the questionnaire
The results of the study are discussed as follows, starting with an analysis of Satisfaction, followed by Efficiency, and, finally, the Effectiveness parameter.
• Satisfaction This parameter measured the level of user acceptance, enjoyment, and ease of use of the system, and, to evaluate this parameter, four items were considered. The result of each item is shown in Table 7.
Most responses agreed or completely agreed that the system was convenient and useful. Furthermore, many participants showed an excellent level of agreement that the system was easy to use and that no prior training was required to use it. This was mainly because the layout of the Web app page was uncomplicated and easy to navigate. Moreover, a large group of participants agreed that the donors should manage their data. This impacted the majority, who agreed that providing a mobile application would be a good idea. However, a few participants remained neutral because they argued that not all donors are qualified to manage their data.  Table 8 indicates that the sample level based on the first parameter (Satisfaction) was high, which means the participants had a positive attitude and good feeling toward the proposed system. • Efficiency The results for this parameter are presented in Table 9, which highlights that the majority of responses completely agreed that the system helped in reducing employee time and effort in completing the tasks. In addition, most participant responses completely agreed or agreed that the system sped up the process of retrieving data, which improved the quality of performance. Moreover, many answers agreed that the QR code method was efficient and provided an ideal storing mechanism, hence, solving the problem of human errors. Lastly, a small group of answers disagreed that the alert notifications method reduced the patient's wait time. However, the majority agreed that alert notifications could help to overcome inventory shortages, especially in emergencies. Table 10 indicates that the overall sample level in the second parameter (Efficiency) was high. This means the proposed system was efficient in saving time, effort, and cost from the point of view of the research sample. • Effectiveness Another significant parameter was Effectiveness, which was considered in evaluating the system using seven items. The outcomes in Table 11 outline that most of the responses completely agreed or agreed that the system assisted in the temperature monitoring of the blood bags. This led the participants to decide that the system could store the blood bags more effectively. Furthermore, the users expressed a clear consensus for the second item, which indicated that the system helped control critical crises. However, a small number of responses remained neutral. In addition, most responses agreed that the digital information was sufficient, and the system provided accurate and integrated statistics. Lastly, a large group of responses indicated the participants' agreement that the design contributed to the success of the institution's works. Moreover, incorporating social media applications would improve the system's performance. Table 12 indicates that, overall, the proposed system offered a compelling performance and functionality in achieving the desired goal based on the participants' opinions regarding the third parameter (Effectiveness).  Figure 15 depicts the mean distribution of the three factors. Furthermore, it provides an overview of the mean of each measured item in Figure 16, implying that end users generally responded positively to the proposed system in relation to the improvement of blood bank administration and services.
A comparison study with the current traditional system was conducted to prove that the proposed system for managing the blood bank was efficient using a questionnaire analysis. The result determined that the proposed system was superior because it saved time, avoided human errors, and provided a set of functionalities. The comparison is shown in Table 13 Figure 15 depicts the mean distribution of the three factors. Furthermore, it provide an overview of the mean of each measured item in Figure 16, implying that end user generally responded positively to the proposed system in relation to the improvement o blood bank administration and services.     Figure 15 depicts the mean distribution of the three factors. Furthermore, it provide an overview of the mean of each measured item in Figure 16, implying that end user generally responded positively to the proposed system in relation to the improvement o blood bank administration and services.    Mean of Each Item Measured item Figure 16. Overview of answers related to measured items. Table 13. Comparison of the proposed system with the paperwork-based system.

Parameter
The Proposed System (New) The Current System (Paperwork System) 6. It is recommended to use multi criteria decision making (MSDM) to select patients in hospitals based on the type of disease and degree of severity, especially in emergencies or when there is a lack of availability of rare blood types; 7.
The use of ThingSpeak, which is an IoT analytics platform service that allows the aggregation, visualization, and analysis of live data streams in the cloud, is recommended for long-term data monitoring, analyzing, and storing data in the cloud.