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.
Accept reports as:
- Raw Text
- Scanned Images
- Laboratory Reports
Automatically extract text from uploaded medical reports using Tesseract OCR.
Google Gemini processes extracted information to:
- Normalize laboratory results
- Structure medical data
- Generate patient-friendly explanations
Prevent hallucinated outputs by validating AI-generated laboratory tests against the original source document before generating responses.
Convert unstructured reports into standardized JSON for downstream applications.
Store processed reports and AI outputs inside MongoDB for traceability and future analysis.
- Laboratory Report Interpretation
- Healthcare Applications
- Patient Education
- Medical OCR
- HealthTech Platforms
- Clinical Documentation
- Medical Record Digitization
- AI Healthcare Assistants
Medical Report
β
βββββββ΄ββββββββββββ
β β
βΌ βΌ
Text Input Image Upload
β
βΌ
OCR Extraction
β
βΌ
Gemini AI Processing
β β
βΌ βΌ
Normalization Simplification
β
βΌ
Validation Layer
β
βΌ
MongoDB Storage
β
βΌ
Patient-Friendly Response
git clone <repository-url>
cd medexplain-ainpm installCreate a .env file.
PORT=3000
MONGO_URI=
GEMINI_API_KEY=npm run devApplication runs on
http://localhost:3000
medexplain-ai/
controllers/
routes/
services/
middlewares/
models/
utils/
uploads/
README.md
- Node.js
- Express.js
- MongoDB
- Mongoose
- Google Gemini API
- Tesseract.js
- Multer
- dotenv
Medical Report
β
OCR Extraction
β
Structured Data Extraction
β
AI Normalization
β
Validation Layer
β
Simplified Explanation
β
MongoDB Storage
β
JSON Response
{
"summary": "The report indicates a low hemoglobin level and an elevated white blood cell count.",
"tests": [...],
"explanations": [...],
"status": "ok"
}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
- 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
Contributions are welcome.
- Fork the repository.
- Create a feature branch.
- Commit your changes.
- Push to your fork.
- Open a Pull Request.
Released under the MIT License.
If you found this project useful, consider giving it a β to support future development.