Blockchain Technology and Artiﬁcial Intelligence Based Decentralized Access Control Model to Enable Secure Interoperability for Healthcare

: Healthcare, one of the most important industries, is data-oriented, but most of the research in this industry focuses on incorporating the internet of things (IoT) or connecting medical equipment. Very few researchers are looking at the data generated in the healthcare industry. Data are very important tools in this competitive world, as they can be integrated with artiﬁcial intelligence (AI) to promote sustainability. Healthcare data include the health records of patients, drug-related data, clinical trials data, data from various medical equipment, etc. Most of the data management processes are manual, time-consuming, and error-prone. Even then, different healthcare industries do not trust each other to share and collaborate on data. Distributed ledger technology is being used for innovations in different sectors including healthcare. This technology can be incorporated to maintain and exchange data between different healthcare organizations, such as hospitals, insurance companies, laboratories, pharmacies, etc. Various attributes of this technology, such as its immutability, transparency, provenance etc., can bring trust and security to the domain of the healthcare sector. In this paper, a decentralized access control model is proposed to enable the secure interoperability of different healthcare organizations. This model uses the Ethereum blockchain for its implementation. This model interfaces patients, doctors, chemists, and insurance companies, empowering the consistent and secure exchange of data. The major concerns are maintaining a history of the transactions and avoiding unauthorized updates in health records. Any transaction that changes the state of the data is reﬂected in the distributed ledger and can be easily traced with this model. Only authorized entities can access their respective data. Even the administrator will not be able to modify any medical records.


Introduction
One of the most important pillars of society is its healthcare sector, because it's related to the wellbeing and lives of human beings. This sector needs innovative ideas that can advance the standard of healthy life by providing solutions to different health-related issues.
The healthcare sector generates large amounts of data that are utilized by different stakeholders of the system, as shown in Figure 1. These data are very sensitive and avoiding sharing them over a public network is very critical. The exchange of patient data is necessary Because of the centralized nature of the current system, security remains a source for worry. As a result, security may be provided via a new and growing technology called blockchains [3][4][5][6]. By identifying the limitations of existing security procedures, blockchain technology may be used to improve security. It is a decentralized point-to-point network that removes the need for an intermediary in transactions and communication [7]. All of the transactions are self-contained and separate from one another. Blockchains are the technology that underpins the popular and ground breaking notion of cryptocurrencies. Everyone has access to blockchains, which are a publicly distributed ledger system [8][9][10].
The blocks in the chain consist of data, a hash of the preceding block, and the hash of all the transactions [11][12][13]. It is divided into two sections: the header and the transaction The innovations and latest breakthroughs in technology have made it easy to witness improvements in the health sector domain. The medical sector's current capabilities may be enhanced further by using the most cutting-edge and innovative computer technology. This cutting-edge computer technology can aid doctors and medical professionals in the early detection of a variety of ailments [2]. These powerful computer technologies can also greatly increase the accuracy of detecting illnesses at their early stages. Various developing and innovative computer technologies are already being applied with spectacular outcomes in other industries, among them blockchain technology, IoT, artificial intelligence, etc.
Because of the centralized nature of the current system, security remains a source for worry. As a result, security may be provided via a new and growing technology called blockchains [3][4][5][6]. By identifying the limitations of existing security procedures, blockchain technology may be used to improve security. It is a decentralized point-to-point network that removes the need for an intermediary in transactions and communication [7]. All of the transactions are self-contained and separate from one another. Blockchains are the technology that underpins the popular and ground breaking notion of cryptocurrencies. Everyone has access to blockchains, which are a publicly distributed ledger system [8][9][10].
The blocks in the chain consist of data, a hash of the preceding block, and the hash of all the transactions [11][12][13]. It is divided into two sections: the header and the transaction information. The block's information is contained in the header. The "timestamp" keeps track of when the block was generated. The "difficulty level" determines how difficult mining a block will be [14]. The hash of all the transactions of the current block is represented by "Merkle tree root", and "NONCE" is the answer to the proof-of-work algorithm's mathematical problem.

Motivation, Objective, and Contributions
In this article, the application of an emerging technology in the healthcare field is discussed. In healthcare, blockchain technology can help with drug traceability, medical record management, and other issues. The healthcare sector is facing lot of difficulties due to the vulnerability of healthcare data to security threats such as assaults on truthfulness, confidentiality, and availability. As a result, blockchain technology may be used in healthcare to improve the sector's capacities, while also ensuring the confidentiality of patients' information. However, the introduction of new and evolving technologies in any industry can result in a number of concerns and obstacles. So, identifying such concerns and obstacles is critical, particularly in the healthcare industry, where human lives are closely linked. The feasibility of adopting blockchains in the healthcare sector is investigated in this article. Contributions made by this article are listed below.

•
Various issues in the healthcare industry are explored and the benefits of integrating blockchain technology in the healthcare industry are discussed. • A blockchain-supported, decentralized access control solution is proposed and implemented. Moreover, it can be tailored for implementation on other blockchain frameworks.

•
The execution costs of various functions of smart contracts with slow, standard, and fast executions are compared.

•
The proof-of-authority consensus procedure is employed in the proposed paradigm. A few selected nodes will function as validators that will have the authority to validate the transactions. Because only preselected validator nodes will validate the transaction, the time necessary to create a block is predictable and smaller than the time required to generate a block using the proof-of-work process.
This paper is structured as follows: In Section 2, a literature study is performed to find out insights into the domain of healthcare. Section 3 elaborates on the advantages of employing blockchain technology in the healthcare industry. Section 4 describes the blockchain-supported proposed architecture. The methodology for the proposed work is described in Section 5. In Section 6, the implementation results and analysis are shown. In Section 7, research implications are discussed. Finally, the article is concluded in Section 8.

Literature Study
Legacy systems in the medical and healthcare fields often only exchange healthcare data within the organization but not outside it. Nonetheless, data suggest that combining these networks for linked and improved healthcare has a number of significant benefits, prompting health informatics academics to demand for interconnections across diverse organizations. Multi-organizational data sharing is an important challenge, since it necessitates that private data provided by a healthcare firm be freely accessible to other organizations. Distributed ledger technology is redefining the process of data management and governance in the domain of the medical system because of different features of blockchains, such as their immutability, provenance, transparency etc. The blockchain is the key to many contemporary advances in the healthcare business [15].
New options for the administration of medical information, as well as for the ease for people to have ownership and share their respective medical data, are opening up. Any data-driven company has to ensure the security, storage, transactions, and easy integration of their data. This is especially true in the medical field, where distributed ledger technology offers the ability to tackle these important concerns in a very effective way [16].
There are multiple levels to distributed ledger technology in healthcare breakthroughs, including its data sources and stakeholders. Gordon and Catalini completed their debate on the use of distributed ledger technology to make the complete system patient-centric, not institution-oriented. They looked at how distributed ledger technology could improve the healthcare industry by providing decentralized access rights, entity identification throughout the system, and data immutableness [17].
Hyperledger Fabric was used as a blockchain framework for the management of healthcare digital assets. The authors acquired the required medical data with the help of mobile phone devices. Their aim was to store the medical data on the blockchain using the Hyperledger framework [18].
Authors explored distributed ledger technology as a solution to efficiently handle the medically related data. They examined the benefits and limitations of employing this technology in the medical domain. The benefits include privacy of patient data, security, and transparency of data movements. There are also some limitations, such as the integration of this emerging technology with traditional infrastructure being costly and difficult. As this is an emerging field, there are fewer skilled professionals. The authors also investigated how this technology can be used in combination with cloud technology for medical data while maintaining security [19].
The authors proposed a model for the resolution of the restrictions of distributed ledger technology. This model was implemented using the Hyperledger framework for the management of patient-oriented medical data [20].
The authors introduced two security techniques for the networks after a survey of the healthcare domain. They also promoted distributed ledger technology as the best solution for privacy and security preservation [21]. MedChain was a system proposed by the authors to exchange healthcare data by utilizing distributed ledger technology and p-2-p networks. The authors created the system to collect patient data from IoT sensors and other mobile apps, Voice over IP (VoIP), and WiMAX as well as healthcare data provided by medical examinations [22].
Khezr et al. explored how blockchain technology might be used to tackle numerous challenges in the healthcare management system. They discussed the latest research on medical data utilizing this technology, as well as several potential medical use cases in which this technology might play a key part in streamlining the process. They've also presented a networking protocol based IoMT delivery system [23].
In addition to conducting a survey on healthcare difficulties, the authors examined various challenges related to healthcare. These issues were the security of the medical data of the patients, the transparency of the communications between different entities, the accessibility of the data, etc., and the authors discussed blockchain-based solutions to address these issues [24].
Breaches of patient information such as names, addresses, and other personal information were common, according to the authors. They proposed a blockchain-based system for dealing with medical records. The major resolution of their work was to evaluate the performance of their system in order to assess how well their suggested framework handled the demands of patients, physicians, and third parties [25].
The authors proposed a book chapter in which they examined several healthcare blockchain application cases. They have emphasized the need for a blockchain-based healthcare system and how this technology may help with medical system design [26].
The authors discussed how distributed ledger technology might help the medical industry by simplifying procedures. They have indicated in their study that keeping healthcare records is critical, and that technology has the ability to decrease data loss and avoid data fabrication by safeguarding information [27].
Jamil et al. explored medication restrictions and how to standardize pharmaceuticals by utilizing blockchain technology. They have underlined the difficulty in detecting fake pharmaceuticals in their study and advocated blockchain as a method for detecting counterfeits [28].
Using a blockchain and a microscope sensor, Lee and Yang developed a fingernail analysis management system. Human nails are one of a kind and represent a person's physiological makeup. They employed minuscule sensors to capture nail pictures and pre-processing methods to produce clear photos in their research. The performance of a feature extraction technique was monitored using a deep neural network. Blockchain technology was employed to safeguard user data, offer security and privacy, and track and record any changes in the system via the ledger [29].
The authors investigated a thorough analysis of existing blockchain applications in the domain of healthcare. Their research demonstrated that distributed ledger technology can be the perfect fit for many medical applications. They also suggested that better knowledge of this technology can open up new research directions in the healthcare domain. Healthcare innovation has been delayed by inefficiency and stringent restrictions [30].
The regulatory difficulties that produce inefficiencies in the EMR system were explored by the authors. They have presented a distributed-ledger-supported solution to handle massive amounts of medical data. They have exhibited a new and inventive way for gaining access to medical records that includes a fair audit log system. Using distributed ledger technology, MedRec allowed patients and clinicians to exchange medical data with other parties. They provide incentives for people such as researchers and other health professionals to engage in the mining process [31].
The authors talked about the use of distributed ledger technology to solve a variety of issues in the medical domain. Multiple issues related to the privacy and security of medical data can be tackled with this technology. They went on to say that by creating blockchainsupported applications, they can more effectively handle healthcare challenges [32].
The authors highlighted the use cases of distributed ledger technology in the domain of the healthcare industry. They have identified the various hurdles in the adoption of distributed ledger technology. They also developed smart contracts for the management of medical systems [33].
The authors advocated distributed ledger technology as the safest way to manage data related to the healthcare domain. As per their survey, due to hacker motivations and secrecy violations, digital safety was a serious concern. It was achievable in the eHealth field, by applying several rules wherein the management of patients' data must adhere to several regulations while staying accessible to officially authorized healthcare practitioners. Most people were aware of distributed ledger technology because of its most popular application in the payment industry, Bitcoin [34].
According to Nofer et al., the distributed ledger system has various advantages that include the protection of personal and confidential information, removing intermediates, etc. Unlike centralized networks, the functioning of the network remains even if individual nodes fail. It enhances confidence since the intermediary or other network members' trustworthiness is not appraised by people. Data security was also supported by the absence of intermediaries, because the involvement of intermediaries also leads to data security breaches. By utilizing distributed ledger technology, intermediaries may become obsolete, significantly boosting the user's safety [35].
The security and confidentiality problems of personal information management were highlighted in a paper by the MIT Media Lab, which emphasized all blockchain technology deployments. The worth of data processing is that it is safe in the sense that it cannot be tampered with. Data privacy and protection were another facet of data security. Enigma, for example, is a decentralized computer platform with assured anonymity and a blockchain innovation. Enigma's mission is to allow inventors to create peer-to-peer decentralized applications that are "privacy by design" without the need for intermediaries. The blockchain is an "operating system" for safe collaborative tasks performed by nodes in a network. Enigma is an extension to distributed ledger technology because processing and data storage are completed outside the blockchain [36].
The blockchain was described as a safe house for processing all types of delicate data. It defined the distributed ledger as a decentralized system. A large number of business difficulties can be solved by this technology. Encryption safeguards the records in a blockchain transaction, and each block is backward-connected to previous blocks by the hashing technique. Transactions were validated with different consensus algorithms. Blockchains will eventually achieve transparency, allowing each user to trace transactions at any moment. A smart contract is a secure method of preventing intervention by intermediaries. Ethereum is Sustainability 2022, 14, 9471 6 of 25 a public blockchain which is powered by smart contracts. This aids creators in the creation of markets for the long-term movement of money based on instructions issued in the past. Decentralization, immutability, rapid transfers, payment, and confirmation in real time are the major aspects of blockchains [37].
Authors took advantage of cloud technology to swiftly detect user behaviors and harvest data from the source. They developed and executed a model for the gathering and authentication of data origins, by embedding historical data into distributed ledger transactions. Data gathering and data validation from historical information were the three main steps of the proposed model. According to performance evaluation findings, ProvChain improved security for cloud-based storage systems which includes customer confidentiality and minimal overhead dependability, [38].
The current healthcare industry has a number of issues. Patients' health records contain sensitive and important information. Without a proper access control policy, these records can be misused by unauthorized users. In conventional approaches, proving the ownership of data is a tough task. Secondly, it is also discovered that the "names" were not those of real people, and a considerable number of names had different spellings. There are also some concerns with health insurance coverage. To begin with, exchanging information with many stakeholders is a time-consuming procedure. In the traditional approach, tracing a fraudulent insurance claim is extremely difficult. As participants add tainted, inadequately maintained, and falsified substances, the illegal drug market contributes significantly to the production of phony and fraudulent medications. Drug traceability is difficult because there aren't enough technological and business solutions that provide proper traceability and provenance. Confidentiality is another issue with the traditional systems. The data are visible to any unauthorized user once they get into the centralized databases of the traditional systems. These issues can be resolved by integrating blockchain technology into the healthcare industry. Some of the benefits are discussed in the next section.

