0% found this document useful (0 votes)
33 views2 pages

Test 2 - Hospital API

The document outlines designing a server-side API for a hospital to manage COVID-19 patient and doctor data using Node.js and MongoDB, including registering and authenticating doctors, registering patients, creating patient reports, and retrieving reports by status or for a specific patient. The API needs routes for doctor registration and login, patient registration, creating and retrieving patient reports, and filtering reports by status, with schemas and authentication implemented thoughtfully based on the provided requirements. Extra points are given for code comments, a project setup readme, and a scalable folder structure separating models, controllers, and routes.

Uploaded by

Ankit Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views2 pages

Test 2 - Hospital API

The document outlines designing a server-side API for a hospital to manage COVID-19 patient and doctor data using Node.js and MongoDB, including registering and authenticating doctors, registering patients, creating patient reports, and retrieving reports by status or for a specific patient. The API needs routes for doctor registration and login, patient registration, creating and retrieving patient reports, and filtering reports by status, with schemas and authentication implemented thoughtfully based on the provided requirements. Extra points are given for code comments, a project setup readme, and a scalable folder structure separating models, controllers, and routes.

Uploaded by

Ankit Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Hospital API

LEVEL 3

You are required to complete the following task in a max of 5 hours. [Ideal completion time: 2.5 hours]

- Design the server side for a hospital Only the API needs to be designed
- Tech Stack: Node.js & Mongo DB
- Feel free to use any libraries (you should be very clear on how it works conceptually)

Extra Points:
- Well commented code
- Readme on how to setup the project on local system
- Scaleable folder structure (separate models, controllers and routes)

Task
- Theme:
- 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 (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
- Decide the fields and schemas on your own, smartly
- Decide which routes need to be protected by authentication

Free Hints
- USE PEN AND PAPER TO CREATE SCHEMAS BEFORE WRITING CODE
- WORK ON ONE API AT A TIME, DON’T THINK ABOUT THE COMPLETE APP TOGETHER
To Submit:
- Record a video (max 3 minutes) with the following details (and upload it to drive/youtube with
public access, VIDEO SHOULD BE ACCESSIBLE BY ANYONE):
- Explain through the folder structure (what is placed where and why)
- Explain the running code using Postman
- Upload the project files on github.com
- SUBMISSIONS WITHOUT VIDEO WILL NOT BE EVALUATED

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy