Prototype / Demo Product
This is a demonstration project with synthetic data. Not intended for production use without proper compliance and validation.
Healthcare
12/26/2024
AI-Powered Medical Prescription OCR System
Prototype AI system that digitizes handwritten prescriptions using multi-engine OCR, medical NLP, and 253K+ Indian medicine database.

Client
Batra Hospital
Duration
10 weeks
Team Size
6 developers
Key Result
98-99% extraction accuracy
The Challenge
Handwritten prescriptions cause medication errors and delays in pharmacy workflows
Our Solution
Multi-engine OCR with Google, Azure & AWS, combined with medical NLP and drug database enrichment
Key Results
98-99% extraction accuracy, 3-5 second processing, 253K+ medicine database
Technologies Used
Demo Product
This is a prototype with synthetic data for demonstration purposes. Not intended for production medical use without proper regulatory compliance and clinical validation.
🚀 Try the Live Demo
Upload a prescription image and watch AI extract medications, dosages & more in real-time.
Overview
Healthcare facilities face significant challenges with handwritten prescriptions — illegibility leads to medication errors, pharmacy staff waste time deciphering writing, and valuable data gets lost in paper-based systems. This AI-powered solution digitizes prescriptions automatically.
98%+
Medicine Extraction
3-5s
Processing Time
253K+
Indian Medicines
3
OCR Engines
How It Works
The system uses a sophisticated multi-stage pipeline:
- Image Preprocessing (~150ms) — Grayscale conversion, deskewing, CLAHE enhancement, and denoising
- Content Segmentation (~90ms) — Divides prescription into logical sections (header, medications, notes)
- Parallel OCR (~3s) — Google Document AI, Azure Form Recognizer, and AWS Textract process simultaneously
- Best Result Selection — Confidence-based selection of best OCR result per section
- Medical NLP (~4.5s) — AWS Comprehend Medical extracts entities, Gemini AI corrects errors
- Database Enrichment (~500ms) — Matches against 253K+ Indian medicines with RxNorm codes
Key Features
Multi-Engine OCR Ensemble
Each prescription section is processed by all 3 OCR engines in parallel. The system automatically selects the best result per section based on confidence scores — different engines excel at different handwriting styles.
Medical-Aware NLP
AWS Comprehend Medical extracts structured entities:
MEDICATION— Drug namesDOSAGE— Amounts (500mg, 1 tab)FREQUENCY— Timing (BD → Twice daily, TDS → Three times daily)DURATION— Length (5 days, 2 weeks)
Gemini AI then corrects OCR errors using medical context: "Prctmol" → "Paracetamol"
Drug Database Integration
Every medication is enriched with RxNorm codes for standardization, brand/generic mapping from 253K+ Indian medicine records, pricing information, and manufacturer details.
Smart Confidence Routing
Results are automatically routed based on confidence: 95%+ auto-approved, 85-95% low-priority review, 70-85% high-priority review, below 70% urgent pharmacist review.
Try It Yourself
- Visit demo.qbitlog.com
- Navigate to the Clinic page
- Drag & drop any prescription image (JPG/PNG, max 10MB)
- Watch real-time processing: preprocessing ✓ → OCR ✓ → NLP ✓ → enrichment ✓
- Review and edit extracted medications, dosages, frequencies
- Send to pharmacy workflow
⚡ Demo Limitations
- • No authentication — open demo for testing
- • All patient/prescription data is synthetic
- • Not HIPAA/GDPR compliant
- • Requires internet for cloud OCR/NLP APIs
- • Processing costs apply for API calls
Technology Stack
Backend: Python 3.11+, FastAPI, SQLAlchemy 2.0 (async), OpenCV, PostgreSQL
OCR Services: Google Document AI, Azure Document Intelligence, AWS Textract
NLP: AWS Comprehend Medical, Google Gemini AI
Frontend: React 18, TypeScript, Vite, TanStack Router, Tailwind CSS