Skip to main content
Spec: PM-41 Status: ✅ Complete — All 4 Phases (2026-03-29) Last Updated: 2026-03-29

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_*_log tables.
  • 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 by pm.intake_funnel.view.

Event & Data Contracts

Payload shapes: see 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/funnel in spec maps to implementation-time route naming.