The Patient-Doctor Portal is a full-featured appointment booking and prescription management system built in Django. Patients can securely register, book appointments, and view prescriptions, while doctors can manage their schedules, update prescriptions, and provide online consultations.
Key features:
- Patient and Doctor role-based dashboards
- Secure login/registration system
- Doctors can manage specialization, experience, and clinic details
- Patients can view prescriptions and appointment history
- Profile picture uploads (powered by Pillow)
- Mobile responsive & production-ready design
| Technology | Purpose |
|---|---|
| Python 3.10+ | Core language |
| Django 4.x | Web framework (secure, scalable, fast) |
| Django REST Framework | API development (future-ready for mobile or SPA extensions) |
| Pillow | Image processing (for profile pictures) |
| Crispy Forms + Bootstrap 5 | Polished, mobile-first UI |
| SQLite / PostgreSQL | Default DB (SQLite), PostgreSQL for production (recommended) |
| Gunicorn + Nginx | Deployment stack for production |
In many healthcare clinics and hospitals, patients struggle with:
- Inconvenient booking processes
- Lack of transparency regarding treatment/prescriptions
- Limited online consultation facilities
Our solution:
A robust, role-based platform where:
- Patients and doctors have distinct, secure access
- Doctors maintain their full profile & availability
- Patients easily book slots, view their prescriptions & stay updated
This improves patient-doctor engagement, operational efficiency, and ensures data privacy.
- ✅ Built with Django: Security, scalability, and rapid development
- ✅ Role-Based Access: Separate modules for patients & doctors
- ✅ Production-Ready Stack: Suitable for real deployments using Gunicorn/Nginx
- ✅ Database-Ready: Works out of the box with SQLite, easy migration to PostgreSQL
- ✅ Image Handling: Uses Pillow for profile pictures (a real-world production feature)
- ✅ Clean & Responsive UI: Bootstrap 5 + Crispy Forms integration
- ✅ Extensible APIs: Prepared for mobile apps or Single Page Apps (with DRF)
- ✅ Deployment-Friendly: Designed with environment variable configs (using
django-environ)
git clone https://github.com/your-username/patient-doctor-portal.git
cd patient-doctor-portal
2️⃣ Setup Virtual Environment
bash
Copy
Edit
python -m venv venv
source venv/bin/activate # (on Windows: venv\Scripts\activate)
3️⃣ Install Dependencies
bash
Copy
Edit
pip install -r requirements.txt
4️⃣ Apply Migrations
bash
Copy
Edit
python manage.py migrate
5️⃣ Create Superuser (for admin access)
bash
Copy
Edit
python manage.py createsuperuser
6️⃣ Run the Development Server
bash
Copy
Edit
python manage.py runserver
Visit: http://127.0.0.1:8000/
🔐 Production Deployment (Example with Gunicorn)
Collect Static Files
bash
Copy
Edit
python manage.py collectstatic
Run Gunicorn
bash
Copy
Edit
gunicorn patient_doctor_portal.wsgi:application
Pair with Nginx for robust production hosting.
📝 Core App Structure
accounts/ - Handles authentication, user roles
doctors/ - Doctor profiles, appointments, prescriptions
patients/ - Patient dashboard, booking, medical records
templates/ - Clean UI using Bootstrap 5
media/ - Profile pictures & uploaded files
✅ Best Practices Followed
Password validation: Enforced strong password policies
Database migrations: Version-controlled migrations
Static/media files: Handled with best Django practices
Security: CSRF protection, Django’s in-built security middleware
Extensible: API-ready design for future mobile integrations
Codebase: Modular, readable, and scalable
✨ Future Enhancements
OTP-based login system
Chat feature between patients & doctors
Payment gateway integration for appointments
Automated appointment reminders (email/SMS)
📸 Screenshots
(Add screenshots showcasing your portal’s UI and features here)