Clone the repository:
git clone https://github.com/TheYogMehta/hospital-management-django
cd hospital-management-djangoCreate and activate a virtual environment:
- Windows :
python -m venv venv venv\Scripts\activate
- Linux / MacOS:
python -m venv venv source venv/bin/activate
Install dependencies:
pip install -r requirements.txtApply database migrations:
python manage.py migrateRun the development server:
python manage.py runserver- Username: admin
- Email address: [email protected]
- Password: G7v!qP9z@2Xw#Lm4
The admin user is pre-created.
- Home redirect:
/→ Redirects to the dashboard based on user role - Login page:
/login/ - Logout page:
/logout/
All API endpoints are under /api/:
| Resource | Endpoint | Notes |
|---|---|---|
| Receptionists | /api/receptionists/ |
CRUD operations on receptionists |
| Doctors | /api/doctors/ |
CRUD operations on doctors |
| Patients | /api/patients/ |
CRUD operations on patients |
| Appointments | /api/appointments/ |
CRUD operations on appointments |
| Prescriptions | /api/prescriptions/ |
CRUD operations on prescriptions |
| Bills | /api/bills/ |
CRUD operations on bills |
| Utility | /api/utility/ |
Utility functions |
| Admin | /api/admin/ |
Admin-specific API actions |
All dashboards are under /dashboard/:
| Role | Dashboard URL | Notes |
|---|---|---|
| Admin | /dashboard/admin/ |
Admin dashboard view |
| Doctor | /dashboard/doctor/ |
Doctor dashboard view |
| Receptionist | /dashboard/receptionist/ |
Receptionist dashboard view |
| Patient | /dashboard/patient/ |
Patient dashboard view |
- Dashboard Redirect:
/dashboard/→ Redirects to the correct role dashboard
- Dashboard URLs are protected; only authenticated users with the correct role can access them
- API endpoints use Django REST Framework
ViewSets - All POST, PUT, PATCH, DELETE requests require authentication
- Use the provided super user credentials to log in and access dashboards