A Novel Blockchain-Based Model for Blood Donation System

In Pakistan, existing blood control systems or blood information management systems are limited in terms of efficient data retrieval of donor to consumer. There is no communication network in place for extra blood in one location to be demanded from a region if blood is limited, resulting in blood wastage. Due to a lack of accessibility and sufficient blood quality testing, blood contaminated with illnesses such as HIV has been used for transfusion in some cases. This study proposes a ledger blood management system to address these challenges. The trail has been represented as a supply-chain management problem following the blood. By trailing the blood stream and donation a single platform for transferring blood and the problem results among blood groups, the proposed system, built on the hyperledger fabric model, adds more traceability toward the blood transfusion process. It also helps to reduce unjustified blood wastage by providing an integrated system for transferring lifeblood and the thing extracts among lifeblood banks. A web app is also designed for accessing the network for simplicity of usage and security is enhanced by implementing block chain hyperfebric ledger system through Key Value System (KVS) system.


Introduction
Every human being's blood is considered the primary source of life. As a result, blood is regarded as a vital resource in medical therapy. However, blood marketing is prohibited worldwide, and the primary cause is blood donation inside a country. Despite the high need for blood, efficient supply channels inside borders are lacking [1]. Furthermore, blood recipients are unaware of the quality or provenance of the blood they are getting for medical treatment.
Blood is an absolute need for all living things. Someone, somewhere, needs blood every few seconds. Because blood cannot be produced, the need for blood that can save lives can only be met via human donations [2]. The donation of *Corresponding author. Email: attique.rehman@lgu.edu.pk blood as well the situation components to patient role through complex elective surgery keeps millions of lives every year. Patients with long-term [3], lifethreatening conditions, such as leukemia, require a sufficient blood supply.
As a result, the challenge of elucidating all aspects of blood transfusions in such a supply chain network becomes crucial. According to a WHO study, a blood bank monitoring system has been defined by the agency in charge and dealing with health concerns. The temperature of the blood and the conditions in which it is stored must be precise. Until the patient receives the blood, it is donated [4]. The WHO study also recommends where blood should be presented, stored, and distributed. On the other hand, no records demonstrate the capacity to track the source and purity of blood [5]. In Korea, the Korean Red Cross founded the Blood System EAI Endorsed Transactions on Context-Aware Systems and Applications 2 Headquarters in 1958 [6], including fifteen blood donations and three blood tests. The system is solely used to take, store, and distribute blood and monitor the quality and provenance of the blood [7].
Donor information, blood group, and blood quality are delicate topics that demand openness and secrecy. Furthermore, the procedure from donating blood to transfusion to the patient involves several steps, including storage and transportation; as a result, the capacity to record transaction information rapidly is required [8]. The information cannot be changed without cause. Based on the criteria mentioned above, blockchain technology is now regarded as the best method for providing helpful information to blood owners, hospitals, and blood receivers. The existing blood management system offers the blood drawn volume and does not provide information on the patient's requirements [9].
According to statistics from the WHO Worldwide Database on Public Health, the blood collection rate is 32.6 in strong nations, 15.1 in top half countries, 8.1 is relatively low countries, but 4.6 popular small revenue nations, according to statistics from the WHO Worldwide Database on Public Health for 2015. Despite 122.7 million components of donations being collected annually across the world, several patient role who need lifeblood transfusions may non take early contact to reliable blood, particularly in the middle-and high revenue nations [10].

Blood Management System in Pakistan
Central Blood Transfusion Council (CBTC) is the federal authority in Pakistan that regulates and controls the Transfusion Service. It was founded in 1996. The CBTC is responsible for assessing the state of blood donation services and conducting yearly quality tests in blood banks, together with the Government Blood Transfusion Councils (GBTCs). The National Blood Transfusion Council (NBTC) and the National AIDS Control Association (NACA) are the technological bodies in charge of developing guidelines to ensure a secured blood transfusion system. Equally reliable to blood centers, developing human resources, and formulating and implementing Pakistan's blood policy [11].
The Ministry of Health & Social Welfare announced in 2016 that just 10.9 million units of donations were donated, against a demand of 12 million units [12]. Various governmental and semi-blood donation groups have been created to meet the significant imbalance between the supply side for blood. These organizations hold regular blood donation drives and host a variety of public awareness campaigns to raise awareness about the necessity of blood donation. Most groups take an internet gateway wherever keen contributors can record besides be notified once campsites remain being arranged. In 2016, the Pakistan government launched PITB [13], a project to link, digitalize, in addition simplify the process of blood banks in the country, recognizing the value of a centralized platform. The portal serves as a centralized Information Management System (IMS). However, it is unable to trace the blood chain ultimately.

