specs/pf/specs/PF-96-medicaid-state-compliance-configuration.md
Owner: PF (Platform Foundation)
Created: 2026-03-29
Integration Overview
PF-96 provides the jurisdiction profile system — a multi-tier configuration layer that decouples state-specific Medicaid compliance rules from hardcoded constants. It is consumed by CL, PM, and PF features via a resolution function and frontend hook.Platform Integration Layer
Location:src/platform/jurisdiction/
Public API:
Edge Function Helper:
Event Contracts
Events Published
pf_jurisdiction_profile_changed
- Publisher: PF-96 (on org/site jurisdiction config change)
- Subscribers: CL-02, CL-04, CL-40, PM-07, PM-08, PM-41, PF-91
-
Payload Schema:
- Status: ✅ Complete
Events Consumed
API Contracts
RPC Functions
pf_resolve_jurisdiction_profile(p_org_id UUID, p_site_id UUID DEFAULT NULL)
- Type: PostgreSQL RPC (SECURITY DEFINER)
- Returns:
JSONB— Merged profile with{ profile_id, state_code, program_code, display_name, clinical, billing, compliance } - Consumers: All CL/PM features, PF-91 compliance dashboard, edge functions
- Resolution Order: Federal baseline → State profile → Org overrides → Site overrides
- Status: ✅ Complete
Consumer Integration Points
Security
- RLS: All three tables have RLS + FORCE enabled
- Profile access: All authenticated users can read active profiles (shared reference data)
- Config access: Org-scoped via
pf_has_org_access(); admin writes viapf_has_org_role() - Federal baseline enforcement:
pf_validate_jurisdiction_override()trigger prevents weakening federal requirements - No PHI: Profiles contain configuration data only; no patient data