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

# Batch

> View read-only details of a single clearinghouse transaction batch including status, transaction type, direction, and timeline.

The Batch screen displays read-only details for a single clearinghouse transaction batch at route `/pm/clearinghouse/batches/:id`.

## Overview

The page loads a batch record via `useTransactionBatchDetail`. It displays two info cards: Batch Information (status badge, transaction type, direction, record count, file name, clearinghouse name from joined `pm_clearinghouse_config`) and Timeline (created, submitted, and acknowledged timestamps). If the batch has an `errors` field, a third card renders the JSON payload in a scrollable pre-formatted block. The page is read-only — no mutation actions are available. The status badge uses destructive styling for `error` and `rejected` states, default styling for `accepted`, and outline for other states.

## Who it's for

Requires permission `PM_PERMISSIONS.CLAIMS_VIEW` (enforced via `RequirePermission` in the route definition for `/pm/clearinghouse/batches/:id`).

## Before you start

* You need the `pm.claims.view` permission.
* Navigate here from the Clearinghouse Batches list (`/pm/clearinghouse/batches`).

## Steps

<Steps>
  <Step title="Open a batch record">
    From the Clearinghouse Batches list, click a row to open the batch detail page.
  </Step>

  <Step title="Review batch information">
    The Batch Information card shows status, transaction type, direction (inbound/outbound), record count, file name, and associated clearinghouse name.
  </Step>

  <Step title="Review timeline">
    The Timeline card shows when the batch was created, submitted to the clearinghouse, and acknowledged.
  </Step>

  <Step title="Review errors (if present)">
    If the batch has errors, a Errors card renders the raw JSON payload for investigation.
  </Step>
</Steps>

## Key concepts

| Term               | Meaning in code                                                                                    |
| ------------------ | -------------------------------------------------------------------------------------------------- |
| `transaction_type` | The X12 transaction set type for this batch                                                        |
| `direction`        | `inbound` or `outbound`                                                                            |
| `record_count`     | Number of transactions in the batch                                                                |
| `file_name`        | Name of the EDI file                                                                               |
| `BatchStatus`      | Status enum from `clearinghouse` types; `accepted`, `error`, `rejected` have distinct badge styles |
| `acknowledged_at`  | Timestamp of clearinghouse acknowledgment receipt                                                  |

## 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/TransactionBatchDetailPage.tsx
  * src/cores/pm/hooks/useTransactionBatch.ts
</Accordion>
