> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Clearinghouse Enrollments

> Manage payer enrollment status for clearinghouse connectivity and create new enrollments via wizard or quick-add dialog.

This page lists and manages payer enrollments for clearinghouse connectivity, accessible at `/pm/clearinghouse/enrollments`.

## Overview

The Clearinghouse Enrollments page lists all payer enrollment records (`pm_payer_enrollments`) for the organization. Each card displays the payer name (joined from `pm_payers`), enrollment status, the associated clearinghouse name (joined from `pm_clearinghouse_config`), the electronic payer ID, and the enrolled date. The search box filters by electronic payer ID. Enrollment status values are: Pending, Active, Inactive, Rejected, and Expired. Users with `pm.payer_enrollments.create` permission see two add actions: a "Quick Add" inline dialog and a "New Enrollment" wizard that navigates to `/pm/enrollment/new`. Removing an enrollment soft-deletes the record without affecting existing claims. This page is a sub-route within the Clearinghouse area (`/pm/clearinghouse/...`).

## Who it's for

Requires permission `pm.payers.manage` (route guard: `PM_PERMISSIONS.PAYERS_MANAGE`). Creating or editing enrollments additionally requires `pm.payer_enrollments.create` / `pm.payer_enrollments.edit`.

## Before you start

* At least one payer record must exist in `/pm/payers` before creating an enrollment.
* At least one clearinghouse configuration must exist at `/pm/clearinghouse`.
* You must hold `pm.payers.manage` to access this page.

## Steps

<Steps>
  <Step title="Open Clearinghouse Enrollments">
    Navigate to `/pm/clearinghouse/enrollments`. The page loads all non-deleted payer enrollment records for your organization, newest first.
  </Step>

  <Step title="Filter the list">
    Type in the search box to filter by electronic payer ID. Use the status dropdown to filter by enrollment status: Pending, Active, Inactive, Rejected, or Expired.
  </Step>

  <Step title="Add a quick enrollment">
    Click "Quick Add" (requires `pm.payer_enrollments.create`) to open the inline `PayerEnrollmentFormDialog` for rapid data entry without leaving the page.
  </Step>

  <Step title="Start the enrollment wizard">
    Click "New Enrollment" (requires `pm.payer_enrollments.create`) to navigate to the full enrollment wizard at `/pm/enrollment/new`.
  </Step>

  <Step title="Remove an enrollment">
    Click the trash icon on a card and confirm the dialog. The enrollment is soft-deleted; existing claims are not affected.
  </Step>
</Steps>

## Key concepts

<AccordionGroup>
  <Accordion title="Enrollment status lifecycle">
    Enrollment status is stored in `pm_payer_enrollments.enrollment_status`. Statuses are: `pending` (submitted, awaiting clearinghouse response), `active` (approved and usable for claim routing), `inactive` (deactivated), `rejected` (denied by clearinghouse or payer), `expired` (enrollment period ended).
  </Accordion>

  <Accordion title="Electronic payer ID">
    The `electronic_payer_id` field on each enrollment record is the identifier used by the clearinghouse to route transactions to the specific payer. This is distinct from the internal payer master ID.
  </Accordion>

  <Accordion title="Empty state">
    When no enrollments exist and no filters are active, the page shows "Add payer enrollments to enable electronic claim submission for specific payers." When filters yield no results, the message reads "No enrollments match the current filters."
  </Accordion>
</AccordionGroup>

## Creating a clearinghouse enrollment

The New Payer Enrollment wizard (`/pm/enrollment/new`, permission: `pm.payer_enrollments.create`) provides a guided workflow for submitting a new payer enrollment. The legacy route `/pm/enrollment` redirects to `/pm/clearinghouse/enrollments`.

Before you start: Ensure the relevant payer exists at `/pm/payers`, have provider NPI and enrollment credentials available, and confirm a clearinghouse configuration exists at `/pm/clearinghouse`.

1. Navigate to **Practice Management → Clearinghouse Enrollments → New Enrollment**, or go to `/pm/enrollment/new`.
2. Follow the on-screen steps presented by the payer enrollment wizard. Step details are defined in `PayerEnrollmentWizard`.
3. On the final step, confirm all details and submit. You will be redirected to `/pm/clearinghouse/enrollments` on success.
4. Use the **Exit** control to cancel and return to the previous page without saving.

## Creating a clearinghouse configuration

The New Clearinghouse Configuration form (`/pm/clearinghouse/new`, permission: `pm.admin`) creates a new clearinghouse adapter configuration. This form is also used to view and edit existing configurations at `/pm/clearinghouse/:id`.

`ClearinghouseConfigDetailPage` presents a react-hook-form with zod validation. Fields include `clearinghouse_name`, `clearinghouse_provider`, `sender_id`, `receiver_id`, `connection_type` (sftp | api | web\_portal), and `is_active`. Connection-type-specific fields (host, port, paths for SFTP; API endpoint for API) appear based on selection. Credential references (`username_vault_ref`, `credentials_vault_ref`) point to a secrets vault rather than storing credentials directly. The page also renders `FailoverSettingsCard` and `PayerRoutesTable` for existing records.

Before you start: Obtain the sender ID and receiver ID from your clearinghouse vendor, have vault secret reference paths ready for credentials, and confirm the connection type (SFTP, API, or web portal).

1. Navigate to **Practice Management → Clearinghouse → New**, or go to `/pm/clearinghouse/new`.
2. Fill in **Clearinghouse Name**, **Clearinghouse Provider**, **Sender ID**, and **Receiver ID**.
3. Choose **API**, **SFTP**, or **Web Portal**. Additional fields appear based on your selection.
4. Provide vault reference paths for `username_vault_ref` and `credentials_vault_ref`. Do not enter raw credentials.
5. Click **Save**. The adapter is created via `useClearinghouseConfigMutation`. A connection test option may be available via the test action.

* **Sender ID / Receiver ID** — EDI interchange identifiers required for transaction routing.
* **Vault references** — pointers to a secrets management system; raw credentials are not stored in the database.
* **Connection type** — determines the transport protocol used for EDI file exchange (SFTP, REST API, or web portal upload).

## Related

<Columns cols={2}>
  <Card title="Practice Management" icon="briefcase" href="/pm/overview">
    Overview of the Practice Management core.
  </Card>

  <Card title="Governance & parity" icon="scale-balanced" href="/governance/index">
    Documentation coverage and governance.
  </Card>
</Columns>

<Note>
  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.
</Note>

<Accordion title="Documentation sources">
  * src/routes/pm.tsx
  * src/cores/pm/pages/PayerEnrollmentListPage.tsx
  * src/cores/pm/hooks/usePayerEnrollment.ts
  * src/cores/pm/types/clearinghouse.ts
  * src/platform/permissions/constants.ts
  * src/cores/pm/pages/ClearinghouseConfigDetailPage.tsx
  * src/cores/pm/hooks/useClearinghouseConfig.ts
  * src/cores/pm/pages/PayerEnrollmentWizardPage.tsx
</Accordion>
