GithubHelp home page GithubHelp logo

hospital_api__cn's Introduction

Hostpital_API__CN

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 two types of Users, Doctors and Patients. Doctors can log in. Doctors can register patients in the app(using phone number). Doctors can create reports of patients.

Installation

  1. Clone this repository
https://github.com/amanpatel23/Hospital_API__CN
  1. Install the dependencies
npm install
  1. run the application
npm start

Routes

  1. Route for registering the doctor. It'll require three form fields, email, username and password. And email should be unique for each doctor.
POST: localhost:8000/api/v1/doctors/register
  1. Route for the doctor login. It'll require two form fields, email and password. It returns the JWT token, which is used for the authorization.
POST: localhost:8000/api/v1/doctors/login
  1. Route for registering the patient. It'll require the JWT token for the authorization and two form fields phone and name. And phone should be of length 10.
POST: localhost:8000/api/v1/patients/register
  1. Route for creating a report of the patient. It'll require the JWT token for the authorization, patient_id as the string param and status as the only form filed. And status can only take any one of these four values Negative, Travelled-Quarantine, Symptoms-Quarantine and Positive-Admit.
POST: localhost:8000/api/v1/patients/:id/create_report
  1. Route for getting all the reports of a patient. It'll only take patient_id as the string param.
GET: localhost:8000/api/v1/patients/:id/all_reports
  1. Route for getting all the patient reports that has a particular status. It'll only take status as the string param.
GET: localhost:8000/api/v1/reports/:status

hospital_api__cn's People

Contributors

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