Assignment For Ajackus
Steps to install:
- Clone the project.
- Open the folder in a terminal, and run
npm install
to install the dependencies. - Start the project using
npm start
. - Coverage folder is included, but to run tests again (with coverage) run
npm test -- --coverage --watchAll
.
Flow Instructions:
- Login using
/login
, and use the credentials given below according to the role. 1 doctor, and 1 patient accounts are already created (Credentials Below). - Doctor can create, edit, delete a patient. Patient list is available.
- Default password set for a patient account when created by a doctor is healthcare.
- Patient can view their own profile, and change the password.
Credentials:
- Doctor: doctor@hotmail.com password
- Patient: patient@hotmail.com healthcare
Possible Errors (or unwanted situations):
- Console error:
unique key error
when viewing the patient list, does not happen all the time. - Diagnoses, and Prescribed Medications are supposed to be required, however was unable to pass the test for some reason, so they are not mandatory for now (Good news for the patient though, they can now be free of a disease).
Note: The API used for backend (https://mockapi.io) is not designed for authentication, or even SQL queries, so a lot of the logic that should be done on the backend had to be done in the frontend here (in the action thunks and so on); all that code will not be required when there is an actual backend present.
Thank you!