Hospital Management System API Documentation

Hospital Management System API Documentation

Overview

This API provides endpoints to manage a hospital system, including Patients, Doctors, and Appointments. The API supports CRUD operations and follows RESTful principles.

Base URL

http://hmsapi.ezkart24.com/

Endpoints

1. Patients API

Get All Patients

Method: GET

URL: /patients_api.php

Add a New Patient

Method: POST

URL: /patients_api.php

{
  "name": "David Miller",
  "age": 45,
  "gender": "Male",
  "phone": "1234567899"
}

Delete a Patient

Method: DELETE

URL: /patients_api.php?id={id}

2. Doctors API

Get All Doctors

Method: GET

URL: /doctors_api.php

Add a New Doctor

Method: POST

URL: /doctors_api.php

{
  "name": "Dr. Anna Smith",
  "specialty": "Cardiology",
  "phone": "9876543215"
}

Delete a Doctor

Method: DELETE

URL: /doctors_api.php?id={id}

3. Appointments API

Get All Appointments

Method: GET

URL: /appointments_api.php

Add a New Appointment

Method: POST

URL: /appointments_api.php

{
  "patient_id": 1,
  "doctor_id": 2,
  "appointment_date": "2025-02-20 11:00:00",
  "status": "Scheduled"
}

Delete an Appointment

Method: DELETE

URL: /appointments_api.php?id={id}

Response Format

All responses are returned in JSON format.

{
  "success": true,
  "message": "Operation successful"
}

In case of an error:

{
  "error": "Invalid request"
}

Notes

This API enables efficient management of a hospital’s Patients, Doctors, and Appointments. 🚀