A blockchain based patient record system but also considers research aspects
Detailed Project Description – Charak
The Charak project is a decentralized platform designed to securely manage and share medical records with full control in the hands of the patient. Recognizing the limitations of traditional healthcare data systems—such as fragmentation, centralization, lack of interoperability, and security vulnerabilities, this solution leverages blockchain technology, cryptographic hashing, and IPFS-based storage to ensure data privacy, integrity, and transparency.
Patient Onboarding and Identity Management
When a patient registers on the system, they enter their Aadhaar number, which is hashed using SHA256, and the first 10 digits of the hash are used to generate a unique PatientID. The system simultaneously allocates a dedicated Ethereum wallet address (via Ganache) to the patient, which serves as their identity on the blockchain. The patient is then prompted to provide basic medical information such as age, height, blood group, and allergies. All these actions are secured and recorded on Node.js
Access Control & Authorization
Doctors and insurance providers must request access from patients to either view previous records or upload new ones. This ensures that the patient remains the sole authority to grant or deny access, aligning with modern data privacy principles.
Medical File Handling & Blockchain Storage
Once a doctor is granted access:
The medical file is sent to the Node.js backend server.
The server generates a SHA256 hash of the file for data integrity.
The file is uploaded to IPFS via Pinata, a decentralized file storage platform.
Pinata returns a CID (Content Identifier), which points to the specific version of the file stored on IPFS.
The backend stores the file hash, CID, and associated PatientID on the blockchain using smart contracts.
This setup guarantees that the actual medical data is not stored on-chain, preventing blockchain bloat and ensuring data efficiency while maintaining cryptographic verification.
Role-Based Access & Security
Patients: Full access and control over their data, permissions, and audit logs.
Doctors/Insurers: Can only access data upon receiving explicit patient consent.
Admin: Has access to file hashes and CIDs only, not to the content or sensitive patient metadata.
Technology Stack
Frontend: Next.JS
Backend: Node.js for API communication and data handling
Smart Contracts: Solidity (compiled and deployed using Truffle)
Local Blockchain: Ganache (for development and testing)
File Storage: IPFS (via Pinata SDK)
Cryptographic Hashing: SHA256 for identity and file verification
Web3 Integration: web3.js to interact with smart contracts
Advantages
Security: Immutable records and cryptographic proof of data integrity.
Privacy: Patient controls all access.
Decentralization: Removes reliance on central servers.
Auditability: All interactions are recorded transparently on the blockchain.