Benefits of Employing Blockchain Technology for Healthcare
Blockchain technology supports a decentralized network where no one is the sole owner of the system [39]. The layered architecture of blockchain-technology-supported applications is shown in Figure 2. At the application-layer level, the front end developed in HTML, React, Javascript, etc. is used to access the system [40]. All the logic is written in the form of smart contracts at the access layer. Then, consensus is achieved via different algorithms such as proof of work (PoW), proof of stake (PoS), etc., at the consensus layer [41][42][43][44][45]. It supports a peer-to-peer system at the networking level. Data are present in the form of transactions and blocks at the data layer.
Multiple benefits can be achieved by different stakeholders from distributed ledger technology, as shown in Figure 3. A healthcare application can spur the construction of a new type of "smart" healthcare worker which can produce personalized treatment plans [46][47][48][49]. All the stakeholders can access the information with proper access controls in a decentralized peer-to-peer network. The following are the benefits of employing this technology in the healthcare industry: 1.

Towards complete and interoperable health records
It can help address the interoperability issue in a way better than current solutions because of its enhanced safety and capacity to develop belief between entities [50-54].

Smart contracts for better coordination
This technology can gather the data from all the entities automatically with proper permissions from the owners of the data. Then every entity can collaborate with other entities for more constructive outcomes by using smart contacts [55][56][57][58][59].

