Skip to content

Doctor Dashboard - Add and Edit Prescription#417

Open
KaustubhK98 wants to merge 6 commits into
masterfrom
kaustubh/prescription-forms
Open

Doctor Dashboard - Add and Edit Prescription#417
KaustubhK98 wants to merge 6 commits into
masterfrom
kaustubh/prescription-forms

Conversation

@KaustubhK98
Copy link
Copy Markdown
Collaborator

Description

  • Fixed the issue where doctors were unable to fetch and view the patient list.
  • Added a dedicated screen on the doctor portal to display all patients.
  • Added UI and functionality for creating prescriptions.
  • Added UI and functionality for editing prescriptions.
  • Added field validations for edit and add prescription forms.
  • Fixed role-based access for prescription actions:
    • Only Doctors can add and edit prescriptions.
    • Nurses and caretakers can view prescriptions but cannot add or edit them.
  • Fixed the issue where assigned nurses were not displayed on the patient detail screen.
  • Improved the Patient Detail screen UI by rearranging elements and removing the unwanted fragment container.
  • Hid the edit patient and assign nurse menu options from the doctor role because these actions are not supported by the backend for doctors.
  • Added loading states during create and edit prescription actions to improve user feedback after pressing the submit button.

Todos

  • Tested and working locally
  • Code follows the style guidelines of this project
  • I have performed a self-review of my code
  • Code changes documented
  • Requested review from >= 2 devs on the team (one frontend and one backend recommended)

How to Test

1. Doctor Patient List

  1. Log in as a doctor.
  2. Open the doctor portal.
  3. Click on the patient list option.
  4. Verify that the list of patients loads successfully.

2. Add Prescription - Doctor Role

  1. Log in as a doctor.
  2. Open any patient details screen.
  3. Verify that the Add Prescription button is visible.
  4. Click on Add Prescription.
  5. Fill in the prescription details.
  6. Submit the form.
  7. Verify that a loading state is shown after pressing submit.
  8. Verify that the prescription is created successfully.
  9. Return to the patient details screen and confirm that the new prescription is visible.

3. Edit Prescription - Doctor Role

  1. Log in as a doctor.
  2. Open a patient who already has a prescription.
  3. Verify that the Edit Prescription button is visible.
  4. Click on Edit Prescription.
  5. Update the prescription details.
  6. Submit the form.
  7. Verify that a loading state is shown after pressing submit.
  8. Verify that the prescription is updated successfully.
  9. Reopen the prescription and confirm that the updated details are displayed correctly.

4. Prescription Access - Nurse Role

  1. Log in as a nurse.
  2. Open the assigned patient details screen.
  3. Verify that prescriptions are visible.
  4. Verify that Add Prescription and Edit Prescription buttons are not visible.
  5. Confirm that the nurse cannot create or edit prescriptions.

5. Prescription Access - Caretaker Role

  1. Log in as a caretaker.
  2. Open the patient details screen.
  3. Verify that prescriptions are visible.
  4. Verify that Add Prescription and Edit Prescription buttons are not visible.
  5. Confirm that the caretaker cannot create or edit prescriptions.

6. Assigned Nurse Display

  1. Log in with a role that can view patient details.
  2. Open the patient detail screen for a patient who has an assigned nurse.
  3. Verify that the assigned nurse’s name is displayed correctly.
  4. Test with a patient who does not have an assigned nurse and verify that the screen handles the error properly.

7. Doctor Menu Restrictions

  1. Log in as a doctor.
  2. Open the patient detail screen.
  3. Open the menu/options section.
  4. Verify that edit patient and assign nurse options are not visible for the doctor role.
  5. Confirm that prescription-related actions are still available for the doctor.

Associated MS Planner Tasks


Known Issues

  • Currently the Patient's list is displayed as a button on the Doctor's dashboard.
  • No known issues identified at the time of testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant