Coder Social home page Coder Social logo

arshu200 / hospital_api Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 9 KB

The Hospital API project is a web-based application developed using Node.js and MongoDB. The primary goal of this project is to provide doctors with a platform where they can register, login, and manage patient reports. The application ensures that only registered doctors can create a patient's report and view all reports.

JavaScript 100.00%

hospital_api's Introduction

๐Ÿฅ Hospital API

The Hospital API project is a web-based application developed using Node.js and MongoDB. The primary goal of this project is to provide doctors with a platform where they can register, login, and manage patient reports. The application ensures that only registered doctors can create a patient's report and view all reports. Patients, on the other hand, cannot register themselves.

The project has various endpoints that doctors can use to perform different operations. For example, the registration endpoint allows new doctors to create an account by providing their name, email address, and password. Once registered, the doctor can log in and access other functionalities, such as adding new patients, creating reports for them, and viewing all their reports.

To ensure the security of the system, the application employs different authentication techniques such as JSON Web Tokens (JWT) to generate tokens that doctors can use to access various endpoints.

API Reference

Doctor registration

  POST /api/v1/doctors/register
Body Type Description
name string Required. Your full name
email string Required. Your email address
password string Required.

Doctor login

  POST /api/v1/doctors/login
Body Type Description
email string Required. Your email address
password string Required.

Returns a token valid for 11 days.

Patient Register

  POST /api/v1/patients/register
Body Type Description
name string Required. Patient full name
number number Required. Patient Phone number
Headers Type Description
Authorization string Required. Bearer Token

Create Patient Report

  POST /api/v1/patients/:id/create_report
Parameter Type Description
id string Required. Id of patient to be generated
Body Type Description
status string Required. Status of patient
Headers Type Description
Authorization string Required. Bearer Token

Get all reports of a particular patient

  GET /api/v1/patients/:id/all_reports
Parameter Type Description
id string Required. Id of patient to be fetched
Headers Type Description
Authorization string Required. Bearer Token

Get all reports of all patients with a specific status

  GET /api/v1/reports/:status
Parameter Type Description
status string Required. Specify status
Headers Type Description
Authorization string Required. Bearer Token

Demo

https://hospital-api-5vca.onrender.com --followed by any of the above endpoints ๐Ÿš€

Features

  • There can be 2 types of Users
    • Doctors ๐Ÿฉบ
    • Patients ๐Ÿ˜ท
  • Doctors can log in
  • Each time a patient visits, the doctor will follow 2 steps
    • Register the patient in the app (using phone number, if the patient already exists, just return the patient info in the API)
  • After the checkup, create a Report
  • Patient Report will have the following fields
    • Created by doctor
    • Status Can be either of: [Negative, Travelled-Quarantine, Symptoms-Quarantine, Postive-Admit etc]
    • Date

Run Project Locally

Clone the project

  https://github.com/Arshu200/Hospital_API

Go to the project directory

  cd Hospital-API

Install the packages

  npm install

Start the server

  npm start

Screenshots

Screenshot 2023-03-13 at 3 48 32 PM

๐Ÿš€ About Me

I'm a Aspiring full stack developer... Love to create, design and build cool projects ๐Ÿ˜Ž and have passion for creating innovative solutions to complex problems using cutting-edge technologies. I have a strong understanding of both front-end and back-end development, and constantly seeking to improve my skills in these areas.

Feedback

If you have any feedback, please reach out to me at [email protected]

Author

hospital_api's People

Contributors

arshu200 avatar

Stargazers

 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.