wiki:UseCase02PrototypeImplementation

Version 1 (modified by 236021, 5 days ago) ( diff )

--

UseCase02PrototypeImplementation - Doctor Login / Authentication

Initiating Actor - Doctor

Description

A doctor logs into the Medora healthcare system using their username and password. The system verifies the credentials, checks that the account is active, retrieves the doctor's profile with department and specialization, and grants access to the doctor's portal.

Scenario

  1. Doctor navigates to the Medora login page.
  1. Doctor enters their username and password and submits the login form.
SELECT
  u.user_id,
  u.username,
  u.password,
  u.role,
  u.first_name,
  u.last_name,
  u.is_active
FROM users u
WHERE u.username = 'elena.kirova';
  1. System verifies the account is active and the password matches.
SELECT u.user_id
FROM users u
WHERE u.username = 'elena.kirova'
  AND u.is_active = TRUE;
  1. System retrieves the linked doctor profile with specialization and department.
SELECT
  d.doctor_id,
  d.first_name,
  d.last_name,
  d.email_address,
  ds.specialization_name,
  dep.department_name
FROM doctors d
JOIN doctor_specialization ds ON d.specialization_id = ds.specialization_id
JOIN departments dep ON d.department_id = dep.department_id
WHERE d.doctor_id = (
  SELECT doctor_id FROM users WHERE username = 'elena.kirova'
);
  1. Doctor is authenticated and redirected to their dashboard.

Attachments (3)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.