Git Product home page Git Product logo

hospital_system's Introduction

Hospital Management System (HMS) API

API endpoints for hospital management using Laravel

Overview

The Hospital Management System (HMS) API provides a set of endpoints to manage hospital operations, appointments, departments, doctors, patients, and user authentication. This README file outlines the available endpoints, their functionalities, and installation instructions.


Endpoints

Authentication

  • POST /signup
    • Create a new user account.
  • POST /login
    • Authenticate user credentials.

Appointments

  • GET /appointment
    • Retrieve all appointments (Admin only).
  • POST /appointment
    • Create a new appointment (Admin or Patient).
  • GET /appointment/:id
    • Get details of a specific appointment (Admin or Patient).
  • PUT /appointment/:id
    • Update a specific appointment (Admin or Patient).
  • DELETE /appointment/:id
    • Delete a specific appointment (Admin or Patient).

Departments

  • POST /departments
    • Add a new department (Admin only).
  • GET /departments
    • Retrieve all departments (Admin only).
  • GET /department/doctors/:_id
    • Retrieve doctors in a specific department (Admin only).
  • GET /department/patients/:_id
    • Retrieve patients in a specific department (Admin only).
  • GET /department/:_id
    • Get details of a specific department (Admin only).
  • DELETE /department/:_id
    • Delete a specific department (Admin only).
  • PUT /department/:_id
    • Update a specific department (Admin only).

Doctors

  • POST /doctors
    • Add a new doctor (Admin only).
  • GET /doctors
    • Retrieve all doctors (Admin only).
  • GET /doctor/:id
    • Get details of a specific doctor (Admin or Doctor).
  • PUT /doctor/:id
    • Update a specific doctor (Admin or Doctor).
  • DELETE /doctor/:id
    • Delete a specific doctor (Admin or Doctor).

Patients

  • POST /patients
    • Add a new patient (Admin only).
  • GET /patients
    • Retrieve all patients (Admin only).
  • GET /patient/:_id
    • Get details of a specific patient (Admin or Patient).
  • PUT /patient/:_id
    • Update a specific patient (Admin or Patient).
  • DELETE /patient/:_id
    • Delete a specific patient (Admin or Patient).

Users

  • GET /user
    • Retrieve all users (Admin only).
  • GET /user/:_id
    • Get details of a specific user (Admin only).

Authentication and Authorization

  • Authentication is required for most routes using JWT tokens (protect middleware).
  • Different roles (admin, doctor, patient) have different levels of access (restrictedTo middleware).

Installation

  1. Clone the repository:

    git clone https://github.com/sohilaehab25/hospital_system cd hospital_system

  2. Configure environment variables:

    • Copy .env.example to .env and update with your settings in the backend.
  3. Install dependencies:

    • Install backend dependencies:

      npm install

    • Run the development server:

      nodemon app.js


Contributing

Contributions are welcome! Follow these steps:

  • Fork the repository.
  • Create a new branch: git checkout -b feature/your-feature.
  • Commit your changes: git commit -am 'Add new feature'.
  • Push to the branch: git push origin feature/your-feature.
  • Submit a PR (pull request).

Contact

For questions or feedback, contact Sohila Ehab at [email protected] or visit GitHub.

hospital_system's People

Contributors

sohilaehab25 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.