A comprehensive healthcare management system that connects Patients, Doctors, and Hospitals. The platform features a doctor recommendation system based on patient ratings and allows seamless management of medical records and appointments.
- Python 3.8+
- pip
# Clone the repository
git clone <repository-url>
cd doc-on-call
# Navigate to the project directory
cd medical/health
# Install dependencies
pip install django
# Run migrations
python manage.py migrate
# Start the development server
python manage.py runserverThe application will be available at: http://localhost:8000
Use these credentials to explore the application:
| Role | Username | Password | Description |
|---|---|---|---|
| Patient | demo_patient |
Demo@123 |
Access patient dashboard, records, appointments |
| Doctor | demo_doctor |
Demo@123 |
View patients and appointment history |
| Hospital | demo_hospital |
Demo@123 |
Manage hospital profile and view doctors |
| Admin | admin |
admin123 |
Full admin access to Django admin panel |
| Page | URL | Description |
|---|---|---|
| Home | http://localhost:8000/ | Landing page with portal selection |
| Unified Login | http://localhost:8000/login/ | Single login page for all user types |
| See Doctors | http://localhost:8000/seedocs | View all doctors with ratings |
| About Us | http://localhost:8000/aboutus | About the platform |
| Contact Us | http://localhost:8000/contactus | Contact information |
| Page | URL | Description |
|---|---|---|
| Patient Portal | http://localhost:8000/patient/ | Patient landing page |
| Patient Signup | http://localhost:8000/patient/signup/ | Register as a patient |
| Patient Login | http://localhost:8000/patient/login | Patient-specific login |
| Patient Dashboard | http://localhost:8000/patient/dashboard | View profile, records & appointments |
| Create Record | http://localhost:8000/patient/record | Create a new medical record |
| Create Appointment | http://localhost:8000/patient/appointment | Book a new appointment |
| Page | URL | Description |
|---|---|---|
| Doctor Portal | http://localhost:8000/doctor/ | Doctor landing page |
| Doctor Signup | http://localhost:8000/doctor/signup/ | Apply as a doctor |
| Doctor Login | http://localhost:8000/doctor/login | Doctor-specific login |
| Doctor Dashboard | http://localhost:8000/doctor/dashboard | View patients & appointments |
| Page | URL | Description |
|---|---|---|
| Hospital Portal | http://localhost:8000/hospital/ | Hospital landing page |
| Hospital Signup | http://localhost:8000/hospital/signup/ | Register a hospital |
| Hospital Login | http://localhost:8000/hospital/login | Hospital-specific login |
| Hospital Dashboard | http://localhost:8000/hospital/dashboard | View associated doctors |
| Page | URL | Description |
|---|---|---|
| Django Admin | http://localhost:8000/admin/ | Full admin access |
- Go to http://localhost:8000/login/ (or click "Login" in navbar)
- Select Patient and enter credentials:
demo_patient/Demo@123 - View your dashboard with profile information
- Create a new record by selecting a doctor
- Create an appointment for an existing record
- Rate your doctor after the appointment
- Go to http://localhost:8000/login/
- Select Doctor and enter credentials:
demo_doctor/Demo@123 - View your dashboard with patient records
- See all appointments and ratings received
- Go to http://localhost:8000/login/
- Select Hospital and enter credentials:
demo_hospital/Demo@123 - View all doctors associated with your hospital
- โ Secure registration and login
- โ Personal profile management
- โ Create medical records with doctors
- โ Book appointments
- โ Rate doctors (1-5 stars)
- โ View appointment history
- โ Professional registration
- โ View all patient records
- โ Track appointments
- โ See ratings and feedback
- โ Hospital affiliation
- โ Hospital registration
- โ View associated doctors
- โ Profile management
- โ Unified login system (single login page for all roles)
- โ Doctor recommendation based on ratings
- โ Sortable doctor listing by specialization
- โ Responsive Bootstrap design
- โ Django admin panel
| Component | Technology |
|---|---|
| Backend | Django 5.x (Python) |
| Database | SQLite (default), PostgreSQL/MySQL ready |
| Frontend | HTML5, CSS3, Bootstrap 4.5 |
| Icons | Font Awesome 4.7 |
| JavaScript | Vanilla JS, jQuery |
medical/health/
โโโ manage.py # Django management script
โโโ db.sqlite3 # SQLite database
โโโ .env.example # Environment variables template
โโโ .gitignore # Git ignore rules
โ
โโโ static/css/ # Shared CSS styles
โ โโโ style.css
โ
โโโ templates/ # Shared templates
โ โโโ base.html # Base template with navbar/footer
โ
โโโ health/ # Main project app
โ โโโ settings.py # Django settings (env-based)
โ โโโ urls.py # Main URL routing
โ โโโ views.py # Home, login, seedocs views
โ โโโ templates/health/ # Main templates
โ
โโโ patient/ # Patient app
โ โโโ models.py # Patient, Record, Appointment models
โ โโโ views.py # Patient views
โ โโโ forms.py # Patient forms
โ โโโ templates/patient/
โ
โโโ doctor/ # Doctor app
โ โโโ models.py # Doctor model
โ โโโ views.py # Doctor views
โ โโโ forms.py # Doctor forms
โ โโโ templates/doctor/
โ
โโโ hospital/ # Hospital app
โโโ models.py # Hospital model
โโโ views.py # Hospital views
โโโ forms.py # Hospital forms
โโโ templates/hospital/
For production, create a .env file based on .env.example:
cp .env.example .envKey settings:
SECRET_KEY=your-secret-key-here
DEBUG=False
ALLOWED_HOSTS=yourdomain.com
Default: SQLite (no configuration needed)
For PostgreSQL:
DB_ENGINE=django.db.backends.postgresql
DB_NAME=doconcall
DB_USER=your_user
DB_PASSWORD=your_password
DB_HOST=localhost
DB_PORT=5432
Hospital (1) โโโโ (Many) Doctor (1) โโโโ (Many) Patient_Record (1) โโโโ (Many) Appointment
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโค
โ
Patient (1) โโโโโโโโโโโโโโโโโโโโโโ(Many)
| Model | Key Fields |
|---|---|
| Hospital | Name, Address, Phone, User (FK) |
| Doctor | Name, Qualification, Specialization, Hospital (FK), User (FK) |
| Patient | Name, DOB, Phone, Address, User (FK) |
| Patient_Record | Patient (FK), Doctor (FK), Diagnostics |
| Appointment | Patient_Record (FK), Date, Medication, Fee, Rating |
- Real-time appointment scheduling with availability calendar
- Video consultation integration
- Prescription management system
- Payment gateway integration
- Mobile app (React Native/Flutter)
- ML-based doctor recommendations
- Email/SMS notifications
- Multi-language support
- Jash Jain
- Naitik Jain
This project is for educational purposes.
1. "No module named django"
pip install django2. Database errors after model changes
python manage.py makemigrations
python manage.py migrate3. Static files not loading
python manage.py collectstatic4. Create new demo users
python manage.py shellfrom django.contrib.auth.models import User
from patient.models import Patient
user = User.objects.create_user('new_patient', 'email@example.com', 'password123')
patient = Patient(user=user, is_patient=True, F_Name='new_patient', M_Name='Test', L_Name='User',
Phone_No='1234567890', DOB='1990-01-01', Street='123 Test St',
City='Mumbai', State='Maharashtra', Pincode='400001')
patient.save()For issues or questions, please create an issue in the repository.







