> ## 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 File

> View and edit a clearinghouse connection configuration including provider, sender/receiver IDs, connection type, SFTP or API settings, and credentials.

The Clearinghouse File screen (Clearinghouse Configuration Detail) displays and edits a single clearinghouse connection record at route `/pm/clearinghouse/:id`. Creating a new configuration is served by `/pm/clearinghouse/new` using the same component.

## Overview

The page uses a `react-hook-form` / Zod form to manage clearinghouse connection settings. Fields include: Name, Provider (Waystar / Availity / Change Healthcare / Trizetto / Other), Sender ID, Receiver ID, Connection Type (SFTP / REST API / Web Portal), and Active toggle. Additional fields appear conditionally: SFTP settings (Host, Port, Retrieval Path `/inbound`, Submission Path `/outbound`) or API settings (API Endpoint URL). Credentials are entered as vault reference strings (`vault://...`), not raw secrets. On existing configurations, a **Test Connection** button calls the clearinghouse adapter's `validateCredentials` method. A Save / Create button (gated by `pm.clearinghouse.create` or `pm.clearinghouse.edit`) submits the form. Below the form, existing configs also show `FailoverSettingsCard` and `PayerRoutesTable`.

## Who it's for

Viewing an existing configuration requires `PM_PERMISSIONS.CLAIMS_VIEW`. Creating a new configuration requires `PM_PERMISSIONS.ADMIN`. Saving changes requires `pm.clearinghouse.edit`; creating requires `pm.clearinghouse.create`.

## Before you start

* You need `pm.admin` to create new configurations.
* You need `pm.claims.view` to view an existing configuration.
* Vault reference strings for credentials must be provisioned outside this UI.

## Steps

<Steps>
  <Step title="Open a clearinghouse configuration">
    Navigate from the Clearinghouse list (`/pm/clearinghouse`) and click a configuration row, or go to `/pm/clearinghouse/new` to create.
  </Step>

  <Step title="Fill in general settings">
    Enter the configuration name, select the provider, and enter Sender ID and Receiver ID. Choose SFTP, REST API, or Web Portal as the connection type.
  </Step>

  <Step title="Enter connection-specific settings">
    For SFTP: enter Host, Port, Retrieval Path, and Submission Path. For API: enter the API Endpoint URL.
  </Step>

  <Step title="Enter vault references for credentials">
    Enter the `username_vault_ref` and `credentials_vault_ref` as vault path strings. Do not paste raw credentials.
  </Step>

  <Step title="Test the connection (existing configs only)">
    Click **Test Connection** to validate the stored credentials against the clearinghouse provider.
  </Step>

  <Step title="Save or create">
    Click **Save Changes** or **Create** to persist the configuration.
  </Step>
</Steps>

## Key concepts

| Term                     | Meaning in code                                                       |
| ------------------------ | --------------------------------------------------------------------- |
| `clearinghouse_provider` | Enum: `waystar`, `availity`, `change_healthcare`, `trizetto`, `other` |
| `connection_type`        | Enum: `sftp`, `api`, `web_portal`                                     |
| `sender_id`              | ISA06 Sender ID in X12 EDI interchange                                |
| `receiver_id`            | ISA08 Receiver ID in X12 EDI interchange                              |
| `username_vault_ref`     | Vault path string for the stored username credential                  |
| `credentials_vault_ref`  | Vault path string for the stored password/key credential              |

## Related

<Columns cols={2}>
  <Card title="Practice Management" icon="briefcase" href="/pm/overview">
    Practice Management core overview.
  </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/ClearinghouseConfigDetailPage.tsx
  * src/cores/pm/hooks/useClearinghouseConfig.ts
  * src/cores/pm/services/clearinghouse.ts
</Accordion>