More successfully detecting fraud
If any patient applies for a fake insurance claim, then these claims can be detected with the help of smart contracts [60].

4.
Improving the correctness of the provider directory Every entity has some unique address that can be used by decentralized consensus mechanisms to make it easier for insurance companies and insurers to modify entries. Confidentiality is maintained by using cryptography in blockchain systems. Every entity has an associated public and private key pair. This pair is cryptographically connected, and it is not technically feasible to produce one key from another key of the pair [61,62].

5.
More client-centric to simplify it Using a blockchain to provide an easier-to-access, more complete collection of medical information might provide relief and satisfaction from what has become an invasive and sometimes disappointing application process [63]. 6.

Assisting in the development of a dynamic insurer-client relationship
A dynamic relationship can be built between insurer and client. All the interaction between the entities can be managed with the help of smart contracts [64,65]. Multiple benefits can be achieved by different stakeholders from distributed ledger technology, as shown in Figure 3. A healthcare application can spur the construction of a new type of "smart" healthcare worker which can produce personalized treatment plans [46][47][48][49]. All the stakeholders can access the information with proper access controls in a decentralized peer-to-peer network. The following are the benefits of employing this technology in the healthcare industry:

Towards complete and interoperable health records
It can help address the interoperability issue in a way better than current solutions because of its enhanced safety and capacity to develop belief between entities [50-54].

Smart contracts for better coordination
This technology can gather the data from all the entities automatically with proper cal information might provide relief and satisfaction from what has become an invasive and sometimes disappointing application process [63].

Assisting in the development of a dynamic insurer-client relationship
A dynamic relationship can be built between insurer and client. All the interaction between the entities can be managed with the help of smart contracts [64,65].

Proposed Architecture
In our proposed architecture, a smart contract is created that provides metadata about record data, ownership, and permissions. Cryptographically signed instructions for controlling these characteristics are included in our system's blockchain transactions [50][51][52][53]. Only legal transactions ensuring data alternation are used by the contract's state-transition functionalities to carry out the rules. If a medical record can be represented computationally, laws may be built to enforce any set of rules governing it. For example, before providing third-party viewing access, a policy may require separate consent transactions from patients and healthcare providers. For complicated healthcare workflows, we created a solution based on blockchain smart contracts. Smart contracts are created to manage data access permissions across different actors in the healthcare ecosystem, as shown in Figure 4.

Proposed Architecture
In our proposed architecture, a smart contract is created that provides metadata about record data, ownership, and permissions. Cryptographically signed instructions for controlling these characteristics are included in our system's blockchain transactions [50][51][52][53]. Only legal transactions ensuring data alternation are used by the contract's state-transition functionalities to carry out the rules. If a medical record can be represented computationally, laws may be built to enforce any set of rules governing it. For example, before providing third-party viewing access, a policy may require separate consent transactions from patients and healthcare providers. For complicated healthcare workflows, we created a solution based on blockchain smart contracts. Smart contracts are created to manage data access permissions across different actors in the healthcare ecosystem, as shown in Figure 4.  This will make it easier for all stakeholders to exchange and communicate information. Smart contracts include data authorization restrictions. It can also assist in tracing all actions associated with a unique ID from the point of origin to the current instance of time. There will be no need for a centralized organization to supervise and authorize the operation because this can be done directly through the smart contract, considerably lowering the cost of administration. To ensure performance and economic sustainability, all medical record data are saved in interplanetary file storage, and the content identifier (CID) of the record is committed to the chain. The smart contract includes the registration of the entities, uploaded documents, treatment process details, and insurance claim pro- This will make it easier for all stakeholders to exchange and communicate information. Smart contracts include data authorization restrictions. It can also assist in tracing all actions associated with a unique ID from the point of origin to the current instance of time. There will be no need for a centralized organization to supervise and authorize the operation because this can be done directly through the smart contract, considerably lowering the cost of administration. To ensure performance and economic sustainability, all medical record data are saved in interplanetary file storage, and the content identifier (CID) of the record is committed to the chain. The smart contract includes the registration of the entities, uploaded documents, treatment process details, and insurance claim process. The tools used in the implementation of the proposed work are shown in the Figure 5. It includes Solidity for smart contract development. It uses Truffle suit for the local blockchain environment. It employs web3.js library to connect the smart contract with the front end. Metamask wallet is used to enable the interaction of the code with the blockchain.
This will make it easier for all stakeholders to exchange and communicate information. Smart contracts include data authorization restrictions. It can also assist in tracing all actions associated with a unique ID from the point of origin to the current instance of time. There will be no need for a centralized organization to supervise and authorize the operation because this can be done directly through the smart contract, considerably lowering the cost of administration. To ensure performance and economic sustainability, all medical record data are saved in interplanetary file storage, and the content identifier (CID) of the record is committed to the chain. The smart contract includes the registration of the entities, uploaded documents, treatment process details, and insurance claim process. The tools used in the implementation of the proposed work are shown in the Figure  5. It includes Solidity for smart contract development. It uses Truffle suit for the local blockchain environment. It employs web3.js library to connect the smart contract with the front end. Metamask wallet is used to enable the interaction of the code with the blockchain.

