Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt

Use this file to discover all available pages before exploring further.

Last Updated: 2026-03-29

Revenue Matrix Configuration

The Program–Insurance Revenue Matrix (pm_program_insurance_revenue_matrix) stores estimated per-lead revenue by program type and insurance type.

Columns

ColumnTypeDescription
program_typeTEXTProgram category (e.g. IOP, PHP, Outpatient, Residential)
insurance_typeTEXT (CHECK constraint: medicaid, commercial, uninsured, medicare, other)Insurance category
estimated_per_lead_revenueNUMERICDollar value estimated per converted lead
effective_fromDATEStart of effective period (NULL = always active)
effective_toDATEEnd of effective period (NULL = no end)

How Revenue Estimates Flow

  1. Screening trigger → looks up matrix by (program_type, insurance_type) → writes lead_value_estimated to pm_analytics_revenue_impact
  2. Appointment confirmation → actualizes revenue: confirmedrevenue_realized = estimated; no_showrevenue_lost = estimated
  3. Revenue Impact Widget → aggregates realized vs. lost revenue in the dashboard

Editing the Matrix

Currently configured via SQL or Supabase dashboard:
INSERT INTO pm_program_insurance_revenue_matrix
  (organization_id, program_type, insurance_type, estimated_per_lead_revenue)
VALUES
  ('your-org-id', 'IOP', 'medicaid', 450),
  ('your-org-id', 'PHP', 'commercial', 800);

Dashboard Settings

These settings are stored in pm_module_settings and affect dashboard behavior:
SettingDefaultEffect
ahcccs_compliance_window_hours72Hours within which appointment must be scheduled after screening for AHCCCS compliance
no_show_risk_alert_threshold50Minimum risk score to show in High-Risk Appointments widget
waitlist_abandon_risk_alert_threshold50Minimum risk score for waitlist abandon alerts

Changing Settings

Update via Supabase dashboard or SQL:
UPDATE pm_module_settings
SET ahcccs_compliance_window_hours = 48
WHERE organization_id = 'your-org-id';

Permissions

PermissionGrants
pm.intake_funnel.viewAccess to the Intake Funnel Analytics dashboard, compliance report, and benchmarking views