Skip to main content

Overview

This guide covers administrative configuration for the MAT/MOUD Tracking module (CL-21).

Quick Reference


Permission Keys

Assign these permissions via Settings > Roles & Permissions: Note: The org_admin role is automatically granted all permissions via the pf_auto_grant_org_admin trigger.

Default Role Assignments


Data Retention

MAT/MOUD records do not support soft delete (deleted_at). This is intentional:
  • 42 CFR Part 2 requires retention of SUD treatment records
  • DELETE operations are restricted to org_admin role only (via RLS)
  • Enrollments can be set to “Discontinued” or “Completed” status instead of deletion

The system enforces 42 CFR Part 2 consent at the RLS (database) level:
  • If a consent_id is linked to an enrollment, that specific consent must be active
  • If no consent_id is set, chart-level SUD consent flags are checked
  • Without valid consent, MAT records are inaccessible (queries return empty)

Future Settings

The following settings are planned for future releases and will be configurable in cl_module_settings:
  • Monitoring cadence defaults — default intervals for UDS, hepatic panels
  • Adherence risk thresholds — missed-dose count triggering alerts
  • Overdue monitoring alert rules — notification timing for overdue items

Database Tables

All tables enforce RLS with FORCE ROW LEVEL SECURITY and multi-tenant isolation via organization_id.

Integration Points


Troubleshooting