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

# Fraud & Abuse Flags

> Review flagged billing patterns identified by automated compliance checks at /pm/fraud-abuse.

This page surfaces automatically detected billing anomalies for compliance review and is reached at `/pm/fraud-abuse`.

## Overview

The Fraud & Abuse Flags page displays billing anomalies detected by automated checks run against `pm_claims`. The current shipped implementation scans the most recent 500 claims for the organization and identifies potential duplicates: claims with the same patient, service date, and total charge amount. Each flagged item shows the flag type, entity type, identifier (claim number), date, and a plain-text summary. The page is read-only; no action buttons appear on the list. An empty state ("No flagged items") displays when no anomalies are found.

## Who it's for

Requires permission: `PM_PERMISSIONS.COMPLIANCE_REPORTS` (`pm.compliance.reports`).

Users without this permission see a destructive alert stating they do not have access.

## Before you start

* You must hold the `pm.compliance.reports` permission.
* Flag checks run against claims already recorded in the system; claims must exist before flags can be generated.

## Steps

<Steps>
  <Step title="Open Fraud & Abuse Flags">
    Navigate to **Practice Management → Fraud & Abuse Flags** or go directly to `/pm/fraud-abuse`. The page runs the automated duplicate check on load.
  </Step>

  <Step title="Review the flags table">
    Each row shows: **Flag Type** badge (e.g., "Duplicate"), **Entity** (e.g., "claim"), **Identifier** (claim number or ID in monospace), **Date**, and **Summary** describing the potential issue.
  </Step>

  <Step title="Act on flagged items">
    Use the claim identifier to locate the full claim record at `/pm/claims/:claimId` for manual review.
  </Step>
</Steps>

## Key concepts

<AccordionGroup>
  <Accordion title="Flag types defined in code">
    Three flag type labels exist: **Duplicate** (`duplicate`), **Outlier** (`outlier`), and **Unusual Pattern** (`unusual_pattern`). Only duplicate detection is implemented in the current hook; the other types are defined but not yet generated.
  </Accordion>

  <Accordion title="Duplicate detection logic">
    The check queries the 500 most recent claims ordered by `created_at` descending, then groups by `patient_id + service_date_from + total_charge`. The second occurrence of any combination is flagged as a potential duplicate.
  </Accordion>

  <Accordion title="Empty state">
    When no flags are detected, the page shows "No flagged items" with the note "Checks run on schedule or on demand."
  </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/FraudAbuseFlagsPage.tsx
  * src/cores/pm/hooks/useFraudAbuseFlags.ts
  * src/cores/pm/types/audit-compliance.ts
</Accordion>
