Skip to content

Filter Appointments As Doctor #24

Description

@maikelsalazar

Filter appointments as Doctor:
As an authenticated doctor, I want to filter appointments, so that I can be prepared.

Feature (Gherkin)

Feature: Filter appointments

Background:
  Given I am an authenticated doctor
  And I am on the protected doctor dashboard


Scenario: Filter appointments by criteria
  Given I have appointments booked
  When I apply filters
    - Patient's name (optional)
    - Date (required)
  Then I should receive a filtered list of appointments matching the criteria
  And each appointment should contain:
    - Appointment Id
    - Doctor Id
    - Patient Id
    - Patient's Name
    - Patient's Phone
    - Patient's Email

Scenario: No appointments match filters
  Given I have appointments booked
  When I apply filters that do not match any of my appointments
  Then I should receive an empty list

Scenario: Missing required date filter
  When I leave the date filter empty
  And I apply filters
  Then I should see a validation error message

Acceptance Criteria:

  1. Only authenticated doctors can apply the filters
  2. When filtering appointments
  • Patient's name filter is optional.
  • Patient name matching must be case-insensitive and use contains logic, e.g. "ah" should match "Sarah Lee".
  • Date is required.
  • The date filter matches appointments scheduled on the selected date.
  1. Each appointment should include:
    • Appointment Id
    • Doctor Id
    • Patient Id
    • Patient's Name
    • Patient's Phone
    • Patient's Email
    1. The system must return an empty list when no appointments match the applied filters.
      Priority: Low
      Story Points: 3
      Notes:
  • The backend must ensure to return appointments associated to the authenticated doctor

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions