# Oziris RIS Performance and Eager-Loading Audit

Date: 18 July 2026

## Scope reviewed

- Active and Pending Worklist
- Appointment day, week, and month boards
- Patient directory and patient examination history
- Completed Exams
- Doctor Dashboard and reporting queue
- Administration Dashboard
- Report search, print, PDF, and reporting workspace

## Findings addressed

- Worklist queries filter by appointment state, workflow state, and scheduled date. A composite index now covers that access path.
- Appointment boards filter by intake type and scheduled-date range. A composite index now covers period loading.
- Reporting queues filter by study state, report request, and report state. A composite index now covers the queue.
- Personal reporting metrics filter by signer/preliminary author and timestamp. Dedicated composite indexes now cover both paths.
- Completed Exams and daily completion metrics filter by workflow state and status-update timestamp. A composite index now covers this path.
- MDT dashboards filter open cases by status and meeting time. A composite index now covers this path.
- Security attention metrics filter audit event and creation time. A composite index now covers this path.
- Relations referenced by the reviewed list views are eager-loaded by their controllers. No confirmed relation-per-row N+1 query remained in these paths.
- Patient-directory results and Completed Exams are paginated at 25 records. Doctor and Administration dashboard detail lists use explicit limits.

## Follow-up

The study scheduling form still loads the full patient list to support its legacy select control. Replace that control with a debounced, permission-protected server-side patient search before operating with a large production registry. This requires a coordinated form UX change and is tracked separately rather than being hidden inside the database-index audit.

Production validation should capture slow-query logs and EXPLAIN plans against representative MariaDB data volumes after these indexes are deployed.
