Changes between Initial Version and Version 1 of UseCase16


Ignore:
Timestamp:
06/14/26 21:01:45 (5 days ago)
Author:
236021
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UseCase16

    v1 v1  
     1= UseCase16 - Lab Technician Login/Authentication =
     2
     3== Initiating Actor - `Lab Technician` ==
     4
     5== Description ==
     6A lab technician logs into the Medora system using their username and password. The system verifies the credentials, checks the account is active, and grants access to the lab overview.
     7
     8== Scenario ==
     9
     101. Lab technician navigates to the Medora login page.
     11
     122. Lab technician enters their username and password and submits the login form.
     13
     14{{{
     15#!sql
     16SELECT
     17  u.user_id,
     18  u.username,
     19  u.password,
     20  u.role,
     21  u.first_name,
     22  u.last_name,
     23  u.is_active
     24FROM users u
     25WHERE u.username = 'darko.milosev';
     26}}}
     27
     283. System verifies the account is active and the password matches.
     29
     30{{{
     31#!sql
     32SELECT u.user_id
     33FROM users u
     34WHERE u.username = 'darko.milosev'
     35  AND u.is_active = TRUE;
     36}}}
     37
     384. System retrieves the linked lab technician profile.
     39
     40{{{
     41#!sql
     42SELECT
     43  lt.technician_id,
     44  lt.user_id,
     45  lt.certification
     46FROM lab_technician lt
     47WHERE lt.user_id = (SELECT user_id FROM users WHERE username = 'darko.milosev');
     48}}}
     49
     505. Lab technician is authenticated and redirected to the lab dashboard.
     51
     52''(No database operation — session/token is application-level)''
     53
     546. System displays all pending lab tests for the technician to process.
     55
     56{{{
     57#!sql
     58SELECT
     59  plt.performed_test_id,
     60  lt.test_name,
     61  u_p.first_name AS patient_first_name,
     62  u_p.last_name AS patient_last_name,
     63  u_d.first_name AS doctor_first_name,
     64  u_d.last_name AS doctor_last_name,
     65  plt.test_date,
     66  plt.notes
     67FROM performed_lab_tests plt
     68JOIN lab_tests lt ON plt.test_id = lt.test_id
     69JOIN patients p ON plt.patient_id = p.patient_id
     70JOIN users u_p ON p.patient_id = u_p.patient_id
     71JOIN doctors d ON plt.doctor_id = d.doctor_id
     72JOIN users u_d ON d.doctor_id = u_d.doctor_id
     73ORDER BY plt.test_date;
     74}}}