Skip to content

A Django REST Framework backend for managing healthcare data, including patients, doctors, and their relationships.

Notifications You must be signed in to change notification settings

rajat1903/Healthcare-Backend-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. 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
  1. Create PostgreSQL database:
createdb healthcare_db
  1. Run migrations:
python manage.py migrate
  1. Create superuser:
python manage.py createsuperuser
  1. Run the development server:
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/<patient_id>/ - Get patient's doctors
  • DELETE /api/mappings// - Delete mapping

Images

image

image

image

About

A Django REST Framework backend for managing healthcare data, including patients, doctors, and their relationships.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages