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

# GFE Configuration

> Map appointment types to CPT codes so Good Faith Estimates can be generated automatically at /pm/gfe/mapping.

This settings page manages the appointment-type-to-<Tooltip tip="Current Procedural Terminology code identifying a medical service for billing">CPT</Tooltip> code mapping table used for automatic <Tooltip tip="Good Faith Estimate — a written cost estimate required under the No Surprises Act for self-pay and uninsured patients">GFE</Tooltip> generation and is reached at `/pm/gfe/mapping`.

## Overview

The GFE Configuration page displays and manages the organization's mapping table (`pm_gfe_appointment_cpt_mapping`) that links appointment type strings to <Tooltip tip="Current Procedural Terminology code identifying a medical service for billing">CPT</Tooltip> codes. Mappings are listed in a table showing **Appointment Type**, **CPT Code**, and **Order**. Each row has a delete button. An **Add Mapping** button opens the "Add CPT Mapping" dialog where the user enters an appointment type (free text, e.g. "Initial Assessment") and a CPT code (e.g. "99213"). Mappings are ordered by `appointment_type` then `display_order` ascending.

## Who it's for

Requires permission: `PM_PERMISSIONS.GFE_MANAGE` (`pm.gfe.manage`). This is a higher-privilege permission than GFE\_VIEW and is intended for billing administrators configuring how estimates are generated.

## Before you start

* You must hold the `pm.gfe.manage` permission.
* Know the appointment type strings used in your scheduling configuration and the corresponding CPT codes before adding mappings.

## Steps

<Steps>
  <Step title="Open GFE Configuration">
    Navigate to **Practice Management → GFE → Configuration** or go directly to `/pm/gfe/mapping`. The current mappings table loads.
  </Step>

  <Step title="Review existing mappings">
    The table lists each **Appointment Type**, its associated **CPT Code** (displayed in monospace), and the display **Order** number.
  </Step>

  <Step title="Add a mapping">
    Click **Add Mapping**. In the "Add CPT Mapping" dialog, enter the appointment type text and CPT code, then click **Add Mapping** to save. Both fields are required; the button is disabled until both are non-empty.
  </Step>

  <Step title="Delete a mapping">
    Click the trash icon on any row to immediately delete that mapping. The table refreshes on success.
  </Step>
</Steps>

## Key concepts

<AccordionGroup>
  <Accordion title="Empty state">
    When no mappings exist, the page shows "No appointment types mapped yet" with an **Add Mapping** action button and the note "Add a mapping so GFEs can be generated automatically."
  </Accordion>

  <Accordion title="Mapping delete behavior">
    Deletion is a hard delete (`DELETE`) from `pm_gfe_appointment_cpt_mapping`, not a soft delete. The row is permanently removed.
  </Accordion>
</AccordionGroup>

## 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/GfeMappingConfigPage.tsx
  * src/cores/pm/hooks/useGfeAppointmentCptMapping.ts
  * src/cores/pm/types/gfe.ts
</Accordion>
