Skip to main content

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:
If staff try to add the same policy twice, they will see a validation error.

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 use FORCE 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:
  1. PM-15: Clearinghouse Integration — SFTP/API connectivity to Availity, Change Healthcare, or Trizetto
  2. AHCCCS Online configuration — organization-level AHCCCS provider credentials stored as secrets
  3. Electronic Payer IDs configured on all payers in the directory
Once PM-15 is implemented, the check_type = 'real_time' flow will:
  1. Send a 270 inquiry to the clearinghouse
  2. Parse the 271 response into benefit_details JSONB
  3. Record the check automatically with request_trace_id from 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 = medicaid in the payer directory
  • AHCCCS is always the payer of last resort (highest priority_order number)
  • 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:
Downstream consumers (planned):
  • CL-01: Update patient chart coverage indicator
  • PM-08: Gate claim submission on eligibility status