🏥 OpenClinic AI Practice Management

Complete 33 Test Scenarios Audit & Verification Report • Executive Board Edition

100.0%
Pass Rate
33
Total Scenarios
33
Verified Pass
0
Failures
📖 User Manual & Help 🌟 Feature Showcase ✉️ Doctor Demo Letter 📊 Download Excel (.xlsx)
User Context Filter:
TC-AUTH-001 Authentication, User Switcher & Password Security 👤 Tested With User: Yes (Staff: Admin)
● PASS - VERIFIED (100%)

Staff User Authentication (Free-Text Login)

🎯 Business Objective: Verify that clinic staff/admin can log in using free-text credentials without selecting from a pre-populated list.
⚙️ Preconditions
Application is running; user is on the login screen or clicks `#login-btn`.
📋 Step-by-Step Actions
1. Open the application URL or click `#login-btn` in the header.
2. In the `#app-login-username` field, type `Admin`.
3. In the `#app-login-password` field, type `password`.
4. Click `#btn-modal-login-submit` ("Sign In").
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - HTTP `200 OK` from `POST /api/login`. - User is authenticated with role `Admin` or `Staff`. - Header displays active user badge and full staff navigation tabs (including `#tab-setup`).
Pass/Fail: Login succeeds; user is granted staff privileges. ---
📸 Visual UI Snapshot / Live Proof Login Modal with Free-Text Username/Password fields
Login Modal with Free-Text Username/Password fields
TC-AUTH-002 Authentication, User Switcher & Password Security 👤 Tested With User: Yes (Patient: Portal User)
● PASS - VERIFIED (100%)

Patient Portal Authentication (Free-Text Email)

🎯 Business Objective: Verify that a registered patient can log in using their email address and portal password.
⚙️ Preconditions
Patient exists in database (e.g. `john.smith@example.com` or `akshi.mishra.bui@gmail.com`).
📋 Step-by-Step Actions
1. Click `#login-btn` to open the authentication modal.
2. In `#app-login-username`, type the patient's registered email (e.g. `akshi.mishra.bui@gmail.com`).
3. In `#app-login-password`, type the patient's portal password.
4. Click `#btn-modal-login-submit`.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - HTTP `200 OK` from `POST /api/login` with `role: "Patient"`. - UI automatically displays `#patient-portal-hub-section` ("Welcome to Your Patient Portal"). - Setup tab (`#tab-setup`) and practice configuration are strictly hidden.
Pass/Fail: Patient authenticates successfully and enters restricted patient view. ---
📸 Visual UI Snapshot / Live Proof Patient Portal Hub isolated from clinic administrative controls
Patient Portal Hub isolated from clinic administrative controls
TC-AUTH-003 Authentication, User Switcher & Password Security 👤 Tested With User: No (System Audit)
● PASS - VERIFIED (100%)

Privacy & RBAC Protection on User Endpoints

🎯 Business Objective: Ensure confidential patient names and emails are never exposed in staff user listings.
⚙️ Preconditions
MariaDB and mock stores contain both staff users and registered patients.
📋 Step-by-Step Actions
1. Dispatch `GET /api/users`.
2. Inspect the returned JSON array of users.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Response contains only practice personnel (Admin, Doctor, Staff). - No patient names, patient IDs, or patient email addresses appear in the response.
Pass/Fail: Zero patient records leaked via `/api/users`. ---
📸 Visual UI Snapshot / Live Proof User Dropdown audited - zero confidential patient accounts leaked
User Dropdown audited - zero confidential patient accounts leaked
TC-AUTH-004 Authentication, User Switcher & Password Security 👤 Tested With User: Yes (Registered User: OTP Request)
● PASS - VERIFIED (100%)

Password Reset - 6-Digit Email OTP Dispatch

