A Django REST Framework backend for managing healthcare data, including patients, doctors, and their relationships.
Link : https://documenter.getpostman.com/view/44498594/2sB2x5Frrk
- JWT Authentication
- Patient Management
- Doctor Management
- Patient-Doctor Mapping
- RESTful API Design
- PostgreSQL Database
- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- 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
- Create PostgreSQL database:
createdb healthcare_db
- Run migrations:
python manage.py migrate
- Create superuser:
python manage.py createsuperuser
- Run the development server:
python manage.py runserver
- POST /api/auth/register/ - Register new user
- POST /api/auth/login/ - Login and get JWT token
- 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
- 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
- POST /api/mappings/ - Create mapping
- GET /api/mappings/ - List mappings
- GET /api/mappings/<patient_id>/ - Get patient's doctors
- DELETE /api/mappings// - Delete mapping