Blood Donation Security Challenges
It's paradoxical that in a country where there's a blood shortage of over a 12 million drips, more than 2.7 million compunents of lifeblood then the situation elements were lost in the last six years [14]. Consumption of lifeblood occurs when hemoglobin or any of its features is discarded rather than administered to a patient. The fundamental cause of this difference is a miscommunication between locations with excess blood supplies and others with a severe shortage [15].
Surprisingly, even states with a higher level of development, such as AJK, GB, Punjab, Sindh, KPK, and Balochistan, reported wasting of whole plasma and lifesaving blood derivatives, including RBCs and blood. Voluntary blood donations may significantly lessen Pakistan's blood shortage problems, provided that an umbrella framework exists to promote communication and blood supply transfer between areas [16]. This necessitates the implementation of effective blood refrigerated [9] control structure that maintains storing then transportation of lifeblood from providers to last donation locations.
It should be mentioned that the government has supported inter-blood bank transactions. Although this, some health centers waste to take drips after additional blood sites, citing the risk of contamination. In addition, here remains not at all method toward trace movement of data from contribution to usage [17]. It is emphasizes the requirement aimed at openness in lifeblood examination procedure. There are two advantages to this. It helps to avoid unintentional transfusion of blood contaminated with illnesses like HIV, liver disease, and syphilis by establishing a trust for promoting bloodstock exchange among blood banks [18]. From 2010 to 2017, about 11,352 instances of HIV transmission by donation of contaminated lifeblood were documented [19].
People initiate embarrassed of giving before marketing lifeblood for cash can face up to three months in jail and a fine under National Blood Donation Services Act 2007. However, here take stayed several instances of enforced lifeblood collection completed ages. Although money based contributions remained outlawed by a Highest Law court decision in 2004, allegations of rehearsal persist [20]. Several situations take as well reported in which patient role have been compelled near discovery alternative lifeblood contributors aimed at supply replacement, contempt administration attempts to protect patient role [11]. These remain fundamental flaws in the Blood Donation Service that must be addressed. To solve these concerns, the paper suggests implementing a comprehensive, encrypted, peer-to-peer, trusted blockchain based lifeblood supply restraint structure that prevents unjustified blood loss, guarantees efficiency in the donation process, and secures the traceability of given blood. By monitoring donors' giving history, such a platform would EAI Endorsed Transactions on Context-aware Systems and Applications Vol. 8 (2022) prevent unlawful blood/plasma transactions and guarantee that donations do not donate excessively.

Literature Work
The majority of the literature on donating blood and transfusion focused on creating an environment used for persons popular want of blood contributors to connect to lifeblood centers too substitute contributors that area. [21] suggested a mobile app which serves interface for patients and donors to browse information on blood banks and donors and make blood requests. This system also included a reporting function that allowed blood bank administrators to keep track of inventories. R. Backiyalakshmi and T. Hilda Jenipha [22] developed an online mobile app which maintain history the current place of listed contributors then locates possible contributors near the source of lifeblood need. [23] proposed using FARM CART Classification Hierarchy towards determine if an enrolled donor is willing to provide blood in the event of a need. This mechanism can also be used to accept standby contributions. Above mentioned methods don't report concerns such as lifeblood supply fetter administration or else blood depletion. They similarly take not any command done the contributors' health or donation process's truthfulness. Blood supply chain research has focused on transit time and maintaining blood availability in the case of a disaster. [24] suggested a model for determining the best sites for lifeblood services and the ideal lifeblood register points to meet demand. [25] and [26] presented an RFID-based blood supply chain information management system. However, the main disadvantage of this structure is confidentiality, like information may be altered.
Dongsoo, Seungeun, and Kim Using the shared-ledger idea, Kim [27] developed a high-level architecture for blockchainbased blood supply chain management. However, the design does not keep track of donor information, promote donor matching, or manage blood waste. [28] proposes the creation of KanChain, an Ethereum-based permissioned blood distribution infrastructure. To follow the blood chain, the idea suggests tracking the exchange of KanCoins amongst stakeholders. In [29] Teijo, Peltoniemi, & Ihalainen Jarkko did exploratory research on how blockchain technology may be employed in the plasma derivatives supply chain. It further clarifies the notion of rewarding active contributors to stimulate additional voluntary giving [30].
Compared to previous solutions, this article intends to develop an combined model aimed at managing then monitoring given lifeblood through using the capability of undeveloped blockchain technology, which enables improved photograph, peer to peer trailing, then dependability [31].

Blockchain Technology
Blockchain stands a reorganized, community database popular which communications remain acknowledged first after being confirmed by all nodes in the network, rendering it unchangeable [32]. It's a period printed sequence of information recordings known as chunks connected collected with cryptography then saved popular group of peers. A linked list of partnerships is formed by separately chunk containing series of connections (specified popular Keen Agreements) and pointers towards following record. As result, the term "blockchain" was coined. Popular double hierarchy known as the merkle tree, the Blockchain architecture keeps numerical imprint of completely connections popular a record [33]. Popular Merkle hierarchy, the child peers contain hashes of transactions, whereas the inside nodes include soups of their offspring nodes. Peers remain secured repeatedly till first single peer remainders, known as the Merkel's gatways, kept in the Blockchain [34]. As normal hash function, SHA-2 is utilized. Because Merkel's Root is a hashing, it may be used to determine whether or not a particular transaction is included in the block.
Constructed scheduled admission stages of networks they have permitted popular grid, there are three types of Blockchain: community, isolated, then grouping. Public blockchain remain available toward everyone and are not controlled by a central authority [35]. It is a permissionless blockchain because nodes do not need the authorization to view data or trade. On the other hand, private blockchains impose limitations and access control lists on who may join the networks and transact. Private blockchains are allowed to access in nature since users need permission to join the network. Identity Management solutions are either included with private blockchain frameworks or third party add ins which provide Association Facility Earners are allowed. Simply particular nodes popular grouping blockchain have authority toward approve connections, whereas other nodes may only start and evaluate transaction history. Private & grouping blockchain remain now additional vulnerable toward information manipulation than community blockchain due to fewer nodes. The former, on the other hand, is more flexible and effective.
For digitally signing transactions, blockchain nodes employ Public Key Cryptography. After electronically verifying its private key, a node that wishes toward manage runs the situation then overflows the subject into the network. Other network nodes validate the transaction. A consensus technique guarantees that an appropriate number of nodes validates the transaction. Once confirmed, all network nodes update the block as parts of the shared ledger. Peer popular have blockchain can be either a associate peer, it have individual originate connections before validating node, that have both start and authenticate connections.

Purposed Blood Management System
As shown in Fig. 1 private Blockchain is to keep sensitive information like donor and donation information out of the hands of the general public. The implementation of Blockchain in the blood trial increases transparency by providing a reliable tracking system. It also improves the system's security because the Blockchain's core nature forbids unauthorized/illegal data alteration.

Purposed Framework Attributes
There are two essential needs to verify that the suggested closed-loop system operates safely and without the possibility of fraud. To begin, it is presumed that there is a Nationwide Health Records (NHR) Registry that keeps track of all Pakistan residents' Electronic Health Records (EHRs). EHRs are utilized to keep track of everyone in the country's medical history. This study does not cover the design of electronic health records. A database was used to implement the program, which contained basic information about participants and a flag showing their availability to donate blood. Second, anybody interested in donating blood must first register with the Nationwide Blood Donor Registry (NBDR). This Registry assigns each Donor a specific Blood Donor ID connected to their EHR ID. There are two benefits to this.

Figure 1. Proposed diagram of Blood Transfusion System for Country using Blockchain Technology
The Donor's medical history may be easily validated using the EHR ID while collecting blood samples. The Blood Donor ID makes it easier to trace donors and their donations, as shown in Fig. 2. This allows for the tracking of each individual's donation frequency. This will assist in reducing the number of money donations and forced extractions.
Donors are also told when their blood is utilized to save lives, providing a rewarding experience. The framework is meant to notify the Donor quickly if the given blood is unsuitable for use during an inspection. This will allow them to get medical attention for any ailments they may have caught.

