Last Updated: 2026-05-28
Constitution Reference: §1 Architecture & Module Boundaries — no direct core-to-core imports; all cross-core via Platform Integration Layer, events, or API contracts.
Overview
The GR (Governance & Compliance) module manages policies, compliance tracking, audits, risk, quality improvement, accreditation, incident reporting, contracts, and procedures. This document is the canonical anchor for all GR integration contracts, cross-core event publisher/consumer mappings, API contracts, and platform layer usage. Related documents:- CROSS_CORE_INTEGRATIONS.md — integration matrix rows for GR
- EVENT_CONTRACTS.md — detailed GR event payload schemas
- CL-GR-CLINICAL-INCIDENT-INTEGRATION.md — bi-directional CL↔GR incident bridge
- IT_INTEGRATION_CONTRACTS.md — IT security incident events consumed by GR
- FM_INTEGRATION_CONTRACTS.md — FM vendor certification events consumed by GR
Events Published by GR
Notes:
- All GR trigger functions that publish to
gr_eventsMUST useSECURITY DEFINER. gr_incident_createdis also documented in CL-GR-CLINICAL-INCIDENT-INTEGRATION.md; follow PHI payload restrictions there.
Events Consumed by GR
Security requirements for all GR consumers:
- Server-side tenant isolation: validate
organization_idagainst JWT claims before writing. - Use
SECURITY DEFINERstored procedures for event-triggered writes. - Log all event consumptions to
pf_audit_logswithuser_id,organization_id,timestamp,correlation_id. - Implement exponential backoff retries; dead-letter queue for max-retry failures.
SAMHSA Grant-Reporting Specs (GR-25-EN-01, GR-28, GR-29, GR-30, GR-31)
The 2026-05-27 care-quality/grant gap memo adds the GR grant-reporting consumer surface. Boundary: CL captures/computes, GR reports. GR never imports CL types — it subscribes to CL events via the Platform Integration Layer. Full pipeline detail (event taxonomy, external submission surfaces, Part 2 gating) lives in CL-PM-GR-CARE-QUALITY-GRANT-INTEGRATION.md.
Notes:
- All grant-reporting tables (
gr_grant_programs,gr_spars_submissions,gr_ppr_reports,gr_teds_records,gr_urs_tables,gr_synar_inspections) are RLS tenant-isolated onorganization_id. - SUD-derived rows are DS4P-aware (CL-63) end-to-end; any payer/grantor-facing export of SUD data routes through CL-11
cl_check_sud_consent()per receiving entity and logs to the CL-11 disclosure log. - GR-28/GR-31 consume CL-51-EN-01 measure values verbatim — no recomputation; package values must equal CL-51-EN-01’s published values exactly (zero drift).
- All jurisdictional variation (state TEDS elements, grant profiles, set-aside floors) is materialized through PF-96.
API Contracts
No GR-owned API contracts are currently defined. The following are candidates for future specification:Platform Layer Usage
PF-15/16/17 adoption is tracked in PF_ADOPTION_STATUS.md.
Cross-Core Data References
GR does not hold foreign keys to other cores (per constitution §1 / ADR-002 restrictions). Cross-core linkage is by UUID reference columns:Implementation Notes for GR-09 (Pending)
The GR-09 Incident Reporting implementation must:- Create
gr_incidentstable with RLS, org isolation, and full audit trail. - Subscribe to
cl_safety_plan_activatedandcl_restraint_event_documentedto auto-create draft incidents. - Publish
gr_incident_createdandincident_createdon incident creation. - Subscribe to
it_security_incident_createdandit_critical_vulnerability_detectedfor IT-originated incidents. - Implement statutory deadline tracking for ARS 46-454, ARS 13-3620, AHCCCS AMPM 1620-O.
- Create
gr_incident_regulatory_reportssub-table for state/AHCCCS report tracking. - Add RLS tests for all new tables in
tests/rls/. - Add E2E tests in
tests/e2e/gr-incident-workflow.test.ts.
See CL-GR-CLINICAL-INCIDENT-INTEGRATION.md for bridge implementation requirements.