Skip to content

An AI powered application which organizes all your medical reports and gives you the complete details upon entering a single prompt

Notifications You must be signed in to change notification settings

DemonJuanWatermelon/Digital-Medical-Report-Organizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Digital Medical Report Organizer

A comprehensive AI-powered system for managing, processing, and analyzing medical reports with advanced OCR capabilities and intelligent data extraction.

πŸ₯ Overview

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.

πŸš€ Tech Stack

  • 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

✨ Key Features

  • πŸ“„ 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

πŸ—οΈ Project Structure

/
β”œβ”€ 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

πŸš€ Quick Start

Prerequisites

  • Docker and Docker Compose
  • Node.js 18+ (for local development)
  • Python 3.11+ (for local development)
  • PostgreSQL 13+ (for local development)

Using Docker (Recommended)

  1. Clone the repository:

    git clone <repository-url>
    cd Digital-Medical-Report-Organizer
  2. Set up environment variables:

    cd infra
    cp .env.example .env
    # Edit .env with your configuration
  3. Start all services:

    docker-compose up -d
  4. Access the application:

Local Development

For detailed local development setup, see the Local Development Guide.

Backend Setup

cd backend
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reload

Frontend Setup

cd frontend
npm install
npm run dev

ML Pipeline Setup

cd 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 8001

πŸ“– Documentation

Comprehensive documentation is available in the docs/ directory:

πŸ”§ Configuration

Environment Variables

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

πŸ§ͺ Testing

Run Tests

# Backend tests
cd backend
pytest tests/

# Frontend tests
cd frontend
npm test

# ML pipeline tests
cd ml_pipeline
pytest tests/

Test Coverage

# Backend coverage
cd backend
pytest --cov=app tests/

# Frontend coverage
cd frontend
npm run test:coverage

πŸš€ Deployment

Docker Deployment

cd infra
docker-compose -f docker-compose.yml up -d

Kubernetes Deployment

kubectl apply -f infra/k8s/

Production Deployment

See the Production Deployment Guide for detailed instructions.

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support

  • Documentation: Check the docs/ directory
  • Issues: Open an issue on GitHub
  • Discussions: Use GitHub Discussions for questions

πŸ™ Acknowledgments

πŸ“Š Project Status

  • βœ… 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

About

An AI powered application which organizes all your medical reports and gives you the complete details upon entering a single prompt

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published