Dr. Hedera
Dr. Hedera: Patient-owned medical NFTs on Hedera with AI chatbot for emergency help and analysis
Problem Statement
Dr. Hedera is a revolutionary healthcare platform built on Hedera blockchain that transforms how medical data is owned, shared, and analyzed. The platform addresses the critical problem of fragmented medical records and a lack of patient data ownership by creating a decentralized system where patients have complete control over their medical information while enabling secure, intelligent healthcare delivery. The core functionality revolves around patient-owned medical records that are encrypted locally and stored off-chain, with secure metadata minted as NFTs on the Hedera blockchain. When patients upload their medical history, including lab results, prescriptions, and doctor notes, the system encrypts this information before it leaves their device, ensuring unprecedented privacy protection. Patients maintain absolute ownership of their medical data while benefiting from blockchain's immutability and transparency. The platform features a sophisticated access control system where doctors can request permission to view specific patient records through smart contracts. Patients receive these requests and can grant granular permissions, choosing to share specific records for defined time periods and purposes. All access is automatically logged on the Hedera blockchain, creating an immutable audit trail for regulatory compliance while allowing patients to revoke access anytime. Central to Dr. Hedera's innovation is its AI-powered health assistant that serves both patients and doctors. For patients, the AI chatbot provides 24/7 emergency medical guidance when doctors aren't available, helping them understand symptom urgency and translating complex medical reports into understandable language. For healthcare providers, the AI offers clinical decision support, analyzing patient data to suggest diagnoses, recommend treatments, and alert doctors to potential drug interactions or concerning patterns. By leveraging Hedera's fast finality, minimal fees, and enterprise-grade security, Dr. Hedera creates a patient-centric healthcare ecosystem that improves data accessibility, enhances privacy protection, enables better clinical decision-making, and provides intelligent health assistance, ultimately leading to better health outcomes while giving patients unprecedented control over their most sensitive personal information.
Solution
How We Built Dr. HederaTechnical Stack & ArchitectureWe built Dr. Hedera using a modern full-stack architecture with Next.js and TypeScript for the frontend, providing type-safe development and dual dashboards for patients and doctors. The backend integrates with Hedera blockchain services and our AI components through RESTful APIs and WebSocket connections for real-time updates.Our core architecture follows a privacy-first approach where medical data is encrypted client-side using AES-256 encryption before leaving the user's device. The encrypted data is stored off-chain on IPFS, while metadata and access permissions are managed through Hedera blockchain services. We leveraged key Hedera services: Hedera Token Service (HTS) for minting medical record NFTs and Hedera Smart Contract Service for access control logic written in Solidity.The smart contracts handle the complex permission system where patients can grant granular access to doctors specifying exact data types, time durations, and purposes. When a doctor requests access, the smart contract validates the request, and upon patient approval, provides the necessary decryption keys for the specific medical records.Hedera AI Studio IntegrationHedera AI Studio was crucial as our partner technology for implementing the intelligent health assistant. We integrated Hedera AI Studio's API to process encrypted patient data while maintaining strict privacy standards within the Hedera ecosystem. This integration allowed us to implement sophisticated medical analysis features without building AI models from scratch.The AI system operates in two modes: simplified educational responses for patients helping them understand their medical reports and symptoms, and clinical-grade analysis for healthcare providers offering differential diagnoses and treatment recommendations. Hedera AI Studio processes anonymized data snippets rather than full patient records, ensuring privacy while providing valuable insights directly within our Hedera-based architecture.The Great Migration: Our 24-Hour PivotThe most notable aspect of our build was the dramatic pivot we executed mid-hackathon. We were 80% complete with our project on 0G blockchain when we discovered their testnet was completely down with less than 24 hours remaining. Faced with abandoning the project or attempting a complete migration, we chose the latter."The Great Migration" involved rapidly re-architecting our smart contracts from 0G to Hedera's ecosystem. We had to migrate our NFT minting logic to Hedera Token Service, reconfigure our authentication systems, and adapt our access control mechanisms to Hedera's consensus model while maintaining our existing frontend interface.The hack was building abstraction layers on the fly that allowed our React components to remain unchanged while completely swapping the underlying blockchain. We worked in parallel - one team member deployed new Hedera smart contracts while others adapted API layers and transaction handling. We essentially maintained the same user experience while the entire backend shifted from one blockchain to another.How Everything Works TogetherThe complete flow works as follows: Patients upload medical records through our Next.js interface, where data gets encrypted locally before being stored on IPFS. The system mints an NFT on Hedera containing metadata and the IPFS hash. When doctors need access, they submit requests through our smart contracts, which patients can approve with specific permissions. Upon approval, doctors receive decryption keys for authorized records only.The Hedera AI Studio integration monitors this flow, providing real-time analysis of medical data for both parties within the unified Hedera ecosystem. All blockchain interactions including access requests, approvals, and data sharing are recorded immutably for regulatory compliance and audit trails.This migration actually improved our project - Hedera's faster finality and lower costs enhanced user experience compared to our original 0G implementation. The forced pivot made our architecture more modular and blockchain-agnostic, demonstrating our team's adaptability while delivering a more polished healthcare solution than originally planned.
Hackathon
ETHGlobal New Delhi
2025
Contributors
- komaljeengar
48 contributions
- AmrendraTheCoder
15 contributions
- tejasmishra1701
3 contributions
- aviratkaushik
2 contributions