Spec: PM-41 Status: ✅ Complete — All 4 Phases (2026-03-29) Last Updated: 2026-03-29Documentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
Overview
PM-41 adds PM-owned analytics tables (pm_analytics_*), funnel aggregates, risk scores, and dashboard/API surfaces. Persistence for immutable logs is via database triggers (or equivalent synchronous paths) on CE/PM source tables; FW-16 is used for realtime UI subscriptions and downstream notifications (e.g. PM-42), not as the sole write path for logs (see spec Clarifications).
Platform Integration Pattern
- Inbound: CE-28 screening completion, PM-38 appointments, PM-39 waitlist lifecycle — materialized into
pm_analytics_*_logtables. - Outbound: Aggregates and risk events consumed by PM-42 (coordinator workbench); compliance CSV exports may be referenced by GR attestation workflows.
- Tenant isolation: All tables
organization_id+ RLS; dashboard gated bypm.intake_funnel.view.
Event & Data Contracts
| Direction | Name | Purpose |
|---|---|---|
| Inbound (conceptual) | ce_screening_completed, pm_appointment_created, pm_appointment_confirmed, waitlist events | Drive analytics log inserts; exact payloads align with CE-28 / PM-38 / PM-39 integration docs |
| Outbound | pm_funnel_update, pm_high_risk_appointment | Downstream dashboards (PM-42); realtime via FW-16 |
EVENT_CONTRACTS.md and CE-28 Integration, CE-29 Integration as applicable.
API / Edge Surface
- Funnel and exports: Supabase RPC or Edge Function with JWT + org validation; logical shape
GET /api/analytics/pm-41/funnelin spec maps to implementation-time route naming.
Related Documents
- CROSS_CORE_INTEGRATIONS.md — integration matrix
- CONTRACT_VALIDATION_CHECKLIST.md