key: cord-0801942-ge9b0og0 authors: Hilal, Ala’ Abu; Badra, Mohamad; Tubaishat, Abdallah title: Building Smart Contracts for COVID19 Pandemic Over the Blockchain Emerging Technologies date: 2022-12-31 journal: Procedia Computer Science DOI: 10.1016/j.procs.2021.12.248 sha: 767064aab58d6454c56df56bab8832973f6a238b doc_id: 801942 cord_uid: ge9b0og0 This research aims to improve and integrate hospital’s healthcare applications with Blockchain and smart contracts technologies to provide huge and secure storage that is immutable. This application will be able to record the patients’ medical history like appointments, medical tests, etc.; As a matter of fact, these resources should be recorded to be securely retrieved, modified, and stored by an authorized party only. The utilization of these critical resources will increase the validity for participants with a high level of liability, where building a scheduling appointment system using the blockchain-based on a smart contract will enhance patients’ privacy and provides a safer method to keep data away from altering through an unofficial use. COVID-19 Coronavirus is a global disaster that requires a reliable and stable network-based application with a giant and secure platform to hold a huge number of people and settings. The simulated outcomes of the developed system were significant and extremely noteworthy according to immutability and correctness. The traditional technological-based patient record is a system particularly designed to support operators by providing accessibility to full and precise data, alerts, reminders, clinical decision support systems, links to medical knowledge, and other benefits. However, due to the rapid technological development, the traditional technologies are facing some technical challenges like the security of data, unauthorized access to confidential information, and many other challenges that could lead to the misuse of data or illegal modification. [1] Healthcare application systems help to manage appointment scheduling, seamlessly new patients to see specialists on arrival, and several other benefits. Hence, staff can focus on supporting patients to provide better and faster service when using modern technologies. [2] However, computers can be used to store the information about the medicines given to a patient as well as medical check-ups, which enable efficient storage of huge amounts of medical data also enable the advantage of analysis and proposing solutions in advanced systems. [3] The possible solutions to enhance patient safety is to come up with better tracking, accurate reporting of decisions, diagnostic testing, and the readiness of complete patient information. Blockchain (BC) brings trust, liability, and digital transactions. Likewise, a system built on the blockchain network takes a short time to process and communicate transactions. Furthermore, BC provides huge storage Cloud opportunities, protects from cyberattacks with Non-Traditional interaction delivery supported by Application Management and Artificial Learning over 24/7, provides multiple transactions at a High Speed, efficiency, and accuracy. The use of Blockchain in healthcare systems has the potential to substantially impact the healthcare industry. [4, 5] Some related studies are presented in section 2. In section 3, the proposed system is discussed in addition to the implementation process. The results are discussed in section 4. Finally, the paper is concluded in section 5 with possible future improvements. Blockchain is based on open-source software, commodity hardware, and an Open Source platform. These modules provide easier integrated tools that can efficiently scale to handle larger volumes of data and more blockchain peers. The architecture has a built-in debugger, data encryption, and cryptography technologies that are broadly used as commercial standards. The patient health system on Blockchain can provide a secure structure for data. As well, users' information can be stored in a blockchain containing control access. [3, 6] The key factors with blockchain systems in healthcare involve: Network infrastructure security at all levels, Identity verification, and authentication of all users. The unique privilege of authorization to access electronic information. [7, 8] The smart contract model was introduced recently, which is an executable code that automatically executes on the blockchain network to enforce a transaction between peers involved in the network. The smart contract consists of a set of executable functions and variables which are created by the transactions and their given parameters. During running a method, the status of the block is changed according to the developed logic. It is written in highlevel languages such as JavaScript or TypeScript. The contract recorded information will be encrypted into the Blockchain network. Any participant in the Blockchain channels can initiate the process of executing a transaction. The contract code is duplicated on each user in the Blockchain network as a part of their verification of new chains. [9, 10] Blockchain Technology Distributed Network is a decentralized style with nodes consisting of network participants as authorized members in the network which store the same copy of the blockchain and contribute to the collective process of validating transactions, those can record digital transactions into a shared ledger. Members of the network run algorithms to evaluate and verify the proposed transaction. [11] Health applications require trust, transparency, security, and huge storage to create immutable and accessible online medical records, which cannot be built by using old traditional platforms. In this paper, a healthcare application prototype was introduced for the COVID-19 Coronavirus as a global Pandemic. As shown in Figures 1 and 2 , a fundamental hospital system was built over the blockchain and the smart contract emerging technologies, which can essentially function on the Internet that can be accessed by many distributed computers known as peers or nodes. Each block's content moves to exchange stored records during the period from the creation of the first block to the appending of the current block. Also, the hash could be seen as a verification process that uniquely labels the previous block. Therefore, any alteration in the block's content will result in a change in the linked hash and the following blocks which will be flagged to all connected parties. Therefore, no block could be modified once stored. This ends up with a very secure technique for exchanging properties, money, and data without the need for any intermediator. [4, 12] Blockchain is a shared immutable ledger that was used to develop the novel Corona Virus application for recording all medical and health transactions about Corona patient. A commercial blockchain, such as IBM Blockchain and the Linux Foundation's Hyperledger platform is the state-of-the-art solution. Also, building smart contracts are a value flow based on certain terms and conditions. They are comparable to contracts in real business. The only difference is that they are fully digital like linking agreements between two or more parties to replace the trusted intermediates, where they use distributed and verified decentralized blockchain networks. Hence, a prototype application is built to simulate the real COVID-19 Corona cases and tests on the IBM Blockchain platform. The procedure of building the Corona system started by creating the BC, transactions, and smart contracts. A testing process has been done to check the accuracy, efficiency, and operations of the system. The following figures show the testing scenarios and results. In addition, the performance test was conducted to check the accuracy and the output of the system, where the transactions and records were displayed correctly in Figures 3, 4, 5, and 6 . Furthermore, Figure 2 shows that the data has been stored and cannot be altered. The essential transaction is presented in Figure 3 , where in this transaction, the blockchain will be created and identified with a unique ID to be used later for selecting the required blockchain (Blockchain Selector). As a result, the records were saved and modified by every transaction properly. When we submitted the transaction to the network to be added to the selected blockchain, the acknowledgment response (ACK) is returned to inform us that the transaction has been successful. If any modification happened to the block from an unauthorized party, the ACK will return an error and it will not add any record to the chain. Likewise, if any change to the blockchain happened from an unauthorized party, the chain will alert, and we will not be able to add any block until the problem is fixed. For future uses, it is highly recommended to develop a global system that can involve every person in the universe. In the following Figure, the first transaction is initiated, and we used the ID "111-1111_1111111-1" to identify the new blockchain and then, we filled the first block with some data related to the user how will record all his corona tests data inside the blockchain. As shown the submission returned a success ACK for the transaction. During the testing process, we generated new BCs with different IDs, and we did multiple transactions to build up some data blocks to check if the data is stored in the BC independently, to make sure that there is no conflict between the BCs, and to check the unchangeability of the data. In Figures 4 and 5 , new transactions (Data Blocks) have been created containing the BC selector/identifier and the required data to be saved in the chain, where the BC selector is a data field used for testing purposes to control more than one BC but in the real-time system, every user will have a consistent BC identifier that cannot be changed. Implementation of the health systems on the Blockchain network and creating smart contracts are digital and automated, where contracts can be executed immediately. There's no traditional process and no time spent on fixing errors that often result from manually records entering. In addition, there's no third party concerned, and all inserted entries are encrypted and will be shared across participants. Separately, Blockchain transaction records are encrypted, which are impossible to hack. Also, each record is connected to the previous and subsequent records on a distributed ledger, hackers would have to modify the entire chain to change a single record. Smart contracts eliminate any third party to process transactions and automate the system. Records are saved in the blockchain permanently and can be accessed using a transaction hash as an identifier. [3, 4, 5] The system has been tested with dummy data only to check the overall functionality and the output result of the system after every created transaction. The contribution is to use Block Chain platform rather than normal database applications to achieve immutability, privacy, and security. Blockchain provided a significant and efficient approach for building the COVID-19 Coronavirus application for keeping and tracking the users' records and information privately, which is executed on IBM open-source platform. As a result, the outcome of the accomplished executions and scenarios showed successful and accurate outputs that have implemented every process and task on every block in the chain of any patient. Moreover, any new entries will be appended to the user history without altering the previous records. Fortunately, this work can be expanded to involve all people in the world on the blockchain cloud. So, it will be like an identified fingerprint anywhere while traveling. Blockchain technology in healthcare: a systematic review Prioritizing barrier s to successful implementation of hospital information systems Analysis and design of hospital management information system based on UML Research on information security technology based on blockchain Realizing the Potential of Blockchain Technology in Smart Grid Applications Robotic systems in operating theaters: New forms of team-machine interaction in health care Influence of mechanism of patient-accessible hospital information system implementation on doctor-patient relationships: A service fairness perspective Implementation processes of hospital information management systems: A field study in Turkey Design of the blockchain smart contract: A use case for real estate Smart contract security: A software lifecycle perspective An overview of smart contract and use cases in BC technology Blockchain Applications in Smart Grid-Review and Frameworks