Permission Reference
Permissions are managed via Platform Foundation → Role Permissions (
pf_role_permissions). Custom roles can be configured via the admin UI.
Payer Directory Setup
Required Fields
Soft Delete vs. Deactivate
Recommendation: Use Deactivate for payers that are no longer contracted. Use Remove only for payers added by mistake with no associated policies.
Insurance Policy Data Model
pm_insurance_policies Schema
Unique Constraint
A composite unique constraint prevents duplicate policies:Eligibility Check Data Model
pm_eligibility_checks Schema
Eligibility checks are append-only in practice — no delete RLS policy exists. Historical checks are retained for audit.
RLS Security Model
All three tables useFORCE ROW LEVEL SECURITY with SECURITY DEFINER helper functions to prevent RLS recursion:
Policy Summary
Phase 2: Real-Time Eligibility (PM-15)
Phase 1 supports manual eligibility entry only. Real-time 270/271 transactions require:- PM-15: Clearinghouse Integration — SFTP/API connectivity to Availity, Change Healthcare, or Trizetto
- AHCCCS Online configuration — organization-level AHCCCS provider credentials stored as secrets
- Electronic Payer IDs configured on all payers in the directory
check_type = 'real_time' flow will:
- Send a 270 inquiry to the clearinghouse
- Parse the 271 response into
benefit_detailsJSONB - Record the check automatically with
request_trace_idfrom the clearinghouse
AHCCCS-Specific Configuration (Deferred to PM-15)
- AHCCCS member ID is stored on
pm_patients.ahcccs_member_id(PM-01) - AHCCCS payer type =
medicaidin the payer directory - AHCCCS is always the payer of last resort (highest
priority_ordernumber) - AHCCCS Online eligibility portal: https://www.healthearizonaplus.gov
Domain Events
pm_eligibility_verified
Published to the platform event bus after every eligibility check insert.
Payload schema:
- CL-01: Update patient chart coverage indicator
- PM-08: Gate claim submission on eligibility status