Proposed Framework Work-Flow
As shown in Fig. 3, this section covers the entire workflow needed inside a blood donation system. The donors register with the nationwide blood donation registry using their EHR ID. The EHR ID is used to verify the person's medical information with the EHR kept by the national health records registry. If a person is deemed to be qualified to donate blood, they are given a Donor ID. To give blood, the Donor must have a valid donor ID. The Donor's medical characteristics, including temperatures, pulse rate, and heart rate, are examined before donation. The EHR ID is used to verify the Donor's eligibility to give blood. It's also checked to see if the Donor's last contribution was more than three months ago. If the donors are deemed qualified for donation, blood is drawn, and a specific Blood ID is assigned to the sample. Otherwise, no blood is taken. Blood can be collected at Blood Camps, as shown in Figure 1, or immediately in Blood Banks. The Transport Service provider transports the obtained blood sample to the Blood Inspections Centre (BIC) in a vehicle whose data are linked to the Blood ID on the Blockchain. The blood is subsequently examined at the BIC according to NBTC procedures, and a report is prepared. The HASH of the evidence of inspection is recorded on the Blockchain. The donors are informed, and the blood is destroyed if it is deemed unsafe for use. If blood is needed, the hospital submits a demand to the BMC. Based on parameters including blood group, request location, and expiration date, the BMC selects the optimal blood match. After a game is identified, the blood is delivered from the blood center to the hospital. The demand for blood and its intake is linked to the receiver to ensure openness. This one is done to protect the patient's privacy and to prevent the blood from using someone else. When the blood is used up, the Donor is alerted.

Authentication Control And Security
It is important to note that the EHR, Donor, and Blood records include compassionate information and must be kept private. Security protocols are enforced via establishing Authorization List files for this purpose. The organization is collecting blood from Donors; for example, it can only Retrieve the EHR ID and the flags variable indicating eligibility to give blood from the EHR data. Furthermore, all Donor information is removed from transportation service providers, leaving only the Blood Identification and donor and receiver details. Donors have to Get ONLY access to individual donation data, such as blood IDs and donation dates and statuses. Only two transactions are permitted in hospitals: receiving blood and monitoring blood consumption after allocation. Hospitals are thus denied access to donor information (DENY ALL ACCESS). The Network Administrator has ALLOW ALL access in the current deployment. However, in future implementations, we want to encrypt data using an installable cryptography package to ensure that only organizations with valid keys may decode and thereby access the data.

Blockchain-Based Channel Framework
The suggested system's design is based on "Hyperledger Fabric," an open-source platform enabling distributed ledger solutions. Because it is tailored for B2B applications and allows access rules to be enforced for data security and privacy by membership services, Hyperledger Fabric is favored over other entrepreneurship blockchain platforms like Ethereum. Furthermore, the proposed approach does not require Ethereum's crypto-currency stack. Hyperledger Fabric also enables customization of the various components in the system to meet specific needs, as shown in Fig. 4. It encourages the use of permission in which the participants' identities are known. This is ideal for our use case since only particular stakeholders should access the network. Other permissioned blockchain systems, such as Quorum, were created with financial applications. Hyperledger Fabric employs X.509 certificates to manage user authentication and authorization. It also allows for the customization of authentication services to meet specific needs [29]. For data privacy, the framework offers the idea of Channels: information inside a Channel is now only visible to those who subscribe to it. Hyperledger Fabric also supports the notion of chain codes for intelligent contract logic. Furthermore, it allows you to include access restrictions as parts of a chain code to limit data exposure. Although Hyperledger Fabric does not enable data encryption, it facilitates the usage of pluggable cryptographic interface packages such as the Blockchain Cryptosystem Service Provider (BCSP). Such other combinations, however, are outside the scope of this article.

Implementation
The system was built using Hyperledger Composition [20], a collection of tools for modeling back-end business rules that can be deployed on the Hyperledger blockchain infrastructure. Assets, Participants, & Transactions are defined in the Network module in Hyperledger Composer. Blood, Donors, EHRs, & transport vehicles are classified as Assets in our system, whereas the other stakeholders listed in Section 4.1 are classified as Participants. The Business Logic is the functional specification and logic of the transaction. The Access Controls provide information about Assets, Participants, and Users' access privileges. Optional Query files, in which Query language queries for the system may be defined, are also available in Hyperledger Composer. These components are packed as a Business Network Archive (BNA file), which can be used to install the system and construct the Fabric network. It's worth noting that Business Logic described in Hyperledger Composer provides the foundation for Hyperledger Fabric's Smart Contracts (also known as Chain codes). This logic is made up of functional definitions for all network transactions. JavaScript was used to identify and build such transactions. The logging method of donating blood, arranging a transport vehicle for moving blood from one location (say, a Blood Bank) to another (say, a Hospital), requesting blood, and assigning blood based on request are important transactions.
We established a baseline mechanism for blood delivery when a hospital issues a blood request because this is the first effort at building a blockchain-based Blood Collection System. A situation with two blood banks and ten hospitals within a 5-kilometer radius was explored for simplicity. For blood allocation, a priority queue of bloodstock is maintained: the blood of the needed blood group with the earlier expiry date is allocated first. The design of distributing transport vehicles to move blood between places is a separate topic that this article will not mention. Another significant benefit of the new system is that it would tell donors when given blood has been utilized and warn them if the blood is discovered to possess any reactive illness during the inspection process. The former gives contributors a sense of satisfaction and encourages them to gift regularly since donor appreciation is a critical catalyst for enhanced donor retention [36]. The latter is motivated by social and ethical obligations to assist the Donor in receiving timely and adequate medical treatment.

