Phase 5 — Settings, Forms & Compliance
PHI access logging, dynamic form builder, and global error boundary land. Tenelix is now audit-ready end-to-end.
Added
- PHI access logging via
PhiAccessObserverand a dedicatedphilog channel. Every read of a patient record emits a structured event — tenant, user, action, timestamp. - Dynamic form builder with auto-versioning on edit-with-submissions. Lifecycle state machine: draft → published → archived.
- Global React
ErrorBoundarywith server-side error reporting viaReportErrorController. - Tenant-aware structured logging across all modules.
- Form lifecycle audit log via
FormLifecycleLogger. - FK guards on
form_submissionsandpatient_form_assignmentsusingON DELETE RESTRICT.
Improved
- Settings hub layout with module cards.
- Clinic profile splits into regional / branding / regulatory sections.
Fixed
- Form clone now correctly preserves field-level visibility flags.