Design and Implementation of a Blockchain-Based Secure Data Sharing Framework to Enhance the Healthcare System
Abstract
1. Introduction
2. Literature Review
3. Research Gap
- Blockchain represents a new era in the development of digital communication, necessitating the creation of comprehensive recourses to develop a secure data blockchain and 5G network,
- Identify the cryptographic approaches that ensure secure and transparent data accessing and control within the 5G network.
- Using the current infrastructure and frameworks to support real-time application transactions.
4. Objectives
- Usage of the blockchain infrastructure and its programming version to design a secure record (data and information) sharing framework that ensures record transparency in 5G network.
- Designing a blockchain-based identity and access control management.
- Deploying an efficient cryptography-based approach to enforce access control on blockchain.
5. Research Methodology
5.1. Data Collection
5.2. System Design
5.2.1. Smart Contracts
- Initialize the smart contract
- Doctor
- Algorithm: Doctor Registry Smart Contract
- Step 1: Initialization
- 1.
- Deploy the contract.
- 2.
- The deployer’s address is set as admin.
- 3.
- nextDoctorId counter is initialized to 0.
- Step 2: Doctor Registration
- 1.
- A doctor calls registerDoctor(name, specialization).
- 2.
- Contract checks if doctor’s wallet is already registered.
- If yes → reject.
- If no → continue.
- 3.
- Increment nextDoctorId.
- 4.
- Create a new Doctor struct:
- id = nextDoctorId
- name = name (string input)
- specialization = specialization (string input)
- walletAddress = msg.sender
- isApproved = false (default)
- 5.
- Store the struct in doctors[walletAddress].
- 6.
- Emit DoctorRegistered event.
- Step 3: Approving a Doctor (Admin Only)
- 1.
- Admin calls approveDoctor(wallet).
- 2.
- Contract checks if doctor is registered.
- If not → reject.
- 3.
- Set isApproved = true for that doctor.
- 4.
- Emit DoctorApproved event.
- Step 4: Revoking a Doctor (Admin Only)
- 1.
- Admin calls revokeDoctor(wallet).
- 2.
- Contract checks if doctor is registered.
- If not → reject.
- 3.
- Set isApproved = false for that doctor.
- 4.
- Emit DoctorRevoked event.
- Step 5: Retrieving Doctor Information
- 1.
- Anyone can call getDoctor(wallet).
- 2.
- The contract returns the full Doctor struct:
- id, name, specialization, walletAddress, isApproved.
- Algorithm: Patient Registry Smart Contract
- Step 1: Initialization
- Deploy the contract.
- The deployer’s address is set as admin.
- nextPatientId counter is initialized to 0.
- Step 2: Patient Registration
- 1.
- A patient calls registerPatient(name, age).
- 2.
- Contract checks if patient’s wallet is already registered.
- If yes → reject.
- If no → continue.
- 3.
- Increment nextPatientId.
- 4.
- Create a new Patient struct:
- id = nextPatientId
- name = name (string input, or use hash for privacy)
- age = age (integer input)
- walletAddress = msg.sender
- isActive = true (default)
- 5.
- Store the struct in patients[walletAddress].
- 6.
- Emit PatientRegistered event.
- Step 3: Updating Patient Information
- 1.
- Patient calls updatePatient(name, age) (optional function).
- 2.
- Contract checks if patient is already registered.
- If not → reject.
- Update stored name and age.
- 3.
- Emit PatientUpdated event.
- Step 4: Deactivating Patient (Admin Only)
- 1.
- Admin calls deactivatePatient(wallet).
- 2.
- Contract checks if patient is registered.
- If not → reject.
- Set isActive = false.
- 3.
- Emit PatientDeactivated event.
- Step 5: Retrieving Patient Information
- 1.
- Anyone can call getPatient(wallet).
- 2.
- The contract returns the full Patient struct:
- id, name, age, walletAddress, isActive.
- Algorithm: Diagnosis Management in Smart Contract
- Step 1: Initialization
- 1.
- Contract is deployed (already has admin, doctors, and patients registered).
- 2.
- nextDiagnosisId counter initialized to 0.
- Step 2: Adding a Diagnosis (Doctor Only)
- 1.
- A doctor (with isApproved = true) calls addDiagnosis(patientWallet, condition, prescription).
- 2.
- Contract checks:
- Doctor is registered and approved.
- Patient is registered and active.
- 3.
- Increment nextDiagnosisId.
- 4.
- Create a new Diagnosis struct:
- id = nextDiagnosisId
- patientId = patient.id
- doctorId = doctor.id
- condition = condition (string, or hash for privacy)
- prescription = prescription (string, or hash for privacy)
- diagnosisDate = block.timestamp
- 5.
- Store the struct in diagnoses[nextDiagnosisId].
- 6.
- Emit DiagnosisAdded event.
- Step 3: Updating a Diagnosis (Doctor Only)
- 1.
- Doctor calls updateDiagnosis(diagnosisId, condition, prescription).
- 2.
- Contract checks:
- Diagnosis exists.
- Caller is the doctor who created it (or admin).
- 3.
- Update condition and/or prescription.
- 4.
- Emit DiagnosisUpdated event.
- Step 4: Retrieving Diagnosis
- 1.
- Anyone with the right permissions (patient, approved doctor, or admin) calls getDiagnosis(diagnosisId).
- 2.
- Contract checks access control:
- Patient can always view their own diagnosis.
- Admin can always view.
- Doctors can view if patient gave consent.
- 3.
- Returns full Diagnosis struct.
- Step 5: Revoking or Deleting Diagnosis (Admin Only)
- Admin calls removeDiagnosis(diagnosisId).
- Contract checks if diagnosis exists.
- Deletes or marks it inactive.
- Emit DiagnosisRemoved event.
5.2.2. Cryptographic Techniques
- 1.
- Public Key Cryptography (Asymmetric Encryption):Public key cryptography involves the use of two keys: a public key (known to everyone) and a private key (known only to the owner).Use in Healthcare Blockchain:
- Patient Identity Verification: A patient’s public key can be used to uniquely identify them on the blockchain. The patient controls the private key, ensuring that they can provide consent or authorization for accessing their healthcare data.
- Doctor and Patient Authentication: Both doctors and patients use public–private key pairs to authenticate themselves, ensuring that only authorized individuals are interacting with the blockchain system.
- 2.
- Hashing (Cryptographic Hash Functions):Hashing transforms input data of any size into a fixed-length output (the hash) using a mathematical function (e.g., SHA-256). It is a one-way process, meaning the original data cannot be reconstructed from the hash.Use in Healthcare Blockchain:
- ○
- Data Integrity: Hashing ensures the integrity of sensitive healthcare data, such as medical records and prescriptions. Any alteration to the data will result in a different hash, making it easy to detect tampering.
- ○
- Digital Signatures: Hashing is used to generate digital signatures, which are essential for verifying the authenticity of documents, such as medical prescriptions or test results, on the blockchain.
- ○
- Transaction Verification: In a blockchain system, every block’s data is hashed, and the hash of the previous block is included in the next block. This creates an immutable chain where altering data in one block would require re-mining all subsequent blocks.
5.2.3. Zero-Knowledge Proofs (ZKPs)
- Patient Data Privacy: Zero-knowledge proofs allow patients to prove that they meet specific health conditions (e.g., having a certain medical diagnosis or being insured) without revealing detailed health records.
- Selective Disclosure: Patients can selectively disclose only the necessary information (e.g., confirming their insurance coverage) without exposing their entire medical history.
5.2.4. Access Control and Permissions
- ○
- Granular Access Control: Smart contracts can enforce who has access to specific health data. For example, a patient may allow a doctor to access only their diagnosis history but not their entire medical record.
- ○
- Role-Based Access: Blockchain can implement role-based access control, where different healthcare professionals (e.g., doctors, nurses, insurance agents) have varying levels of access to patient data.
5.2.5. Blockchain Consensus Mechanisms
- ○
- Transaction Validation: Consensus mechanisms, like Proof of Work (PoW) or Proof of Stake (PoS), ensure that healthcare transactions (e.g., patient data updates, service agreements) are validated and recorded securely on the blockchain.
- ○
- Immutable Medical Records: Once medical records are validated by the consensus process, they become immutable, ensuring they cannot be altered or tampered with without detection.
5.2.6. Fifth-Generation Protocol
5.3. System Architecture and Proposed System
5.3.1. System Layers
- User Layer
- 2.
- Application Layer
- 3.
- Blockchain Layer
- 4.
- Data Storage Layer
- 5.
- Security and Privacy Layer
5.3.2. Proposed System Functionality
- Data Registration
- 2.
- Patient-Centric Access Control
- 3.
- Secure Data Sharing
- 4.
- Interoperability and Integration
- 5.
- Audit Ability and Transparency
5.3.3. Benefits of the Proposed System
6. Implementation
6.1. Software Requirements
6.2. Hardware Requirements
6.3. Output Screenshots of Implemented Framework
7. Test Case Study of Framework
7.1. Functional Test Cases
7.2. Security Test Cases
7.3. Performance Test Cases
7.4. Comparative Analysis of All Test Cases
7.5. Attacks and Security Implementation Check in Block Chain
8. Conclusions
- 1.
- Functional:
- ○
- The system showed high performance in terms of smart contract execution and data sharing success. The logic execution was almost flawless, with minor inconsistencies observed.
- ○
- The audit log generation also proved to be highly consistent, ensuring transparency and integrity across transactions.
- ○
- These results indicate that the system is robust in executing core blockchain functionalities, making it suitable for applications like healthcare data management.
- 2.
- Security:
- ○
- The security module of the system excelled with an extremely high level of accuracy in unauthorized access detection, data integrity verification, and encryption/decryption processes.
- ○
- With 99.9% cryptographic accuracy and 99.6% data integrity, the system can be considered very secure, providing strong protection against potential breaches and ensuring the confidentiality and integrity of sensitive health data.
- ○
- This indicates that the system is well-suited for secure healthcare environments that require stringent compliance with data protection regulations.
- 3.
- Performance:
- ○
- The performance results showed moderate-to-high consistency in transaction throughput and system latency, with an average of 95.5% accuracy across different phases (training, validation, and testing).
- ○
- While throughput remained stable, there is still room for improvement in latency handling under high load conditions. The system performed well within normal operational parameters but could benefit from further optimization in real-time transaction processing.
- ○
- This suggests that scalability improvements could be made to ensure smoother performance during peak loads.
- 4.
- Attack Defense
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Ali, M.; Nelson, J.; Shea, R.; Freedman, M.J. Blockstack: A global naming and storage system secured by blockchains. In Proceedings of the 2016 USENIX Annual Technical Conference (USENIX ATC 16), Denver, CO, USA, 22–24 June 2016; pp. 181–194. [Google Scholar]
- Alizadeh, M.; Peters, S.; Etalle, S.; Zannone, N. Behavior analysis in the medical sector: Theory and practice. In Proceedings of the 33rd Annual ACM Symposium on Applied Computing, Pau, France, 13 April 2018; pp. 1637–1646. [Google Scholar]
- Alsayed Kassem, J.; Sayeed, S.; Marco-Gisbert, H.; Pervez, Z.; Dahal, K. DNS-IdM: A blockchain identity management system to secure personal data sharing in a network. Appl. Sci. 2019, 9, 2953. [Google Scholar] [CrossRef]
- Amani, S.; B’egel, M.; Bortin, M.; Staples, M. Towards verifying Ethereum smart contract bytecode in Isabelle/HOL. In Proceedings of the 7th ACM SIGPLAN International Conference on Certified Programs and Proofs, Los Angeles, CA, USA, 8–9 January 2018; pp. 66–77. [Google Scholar]
- Brotsis, S.; Kolokotronis, N.; Limniotis, K.; Bendiab, G.; Shiaeles, S. On the Security and Privacy of Hyperledger Fabric: Challenges and Open Issues. In Proceedings of the 2020 IEEE World Congress on Services (SERVICES), Beijing, China, 18–23 October 2020; pp. 197–204. [Google Scholar] [CrossRef]
- Androulaki, E.; Karame, G.O.; Roeschlin, M.; Scherer, T.; Capkun, S. Evaluating user privacy in Bitcoin. In Proceedings of the International Conference on Financial Cryptography and Data Security, Okinawa, Japan, 1–5 April 2013; Springer: Berlin/Heidelberg, Germany, 2013; pp. 34–51. [Google Scholar]
- Argento, L.; Margheri, A.; Paci, F.; Sassone, V.; Zannone, N. Towards adaptive access control. In Proceedings of the IFIP Annual Conference on Data and Applications Security and Privacy, Bergamo, Italy, 16–18 July 2018; Springer: Berlin/Heidelberg, Germany, 2018; pp. 99–109. [Google Scholar]
- Arnautov, S.; Brito, A.; Felber, P.; Fetzer, C.; Gregor, F.; Krahn, R.; Ozga, W.; Martin, A.; Schiavoni, V.; Silva, F.; et al. Pubsub-sgx: Exploiting trusted execution environments for privacy-preserving publish/subscribe systems. In Proceedings of the 2018 IEEE 37th Symposium on Reliable Distributed Systems (SRDS), Salvador, Brazil, 2–5 October 2018; pp. 123–132. [Google Scholar]
- Ateniese, G.; Fu, K.; Green, M.; Hohenberger, S. Improved proxy reencryption schemes with applications to secure distributed storage. ACM Trans. Inf. Syst. Secur. (TISSEC) 2006, 9, 1–30. [Google Scholar] [CrossRef]
- Nakamoto, S. Bitcoin: A Peer-to-Peer Electronic Cash System. 2008. Available online: https://bitcoin.org/bitcoin.pdf (accessed on 13 August 2025).
- Wood, G. Ethereum: A Secure Decentralized Generalised Transaction Ledger. Ethereum Proj. Yellow Pap. 2014, 151, 1–32. [Google Scholar]
- Zyskind, G.; Nathan, O.; Pentland, A. Decentralizing Privacy: Using Blockchain to Protect Personal Data. In Proceedings of the 2015 IEEE Security and Privacy Workshops, San Jose, CA, USA, 21–22 May 2015; pp. 180–184. [Google Scholar] [CrossRef]
- Yue, X.; Wang, H.; Jin, D.; Li, M.; Jiang, W. Healthcare Data Gateways: Found Healthcare Intelligence on Blockchain with Novel Privacy Risk Control. J. Med.Syst. 2016, 40, 218. [Google Scholar] [CrossRef]
- Konstantinos, C.; Michael, D. Blockchains and Smart Contracts for the Internet of Things. IEEE Access 2016, 4, 2292–2303. [Google Scholar] [CrossRef]
- Kosba, A.; Miller, A.; Shi, E.; Wen, Z.; Papamanthou, C. In Proceedings of the Hawk: The Blockchain Model of Cryptography and Privacy-Preserving Smart Contracts. 2016 IEEE Symposium on Security and Privacy, San Jose, CA, USA, 22–26 May 2016; pp. 839–858. [Google Scholar] [CrossRef]
- Mettler, M. Blockchain technology in healthcare: The revolution starts here. In Proceedings of the 2016 IEEE 18th International Conference on e-Health Networking, Applications and Services (Healthcom), Munich, Germany, 14–16 September 2016; pp. 1–3. [Google Scholar] [CrossRef]
- Azaria, A.; Ekblaw, A.; Vieira, T.; Lippman, A. MedRec: Using Blockchain for Medical Data Access and Permission Management. In Proceedings of the 2016 2nd International Conference on Open and Big Data (OBD), Vienna, Austria, 22–24 August 2016; pp. 25–30. [Google Scholar] [CrossRef]
- Abdullah, O.; Anirban, B.; Shinsaku, K. MediBchain: A Blockchain Based Privacy Preserving Platform for Healthcare Data. In Proceedings of the International Conference on Security, Privacy and Anonymity in Computation, Communication and Storage, Guangzhou, China, 12–15 December 2017; Springer: Cham, Switzerland, 2017; pp. 534–543. [Google Scholar] [CrossRef]
- Liang, X.; Shetty, S.; Tosh, D.; Kamhoua, C.; Kwiat, K.; Njilla, L. ProvChain: A Blockchain-Based Data Provenance Architecture in Cloud Environment with Enhanced Privacy and Availability. In Proceedings of the 2017 17th IEEE/ACM International Symposium on Cluster, Cloud and Grid Computing (CCGRID), Madrid, Spain, 14–17 May 2017. [Google Scholar] [CrossRef]
- Li, K.; Li, H.; Hou, H.; Li, K.; Chen, Y. Proof of Vote: A High-Performance Consensus Protocol Based on Vote Mechanism & Consortium Blockchain. In Proceedings of the 2017 IEEE 19th International Conference on High Performance Computing and Communications; IEEE 15th International Conference on Smart City; IEEE 3rd International Conference on Data Science and Systems (HPCC/SmartCity/DSS), Bangkok, Thailand, 18–20 December 2017; pp. 466–473. [Google Scholar] [CrossRef]
- Xia, Q.; Sifah, E.B.; Asamoah, K.O.; Gao, J.; Du, X.; Guizani, M. MeDShare: Trust-Less Medical Data Sharing Among Cloud Service Providers via Blockchain. IEEE Access 2017, 5, 14757–14767. [Google Scholar] [CrossRef]
- Zubaydi, H.; Chong, Y.; Ko, K.; Hanshi, S.M.; Karuppayah, S. A Review on the Role of Blockchain Technology in the Healthcare Domain. Electronics 2019, 8, 679. [Google Scholar] [CrossRef]
- Hasselgren, A.; Kralevska, K.; Gligoroski, D.; Pedersen, S.A.; Faxvaag, A. Blockchain in healthcare and health sciences-A scoping review. Int. J. Med. Inform. 2020, 134, 104040. [Google Scholar] [CrossRef] [PubMed]
- Dubovitskaya, A.; Xu, Z.; Ryu, S.; Schumacher, M. Blockchain applications for healthcare data management. Healthc. Inform. Res. 2021, 27, 153–160. [Google Scholar] [CrossRef]
- Saeed, H.; Malik, H.; Bashir, U.; Ahmad, A.; Riaz, S.; Ilyas, M.; Bukhari, W.A.; Khan, M.I.A. Blockchain technology in healthcare: A systematic review. PLoS ONE 2022, 17, e0266462. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Dionisio, M.; Junior, S.; Paula, F.; Pellanda, P. The role of digital transformation in improving the efficacy of healthcare: A systematic review. J. High Technol. Manag. Res. 2022, 34, 100442. [Google Scholar] [CrossRef]
- Shine, T.; Thomason, J.; Khan, I.; Maher, M.; Kurihara, K.; El-Hassan, O. Blockchain in Healthcare: 2023 Predictions from Around the Globe. Blockchain Healthc. Today 2023, 6, 10–30953. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Kormiltsyn, A.; Udokwu, C.; Dwivedi, V.; Norta, A.; Nisar, S. Privacy-Conflict Resolution for Integrating Personal- and Electronic Health Records in Blockchain-Based Systems. Blockchain Healthc. Today 2023, 6, 10–30953. [Google Scholar] [CrossRef] [PubMed]
- Gai, K.; She, Y.; Zhu, L.; Choo, K.-K.R.; Wan, Z. A blockchain-based access control scheme for zero trust cross-organizational data sharing. ACM Trans. Internet Technol. 2023, 23, 38. [Google Scholar] [CrossRef]
- Marry, P.; Yenumula, K.; Katakam, A.; Bollepally, A.; Athaluri, A. Blockchain based Smart Healthcare System. In Proceedings of the 2023 International Conference on Sustainable Computing and Smart Systems (ICSCSS), Coimbatore, India, 14–16 June 2023; pp. 1480–1484. [Google Scholar] [CrossRef]
- Kasyapa, M.S.B.; Vanmathi, C. Blockchain integration in healthcare: A comprehensive investigation of use cases, performance issues, and mitigation strategies. Front. Digit. Health 2024, 6, 1359858. [Google Scholar] [CrossRef] [PubMed]
Authors | Paper Title | Year | Discussion |
---|---|---|---|
Satoshi Nakamoto [10] | Bitcoin: A Peer-to-Peer Electronic Cash System | 2008 | Proposesa system for electronic transactions without relying on trust. |
Wood, G [11] | Ethereum: A secure decentralisedgeneralised transaction ledger | 2014 | Specifiesa new cryptocurrency and decentralized application platform |
Zyskind, Nathan et al. [12] | Decentralizing Privacy: Using Blockchain to Protect Personal Data | 2015 | Adecentralized personal data management system that fundamentally shifts the control of data from centralized entities to individual users |
Yue, Wang et al. [13] | Healthcare Data Gateways: Found Healthcare Intelligence on Blockchain with Novel Privacy Risk Control | 2016 | Proposes a blockchain-based framework designed to enhance data privacy, security, and interoperability, addressing critical challenges faced by traditional healthcare data management systems. |
Christidis et al. [14] | Blockchains and Smart Contracts for the Internet of Things | 2016 | Concludes that the integration of blockchain technology with the Internet of Things (IoT) has the potential to revolutionize how devices interact and operate autonomously within a decentralized framework. |
Kosba et al. [15] | Novel framework that addresses the privacy limitations inherent intraditional blockchain and smart contract systems | 2016 | Presents a novel framework that addresses the privacy limitations inherent intraditional blockchain and smart contract systems. |
M.Mettler et al. [16] | Blockchain technology in healthcare: The revolution starts here | 2016 | Underscores that blockchain can fundamentally reshape healthcare by enhancing data security, improving interoperability, and fostering trust among stakeholders. |
M.Mettler et al. [17] | Medrec: Using blockchain for medical data access and permission management | 2016 | Emphasizes the transformative potential of MedRec in enhancing the management and utilization of electronic health records (EHRs) and medical research data. |
Omar, et al. [18] | MediBchain: A Blockchain Based Privacy Preserving Platform for Healthcare Data | 2017 | Highlights the innovative aspects of MediBchain and discusses its potential impact, along with the challenges that need to be addressed for its successful implementation. |
Liang et al. [19] | ProvChain: A Blockchain-Based Data Provenance Architecture in Cloud Environment with Enhanced Privacy and Availability | 2017 | Sophisticated architecture that harnesses blockchain technology to address key challenges in cloud data provenance. |
Li, Kejiao et al. [20] | Proof of Vote: A High-Performance Consensus Protocol Based on Vote Mechanism & Consortium Blockchain | 2018 | Presents an innovative consensus mechanism designed to address the inefficiencies and security challenges prevalent in traditional consensus protocols like Proof of Work (PoW) and Proof of Stake (PoS). |
Xia et al. [21] | MeDShare: Trust-Less Medical Data Sharing Among Cloud Service Providers via Blockchain | 2019 | Utilizing blockchain technology, MeDShare addresses critical issues such as data integrity, privacy, and trust among cloud service providers (CSPs). |
Zubaydi et al. [22] | A Review on the Role of Blockchain Technology in the Healthcare Domain | 2019 | They assert that blockchain can address critical issues related to data security, interoperability, and transparency, which are prevalent in current healthcare systems. |
Hasselgren et al. [23] | Blockchain Technology in Healthcare: A Comprehensive Review and Directions for Future Research | 2020 | Highlight that blockchain’s decentralized and immutable nature can significantly enhance data security, patient privacy, and the integrity of medical records. |
Dubovitskaya et al. [24] | Blockchain applications for healthcare data management. Healthcare Informatics Research. | 2021 | They emphasize blockchain’s decentralized architecture, cryptographic security, and immutability as pivotal features that address longstanding challenges in healthcare data integrity and interoperability. |
Saeed H et al. [25] | Blockchain technology in healthcare: A systematic review. | 2022 | SLRs were conducted on nine highly regarded databases using particular protocols to pick out relevant articles for review. |
Dionisio et al. [26] | The role of digital transformation in improving the efficacy of healthcare: A systematic review | 2022 | Proposes a systematic literature review to examine the applications, benefits, opportunities, and threats posed by digital transformation in healthcare. |
Shine T et al. [27] | Blockchain in Healthcare | 2023 | Enhancing transparency, security, and interoperability has inspired diverse applications, from patient data management to drug supply chain monitoring and clinical trials. |
Kormiltsyn et al. [28] | Privacy-Conflict Resolution for Integrating Personal- and Electronic Health Records in Blockchain-Based Systems. Blockchain in Healthcare Today | 2023 | Proposes a secure, blockchain-based, patient-centric system. Our design formalizes PHR requirements and introduces an ontology for privacy-conflict resolution and management mechanisms. |
Gai, K. et al. [29] | A blockchain-based access control scheme for zero trust cross-organizational data sharing. | 2023 | The proposed solution has been evaluated on the HyperLedger Fabric consortium blockchain platform, utilizing both the Caliper and BFT-SMaRT benchmarks. |
P. Marry et al. [30] | Blockchain based Smart Healthcare System, | 2023 | Introduces novel approach to maintaining medical records, leveraging smart contracts to ensure accessibility, interoperability, and auditability. |
Kasyapa et al. [31] | Blockchain integration in healthcare: a comprehensive investigation of use cases, performance issues, and mitigation strategies | 2024 | Examines various healthcare use cases, including drug supply chain management, clinical trial administration, EHR management, and health insurance regulation. |
Component | Description | How Data Is Collected | Challenges and Considerations |
---|---|---|---|
Patient Data | Personal, medical, and health-related data of patients. Includes medical history, treatment records, diagnoses, prescriptions, etc. | Patients provide their data through smart contracts or via decentralized applications (dApps). Patients can upload their health records directly onto the blockchain or on decentralized storage (e.g., IPFS). | Privacy concerns: Ensuring that only authorized entities can access the data. Data fragmentation: The possibility of multiple data sources leading to fragmented records. Compliance with HIPAA, GDPR, and other privacy regulations. |
Doctor and Healthcare Provider Data | Data about healthcare providers, including their identity, qualifications, and certifications. | Credential verification through decentralized identity (DID) protocols. Healthcare providers can create a profile on the blockchain, including their licenses, medical history, and other professional credentials. | Ensuring accuracy: Verifying the authenticity of credentials. Data integrity: Protecting against the inclusion of false credentials on the blockchain. |
Medical Records | Detailed patient health information, including diagnoses, treatments, test results, prescriptions, etc. | Health records can be stored off-chain (on a decentralized storage system like IPFS or Swarm) and linked to the blockchain. The patient or healthcare provider can update these records with consent. | Data access control: Ensuring patients retain control over who can access their records. Data availability: Ensuring that medical data is always accessible when needed by authorized entities. |
Consent Data | Patient’s consent for specific actions (e.g., data sharing, treatment decisions). | Patients give explicit consent through smart contracts before data sharing or treatment occurs. The blockchain stores the patient’s consent, ensuring it is immutable and tamper-proof. | Consent revocation: Allowing patients to withdraw consent at any time while ensuring the revocation is honored in the blockchain. Transparency: Making sure patients understand what they are consenting to. |
Medical Transactions | All blockchain-based transactions related to patient services, such as payments, insurance claims, or service agreements. | Payments for healthcare services can be processed via cryptocurrency or stablecoins. Smart contracts can automate payments based on service completion and conditions met. | Transaction security: Ensuring that all payments and transactions are securely recorded. Latency: Blockchain transactions can take time to process, which might delay medical service payments or updates. |
5G Protocol/Component | Role | Blockchain Use |
---|---|---|
Network Slicing (NS) | Creates virtualized network partitions (slices) for different services. | Smart contracts can govern the dynamic allocation and monetization of slices. |
Network Function Virtualization (NFV) | Virtualizes hardware functions of the 5G network. | Blockchain can provide secure records of NFV deployment and scaling. |
Service-Based Architecture (SBA) | Modular architecture in 5G core using APIs (REST/HTTP2). | Blockchain can authenticate API calls and log interactions between network functions. |
Multi-access Edge Computing (MEC) | Pushes computing closer to users/devices. | Blockchain nodes deployed at the edge can increase decentralization and reduce latency. |
Device Identity (via SIM/eSIM or 5G-AKA) | Uses 5G-AKA for secure device authentication. | Blockchain can store and validate immutable device identities. |
Blockchain | Ensures Data Integrity and Tamper-Resistance |
---|---|
Patient Control | Empowers patients with data ownership |
Interoperability | Seamless integration with legacy systems |
Real-Time Access | Fast and secure access for emergencies |
Smart Contracts | Automates policy enforcement |
Sno | Tool Details | Minimum Requirement |
---|---|---|
1 | Front end | VS Code, Rimix IDE, |
2 | Backend | IPFS, MongoDB |
3 | Blockchain | Etherium, Ganache, MetaMask |
4 | Programming language | Solidity, ReactJS |
Sno | Tools Details | Minimum Requirement |
---|---|---|
1 | System Computer | P4 CPU, 1Gb Ram, 500 Gb hard disk with other necessary devices |
Test Case ID | Description | Input | Expected Output | Original Output | Status | Efficiency | Accuracy |
---|---|---|---|---|---|---|---|
TC-FUNC-01 | Add patient record to blockchain | Patient data | Transaction recorded on blockchain | Transaction hash generated, data confirmed on-chain | Pass | High (≤1 s latency) | 100%—Data match verified |
TC-FUNC-02 | Retrieve data by authorized doctor | Doctor credentials | Encrypted patient data | Encrypted patient data retrieved successfully | Pass | Medium (1–2 s latency) | 98%—Minor delay in decryption |
TC-FUNC-03 | Unauthorized access attempt | Invalid credentials | Access denied | Access denied with log entry recorded | Pass | High (instant) | 100%—No data leakage |
TC-FUNC-04 | Share data with another hospital | Patient consent + hospital ID | Access granted with hash record | Access granted; hash recorded on blockchain | Pass | Medium (1.5 s latency) | 99%—Hash confirmed |
Test Case ID | Description | Input | Expected Output | Original Output | Status | Efficiency | Accuracy |
---|---|---|---|---|---|---|---|
TC-SEC-01 | Replay attack | Repeated transaction | Transaction rejected | Duplicate transaction hash blocked | Pass | High (instant) | 100%—No duplication |
TC-SEC-02 | Tampering attempt | Modified blockchain entry | Integrity check failed | Hash mismatch detected, tamper blocked | Pass | High (≤1 s detection) | 100%—Tamper blocked |
TC-SEC-03 | Authentication failure | Incorrect private key | Access denied | Invalid key error, no data access | Pass | High (instant) | 100%—Authentication held |
TC-SEC-04 | Data encryption test | Plain data input | AES/Blockchain encrypted output | Encrypted output (AES-256 + chain hash) | Pass | Medium (1.5 s latency) | 99%—Encrypted as expected |
Test Case ID | Description | Input | Expected Output | Original Output | Final Status | Efficiency | Accuracy |
---|---|---|---|---|---|---|---|
TC-PERF-01 | Transaction latency | 100 concurrent transactions | ≤X ms/transaction | Avg latency: 95ms | Pass | 97% of performance target | 99.9% valid transactions |
TC-PERF-02 | Throughput under load | 1000 tx/s | No crash, acceptable delay | System stable, avg delay: 120 ms | Pass | 96% sustained throughput | 99.8% transaction integrity |
TC-PERF-03 | Scalability with nodes | Increase nodes from 10 to 100 | Stable performance | Latency stable, CPU: 80% at peak | Pass | 92% resource scalability | 99.7% transaction success |
TC-PERF-04 | Storage usage | 1000 patient records | Measured in GB | Storage used: 1.8 GB | Pass | 555 records/GB | 100% record integrity |
Category | Metric | Accuracy (%) | Original Output | Efficiency | Accuracy | Notes | ||
---|---|---|---|---|---|---|---|---|
Train | Valid | Test | ||||||
Functional | Smart Contract Execution Accuracy | 97.8 | 98.5 | 98.2 | 982/1000 transactions executed correctly | 98.2% logic match rate | High (minor errors in edge cases) | Correct access control and logic execution |
Data Sharing Success Rate | 96.5 | 97.3 | 97.0 | 970/1000 records shared successfully | 97% delivery rate | High (minimal duplication) | Seamless interoperability across hospitals and labs | |
Audit Log Generation Consistency | 98.1 | 98.7 | 98.6 | Logs generated for 986/1000 txs | 98.6% log generation rate | Very high (logs immutable) | Immutable logs generated per transaction | |
Security | Unauthorized Access Detection | 95.0 | 96.2 | 96.0 | 960/1000 unauthorized attempts detected | 96% anomaly detection efficiency | High (some false positives) | Alerts and logs triggered on anomalies |
Data Integrity Verification | 99.2 | 99.6 | 99.5 | 995/1000 hashes matched | 99.5% integrity verification | Extremely high | Hash matching using SHA-256 or similar | |
Encryption and Decryption Accuracy | 99.8 | 99.9 | 99.9 | 999/1000 decrypted accurately | 99.9% cryptographic success | Very high | AES-256/RSA-based cryptography | |
Performance | Transaction Throughput Consistency | 94.7 | 95.3 | 95.0 | 950 TPS stable under load | 95% TPS target met | Moderate-High | Blockchain processed consistent TPS across tests |
System Latency (within 2 sec) | 92.0 | 93.8 | 93.5 | 935/1000 txs<2 s latency | 93.5% low-latency success | High in average cases | Average transaction latency <2 s in 93.5% of cases | |
Data Retrieval Accuracy | 97.5 | 98.2 | 98.1 | 981/1000 files retrieved accurately | 98.1% fetch rate | Very high | From off-chain IPFS or cloud repositories |
Category | Avg. Training Accuracy (%) | Avg. Validation Accuracy (%) | Avg. Testing Accuracy (%) | Overall Efficiency | Overall Accuracy | General Notes |
---|---|---|---|---|---|---|
Functional | 97.47 | 98.17 | 97.93 | High (97.93%+ performance) | High (minor inconsistencies) | Logic execution and data sharing are mostly robust |
Security | 98 | 98.57 | 98.47 | Very High (98%+ success) | Extremely high | Strong in cryptographic integrity and intrusion detection |
Performance | 94.73 | 95.77 | 95.53 | Moderate to High (95% avg) | High | Slight room to improve latency and throughput under heavy load |
Actual\Predicted | Functional | Security | Performance |
---|---|---|---|
Functional | 295 | 3 | 2 |
Security | 2 | 295 | 3 |
Performance | 5 | 6 | 289 |
Class Name | Precision | 1-Precision | Recall | 1-Recall | F1-Score |
---|---|---|---|---|---|
Functional | 0.9833 | 0.0167 | 0.9768 | 0.0232 | 0.9801 |
Security | 0.9833 | 0.0167 | 0.9704 | 0.0296 | 0.9768 |
Performance | 0.9633 | 0.0367 | 0.9830 | 0.0170 | 0.9731 |
Accuracy | 0.9767 | ||||
Misclassification Rate | 0.0233 | ||||
Macro-F1 | 0.9767 | ||||
Weighted –F1 | 0.9767 |
Attack Type | Detection/Prevention Mechanism | Accuracy (%) | Efficiency | F1 Score | Confusion Matrix | Remarks | |||||
---|---|---|---|---|---|---|---|---|---|---|---|
Train | Val | Test | TP | FP | FN | TN | |||||
51% Attack | PoS/DPoS, multi-layer consensus, hash rate monitoring | 95.0 | 96.3 | 96.0 | High | 0.95 | 480 | 10 | 20 | 490 | Risk reduced using non-PoW consensus |
Sybil Attack | PoS, DID, reputation scoring | 94.5 | 95.7 | 95.2 | High | 0.94 | 476 | 15 | 24 | 485 | Identity scoring increases trust |
Man-in-the-Middle | TLS, secure key management, encryption | 97.2 | 98.5 | 98.1 | High | 0.98 | 490 | 5 | 9 | 496 | High precision with TLS + signatures |
Smart Contract Exploit | Formal verification, static/dynamic analysis | 93.8 | 95.6 | 95.0 | Medium | 0.93 | 475 | 12 | 25 | 488 | Detection improved with formal methods |
Denial of Service | Rate limiting, decentralized nodes, anomaly detection | 92.0 | 93.4 | 93.0 | Medium | 0.91 | 460 | 20 | 35 | 485 | Real-time mitigation of attack spikes |
Data Breach | Encryption, MFA, DID-based controls | 98.0 | 99.1 | 98.7 | High | 0.98 | 495 | 3 | 7 | 495 | Secure identity protocols reduce theft |
Double Spending | PoW/PoS consensus, transaction finality checks | 94.5 | 95.8 | 95.4 | High | 0.94 | 478 | 10 | 22 | 490 | Finality mechanisms ensure uniqueness |
Eavesdropping | Secure channels, TLS, key rotation | 97.0 | 98.2 | 97.8 | High | 0.97 | 488 | 6 | 10 | 496 | Strong encryption prevents passive attacks |
Phishing Attacks | User training, MFA, phishing detection | 92.3 | 93.5 | 93.1 | Medium | 0.91 | 465 | 18 | 30 | 487 | Awareness and alerts reduce attacks |
Malware/Ransomware | Anti-malware, backups, node hardening | 93.7 | 95.0 | 94.5 | Medium | 0.92 | 472 | 14 | 28 | 486 | Redundancy and hardening aid resilience |
Replay Attack | Nonces, time-based validation | 95.8 | 96.9 | 96.3 | High | 0.95 | 482 | 9 | 19 | 490 | Mitigated via temporal uniqueness |
Front-running | zk-Rollups, private mempools | 91.5 | 93.1 | 92.7 | Medium | 0.90 | 460 | 16 | 34 | 490 | Obfuscation hides trade intentions |
XSS (Cross-Site Scripting) | Input validation, CSP, UI hardening | 94.2 | 95.4 | 95.1 | Medium | 0.93 | 474 | 13 | 26 | 487 | Secured interfaces reduce injection vectors |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Sharma, S.K.; Parwej, F. Design and Implementation of a Blockchain-Based Secure Data Sharing Framework to Enhance the Healthcare System. Blockchains 2025, 3, 10. https://doi.org/10.3390/blockchains3030010
Sharma SK, Parwej F. Design and Implementation of a Blockchain-Based Secure Data Sharing Framework to Enhance the Healthcare System. Blockchains. 2025; 3(3):10. https://doi.org/10.3390/blockchains3030010
Chicago/Turabian StyleSharma, Shrawan Kumar, and Firoj Parwej. 2025. "Design and Implementation of a Blockchain-Based Secure Data Sharing Framework to Enhance the Healthcare System" Blockchains 3, no. 3: 10. https://doi.org/10.3390/blockchains3030010
APA StyleSharma, S. K., & Parwej, F. (2025). Design and Implementation of a Blockchain-Based Secure Data Sharing Framework to Enhance the Healthcare System. Blockchains, 3(3), 10. https://doi.org/10.3390/blockchains3030010