It is an API for Hospital which helps to perform various functionality which are mentioned below.
- How to Setup the Code into your System
- Cloning the repository using VS Code
- Tech Used in it
- Detailed API's Functionality
- Support
- Fork this repository into your github account (create one if you don't have it yet)
- Clone it to your system (
git clone
) - In the terminal run git remote add upstream
https://github.com/pratik-dutta/hospitalAPI.git
(this is for taking a fresh update of the code anytime in the future)
- Open VS Code.
- Go to View > Terminal.
- To clone the repo to your desktop, change the directory to desktop by running the command
cd desktop
. - In the terminal, run
git clone https://github.com/pratik-dutta/hospitalAPI.git
. - A folder/directory should be created on your desktop.
- Open that folder in VS Code, go to File > Open.
- Run
npm install
to download dependencies of the project or you can download it by seeing dependencies inpackage.json
. - Now you're good to go!
Stack: NodeJs, ExpressJs, MongoDB
Authentication Packages: Passport, Passport JWT, jsonwebtoken
This API helps to performs the following function
Following is the description of all the function mentioned above.
-
Register - Doctor
This API helps to register the doctor in the app. -
Login - Doctor
This function helps to login the Doctor in the app. If the user successfull login it generates a token and it'll be valid for almost 3 minutes and it gets expired after that. -
Create Patient
This function helps to create a patient in database.
This function is allowed only if the token is not expired. -
Create Report
This function helps to create report of a patient in database.
This function is allowed only if the token is not expired. -
Fetch Report
This function helps to fetch all reports of patient whose id is mentioned in params from the database.
-
Fetch Report By Status
This function helps to fetch all reports of all patients as per the status mentioned in the params from the database.
Feel free to contact at pratikdutta.786(at)gmail(dot)com for any query.