🎯 Business Objective: Verify that requesting a password reset generates a 6-digit OTP and delivers it via Brevo HTTPS email.
⚙️ Preconditions
Patient or staff email exists in system.
📋 Step-by-Step Actions
1. Open `#change-password-modal` via `#link-forgot-password` or User menu.
2. Enter registered email address in `#change-pwd-user-input`.
3. Click `#btn-request-otp` ("📧 Send OTP").
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Endpoint `POST /api/auth/request-otp` returns `{"status": "success", "message": "Verification code sent to ..."}`. - Brevo HTTPS API dispatches the email to the recipient with a 6-digit numeric code. - UI button transitions to disabled countdown state; confirmation badge displays masked recipient email.
Pass/Fail: 6-digit OTP generated in memory/database with a 10-minute expiry; email delivered. ---
📸 Visual UI Snapshot / Live Proof Formatted credentials email with Brevo HTTPS 6-digit verification code
Formatted credentials email with Brevo HTTPS 6-digit verification code
TC-AUTH-005 Authentication, User Switcher & Password Security 👤 Tested With User: No (Intruder / Invalid Entry)
● PASS - VERIFIED (100%)

Password Reset - Invalid / Expired OTP Rejection

🎯 Business Objective: Verify that incorrect or expired verification codes are rejected.
⚙️ Preconditions
An active OTP has been requested for an account.
📋 Step-by-Step Actions
1. Enter `000000` or an incorrect code in `#change-pwd-otp`.
2. Enter a new password in `#change-pwd-new` and confirm it in `#change-pwd-confirm`.
3. Click `#btn-submit-change-password`.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Backend returns HTTP `400 Bad Request` with message "Invalid verification code". - Attempt counter increments; password remains unchanged.
Pass/Fail: Password update is blocked; user receives clear error toast. ---
📸 Visual UI Snapshot / Live Proof System blocks incorrect OTP with 400 Bad Request
System blocks incorrect OTP with 400 Bad Request
TC-AUTH-006 Authentication, User Switcher & Password Security 👤 Tested With User: Yes (Registered User: Password Update)
● PASS - VERIFIED (100%)

Password Reset - Valid OTP Confirmation & Re-Login

🎯 Business Objective: Verify that submitting the correct OTP updates the password across memory, MariaDB, and persistent storage.
⚙️ Preconditions
Valid 6-digit code received via email.
📋 Step-by-Step Actions
1. Enter the valid 6-digit OTP in `#change-pwd-otp`.
2. Enter new password `NewSecurePass@2026` in `#change-pwd-new` and `#change-pwd-confirm`.
3. Click `#btn-submit-change-password`.
4. Attempt login with old password (must fail).
5. Attempt login with `NewSecurePass@2026` (must succeed).
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Endpoint `POST /api/auth/reset-password-otp` returns `HTTP 200 OK`. - Modal closes with success notification. - Login with new password succeeds immediately.
Pass/Fail: Old password invalidated; new password active across all storage tiers. ---
📸 Visual UI Snapshot / Live Proof Password updated across memory, MariaDB, and storage
Password updated across memory, MariaDB, and storage
TC-AUTH-007 Top Navigation Bar & Module Tabs 👤 Tested With User: Yes (Authenticated Session: Sign Out)
● PASS - VERIFIED (100%)

User Logout & Session State Teardown

🎯 Business Objective: Verify that logging out clears credentials, resets role, and cleanses the active view.
⚙️ Preconditions
Logged in as Staff or Patient.
📋 Step-by-Step Actions
1. Click `#btn-logout` ("🚪 Sign Out").
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Session tokens/cookies cleared. - Role badge resets to Guest/Signed Out. - UI redirects to the default initial view without residual patient data.
Pass/Fail: Complete session termination without data bleed. --- ## Section 2: Top Navigation Bar & Module Tabs
📸 Visual UI Snapshot / Live Proof Session cleared and role reset to guest
Session cleared and role reset to guest
TC-NAV-001 Top Navigation Bar & Module Tabs 👤 Tested With User: Yes (Staff: Admin)
● PASS - VERIFIED (100%)

Staff Module Navigation

🎯 Business Objective: Verify that clicking top navigation tabs switches active module views correctly.
⚙️ Preconditions
Logged in with Staff or Admin credentials.
📋 Step-by-Step Actions
1. Click `#tab-summary` -> Verify Patient Info Summary renders.
2. Click `#tab-appointment` -> Verify Operatory Scheduling Grid renders.
3. Click `#tab-chart` -> Verify 3D Tooth Chart canvas renders.
4. Click `#tab-billing` -> Verify Aging Table & Ledger render.
5. Click `#tab-treatment` -> Verify Treatment Plan phases render.
6. Click `#tab-perio` -> Verify 6-point perio probing grid renders.
7. Click `#tab-setup` -> Verify Practice Setup options render.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Active tab CSS class updates; corresponding DOM section becomes visible. - Previous section hides without layout distortion.
Pass/Fail: All 7 tabs switch seamlessly within 100ms. ---
📸 Visual UI Snapshot / Live Proof Top Navigation Bar switching across all 7 practice modules
Top Navigation Bar switching across all 7 practice modules
TC-NAV-002 Patient Selection & Directory Management 👤 Tested With User: Yes (Patient: Portal User)
● PASS - VERIFIED (100%)

Patient RBAC Restriction on Admin Tabs

🎯 Business Objective: Verify that patient accounts cannot see or access `#tab-setup` or administrative tools.
⚙️ Preconditions
Logged in as a Patient.
📋 Step-by-Step Actions
1. Inspect the top navigation bar.
2. Attempt to execute `window.navigateToModule('setup')` in the browser console.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Setup tab is hidden (`display: none` or omitted from DOM). - Calling navigation function redirects or rejects with permission alert ("Access restricted to practice staff").
Pass/Fail: Zero unauthorized module access for patient role. --- ## Section 3: Patient Selection & Directory Management
📸 Visual UI Snapshot / Live Proof Setup tab hidden; permission check restricts patient to personal record
Setup tab hidden; permission check restricts patient to personal record
TC-DIR-001 Patient Selection & Directory Management 👤 Tested With User: Yes (Staff: Patient Search)
● PASS - VERIFIED (100%)

Real-Time Patient Search

🎯 Business Objective: Verify real-time search filtering in the Patient Directory.
⚙️ Preconditions
Multiple patients loaded in the system.
📋 Step-by-Step Actions
1. Focus the search input `#global-patient-search`.
2. Type `John`.
3. Clear and type `501`.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Table instantly filters to matching names or PatNum values. - Irrelevant rows are hidden without full page reload.
Pass/Fail: Search results update smoothly under 200ms debounce. ---
📸 Visual UI Snapshot / Live Proof Search bar real-time debounce filtering patient rows
Search bar real-time debounce filtering patient rows
TC-DIR-002 Patient Selection & Directory Management 👤 Tested With User: Yes (Staff: Patient Context)
● PASS - VERIFIED (100%)

Patient Row Selection & Context Binding

🎯 Business Objective: Verify that clicking a patient row sets global patient context across all modules.
⚙️ Preconditions
Patient directory is displayed.
📋 Step-by-Step Actions
1. Click on patient row for `John Smith (PatNum #1)`.
2. Switch to `#tab-chart`, `#tab-billing`, and `#tab-appointment`.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Global context `currentSelectedPatient.pat_num` equals `1`. - Tooth Chart loads tooth notes for John Smith. - Billing ledger displays John Smith's transactions and balance.
Pass/Fail: Context remains synced across tab transitions. ---
📸 Visual UI Snapshot / Live Proof Patient #1 John Smith context bound across Chart, Sched, Billing
Patient #1 John Smith context bound across Chart, Sched, Billing
TC-DIR-003 Patient Selection & Directory Management 👤 Tested With User: Yes (Staff: New Registration)
● PASS - VERIFIED (100%)

New Patient Registration & Welcome Email Dispatch

