Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Doc-On-Call

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.


๐Ÿš€ Quick Start

Prerequisites

  • Python 3.8+
  • pip

Installation

# 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 runserver

The application will be available at: http://localhost:8000


๐Ÿ” Demo Credentials

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

๐Ÿ—บ๏ธ Navigation Guide

Public Pages (No Login Required)

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

Patient Pages

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

Doctor Pages

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

Hospital Pages

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

Admin

Page URL Description
Django Admin http://localhost:8000/admin/ Full admin access

๐Ÿ‘ค User Flows

As a Patient:

  1. Go to http://localhost:8000/login/ (or click "Login" in navbar)
  2. Select Patient and enter credentials: demo_patient / Demo@123
  3. View your dashboard with profile information
  4. Create a new record by selecting a doctor
  5. Create an appointment for an existing record
  6. Rate your doctor after the appointment

As a Doctor:

  1. Go to http://localhost:8000/login/
  2. Select Doctor and enter credentials: demo_doctor / Demo@123
  3. View your dashboard with patient records
  4. See all appointments and ratings received

As a Hospital:

  1. Go to http://localhost:8000/login/
  2. Select Hospital and enter credentials: demo_hospital / Demo@123
  3. View all doctors associated with your hospital

โœจ Features

For Patients

  • โœ… Secure registration and login
  • โœ… Personal profile management
  • โœ… Create medical records with doctors
  • โœ… Book appointments
  • โœ… Rate doctors (1-5 stars)
  • โœ… View appointment history

For Doctors

  • โœ… Professional registration
  • โœ… View all patient records
  • โœ… Track appointments
  • โœ… See ratings and feedback
  • โœ… Hospital affiliation

For Hospitals

  • โœ… Hospital registration
  • โœ… View associated doctors
  • โœ… Profile management

General

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

๐Ÿ› ๏ธ Technology Stack

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

๐Ÿ“ Project Structure

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/

๐Ÿ”ง Configuration

Environment Variables

For production, create a .env file based on .env.example:

cp .env.example .env

Key settings:

SECRET_KEY=your-secret-key-here
DEBUG=False
ALLOWED_HOSTS=yourdomain.com

Database Configuration

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

๐Ÿ“Š Database Schema

Entity Relationships

Hospital (1) โ”€โ”€โ”€โ”€ (Many) Doctor (1) โ”€โ”€โ”€โ”€ (Many) Patient_Record (1) โ”€โ”€โ”€โ”€ (Many) Appointment
                              โ”‚                       โ”‚
                              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
                                                      โ”‚
               Patient (1) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€(Many)

Models Overview

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

๐Ÿ“ธ Screenshots

ER Diagram

ER Diagram

Schema Diagram

Schema Diagram

Home Page

Home Page

See Doctors (with Ratings)

See Doctors

Patient Dashboard

Patient Page

Doctor Dashboard

Doctor Page

Hospital Dashboard

Hospital Page

Admin Panel

Admin


๐Ÿ”ฎ Future Scope

  • 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

๐Ÿ‘ฅ Contributors

  • Jash Jain
  • Naitik Jain

๐Ÿ“„ License

This project is for educational purposes.


๐Ÿ› Troubleshooting

Common Issues

1. "No module named django"

pip install django

2. Database errors after model changes

python manage.py makemigrations
python manage.py migrate

3. Static files not loading

python manage.py collectstatic

4. Create new demo users

python manage.py shell
from 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()

๐Ÿ“ž Support

For issues or questions, please create an issue in the repository.

About

A D.B.M.S project which recommends doctors to patients(new as well as existing ones).

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages