A comprehensive Django-based medical diagnosis application that combines patient management, AI-powered diagnosis, and automated report generation.
- Complete patient record creation and management
- Medical history tracking
- File upload support for ECG, Lab, and X-ray reports
- Patient search and filtering capabilities
- Symptom-based diagnosis using machine learning
- Confidence scoring for diagnosis accuracy
- Support for multiple medical report types
- Automated treatment plan generation
- Automated PDF report generation
- Professional medical report formatting
- Downloadable patient records
- Comprehensive medical summaries
- Secure user registration and login
- Role-based access control
- User session management
- Password validation and security
- Responsive Bootstrap-based interface
- Medical-themed design
- Mobile-friendly layout
- Intuitive navigation
- Backend: Django 3.2+
- Frontend: Bootstrap 5, HTML5, CSS3
- Database: SQLite (development), PostgreSQL (production)
- AI/ML: scikit-learn, joblib
- PDF Generation: ReportLab
- Image Processing: Pillow
- Python 3.8 or higher
- pip (Python package installer)
-
Clone the repository
git clone <repository-url> cd Diagno
-
Create a virtual environment
python -m venv venv # On Windows venv\Scripts\activate # On macOS/Linux source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Run database migrations
python manage.py makemigrations python manage.py migrate
-
Create a superuser (optional)
python manage.py createsuperuser
-
Run the development server
python manage.py runserver
-
Access the application
- Open your browser and go to
http://127.0.0.1:8000/ - Register a new account or login with existing credentials
- Open your browser and go to
Diagno/
├── core/ # Main application
│ ├── ai_models/ # AI model files
│ ├── static/ # Static files (CSS, JS)
│ ├── templates/ # HTML templates
│ ├── admin.py # Django admin configuration
│ ├── forms.py # Patient forms
│ ├── models.py # Database models
│ ├── urls.py # URL routing
│ ├── utils.py # PDF generation utilities
│ └── views.py # Application views
├── users/ # User authentication app
│ ├── forms.py # User registration forms
│ ├── urls.py # Auth URL routing
│ └── views.py # Authentication views
├── diagnorx/ # Django project settings
│ ├── settings.py # Django settings
│ ├── urls.py # Main URL configuration
│ └── wsgi.py # WSGI configuration
├── media/ # Uploaded files
│ ├── ecg_reports/ # ECG report files
│ ├── lab_reports/ # Lab report files
│ └── xray_reports/ # X-ray report files
├── manage.py # Django management script
├── requirements.txt # Python dependencies
└── README.md # Project documentation
- Login/Register: Create an account or login to the system
- Add Patient: Fill out the comprehensive patient form with symptoms and medical history
- Upload Reports: Optionally upload ECG, lab, or X-ray reports
- Generate Diagnosis: Submit the form to get AI-powered diagnosis
- View Results: Review diagnosis, confidence score, and treatment plan
- Download Reports: Generate and download PDF medical reports
- Track History: View and search through all patient records
The system provides intelligent diagnosis based on:
- Symptom Analysis: Analyzes patient symptoms using pattern recognition
- Medical History: Considers patient's medical background
- Report Integration: Incorporates uploaded medical reports
- Confidence Scoring: Provides accuracy confidence for each diagnosis
- Cardiovascular issues
- Respiratory infections
- Neurological conditions
- Gastrointestinal problems
- General consultations
Create a .env file in the project root:
SECRET_KEY=your-secret-key-here
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1
DATABASE_URL=sqlite:///db.sqlite3For production deployment:
- Set
DEBUG=Falsein settings - Configure a production database (PostgreSQL recommended)
- Set up static file serving
- Configure media file storage
- Set up proper security measures
/- Dashboard (requires authentication)/dashboard/- Patient form and recent records/prescription/<id>/- View diagnosis results/history/- Patient records with search/filter/download-pdf/<id>/- Download PDF report/users/login/- User login/users/register/- User registration/users/logout/- User logout
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the repository
- Contact the development team
- Check the documentation
This is a demonstration system and should not be used for actual medical diagnosis without proper validation and certification. Always consult with qualified medical professionals for real medical decisions.
DiagnoRx - Advancing medical diagnosis through AI technology.