- 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]
- Register a Doctor:
[POST]: /api/v1/doctors/register - Login for Doctor:
[POST]: /api/v1/doctors/login - Register a patient:
[POST]: /api/v1/patients/register - Create Patient report:
[POST]:/api/v1/patients/:id/create_report - Fetch All Reports of a Patient
[GET]: /api/v1/patients/:id/all_reports - Fetch All Reports Based on a Status:
[GET]: /api/v1/reports/:status
I'm a full stack developer...