https://github.com/rajat1903/healthcare-backend-api
A Django REST Framework backend for managing healthcare data, including patients, doctors, and their relationships.
https://github.com/rajat1903/healthcare-backend-api
django django-rest-framework jwt-authentication orm-model postgres postman restful-api simplejwt
Last synced: 9 months ago
JSON representation
A Django REST Framework backend for managing healthcare data, including patients, doctors, and their relationships.
- Host: GitHub
- URL: https://github.com/rajat1903/healthcare-backend-api
- Owner: rajat1903
- Created: 2025-06-10T17:36:53.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-06-10T18:23:38.000Z (10 months ago)
- Last Synced: 2025-06-10T18:55:14.674Z (10 months ago)
- Topics: django, django-rest-framework, jwt-authentication, orm-model, postgres, postman, restful-api, simplejwt
- Language: Python
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Healthcare Management System Backend
A Django REST Framework backend for managing healthcare data, including patients, doctors, and their relationships.
## API Documentation
> Link : https://documenter.getpostman.com/view/44498594/2sB2x5Frrk
## Features
- JWT Authentication
- Patient Management
- Doctor Management
- Patient-Doctor Mapping
- RESTful API Design
- PostgreSQL Database
## Setup Instructions
1. Create a virtual environment:
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
2. Install dependencies:
```bash
pip install -r requirements.txt
```
3. Create a .env file with the following variables:
```
DEBUG=True
SECRET_KEY=your-secret-key-here
DB_NAME=healthcare_db
DB_USER=postgres
DB_PASSWORD=postgres
DB_HOST=localhost
DB_PORT=5432
```
4. Create PostgreSQL database:
```bash
createdb healthcare_db
```
5. Run migrations:
```bash
python manage.py migrate
```
6. Create superuser:
```bash
python manage.py createsuperuser
```
7. Run the development server:
```bash
python manage.py runserver
```
## API Endpoints
### Authentication
- POST /api/auth/register/ - Register new user
- POST /api/auth/login/ - Login and get JWT token
### Patients
- POST /api/patients/ - Create patient
- GET /api/patients/ - List patients
- GET /api/patients// - Get patient details
- PUT /api/patients// - Update patient
- DELETE /api/patients// - Delete patient
### Doctors
- POST /api/doctors/ - Create doctor
- GET /api/doctors/ - List doctors
- GET /api/doctors// - Get doctor details
- PUT /api/doctors// - Update doctor
- DELETE /api/doctors// - Delete doctor
### Patient-Doctor Mappings
- POST /api/mappings/ - Create mapping
- GET /api/mappings/ - List mappings
- GET /api/mappings// - Get patient's doctors
- DELETE /api/mappings// - Delete mapping
## Images


