= UseCase01PrototypeImplementation - Patient Login / Authentication = == Initiating Actor - `Patient` == == Description == A patient logs into the Medora healthcare system using their EMBG and password. The system verifies the credentials, checks that the account is active, and grants access to the patient portal. == Scenario == 1. Patient navigates to the Medora login page. [[Image(Screenshot 2026-06-14 231855.png , width=100%)]] 2. Patient enters their EMBG as username and then their password and clicks Login. [[Image(Screenshot 2026-06-14 231346.png, width=100%)]] {{{ #!sql SELECT u.user_id, u.password, u.role, u.first_name, u.last_name, u.is_active FROM users u JOIN patients p ON p.user_id = u.user_id WHERE p.embg = '1402994123456' AND u.is_active = TRUE; }}} 3. System retrieves the linked patient's profile. {{{ #!sql SELECT p.patient_id, p.date_of_birth, p.gender, p.phone_number, p.embg FROM patients p WHERE p.user_id = (SELECT user_id FROM patients WHERE embg = '1402994123456'); }}} 4. Patient is authenticated and redirected to their dashboard. [[Image(Screenshot 2026-06-14 231437.png​ , width=100%)]]