Proposed Methodology
Multiple entities, such as patients, doctors, and insurance companies, are associated with the smart contract with the help of different functions, as shown in Figure 6. These entities interact with each other via smart contract functions.

Proposed Methodology
Multiple entities, such as patients, doctors, and insurance companies, are associated with the smart contract with the help of different functions, as shown in Figure 6. These entities interact with each other via smart contract functions. The workflow of the process of record creation and insurance claim validation is shown in Figure 7. The proof-of-authority consensus procedure is employed in our suggested paradigm. Few selected nodes can function as validators in this algorithm to validate transactions. Because only preselected validator nodes will validate the transaction, the time necessary to create a block is predictable and smaller than the time required to generate a block using the PoW.  The workflow of the process of record creation and insurance claim validation is shown in Figure 7. The proof-of-authority consensus procedure is employed in our suggested paradigm. Few selected nodes can function as validators in this algorithm to validate transactions. Because only preselected validator nodes will validate the transaction, the time necessary to create a block is predictable and smaller than the time required to generate a block using the PoW. The workflow of the process of record creation and insurance claim validation is shown in Figure 7. The proof-of-authority consensus procedure is employed in our suggested paradigm. Few selected nodes can function as validators in this algorithm to validate transactions. Because only preselected validator nodes will validate the transaction, the time necessary to create a block is predictable and smaller than the time required to generate a block using the PoW.

Registration
The main entities in the proposed model are the hospital admin, patient, doctor, chemist, lab admin, and insurance company. The hospital admin add or register an entity by providing some information such as patient ID, name, address, etc. Then this record is signed and verified by the respective entity. An entity can sign and verify its respective record. One entity cannot sign and verify records of other entities' registration details. The address provided during registration is a 20-byte (160 bits or 40 hex characters) account address that will uniquely identify the entity in this model. All the entities are registered with a unique account address for the authentication purposes. Whenever any entity wants to access, verify, or update some information, then its hexadecimal address is used to authenticate the entity to check whether it is authorized to do so or not.

Treatment
At the time of treatment of any patient, information such as patient ID, doctor ID, diagnosis, test conducted, medicine, etc., are entered. This information can be retrieved at any point of time to find which doctor treated which patient, what type of tests were conducted, which medicine suggested, etc. Once the information is recorded in the blockchain transaction, nobody can update it after that. Even the doctor is not able to edit this information.

Document Upload on IPFS and Association with the Owner
Documents such as test reports, etc., are uploaded on IPFS. When a document is uploaded on IPFS, a content identifier (CID) is returned which is unique for each document. If there is any change in the content of the document, then its CID will also be changed. Two identical documents will generate the same CID. This CID is associated with a hexadecimal address. So, that entity with the associated address is treated as the owner of the document.

Insurance Claim
First, patients will create a medical record by providing a few details such as ID, test name, date, hospital name, price etc. Then, this record will be signed by the hospital admin and lab admin of that hospital. After getting signed by both, the record is considered approved. Then this record will go through the insurance claim process (Algorithms 1 and 2). If (msg.sender = admin hospital ) 2.
Then "cannot add new entity E and operation declined" 3.
Else "enter attributes for E to create a record" 4.
Else "E record is not approved" 7.
If (X Signed(E record )) //X represents any other entity 8.
If (A hospital signed (A hospital Signed (M record )) || A lab Signed (A lab Signed (M record ))) 8.
If (A hospital Signed (M record ) && A lab Signed (M record )) 10. Then "M record approved for insurance claim" 11. Else "M record not approved for insurance claim"

Result and Analysis
We deploy a smart contract using Remix IDE and a Metamask wallet, then a confirmation pops up from the Metamask wallet as shown in Figure 8. It shows the activity of the transaction confirmation before its execution. Metamask wallet is used by the entities to connect with the system. This wallet stores the information about the account of the entities such as the number of ethers, address of the entity, etc.
This pop up shows the estimated gas fee required to deploy this smart contract. After clicking the confirm button, the smart contract is deployed, and the transaction is recorded in the distributed ledger of the blockchain. The transaction details show the address from which it is deployed, gas consumed, gas fee, etc., as shown in the Figure 9. These details include the status of the transaction, such as whether it is executed successfully or not. Transaction hash represents the hash of the executed transaction. From represents the address of the sender of the transaction. Gas represents the total gas available. Transaction cost represents the amount of gas consumed by this particular transaction.
After deployment, we can see a view of the different functions of the smart contract, as shown in Figure 10. Functions are shown with two different colors. Functions with orange color are those which will add or modify the state of the data. Functions with blue colour are only view functions. These functions do not change any data.

Result and Analysis
We deploy a smart contract using Remix IDE and a Metamask wallet, then a confirmation pops up from the Metamask wallet as shown in Figure 8. It shows the activity of the transaction confirmation before its execution. Metamask wallet is used by the entities to connect with the system. This wallet stores the information about the account of the entities such as the number of ethers, address of the entity, etc. This pop up shows the estimated gas fee required to deploy this smart contract. After clicking the confirm button, the smart contract is deployed, and the transaction is recorded in the distributed ledger of the blockchain. The transaction details show the address from which it is deployed, gas consumed, gas fee, etc., as shown in the Figure 9. These details include the status of the transaction, such as whether it is executed successfully or not. Transaction hash represents the hash of the executed transaction. From represents the address of the sender of the transaction. Gas represents the total gas available. Transaction cost represents the amount of gas consumed by this particular transaction. After deployment, we can see a view of the different functions of the smart contract, as shown in Figure 10. Functions are shown with two different colors. Functions with orange color are those which will add or modify the state of the data. Functions with blue colour are only view functions. These functions do not change any data.  After deployment, we can see a view of the different functions of the smart contract, as shown in Figure 10. Functions are shown with two different colors. Functions with orange color are those which will add or modify the state of the data. Functions with blue colour are only view functions. These functions do not change any data.  After clicking on the addPatient function, a patient can be registered by the hospital admin as shown in Figure 11. For testing purposes, a patient with pID 11 named ram is registered. This patient is assigned to Dr. Shyam as per testing data. After clicking on the addPatient function, a patient can be registered by the hospital admin as shown in Figure 11. For testing purposes, a patient with pID 11 named ram is registered. This patient is assigned to Dr. Shyam as per testing data. After successful execution of the addPatient function, information related to this transaction such as the transaction hash, address by which this function is executed, gas available for execution, gas consumption by the function execution, and other related data can be seen in its transaction details, as shown in Figure 12. After successful execution of the addPatient function, information related to this transaction such as the transaction hash, address by which this function is executed, gas available for execution, gas consumption by the function execution, and other related data can be seen in its transaction details, as shown in Figure 12. After successful execution of the addPatient function, information related to this transaction such as the transaction hash, address by which this function is executed, gas available for execution, gas consumption by the function execution, and other related data can be seen in its transaction details, as shown in Figure 12. If a hospital admin or any other entity tries to sign the record of a patient for verification, then the operation is declined. For example, if the address of the patient is "0xAb8…35cb2", but an entity with the address "0x5B3…. eddC4" tried to execute the function, then an error will be returned because only the patient with address "0xAb8…35cb2" can execute this function, as shown in Figure 13, Figure 14, and Figure  15. If a hospital admin or any other entity tries to sign the record of a patient for verification, then the operation is declined. For example, if the address of the patient is "0xAb8 . . . 35cb2", but an entity with the address "0x5B3 . . . eddC4" tried to execute the function, then an error will be returned because only the patient with address "0xAb8 . . . 35cb2" can execute this function, as shown in Figures 13-15.       When the same function is used by the patient with address ""0xAb8…35cb2", then the function is executed and the transaction details for the same is recorded in the blockchain, as shown in Figure 16 and Figure 17.  When the same function is used by the patient with address ""0xAb8 . . . 35cb2", then the function is executed and the transaction details for the same is recorded in the blockchain, as shown in Figures 16 and 17.  When the same function is used by the patient with address ""0xAb8…35cb2", then the function is executed and the transaction details for the same is recorded in the blockchain, as shown in Figure 16 and Figure 17.  Medical documents such as test reports, etc., can be stored on IPFS, which is a decentralized storage solution. When a file is stored on IPFS, a content identifier (CID) is generated for that particular file. If there is any change in the file, then the CID will also be changed. For our implementation, a demo file is uploaded on IPFS, as shown in Figure 18. Medical documents such as test reports, etc., can be stored on IPFS, which is a decentralized storage solution. When a file is stored on IPFS, a content identifier (CID) is generated for that particular file. If there is any change in the file, then the CID will also be changed. For our implementation, a demo file is uploaded on IPFS, as shown in Figure 18. Medical documents such as test reports, etc., can be stored on IPFS, which is a decentralized storage solution. When a file is stored on IPFS, a content identifier (CID) is generated for that particular file. If there is any change in the file, then the CID will also be changed. For our implementation, a demo file is uploaded on IPFS, as shown in Figure 18. After uploading the document, we can associate the CID of the document with the address of the owner of the file, as shown in Figure 19. For testing purposes, the CID used is "QmPGr8FuBcRQ4zqtnwrCXP2JpUUrNBLsqfT5rB7CwWt41U", and the owner address used is "0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2". After uploading the document, we can associate the CID of the document with the address of the owner of the file, as shown in Figure 19. For testing purposes, the CID used is "QmPGr8FuBcRQ4zqtnwrCXP2JpUUrNBLsqfT5rB7CwWt41U", and the owner address used is "0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2". After successful execution of the hash function, information related to this transaction such as the transaction hash, address by which this function is executed, gas available for execution, gas consumption by the function execution, and other related data can be seen in the transaction details, as shown in Figure 20. After successful execution of the hash function, information related to this transaction such as the transaction hash, address by which this function is executed, gas available for execution, gas consumption by the function execution, and other related data can be seen in the transaction details, as shown in Figure 20.
If any other unauthorized entity tries to access this file with CID "QmPGr8FuBcRQ4zqtnwrCXP2JpUUrNBLsqfT5rB7CwWt41U", then that operation is declined, as shown in Figures 21 and 22.
However, if the owner of the file with address "0xAb8483F64d9-C6d1EcF9b849Ae677dD3315835cb2" tries to access the same file, then this operation is allowed and the transaction is recorded in the blockchain, as shown in Figure 23.
When a smart contract is deployed on the main net of the Ethereum blockchain, it uses some fee for its deployment. This fee is necessary to avoid fake executions and keep the network running without intervention from an external entity. This fee is measured in terms of gas consumed for the execution. How much computation is required for execution of a transaction is represented by gas. The gas fee is paid in the local currency of the Ethereum blockchain, i.e., ether. The total amount of gas consumed for the execution of any transaction is multiplied with the gas price at that moment. This gives us the number of ethers required for the execution of that transaction. Then, the number of ethers can be multiplied with the USD price of ether to find the cost in USD. The gas price is different for different execution speeds. There are three types of executions: fast, standard, and slow. Miners receive some reward from the transaction fees of all the transactions included in the generated block. So, the Miners prioritize the transaction according to their gas fee. It means a transaction with a high gas price is added in the block before a transaction with a low gas price. So, gas price is highest for fast executions and at its minimum for slow executions. Cost estimates for fast, standard, and slow executions for different functions of the smart contract are shown in Tables 1-3. The cost in ether and USD is calculated for different functions of the smart contract. If the user does not have a sufficient amount of gas in their wallet, then they cannot perform the transaction. The ether price in USD and the gas price for fast, standard, and slow executions are considered at the time of deployment of the contract. After successful execution of the hash function, information related to this transaction such as the transaction hash, address by which this function is executed, gas available for execution, gas consumption by the function execution, and other related data can be seen in the transaction details, as shown in Figure 20. If any other unauthorized entity tries to access this file with CID "QmPGr8FuB-cRQ4zqtnwrCXP2JpUUrNBLsqfT5rB7CwWt41U", then that operation is declined, as shown in Figures 21 and 22.    However, if the owner of the file with address "0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2" tries to access the same file, then this operation is allowed and the transaction is recorded in the blockchain, as shown in Figure 23. When a smart contract is deployed on the main net of the Ethereum blockchain, it uses some fee for its deployment. This fee is necessary to avoid fake executions and keep the network running without intervention from an external entity. This fee is measured in terms of gas consumed for the execution. How much computation is required for execution of a transaction is represented by gas. The gas fee is paid in the local currency of the Ethereum blockchain, i.e., ether. The total amount of gas consumed for the execution of any transaction is multiplied with the gas price at that moment. This gives us the number of ethers required for the execution of that transaction. Then, the number of ethers can be multiplied with the USD price of ether to find the cost in USD. The gas price is different for different execution speeds. There are three types of executions: fast, standard, and slow. Miners receive some reward from the transaction fees of all the transactions included in the generated block. So, the Miners prioritize the transaction according to their gas fee. It means a transaction with a high gas price is added in the block before a transaction with a low gas price. So, gas price is highest for fast executions and at its minimum for slow executions. Cost estimates for fast, standard, and slow executions for different functions of the smart contract are shown in Tables 1-3. The cost in ether and USD is calculated for different functions of the smart contract. If the user does not have a sufficient amount of gas in their wallet, then they cannot perform the transaction. The ether However, if the owner of the file with address "0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2" tries to access the same file, then this operation is allowed and the transaction is recorded in the blockchain, as shown in Figure 23. When a smart contract is deployed on the main net of the Ethereum blockchain, it uses some fee for its deployment. This fee is necessary to avoid fake executions and keep the network running without intervention from an external entity. This fee is measured in terms of gas consumed for the execution. How much computation is required for execution of a transaction is represented by gas. The gas fee is paid in the local currency of the Ethereum blockchain, i.e., ether. The total amount of gas consumed for the execution of any transaction is multiplied with the gas price at that moment. This gives us the number of ethers required for the execution of that transaction. Then, the number of ethers can be multiplied with the USD price of ether to find the cost in USD. The gas price is different for different execution speeds. There are three types of executions: fast, standard, and slow. Miners receive some reward from the transaction fees of all the transactions included in the generated block. So, the Miners prioritize the transaction according to their gas fee. It means a transaction with a high gas price is added in the block before a transaction with a low gas price. So, gas price is highest for fast executions and at its minimum for slow executions. Cost estimates for fast, standard, and slow executions for different functions of the smart contract are shown in Tables 1-3. The cost in ether and USD is calculated for different functions of the smart contract. If the user does not have a sufficient amount of gas in their wallet, then they cannot perform the transaction. The ether  A cost comparison of fast, standard, and slow executions of the transactions is shown in Figure 24.  The Ethereum blockchain is used for the deployment of the proposed solution. Use of the Ethereum blockchain is increasing day by day. More and more addresses are being registered on it, as shown in Figure 25. The gas price on the Etherum blockchain change daily. The average gas price during 2016 to 2022 is shown in Figure 26. As the number of registered users are increasing, the daily transaction execution count is also increasing, as shown in Figure 27.  The Ethereum blockchain is used for the deployment of the proposed solution. Use of the Ethereum blockchain is increasing day by day. More and more addresses are being registered on it, as shown in Figure 25. The gas price on the Etherum blockchain change daily. The average gas price during 2016 to 2022 is shown in Figure 26. As the number of registered users are increasing, the daily transaction execution count is also increasing, as shown in Figure 27.  The Ethereum blockchain is used for the deployment of the proposed solution. Use of the Ethereum blockchain is increasing day by day. More and more addresses are being registered on it, as shown in Figure 25. The gas price on the Etherum blockchain change daily. The average gas price during 2016 to 2022 is shown in Figure 26. As the number of registered users are increasing, the daily transaction execution count is also increasing, as shown in Figure 27.  Existing approaches are compared with the proposed approach on the basis of various attributes. These attributes include the speed of transaction executions, energy consumption, processing power requirements, consensus algorithm, possibility of 51% attack, etc. Comparative analysis of the proposed approach with the existing approach is shown in Table 4. Existing approaches [15,42] use proof of work as the consensus algorithm. In this algorithm, a transaction is confirmed when multiple miners validate that particular transaction. Limitations with this process are its consumption of lots of energy, slow confirmation, and problem of 51% attack. In the proposed approach, the proof-of-authority consensus algorithm is used. In this process, predefined, limited nodes have the capability to validate the transactions. Energy consumption is low and confirmation of transactions is fast.  Existing approaches are compared with the proposed approach on the basis of various attributes. These attributes include the speed of transaction executions, energy consumption, processing power requirements, consensus algorithm, possibility of 51% attack, etc. Comparative analysis of the proposed approach with the existing approach is shown in Table 4. Existing approaches [15,42] use proof of work as the consensus algorithm. In this algorithm, a transaction is confirmed when multiple miners validate that particular transaction. Limitations with this process are its consumption of lots of energy, slow confirmation, and problem of 51% attack. In the proposed approach, the proof-of-authority consensus algorithm is used. In this process, predefined, limited nodes have the capability to validate the transactions. Energy consumption is low and confirmation of transactions is fast.   Existing approaches are compared with the proposed approach on the basis of various attributes. These attributes include the speed of transaction executions, energy consumption, processing power requirements, consensus algorithm, possibility of 51% attack, etc. Comparative analysis of the proposed approach with the existing approach is shown in Table 4. Existing approaches [15,42] use proof of work as the consensus algorithm. In this algorithm, a transaction is confirmed when multiple miners validate that particular transaction. Limitations with this process are its consumption of lots of energy, slow confirmation, and problem of 51% attack. In the proposed approach, the proof-of-authority consensus algorithm is used. In this process, predefined, limited nodes have the capability to validate the transactions. Energy consumption is low and confirmation of transactions is fast.

