MediChain-AI
Secure, Unified, Decentralized Health Records
Created on 18th January 2026
•
MediChain-AI
Secure, Unified, Decentralized Health Records
The problem MediChain-AI solves
The Problem MediChain AI Solves
Healthcare today faces a critical data crisis: patients don't own their medical records, and doctors waste hours sifting through fragmented information.
For Patients:
- Medical records are locked in different hospital systems—you can't access your own health data without bureaucracy and physical visits
- Sharing records between doctors or switching hospitals means starting from scratch
- Centralised databases are vulnerable to ransomware attacks and data breaches
- You have zero control over who sees your sensitive health information
For Doctors:
- Spending a lot of their time reviewing unstructured PDF reports instead of treating patients
- No unified view of patient history—leading to redundant tests and delayed diagnoses
- Manual, insecure methods to share records between specialists
For Healthcare Systems:
- Interoperability gaps make cross-border or cross-provider data sharing nearly impossible
- Privacy violations and compliance risks from centralised storage
- Billions wasted on duplicate tests due to information silos
MediChain AI fixes this by:
✅ Patient Ownership — Blockchain smart contracts give patients full control over their medical data
✅ AI-Powered Analysis — Instantly analyses and summarises complex medical documents into actionable insights
✅ Decentralized Storage — IPFS eliminates vulnerable central servers and prevents data breaches
✅ Unified Health Timeline — Creates an intelligent, accessible health record available anywhere
✅ Unified Platform — Brings patients, doctors, and admins together on one seamless platform for coordinated healthcare management
Result: Healthcare data that is secure, accessible, and actually useful.
Challenges we ran into
Challenges I Ran Into
Building MediChain AI involved integrating three complex technologies—Blockchain, IPFS, and AI—which presented several technical hurdles:
1. Two-Way IPFS Access Authentication
The Problem: Setting up secure two-way authentication for files uploaded to IPFS was the biggest challenge. We needed both patients and doctors to access the same encrypted file, but IPFS doesn't have built-in access control.
The Solution:
- Implemented client-side AES-256 encryption before uploading to IPFS
- Stored encryption keys on-chain in the smart contract, accessible only to authorized parties
- Created a key-sharing mechanism where patients grant doctors decryption keys through blockchain transactions
- Used Pinata's IPFS pinning service for reliable file availability
2. Immutable Blockchain Metadata Problem
The Problem: Medical records need updates (e.g., adding diagnoses, correcting errors), but blockchain data is immutable by design. We couldn't directly edit file metadata once recorded.
The Solution:
- Adopted a versioning system where each update creates a new IPFS hash with updated metadata
- Smart contract maintains a linked list of record versions, always pointing to the latest
- Previous versions remain accessible for audit trail purposes
- Implemented a "soft delete" flag rather than actual deletion to maintain data integrity
3. AI Model Accuracy with Medical Terminology
The Challenge: Gemini AI sometimes struggled with complex medical abbreviations and domain-specific terminology in scanned documents.
The Solution:
- Created custom prompt engineering templates with medical context
- Implemented multi-pass analysis: first for text extraction, then for structured summarization
- Added validation layer to catch and flag low-confidence AI outputs
4. Cross-Browser Wallet Compatibility
The Challenge: MetaMask integration behaved differently across browsers, especially mobile Safari.
The Solution:
- Implemented Wagmi/Viem hooks for standardized Web3 interactions
- Added fallback wallet connection methods
- Created comprehensive error handling for connection failures
5. IPFS Retrieval Speed
The Challenge: Fetching files from IPFS was sometimes slow, creating poor user experience.
The Solution:
- Used Pinata's dedicated gateways for faster retrieval
- Implemented a caching layer in the backend
- Added loading states and progressive rendering in the frontend
Key Takeaway: The biggest lesson was that decentralised systems require thinking differently about data flow. Traditional centralized patterns don't translate directly—we had to architect solutions that work with blockchain's immutability and IPFS's distributed nature, not against them.
Tracks Applied (3)
AI
Blockchain
Ethereum Track
ETHIndia
