The Compliance Report screen displays aggregate consent compliance statistics for Substance Use Disorder (SUD) records under 42 CFR Part 2, accessible at routeDocumentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
/cl/compliance-report.
Overview
The page usesPermissionGate with cl.compliance_report.view to control access, rendering a fallback message “You do not have permission to view compliance reports.” when the permission is absent. The main content is rendered by DashboardContent, which calls useComplianceStats. That hook invokes the cl_part2_compliance_stats Supabase RPC function with p_org_id set to the current organization’s ID. The RPC returns aggregate counts only; no patient identifiers are returned or displayed. Five metric cards are rendered: SUD Charts, Active Consents, Consent Coverage (as a percentage with one decimal place), Disclosures, and Redisclosures. An “About This Report” card beneath the metrics states that no patient identifiers are shown, consistent with 42 CFR Part 2 requirements, and that all data is scoped to the organization. A loading skeleton of five cards is shown while data loads. If the RPC returns an error, an error card is shown.
Who it’s for
Requires permissioncl.compliance_report.view (enforced by PermissionGate in the component and by RequirePermission in the route at /cl/compliance-report).
Before you start
- You must hold the
cl.compliance_report.viewpermission. - Data is returned by the
cl_part2_compliance_statsdatabase RPC; if the RPC is unavailable or returns an error, an error card is displayed.
Steps
Open the Compliance Report screen
Navigate to
/cl/compliance-report. A skeleton of five metric cards is shown while the cl_part2_compliance_stats RPC is called.Review the five aggregate metrics
The five cards display: SUD Charts, Active Consents, Consent Coverage (%), Disclosures, and Redisclosures. All values are organization-scoped aggregate counts — no patient identifiers are shown.
Key concepts
Aggregate-only design
Aggregate-only design
The component comment and the “About This Report” card both state that no patient identifiers are displayed. The RPC
cl_part2_compliance_stats returns only aggregate counts. This design is described as consistent with 42 CFR Part 2 requirements — SME should confirm.Error state
Error state
If
useComplianceStats returns an error, the metric cards are replaced with a single card showing “Unable to load compliance statistics. Please try again later.”Zero-value defaults
Zero-value defaults
If the RPC returns no rows, all five metrics default to zero (
sudChartCount: 0, activeConsentCount: 0, consentCoveragePct: 0, disclosureCount: 0, redisclosureCount: 0).Related
Clinical
Overview of the Clinical core.
Governance & parity
Documentation coverage and governance.
This page documents shipped product behavior. It is not medical, legal, or
billing advice. Verify against your organization’s policies and applicable
regulations before using it for clinical, compliance, or billing decisions.
Protected health information (PHI) shown in the product is governed by your
tenant’s access controls and is never exposed in this documentation.
Documentation sources
Documentation sources
- src/routes/cl.tsx
- src/cores/cl/pages/Part2ComplianceDashboardPage.tsx
- src/cores/cl/hooks/useComplianceStats.ts