GithubHelp home page GithubHelp logo

divyagaurav21 / hospital-api Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 961 KB

Hospital-API Backend Project , which manage Doctor , patient and their reports . TechStack used for this application is :- Node.js, Express, MongoDB , Passport , Passport-JWT

JavaScript 100.00%
express json mongodb nodejs postman rest-api

hospital-api's Introduction

Hospital Rest-API

Description

We’re going to design an API for the doctors of a Hospital which has been allocated by the govt for testing and quarantine + well being of COVID-19 patients

  • 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 (patient status like:- fever , malaria etc):

The Routes here used in project

  • /doctors/register → with username and password
  • /doctors/login → returns the JWT to be used
  • /patients/register
  • /patients/:id/create-report
  • /patients/:id/all_reports → List all the reports of a patient oldest to latest
  • /reports/:status → List all the reports of all the patients filtered by a specific status

Tech stack

Node.js , Express , Mongo-DB , passport-JWT

How to setup the project on local system

  1. Clone this project
  2. Start by installing npm if you don't have it already.
  3. Navigate to Project Directory by : Using
cd Hospital-API

After reaching to the this preoject directory yo have to run this following command :

$ npm install
$ nodemon index.js or npm start

Operation check route end point on postman

test5

  • route endpoints :- /reports/:status test5

Folder Structure

Hospital-API
    |               
    |
    |               |--->mongoose.js
    |--->config---->|
    |               |--->passport-jwt-strategy.js
    |
    |                  |-->doctor_controoler.js
    |--->controllers-->|-->patient_controller.js
    |                  |-->report_controller.js
    |
    |               |-->Doctor.js
    |--->models---->|-->Patient.js
    |               |-->Report.js
    |
    |              
    |               |-->doctor.js
    |--->routes---->|-->patient.js
    |               |-->index.js
    |               |-->report.js
    |
    |
    |              
    |
    |-->index.js
    |
    |-->node_modules
    |-->.gitignore
    |-->package.json
    |

🚀 About Me

I'm a junior full stack developer...

who enjoye and love to work on web developement and learning new technology in my free times.

🔗 Links

portfolio linkedin

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.