🎯 Business Objective: Verify creating a new patient automatically provisions portal credentials and dispatches welcome email.
⚙️ Preconditions
Staff member has `#new-patient-modal` open.
📋 Step-by-Step Actions
1. Enter First Name `Alexander`, Last Name `Wright`, Email `alex.wright@example.com`, Phone `555-0199`.
2. Click Submit.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - HTTP `200/201` from `POST /api/patient/create`. - Patient is assigned next PatNum in sequence. - Brevo HTTPS API dispatches portal welcome email containing temporary password. - UI displays Credentials Modal with "Copy Credentials" button.
Pass/Fail: Record persisted; credentials delivered via email. ---
📸 Visual UI Snapshot / Live Proof Welcome registration email formatted with stacked username & temporary password pills
Welcome registration email formatted with stacked username & temporary password pills
TC-DIR-004 Patient Profile Summary & Clinical Export 👤 Tested With User: Yes (Staff: International Patient)
● PASS - VERIFIED (100%)

International Address Formatting & Country Selector

🎯 Business Objective: Verify international patients support country-specific postal codes and addresses.
⚙️ Preconditions
Patient registration or edit modal open.
📋 Step-by-Step Actions
1. Toggle `#btn-international-toggle`.
2. Select Country `United Kingdom`.
3. Enter Address `10 Downing Street`, City `London`, Postcode `SW1A 2AA`.
4. Save patient.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Patient record stores country `United Kingdom` and UK postal format. - Profile header and clinical report display `10 Downing Street, London SW1A 2AA • United Kingdom`.
Pass/Fail: International address saved without US zip code validation errors. --- ## Section 4: Patient Profile Summary & Clinical Export
📸 Visual UI Snapshot / Live Proof International address and country format displayed without errors
International address and country format displayed without errors
TC-CLIN-001 Patient Profile Summary & Clinical Export 👤 Tested With User: Yes (Staff: Print Report)
● PASS - VERIFIED (100%)

Printable Clinic Report Generation

🎯 Business Objective: Verify generating the official printable Clinic Health Report in a new window.
⚙️ Preconditions
A patient with recorded allergies, medications, and consultations is selected.
📋 Step-by-Step Actions
1. Click `#btn-print-clinic-report` ("🖨️ Print Clinic Report").
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - New browser window opens displaying the formatted Clinic Health Report. - Contains OpenClinic AI banner, patient demographic summary, allergies table, medications, doctor notes, and signature line. - Triggers print dialog or provides Print / Close buttons.
Pass/Fail: Report renders completely without JavaScript console errors. ---
📸 Visual UI Snapshot / Live Proof Official certified Clinical Health Report in print window
Official certified Clinical Health Report in print window
TC-CLIN-002 Patient Profile Summary & Clinical Export 👤 Tested With User: Yes (Staff: Email Report)
● PASS - VERIFIED (100%)

Email Clinical Health Report Dispatch

🎯 Business Objective: Verify emailing the official Clinical Report directly to the patient via Brevo.
⚙️ Preconditions
Patient #1 selected; Brevo API key configured.
📋 Step-by-Step Actions
1. Click `#btn-email-clinic-report` on the Patient Profile Summary bar.
2. Confirm recipient email in prompt modal (e.g. `akshi.mishra.bui@gmail.com`).
3. Click OK.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Button transitions to `⏳ Sending Email...`. - Backend endpoint `POST /api/patient/1/email-clinic-report` returns `status: success`. - Brevo dispatches certified clinical summary email with responsive styling. - Alert displays `✅ Official Clinical Report successfully emailed!`.
Pass/Fail: Email arrives in recipient inbox with correct demographics and medical register. ---
📸 Visual UI Snapshot / Live Proof Certified clinical record email delivered via Brevo HTTPS
Certified clinical record email delivered via Brevo HTTPS
TC-CLIN-003 Medical History & Safety Register 👤 Tested With User: Yes (Staff: Resend Credentials)
● PASS - VERIFIED (100%)

Resend Patient Portal Welcome Email

🎯 Business Objective: Verify manual re-dispatch of portal credentials from the Patient Profile bar.
⚙️ Preconditions
Patient selected with valid email on file.
📋 Step-by-Step Actions
1. Click `#btn-resend-portal-email` ("✉️ Resend Portal Email").
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Backend executes `POST /api/patient/{pat_num}/resend-email`. - Generates/refreshes credentials and sends welcome email via Brevo. - UI displays alert with target username.
Pass/Fail: HTTP 200 returned; welcome email received. --- ## Section 5: Medical History & Safety Register
📸 Visual UI Snapshot / Live Proof Formatted credentials email with stacked username and password pills
Formatted credentials email with stacked username and password pills
TC-MED-001 Medical History & Safety Register 👤 Tested With User: Yes (Clinical Staff: Add Allergy)
● PASS - VERIFIED (100%)

