Code Monkey home page Code Monkey logo

hospital_api_project's Introduction

Hospital API πŸ“

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

Tech Stack

Client: JAVASCRIPT

Server: Node.js, Express.js, Mongoose, EJS,

πŸ”— Links

Github Link:-

πŸ”— Live Demo

Render Link:-

Folder Structure

Hospital API /

β”‚
β”œβ”€β”€ routes/
β”‚   β”œβ”€β”€ api/v1/doctors.js
β”‚   β”œβ”€β”€ api/v1/index.js
β”‚   β”œβ”€β”€ api/v1/patients.js
β”‚   β”œβ”€β”€ api/v1/reports.js
β”‚   β”œβ”€β”€ api/index.js
|   β”œβ”€β”€ routes/index.js
β”‚
β”œβ”€β”€ controllers/
β”‚   β”œβ”€β”€ api/v1/doctor_controller.js
β”‚   β”œβ”€β”€ api/v1/patient_controller.js
β”‚   β”œβ”€β”€ api/v1/report_controller.js
|   |
β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ doctorModel.js
β”‚   β”œβ”€β”€ patientModel.js
β”‚   β”œβ”€β”€ reportModel.js
|   |
β”œβ”€β”€ index.js
β”œβ”€β”€ package-lock.json
β”œβ”€β”€ package.json
β”œβ”€β”€ README.md

Step 2: install

Install the required Node.js packages by running the following command.

npm install

Set up the MongoDB database using Mongoose. Modify the config.js file in the config directory with your MongoDB connection URL. Create necessary models for the placement cell app in the models directory using Mongoose schema. Implement the required routes and logic in the routes directory to handle Hospital API functionalities.

Step 3: Start the Application

Run the following command to start the server.

node index.js

Step 4: Access the Application

Open your web browser and visit http://localhost:8000 to access the Employee Review System web app.

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 (You can use enums if you want to):

  • Can be either of: [Negative, Travelled-Quarantine, Symptoms-Quarantine, Positive-Admit]

  • Date

  • Required Routes

  • /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

use postman to test the Hospital API

hospital_api_project's People

Contributors

k1chandrasekhar 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.