Result Discussion
Experimental EHR or Donor datasets produced using volunteer data were used to evaluate the system. A scenario including two blood banks & 10 hospitals within a 5-kilometer radius was explored for simplicity. The genesis blocks, including for Blood and Donor, were used to start the Blockchain. The system was set up using ten transactions per block size. One hundred blood requests have been simulated to test the functionality, some of which have been mentioned in this section. As seen in Fig. 6., each transaction results in the generation of a new block connected to the previous block. The total transaction throughput was discovered to be 80 transactions per second. Further stress testing with concurrent requests and larger loads will be required in the future. The blood trails (transaction outcomes) are saved in Key-Value Store because the system is predicated on Hyperledger Fabric (KVS) as shown in Fig.7. A web app is being developed for the proposed system's simplicity of use. The user in the images is an Admin with the ability to initiate all transactions.
The Donor Enrollment page is shown in Fig. 8. Donors register using any EHR Id and are only permitted to do so if their EHR is eligible for the donation option set. The individual is not allowed to write because they're not qualified, as indicated in Fig. 9. As illustrated in Fig. 10, donors without such a valid EHR Id are not permitted to register with the network.    The template shown in Fig. 11 is being used to record the blood collection. Blood is not taken if medical factors such as temperature, heart rate, or heart rate are abnormal. Instead, as illustrated, a notice is displayed. If the Donor's prior donation occurred within the preceding three months, information is provided not to gather blood, as shown in Fig. 12. In addition, the Donor's EHR is rechecked to ensure that the donors are also still able to donate. It is done to guarantee that the most recent medical developments are considered when selecting donors. We also want to automatically identify and alert donors in the future if the EHRs can qualify For the Donation flag to be modified based on medical records. The online app also includes a gateway for recording blood inspection findings. The inspection report's HASH aids in invalidating its validity and increasing the inspection process' dependability; any minor changes to the notice will result in a different HASH. The production & storage of the file's HASH were shown using an example report. Figure 11. When Donor have off range medical parameters in blood donation system. Figure 12. When donor previous donation has less than three months in blood donation system. Fig. 13 is being used to assist hospitals in requesting blood on behalf of patients. The hospital is then informed about the blood matches. Even though the first blood bank was out of stock, the suggested blood proposed technique was influential in the allocation of blood from the second blood bank. There are two benefits to this. It guarantees enough blood is available in areas where supply may be scarce, for starters. It also reduces unnecessary blood loss by ensuring that given blood is used regardless of location restrictions.

The webpage illustrated in
From the moment of donation through the time of consumption, the suggested method guarantees that given blood is tracked. It also includes a system for monitoring donors' donation eligibility in terms of health, fitness, and time since their last donation.
For improved confidence, the system also includes confirmation of quality inspections on the blood while exchanging blood across areas. The blood matching system guarantees that blood is distributed fairly and transparently. Overall, the suggested system may be employed as a peer-topeer blood trial monitoring solution to improve blood use efficacy and reduce malpractices.

Conclusion
We have successfully established a Blockchain-based Blood Transfusion System in this paper. We also created a Web App as the system's front-end to ensure simplicity of usage. This app may be used to trace given blood throughout the transfusion process, ensuring total transparency. The suggested method might be improved for related fields such as organ donation on a national and worldwide scale. Only blood tracking was included because this was the first effort at using the blockchain architecture for Blood Donation Management. We want to introduce a tracking feature for blood derivatives in the next phase for a complete framework. This is significant because various blood derivatives have varying shelf lives. The suggested system for blood cold-chain monitoring is still in its early stages, and performance measures for it are needed. For further study, benchmarking and the creation of performance measures are necessary. Furthermore, blood matching was done only based on the stock's nearest expiration date. However, to make the blood matching algorithm more efficient, additional criteria including real-time traffic, location, the severity of both the requirement, stock availability, and expected demand in Blood Banks might be integrated. This will be implemented as part of its next step.