Allergy Entry & Active Status Highlighting

🎯 Business Objective: Verify adding an allergy with reaction and active status highlighting.
⚙️ Preconditions
Patient Info tab active; Medical History card visible.
📋 Step-by-Step Actions
1. Click `#btn-add-allergy`.
2. Enter Allergen `Amoxicillin`, Reaction `Severe rash & facial swelling`.
3. Ensure `#allergy-status-badge` is set to `Active`.
4. Click `#btn-save-medical-history`.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Allergy record saved. - Active allergen displays with bold red styling and clinical alert icon. - Included in subsequent Clinical Report exports.
Pass/Fail: Record persisted in MariaDB / database mock. ---
📸 Visual UI Snapshot / Live Proof Active allergen with severe reaction highlighted with red safety pill
Active allergen with severe reaction highlighted with red safety pill
TC-MED-002 Medical History & Safety Register 👤 Tested With User: Yes (Clinical Staff: Safety Check)
● PASS - VERIFIED (100%)

NKDA Fallback Display

🎯 Business Objective: Verify that patients with no recorded allergies display "No Known Drug Allergies (NKDA)".
⚙️ Preconditions
Patient with empty allergy list selected.
📋 Step-by-Step Actions
1. View Medical History card and generate Clinic Report.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Allergy table displays formatted note: `No known allergies recorded (NKDA)`.
Pass/Fail: Clear indicator displayed; no blank tables. ---
📸 Visual UI Snapshot / Live Proof No Known Drug Allergies (NKDA) confirmation note
No Known Drug Allergies (NKDA) confirmation note
TC-MED-003 Appointments & Operatory Scheduling Grid 👤 Tested With User: Yes (Clinical Staff: Safety Flag)
● PASS - VERIFIED (100%)

Prophylactic Pre-Medication Safety Flag

🎯 Business Objective: Verify toggling the Pre-Medication Required checkbox generates critical clinical warnings.
⚙️ Preconditions
Patient selected in Patient Info tab.
📋 Step-by-Step Actions
1. Check `#med-premedicate-checkbox` ("⚠️ Pre-Medication Required").
2. Click `#btn-save-medical-history`.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Profile header and Clinical Report highlight prominent warning banner: `⚠️ PRE-MEDICATION REQUIRED: Patient requires prophylactic antibiotic prior to dental treatment.`
Pass/Fail: Premedication flag saved and highlighted in red across summary and exports. --- ## Section 6: Appointments & Operatory Scheduling Grid
📸 Visual UI Snapshot / Live Proof Prominent warning: PRE-MEDICATION REQUIRED prior to dental treatment
Prominent warning: PRE-MEDICATION REQUIRED prior to dental treatment
TC-SCHED-001 Appointments & Operatory Scheduling Grid 👤 Tested With User: Yes (Staff: Schedule Navigation)
● PASS - VERIFIED (100%)

Operatory Schedule Date Navigation

🎯 Business Objective: Verify selecting dates in the calendar reloads daily operatory bookings.
⚙️ Preconditions
In `#tab-appointment`.
📋 Step-by-Step Actions
1. Pick a date using `#appt-calendar-picker`.
2. Click `#btn-today-appt` ("Today").
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Operatory columns (Chairs 1–5) update with scheduled consultations for the selected day. - Clicking "Today" restores current calendar day view.
Pass/Fail: Calendar grid synchronizes with database query for target date. ---
📸 Visual UI Snapshot / Live Proof Operatory columns 1 to 5 synchronized with selected calendar date
Operatory columns 1 to 5 synchronized with selected calendar date
TC-SCHED-002 3D Interactive Tooth Chart & Procedures 👤 Tested With User: Yes (Staff: Consultation Booking)
● PASS - VERIFIED (100%)

