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

# Encounter Review

> Review, approve, edit, and reject generated encounter records in batch at route /cl/group-encounter-review.

The Encounter Review screen (`/cl/group-encounter-review`) lists generated encounter records from the `cl_group_encounter_generations` table and allows reviewers to approve or reject them individually or in bulk.

## Overview

The page uses `useGroupEncounterGenerationList` to fetch records scoped to the current organization, defaulting to `pending_review` status. A status filter dropdown allows switching to any `GenerationStatus` or `All Statuses`. Users with `cl.group-encounter-generation.approve` permission see checkboxes and individual Approve/Reject buttons per pending row, plus a **Approve Selected (n)** bulk action that opens `BulkApproveConfirmDialog`. Users with `cl.group-encounter-generation.edit` can edit the `proposed_cpt_code` and `duration_minutes` of a pending record via `EditEncounterGenerationDialog`. Rejected records show a truncated rejection reason in the Actions column. A `ReconciliationSummary` component renders above the table.

## Who it's for

Requires permission `cl.group-encounter-generation.view`. Approval actions additionally require `cl.group-encounter-generation.approve`; edit actions require `cl.group-encounter-generation.edit`.

## Before you start

* You must hold `cl.group-encounter-generation.view`.
* An organization must be selected; the hook will not fetch without `organization_id`.
* Encounter generation records are created upstream (outside this screen); this screen is for review only.

## Steps

<Steps>
  <Step title="Open Encounter Review">
    Navigate to `/cl/group-encounter-review`. The list loads filtered to `pending_review` by default.
  </Step>

  <Step title="Filter by status">
    Use the **Filter by status** dropdown to select All Statuses or any specific `GenerationStatus` value. Changing the filter clears the current selection.
  </Step>

  <Step title="Review the reconciliation summary">
    The `ReconciliationSummary` card above the table displays aggregate counts for the loaded records.
  </Step>

  <Step title="Select pending records for bulk approval">
    Check individual rows or use the header checkbox to select all pending records. The **Approve Selected (n)** button appears in the filter bar when at least one record is selected.
  </Step>

  <Step title="Approve a single record">
    Click the green Approve (CheckCircle2) button on a `pending_review` row. The row is removed from the selection set on success.
  </Step>

  <Step title="Edit a pending record (if permitted)">
    Click the Edit (pencil) button to open `EditEncounterGenerationDialog`. Update `proposed_cpt_code` or `duration_minutes` and confirm.
  </Step>

  <Step title="Reject a record">
    Click the red Reject (XCircle) button to open `RejectEncounterGenerationDialog`. Enter a rejection reason and confirm. The reason (up to 30 characters) is shown in the Actions column of the rejected row.
  </Step>

  <Step title="Bulk approve">
    With records selected, click **Approve Selected (n)** and confirm in `BulkApproveConfirmDialog`. All selected IDs are approved in a single mutation.
  </Step>
</Steps>

## Key concepts

<AccordionGroup>
  <Accordion title="Generation statuses">
    The filter exposes values from `GENERATION_STATUS_OPTIONS` (imported from `src/cores/cl/types/group-encounter-generation`). The default view is `pending_review`. Only `pending_review` rows display action buttons and checkboxes.
  </Accordion>

  <Accordion title="Attendance status badge">
    Each row shows an `attendance_status` badge (outline variant, capitalized, underscores replaced with spaces) pulled from the generation record.
  </Accordion>

  <Accordion title="Empty state">
    When no records match the current filter, the page shows "No encounter generations" with a contextual description distinguishing between an empty `all` filter and an empty status-specific filter.
  </Accordion>
</AccordionGroup>

## Related

<Columns cols={2}>
  <Card title="Clinical" icon="stethoscope" href="/cl/overview">
    Overview of the Clinical 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/cl.tsx
  * src/cores/cl/pages/GroupEncounterGenerationBatchReviewPage.tsx
  * src/cores/cl/hooks/useGroupEncounterGenerations.ts
</Accordion>
