A comprehensive AI-powered system for managing, processing, and analyzing medical reports with advanced OCR capabilities and intelligent data extraction.
The Digital Medical Report Organizer is a modern web application that transforms how medical professionals handle and analyze patient reports. By combining cutting-edge OCR technology with advanced AI models, it automatically extracts, categorizes, and analyzes medical information from scanned documents, providing valuable insights and improving workflow efficiency.
The system processes medical images through a sophisticated pipeline that includes image preprocessing, text extraction, medical entity recognition, document classification, and risk assessment. Healthcare providers can upload reports, view AI-generated analysis, and access organized patient data through an intuitive web interface.
- Backend: FastAPI, SQLAlchemy, PostgreSQL, Redis
- Frontend: Next.js, React, Tailwind CSS, TypeScript
- ML/AI: Transformers, PyTorch, Tesseract OCR, Emergent Medical LLM
- Database: PostgreSQL with full-text search
- Infrastructure: Docker, Docker Compose, Kubernetes, Nginx
- Authentication: JWT-based security with role-based access control
- π OCR Processing: Advanced image preprocessing and text extraction from medical documents
- π€ AI Analysis: Medical entity recognition, document classification, and risk assessment
- π Smart Search: Full-text search across all processed reports
- π Analytics Dashboard: Comprehensive insights and statistics
- π Secure Storage: Encrypted data storage with access controls
- π± Responsive Design: Modern UI that works on all devices
- β‘ Real-time Processing: Live status updates and progress tracking
/
ββ backend/ # FastAPI backend application
β ββ app/ # Main application code
β ββ requirements.txt
β ββ Dockerfile
ββ frontend/ # Next.js frontend application
β ββ app/ # Next.js app directory
β ββ components/ # React components
β ββ package.json
β ββ tailwind.config.js
ββ ml_pipeline/ # OCR and AI processing
β ββ ocr/ # OCR processing scripts
β ββ ai/ # AI model inference
β ββ requirements.txt
ββ infra/ # Infrastructure and deployment
β ββ docker-compose.yml
β ββ nginx.conf
β ββ k8s/ # Kubernetes manifests
ββ docs/ # Comprehensive documentation
β ββ api/ # API documentation
β ββ architecture/ # System architecture
β ββ deployment/ # Deployment guides
ββ README.md
- Docker and Docker Compose
- Node.js 18+ (for local development)
- Python 3.11+ (for local development)
- PostgreSQL 13+ (for local development)
-
Clone the repository:
git clone <repository-url> cd Digital-Medical-Report-Organizer
-
Set up environment variables:
cd infra cp .env.example .env # Edit .env with your configuration
-
Start all services:
docker-compose up -d
-
Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
For detailed local development setup, see the Local Development Guide.
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reloadcd frontend
npm install
npm run devcd ml_pipeline
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
python -m uvicorn main:app --reload --port 8001Comprehensive documentation is available in the docs/ directory:
- System Architecture: Detailed system design and components
- API Reference: Complete REST API documentation
- Deployment Guide: Docker, Kubernetes, and production deployment
- User Guide: End-user documentation and tutorials
Key environment variables for configuration:
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/medical_reports
# Security
SECRET_KEY=your-secret-key-here
ACCESS_TOKEN_EXPIRE_MINUTES=30
# File Upload
MAX_FILE_SIZE=10485760 # 10MB
UPLOAD_DIR=uploads
# OCR Settings
TESSERACT_PATH=/usr/bin/tesseract
OCR_LANGUAGE=eng
# AI Models
AI_MODEL_NAME=emergentmedical/emergent-medical-ner# Backend tests
cd backend
pytest tests/
# Frontend tests
cd frontend
npm test
# ML pipeline tests
cd ml_pipeline
pytest tests/# Backend coverage
cd backend
pytest --cov=app tests/
# Frontend coverage
cd frontend
npm run test:coveragecd infra
docker-compose -f docker-compose.yml up -dkubectl apply -f infra/k8s/See the Production Deployment Guide for detailed instructions.
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: Check the docs/ directory
- Issues: Open an issue on GitHub
- Discussions: Use GitHub Discussions for questions
- FastAPI for the excellent web framework
- Next.js for the React framework
- Transformers for AI model integration
- Tesseract OCR for text extraction
- Emergent Medical for medical AI models
- β Backend API: Complete with authentication and file processing
- β Frontend UI: Modern React interface with dark/green theme
- β ML Pipeline: OCR and AI processing with medical models
- β Infrastructure: Docker and Kubernetes deployment ready
- β Documentation: Comprehensive guides and API docs
- π Testing: Unit and integration tests in progress
- π CI/CD: Automated testing and deployment pipeline
Built with β€οΈ for the healthcare community