Booking a New Consultation

🎯 Business Objective: Verify creating a new dental consultation assigns chair and provider correctly.
⚙️ Preconditions
Scheduling tab open.
📋 Step-by-Step Actions
1. Click `#btn-new-appointment`.
2. Select Patient `John Smith`, Operatory `2`, Provider `Dr. Smith`, Date/Time `2026-09-10 10:00 AM`.
3. Enter Procedure `Comprehensive Oral Evaluation & Prophy`.
4. Submit booking.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - `POST /api/appointments/create` returns `HTTP 200/201`. - New appointment card appears in Operatory 2 column.
Pass/Fail: Appointment persisted and visible on grid. --- ## Section 7: 3D Interactive Tooth Chart & Procedures
📸 Visual UI Snapshot / Live Proof New appointment booked and rendered on operatory grid
New appointment booked and rendered on operatory grid
TC-CHART-001 3D Interactive Tooth Chart & Procedures 👤 Tested With User: Yes (Dental Provider: Tooth Chart)
● PASS - VERIFIED (100%)

3D Tooth Selection & Surface Highlighting

🎯 Business Objective: Verify selecting a tooth in the arch enables surface tagging.
⚙️ Preconditions
In `#tab-chart`.
📋 Step-by-Step Actions
1. Click Tooth `#14` in the tooth grid.
2. Click surface buttons `#surface-m`, `#surface-o`, `#surface-d`.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Tooth 14 highlights in the 3D arch canvas. - Surface indicator displays `MOD`.
Pass/Fail: Selected tooth and surfaces update in state. ---
📸 Visual UI Snapshot / Live Proof Tooth #14 selected in 3D arch with MOD surface tags applied
Tooth #14 selected in 3D arch with MOD surface tags applied
TC-CHART-002 3D Interactive Tooth Chart & Procedures 👤 Tested With User: Yes (Dental Provider: Arch Toggle)
● PASS - VERIFIED (100%)

Adult vs. Primary (Pediatric) Tooth Mode Toggle

🎯 Business Objective: Verify toggling primary teeth switches arch between 1–32 and A–T.
⚙️ Preconditions
In `#tab-chart`.
📋 Step-by-Step Actions
1. Click `#btn-toggle-primary-teeth`.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Tooth labels transform to pediatric letter system (`A` through `T`). - Clicking again restores adult numbered system (`1` through `32`).
Pass/Fail: Complete numbering toggle without rendering crash. ---
📸 Visual UI Snapshot / Live Proof Primary teeth toggle switching between adult 1-32 and pediatric A-T
Primary teeth toggle switching between adult 1-32 and pediatric A-T
TC-CHART-003 Invoice & Billing Ledger Operations 👤 Tested With User: Yes (Dental Provider: Record Proc)
● PASS - VERIFIED (100%)

Record Procedure & Ledger Synchronization

🎯 Business Objective: Verify recording a completed procedure posts to both tooth chart history and financial ledger.
⚙️ Preconditions
Tooth 14 selected with procedure `Resin Composite - 3 Surfaces (D2393)`.
📋 Step-by-Step Actions
1. Click `#btn-record-procedure`.
2. Navigate to `#tab-billing`.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Procedure saved in tooth history log. - Procedure fee ($220.00) appears as a debit charge in the Billing Ledger. - Patient balance increases accordingly.
Pass/Fail: Clinical chart and financial ledger remain in sync. --- ## Section 8: Invoice & Billing Ledger Operations
📸 Visual UI Snapshot / Live Proof Completed procedure logged to chart and synced to billing ledger ($220.00)
Completed procedure logged to chart and synced to billing ledger ($220.00)
TC-BILL-001 Invoice & Billing Ledger Operations 👤 Tested With User: Yes (Billing Staff: Aging Breakdown)
● PASS - VERIFIED (100%)

Financial Aging Breakdown Calculation

🎯 Business Objective: Verify account aging buckets calculate balances correctly (0–30, 31–60, 61–90, 90+ days).
⚙️ Preconditions
In `#tab-billing` for a patient with open charges.
📋 Step-by-Step Actions
1. Review the aging cards atop the billing module.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Aging boxes sum transactions based on date age. - Net balance equals `Total Balance - Est Ins Pending = Patient Portion Due`.
Pass/Fail: Totals match individual transaction sums. ---
📸 Visual UI Snapshot / Live Proof Aging summary cards: 0-30, 31-60, 61-90, 90+ days calculation
Aging summary cards: 0-30, 31-60, 61-90, 90+ days calculation
TC-BILL-002 Invoice & Billing Ledger Operations 👤 Tested With User: Yes (Billing Staff: Post Payment)
● PASS - VERIFIED (100%)

Post Patient Payment

🎯 Business Objective: Verify applying a payment reduces total balance and records payment entry.
⚙️ Preconditions
In `#tab-billing`.
📋 Step-by-Step Actions
1. Click `#btn-billing-payment` ("💳 Payment ▾").
2. Enter Amount `$150.00`, Payment Type `Credit Card`, Note `Copay payment`.
3. Submit payment.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - `POST /api/account/payment` returns `HTTP 200`. - Payment appears in ledger in green credit text (`-$150.00`). - Total balance reflects the credit immediately.
Pass/Fail: Ledger recalculates balance due accurately. ---
📸 Visual UI Snapshot / Live Proof Payment entry (-$150.00) posted in green credit text; balance updated
Payment entry (-$150.00) posted in green credit text; balance updated
TC-BILL-003 Invoice & Billing Ledger Operations 👤 Tested With User: Yes (Billing Staff: Statement Modal)
● PASS - VERIFIED (100%)

Send Statement Modal via Email Channel

🎯 Business Objective: Verify that selecting Email channel in the statement modal delivers email and logs statement.
⚙️ Preconditions
Statement modal `#statement-modal` open.
📋 Step-by-Step Actions
1. Check `#stmt-mode-email` (checked by default).
2. Select Statement Category `Standard Account Statement`.
3. Enter custom note `Thank you for choosing our practice`.
4. Click `#btn-statement-submit` ("Send Statement").
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Statement email dispatched via Brevo HTTPS API to patient's email. - Statement logged in database ledger table with `DateSent`, `Type: Standard Statement via Email`, and `Note`. - Modal closes with success alert.
Pass/Fail: Statement logged in ledger and delivered to inbox. ---
📸 Visual UI Snapshot / Live Proof Statement modal with Email channel checked; statement logged to ledger
Statement modal with Email channel checked; statement logged to ledger
TC-BILL-004 Dedicated Patient Portal (Self-Service View) 👤 Tested With User: Yes (Billing Staff: Quick Email)
● PASS - VERIFIED (100%)

Quick Email Billing Statement Dispatch

🎯 Business Objective: Verify one-click billing statement dispatch from the billing toolbar.
⚙️ Preconditions
In `#tab-billing`.
📋 Step-by-Step Actions
1. Click `#btn-billing-email-statement` ("📧 Email Statement").
2. Confirm recipient email in prompt.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Endpoint `POST /api/patient/{pat_num}/email-billing-statement` returns `status: success`. - Statement email arrives with aging breakdown table, balance hero card, itemized ledger rows, and remittance note. - Ledger automatically refreshes showing newly logged statement row.
Pass/Fail: Instant delivery and automatic ledger row creation. --- ## Section 9: Dedicated Patient Portal (Self-Service View)
📸 Visual UI Snapshot / Live Proof One-click 'Email Statement' toolbar button delivers via Brevo
One-click 'Email Statement' toolbar button delivers via Brevo
TC-PORTAL-001 Dedicated Patient Portal (Self-Service View) 👤 Tested With User: Yes (Patient: Self-Service Hub)
● PASS - VERIFIED (100%)

Patient Portal Hub Rendering & Security

🎯 Business Objective: Verify that patient users land on the dedicated self-service hub without access to practice administration.
⚙️ Preconditions
Authenticated with Patient credentials.
📋 Step-by-Step Actions
1. Observe dashboard layout upon login.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Displays `#patient-portal-hub-section` with welcoming message and portal module cards: 1. My Profile & Address 2. My Medical Info & Allergies 3. My Scheduled Appointments 4. Generate Clinic Report - Practice Management modules grid is hidden. - Setup tab is completely removed from navigation.
Pass/Fail: Strict RBAC confinement to personal health record. ---
📸 Visual UI Snapshot / Live Proof Restricted self-service hub with personal profile, med info, appointments
Restricted self-service hub with personal profile, med info, appointments
TC-PORTAL-002 Dedicated Patient Portal (Self-Service View) 👤 Tested With User: Yes (Patient: Self-Service Report)
● PASS - VERIFIED (100%)

Self-Service Clinical Report Email

🎯 Business Objective: Verify patient can trigger email dispatch of their own clinical record.
⚙️ Preconditions
Logged into Patient Portal.
📋 Step-by-Step Actions
1. Click `#btn-patient-email-report` ("📧 Email Report") in portal banner.
2. Confirm target email address.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Button indicates loading state. - Certified clinical health report emailed to patient's registered inbox. - Confirmation alert displayed upon successful Brevo dispatch.
Pass/Fail: Report dispatched to patient's own verified email. ---
📸 Visual UI Snapshot / Live Proof Patient self-service 'Email Report' dispatches clinical record to inbox
Patient self-service 'Email Report' dispatches clinical record to inbox
TC-PORTAL-003 System Setup & Administration 👤 Tested With User: Yes (Patient: Self-Service Stmt)
● PASS - VERIFIED (100%)

Self-Service Billing Statement Email

🎯 Business Objective: Verify patient can trigger email dispatch of their own account statement and balances.
⚙️ Preconditions
Logged into Patient Portal.
📋 Step-by-Step Actions
1. Click `#btn-patient-email-statement` ("💳 Email Statement") in portal banner.
2. Confirm target email address.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Itemized billing statement with aging breakdown and payment options emailed to patient. - Alert informs patient of successful dispatch.
Pass/Fail: Statement delivered to patient's verified email. --- ## Section 10: System Setup & Administration
📸 Visual UI Snapshot / Live Proof Patient self-service 'Email Statement' dispatches account ledger to inbox
Patient self-service 'Email Statement' dispatches account ledger to inbox
TC-SETUP-001 System Setup & Administration 👤 Tested With User: Yes (Administrator: Practice Settings)
● PASS - VERIFIED (100%)

Practice Information & Preferences Persistence

🎯 Business Objective: Verify updating practice details saves to preference table and reflects globally.
⚙️ Preconditions
Logged in as Admin; `#tab-setup` active.
📋 Step-by-Step Actions
1. Navigate to Practice Information.
2. Update Clinic Name or Contact Phone.
3. Click Save.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - `POST /api/preferences` returns `HTTP 200`. - Header branding and report headers update to reflect new clinic details.
Pass/Fail: Values persisted across page reloads. ---
📸 Visual UI Snapshot / Live Proof Practice settings updated and reflected across global branding
Practice settings updated and reflected across global branding
TC-SETUP-002 System Setup & Administration 👤 Tested With User: Yes (Administrator: Audit Logs)
● PASS - VERIFIED (100%)

Email Dispatcher Audit Logs Inspection

🎯 Business Objective: Verify administrative audit log records all outbound Brevo and SMTP deliveries.
⚙️ Preconditions
Clinical report or statement has been emailed.
📋 Step-by-Step Actions
1. Open Setup -> Email Logs or inspect `opendental_api/email_logs.json`.
🎯 Expected Outcome & Pass/Fail Criteria
Expected: - Log contains entry with `to_email`, `subject`, `timestamp`, `delivered_via: https://api.brevo.com`, and `status`.
Pass/Fail: 100% of outbound communications audited with delivery metadata.
📸 Visual UI Snapshot / Live Proof Outbound email audit log displaying Brevo HTTPS delivery records
Outbound email audit log displaying Brevo HTTPS delivery records
Snapshot Preview