Skip to content
MedOracle – Decentralized Medical Report Verifier

MedOracle – Decentralized Medical Report Verifier

MedOracle: Medical Reports, Verified on Blockchain

Created on 23rd June 2025

•

MedOracle – Decentralized Medical Report Verifier

MedOracle – Decentralized Medical Report Verifier

MedOracle: Medical Reports, Verified on Blockchain

The problem MedOracle – Decentralized Medical Report Verifier solves

🧩 The Problem it Solves
Modern healthcare generates a vast number of medical test reports daily—many of which are misunderstood by patients, misused in falsified documents, or improperly handled in insecure systems.

🚫 The current pain points:
Non-technical patients often don’t understand what their test results indicate.

Manual verification of reports (e.g., for job screenings or insurance) is time-consuming and prone to human error.

Tampering and forgery of digital reports is a serious issue in institutions with limited checks.

Lack of data privacy—medical records are stored in centralized systems vulnerable to leaks or misuse.

💡 What MedOracle Offers
MedOracle is an AI-powered + blockchain-backed solution that helps users:

✅ Instantly Understand Test Results
Upload a lab report (image or PDF)

Extracts key medical features automatically (e.g., BP, sugar levels)

Uses an ML model to predict health risk level in plain terms

🔐 Securely Store Medical Proofs on Web3
Converts test data into a tamper-proof record

Stores a hash on IPFS, with an immutable reference recorded on-chain via a smart contract

This makes medical records verifiable, traceable, and privacy-preserving

⚙️ Use Cases:
Patients seeking clear explanations of their reports

Hospitals needing fast, AI-assisted triaging

Employers and insurance agencies verifying authenticity of health records

Researchers needing anonymized, decentralized medical data

Challenges I ran into

🐞 Challenges I Ran Into

Building MedOracle involved tackling several technical and integration challenges:

🔗 1. Connecting Web3 with Python (Flask)

Unlike JavaScript-based dApps, integrating blockchain functionality in a Python backend was tricky. Managing web3.py, contract ABIs, and triggering smart contract functions from Flask required careful coordination.

Solution:
Created a contract_connector.py module to handle smart contract loading and transaction logic separately, improving modularity and clarity.


🧠 2. ML Model Compatibility Issues

An early issue involved a ValueError when loading a DecisionTreeClassifier trained with scikit-learn 1.0 in an environment running 1.7. This caused the app to break during model loading.

Solution:
Re-trained the model using the matching scikit-learn version and saved it in a fresh pkl file that matched the current environment.


📄 3. OCR from Uploaded PDFs

Initially, the app only supported image input. But many users had test reports in PDF format.

Solution:
Used the pdf2image library to convert PDFs into images before OCR extraction, allowing the same processing pipeline for both input types.


🧪 4. IPFS Upload + Metadata Mapping

Storing results on IPFS was easy, but linking the CID back to user reports and blockchain records needed care.

Solution:
Wrote custom JSON objects with extracted features + prediction results and uploaded them using web3.storage. The returned CID was then registered via the smart contract.


🧬 5. Time Crunch!

Building the entire flow — frontend, backend, ML, OCR, blockchain, IPFS — within a tight timeframe was tough.

Solution:
Planned a modular structure early on, worked in small testable chunks, and reused proven libraries to accelerate development.


Tracks Applied (2)

Cross-Chain Solutions

While MedOracle is currently deployed on a single blockchain, the project lays foundational work for future cross-chain ...Read More

AWS Credits for all Hackathon winners and runner ups

MedOracle uses machine learning to analyze medical reports and currently runs all backend services locally. However, the...Read More

AWS

Discussion

Builders also viewed

See more projects on Devfolio