Research Implications
In this study, we used blockchain technology to increase healthcare system interoperability across various stakeholders. Academicians, researchers, etc., can take benefit from our findings in a variety of ways. First and foremost, the findings may be used to improve policy formulation. Second, this research may be utilized as a foundation for looking into other parts of the healthcare sector where blockchain technology could be employed. The findings provide a comprehensive perspective on a blockchain-enabled healthcare system. Researchers will be able to better comprehend the evolution and current state of blockchain technology, which will aid in the selection of worthwhile study areas that require more attention from the academic community. For cost-effective and secure data sharing, more blockchain-based apps may be developed.

Conclusions
In traditional healthcare delivery models, hospitals, laboratories, payers (i.e., insurance companies), and medication firms all store medical data related to patients in different forms, but have no consistency in record keeping. This has resulted in the current state of data chaos in the interchange of health records. We present a novel method for medical record management that uses smart contracts to provide auditability, interoperability, and accessibility. This system, which is planned to record flexibility and granularity, allows for the exchange of patients' medical data as well as insurance claims to support the system.
The practical application of distributed ledger technology in the medical domain will benefit many people, including health experts, healthcare workers, healthcare entities, and biomedical researchers, by allowing them to more effectively disseminate large amounts of data, share clinical knowledge, and communicate recommendations, while maintaining greater security and privacy protection. The effective deployment of this technology in medical settings in the healthcare domain will undoubtedly open new research paths for biomedical research development. Deployment of the proposed solution on other blockchains with lower costs can be considered as a future work. The lack of competence is a major barrier to the use of this modern technology in medical institutions. Blockchain applications are still in their infancy, and more effort in research is required. It does, however, serve as a responsibility of medical groups and regulators. The use of blockchain in healthcare is extremely likely to grow in the future. Its applications in healthcare will improve as a result of this technological advancement, since it aids in the explanation of treatment results and progress.