Introduction

Secure EHR 2.0 is a blockchain-powered application designed to help medical professionals securely store and share patients' electronic health records. With enhanced security and privacy features, this system offers a decentralized approach to health data management.

  • Decentralized storage with IPFS for enhanced privacy.
  • Real-time data handling for efficient medical record management.
  • User-friendly interface for doctors, patients, and administration.

Overview of the System

The primary goal of Secure EHR 2.0 is to create a secure and decentralized platform for storing and sharing electronic health records. The system supports different user roles, such as patients, doctors, and administrators, each with varying levels of access and responsibilities.

The system is built on blockchain technology to ensure data integrity and security, with transactions handled via a Proof of Work (PoW) consensus mechanism and encrypted using SHA-256 hashing. By leveraging IPFS for storage and Ethereum for smart contracts, Secure EHR 2.0 provides a tamper-proof solution for managing health records.

Workflow Video

How It Works

The workflow of Secure EHR 2.0 involves multiple user roles—Admin, Doctor, and Patient—each interacting with the system via Metamask and the blockchain network. Below is a step-by-step explanation of the entire process.

Admin Login and Access

The Admin logs into the system using Metamask, which serves as the authentication mechanism. The admin dashboard is accessible only through a valid Metamask account.

Upon successful login, the Admin can access a comprehensive dashboard displaying all hospital-related details, including statistics, registered users, and overall system health.

Adding a Doctor

Introduction to Ganache: The system uses Ganache, a local blockchain environment, to simulate transactions and manage user profiles. Ganache provides a set of test accounts with public and private keys, which are used to manage different user roles in the system.

The Admin initiates the process of adding a doctor by selecting a public key from one of the Ganache profiles. This key uniquely identifies the doctor within the system.

The Admin then enters the doctor’s details, such as name, specialization, and contact information, and submits the transaction. Metamask prompts the Admin to confirm the transaction, which is then processed on the blockchain.

Once confirmed, the doctor is successfully added to the hospital’s database, with their profile securely stored on the blockchain.

Doctor Login and Profile Setup

The newly added Doctor can log into the system using the private key associated with their Ganache profile. This key is used to authenticate their identity through Metamask.

After logging in, the Doctor gains access to their profile, where they can manage patient appointments, view consultation history, and update medical records.

Patient Registration and Appointment Booking

Similar to the doctor, the Patient logs in using a private key from another Ganache profile through Metamask.

Upon logging in, the Patient can register their profile by providing personal details such as name, age, medical history, and contact information.

The Patient can then browse the list of available doctors and book an appointment based on their medical needs.

The appointment request is recorded on the blockchain and becomes visible in the selected doctor’s dashboard.

Doctor Consultation and Prescription

The Doctor views the appointment request on their dashboard and accepts the consultation.

During the consultation, the Doctor records the necessary medical notes and prescriptions. These records are encrypted using RSA encryption before being uploaded to IPFS.

The IPFS generates a unique hash for the encrypted file, which is stored on the blockchain. This ensures that the medical record is secure, immutable, and only accessible through the blockchain.

Patient Access to Health Records

After the consultation, the Patient can log back into the system using Metamask and retrieve their health records.

To view their health record, the Patient requests the encrypted file’s hash from the blockchain. The system then retrieves the file from IPFS using this hash.

The file is decrypted using the Patient’s private key, allowing them to view their health record. Neither the doctor nor the admin has access to this decrypted information, ensuring complete privacy.

Enhanced Security Measures

To further secure the system, the hash key used to retrieve the health record from the blockchain undergoes additional cryptographic transformations. This adds another layer of security, preventing unauthorized access to the data.

System Implementation

The system divides users into two primary categories: administrators and regular users (doctors and patients). Administrators assign roles and access levels, allowing doctors to manage appointments and patient records while ensuring patients have control over who can view their data.

Key components of the system include:

System Block Diagram

Technology Stack

Security and Privacy

Secure EHR 2.0 is built with a focus on security and privacy, employing robust techniques to protect sensitive health records:

User Guide

The User Guide offers step-by-step instructions for different user roles within Secure EHR 2.0, covering everything from installation to daily use:

Future Enhancements

Possible improvements for Secure EHR 2.0 include: