Changes between Initial Version and Version 1 of UseCase02


Ignore:
Timestamp:
06/12/26 17:43:47 (8 days ago)
Author:
236021
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UseCase02

    v1 v1  
     1= UseCase02 - Doctor Login / Authentication =
     2
     3== Initiating Actor - `Doctor` ==
     4
     5
     6== Description ==
     7A 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.
     8
     9== Scenario ==
     10
     111. Doctor navigates to the Medora login page.
     12
     132. Doctor enters their username and password and submits the login form.
     14
     15{{{
     16#!sql
     17SELECT
     18  u.user_id,
     19  u.username,
     20  u.password,
     21  u.role,
     22  u.first_name,
     23  u.last_name,
     24  u.is_active
     25FROM users u
     26WHERE u.username = 'elena.kirova';
     27}}}
     28
     293. System verifies the account is active and the password matches.
     30
     31{{{
     32#!sql
     33SELECT u.user_id
     34FROM users u
     35WHERE u.username = 'elena.kirova'
     36  AND u.is_active = TRUE;
     37}}}
     38
     394. System retrieves the linked doctor profile with specialization and department.
     40
     41{{{
     42#!sql
     43SELECT
     44  d.doctor_id,
     45  d.specialization,
     46  dep.name AS department_name,
     47  u.first_name,
     48  u.last_name,
     49  u.email
     50FROM doctors d
     51JOIN departments dep ON d.department_id = dep.department_id
     52JOIN users u ON d.user_id = u.user_id
     53WHERE d.user_id = (SELECT user_id FROM users WHERE username = 'elena.kirova');
     54}}}
     55
     565. Doctor is authenticated and redirected to their dashboard.