Skip to content

raghav26102000/MedExplain-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🩺 MedExplain AI

AI-Powered Medical Report Interpretation Platform

Transform complex medical reports into clear, patient-friendly explanations using OCR, Large Language Models, and intelligent validation pipelines.

Open Source β€’ Healthcare AI β€’ OCR β€’ Gemini AI β€’ Node.js β€’ Medical Document Intelligence


MedExplain AI is an intelligent backend platform that helps patients better understand laboratory reports without replacing professional medical advice.

The platform accepts medical reports as text or scanned images, extracts relevant laboratory values, validates the extracted information against the original report, and generates simplified explanations using Google Gemini while minimizing hallucinations through a dedicated validation layer.

Designed with safety, transparency, and reliability in mind, MedExplain AI focuses on explaining medical information rather than diagnosing medical conditions.


✨ Features

πŸ“„ Medical Report Processing

Accept reports as:

  • Raw Text
  • Scanned Images
  • Laboratory Reports

πŸ” OCR Extraction

Automatically extract text from uploaded medical reports using Tesseract OCR.


πŸ€– AI-Powered Medical Understanding

Google Gemini processes extracted information to:

  • Normalize laboratory results
  • Structure medical data
  • Generate patient-friendly explanations

πŸ›‘ AI Validation Guardrails

Prevent hallucinated outputs by validating AI-generated laboratory tests against the original source document before generating responses.


πŸ“Š Structured Medical Data

Convert unstructured reports into standardized JSON for downstream applications.


πŸ’Ύ Audit Logging

Store processed reports and AI outputs inside MongoDB for traceability and future analysis.


🎯 Use Cases

  • Laboratory Report Interpretation
  • Healthcare Applications
  • Patient Education
  • Medical OCR
  • HealthTech Platforms
  • Clinical Documentation
  • Medical Record Digitization
  • AI Healthcare Assistants

πŸ— System Architecture

Medical Report
       β”‚
 β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚                 β”‚
 β–Ό                 β–Ό
Text Input     Image Upload
                   β”‚
                   β–Ό
             OCR Extraction
                   β”‚
                   β–Ό
        Gemini AI Processing
         β”‚              β”‚
         β–Ό              β–Ό
Normalization      Simplification
         β”‚
         β–Ό
Validation Layer
         β”‚
         β–Ό
MongoDB Storage
         β”‚
         β–Ό
Patient-Friendly Response

πŸš€ Quick Start

Clone Repository

git clone <repository-url>

cd medexplain-ai

Install Dependencies

npm install

Configure Environment Variables

Create a .env file.

PORT=3000

MONGO_URI=

GEMINI_API_KEY=

Run Development Server

npm run dev

Application runs on

http://localhost:3000

πŸ“‚ Project Structure

medexplain-ai/

controllers/

routes/

services/

middlewares/

models/

utils/

uploads/

README.md

πŸ›  Technology Stack

Backend

  • Node.js
  • Express.js

Database

  • MongoDB
  • Mongoose

Artificial Intelligence

  • Google Gemini API

OCR

  • Tesseract.js

File Processing

  • Multer

Configuration

  • dotenv

πŸ”„ Processing Pipeline

Medical Report

↓

OCR Extraction

↓

Structured Data Extraction

↓

AI Normalization

↓

Validation Layer

↓

Simplified Explanation

↓

MongoDB Storage

↓

JSON Response

πŸ“Š Example Response

{
  "summary": "The report indicates a low hemoglobin level and an elevated white blood cell count.",

  "tests": [...],

  "explanations": [...],

  "status": "ok"
}

πŸ”’ Safety First

MedExplain AI is designed to explain medical reportsβ€”not diagnose diseases.

The platform:

  • Never generates medical diagnoses
  • Avoids treatment recommendations
  • Validates AI output against source reports
  • Minimizes hallucinations through rule-based verification

πŸš€ Roadmap

  • Multi-language Support
  • PDF Report Upload
  • Voice Explanations
  • Medical Report Comparison
  • FHIR Integration
  • Patient Dashboard
  • Healthcare Provider Portal
  • Clinical Analytics
  • Doctor Review Workflow
  • Confidence Scoring

🀝 Contributing

Contributions are welcome.

  1. Fork the repository.
  2. Create a feature branch.
  3. Commit your changes.
  4. Push to your fork.
  5. Open a Pull Request.

πŸ“„ License

Released under the MIT License.


⭐ Support

If you found this project useful, consider giving it a ⭐ to support future development.

About

AI-powered medical report interpretation platform that converts complex lab reports into patient-friendly explanations using OCR, Gemini AI, and intelligent validation guardrails.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors