MedWallet
Health is Wealth
The problem MedWallet solves
Healthcare data today is fragmented, insecure, and inaccessible.
Patients have little control over who accesses their records, doctors struggle to get complete histories across hospitals, and labs operate in silos — all while sensitive medical information is stored on centralized servers vulnerable to breaches.
Existing systems fail to ensure:
Data Ownership — patients rarely have true control over their medical records.
Interoperability — hospitals, labs, and devices don’t communicate efficiently.
Privacy & Consent — users can’t easily grant, revoke, or audit who has accessed their health data.
Trust — there’s no tamper-proof way to verify data authenticity or access logs.
Our platform solves this by combining Blockchain + AI + Decentralized Storage to create a secure, patient-centric healthcare ecosystem where:
Every record is verifiable, encrypted, and owned by the patient.
Smart contracts enforce data-sharing permissions transparently.
IPFS ensures decentralized and immutable medical record storage.
AI health assistant (MedGemma-powered) provides real-time preventive care and predictions.
FHIR + ABDM integration bridges existing healthcare systems for seamless interoperability.
In short, we’re redefining digital healthcare by shifting power from institutions to individuals —
making healthcare data transparent, portable, and secure for everyone.
Challenges we ran into
- Module Conflicts in Hardhat (ESM vs CommonJS)
When integrating our smart contracts with the backend, the Hardhat compiler threw repeated syntax errors due to mismatched module systems (ES Modules vs CommonJS).
We had to debug our hardhat.config.js setup, align it with the "type": "module" directive in package.json, and reinstall dependencies using
npm install --legacy-peer-deps
to resolve version mismatches between @nomicfoundation/hardhat-ethers and ethers.js.
🧠 2. AI Integration (MedGemma + Web3)
Integrating an AI health assistant with a blockchain-based consent system introduced major architectural challenges:
Handling asynchronous AI inference securely.
Ensuring that no sensitive patient data was stored off-chain or leaked during model predictions.
Synchronizing results between AI backend and blockchain smart contracts without breaking Web3 context.
🔐 3. Decentralized Data Storage (IPFS Integration)
We faced latency and versioning challenges when storing and retrieving medical data from IPFS:
CID changes after every upload broke our database references.
Needed to build a custom mapping layer to link IPFS hashes with on-chain records.
Implemented data encryption before pinning to ensure compliance with HIPAA/GDPR.
🏥 4. FHIR and ABDM Interoperability
Mapping real healthcare standards like FHIR (Fast Healthcare Interoperability Resources) and ABDM APIs into blockchain data models required:
Schema redesign for EHRs (Electronic Health Records).
Balancing on-chain minimalism (for performance) and off-chain integrity (for compliance).
⚖️ 5. Consent Management and Privacy Logic
Designing smart contracts to represent granular user consent (who can view, edit, or share data) was difficult:
Solidity lacks dynamic object handling for nested permissions.
Required writing modular contracts for permission delegation, revocation, and emergency access.
💻 6. Multi-Dashboard Synchronization
With four different dashboards (Patient, Doctor, Lab, Admin), syncing real-time updates between all of them via Web3 events and backend APIs required:
Implementing socket-based listeners.
Handling race conditions between frontend and blockchain event confirmations.
🚀 7. Team Coordination with Virtual Environments
Working in multiple environments (local, virtual, cloud) caused frequent git merge conflicts and environment mismatches.
We resolved it using:
.env.example templates for environment consistency.
Branch-based development (dev-varun, main, etc.).
Version pinning in package.json for stability.
Tracks Applied (1)
Ethereum Track
ETHIndia
Technologies used