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:
- Only authenticated doctors can apply the filters
- 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.
- Each appointment should include:
- Appointment Id
- Doctor Id
- Patient Id
- Patient's Name
- Patient's Phone
- Patient's Email
-
- 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
Filter appointments as Doctor:
As an authenticated doctor, I want to filter appointments, so that I can be prepared.
Feature (Gherkin)
Acceptance Criteria:
Priority: Low
Story Points: 3
Notes: