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

# Report Definitions

> Configure, edit, and run compliance and quality measure report templates for Joint Commission, CARF, HEDIS, AHCCCS, and custom types.

The Report Definitions screen manages the catalog of report templates used to generate compliance and quality reports, at the in-app route `/cl/report-definitions`.

## Overview

The page is guarded by `cl.report_definitions.view`. A list of report definitions from `cl_report_definitions` is fetched via `useReportDefinitionList`. Each definition shows its name, report type badge (from `REPORT_TYPE_OPTIONS`), format, and active/inactive status. Users with `cl.report_definitions.create` see a "New Definition" button that opens a `ReportDefinitionFormDialog` for creating a template. Each row supports Edit (opens the same dialog pre-populated with existing values) and, for users with `cl.report_definitions.delete`, Delete. Users with `cl.report_runs.run` see a "Run" button per row that triggers `useRunReport` to initiate a report run. When no definitions exist, an empty state is shown with an optional "Create Definition" action.

## Who it's for

Requires permission `cl.report_definitions.view`. Additional sub-permissions control write actions:

* `cl.report_definitions.create` — enables "New Definition" and the Create action in the empty state.
* `cl.report_definitions.delete` — enables Delete per row.
* `cl.report_runs.run` — enables Run per row.

## Before you start

* Permission `cl.report_definitions.view` must be granted.
* To create or edit definitions, `cl.report_definitions.create` is required.
* To run a report, `cl.report_runs.run` is required; run history is visible at `/cl/report-runs`.

## Steps

<Steps>
  <Step title="View existing definitions">
    The table lists all report definitions with name, type, format, and status. Inactive definitions show a secondary status badge.
  </Step>

  <Step title="Create a new definition (if permitted)">
    Click "New Definition" (requires `cl.report_definitions.create`) to open the `ReportDefinitionFormDialog` and configure a new template.
  </Step>

  <Step title="Edit an existing definition">
    Click "Edit" on any row to open the dialog pre-populated with that definition's values.
  </Step>

  <Step title="Run a report (if permitted)">
    Click "Run" on any row (requires `cl.report_runs.run`) to initiate a report run. Navigate to the Report History page at `/cl/report-runs` to monitor run status.
  </Step>

  <Step title="Delete a definition (if permitted)">
    Click "Delete" (requires `cl.report_definitions.delete`) on any row to remove the definition.
  </Step>
</Steps>

## Key concepts

<AccordionGroup>
  <Accordion title="Report type values">
    `joint_commission` (Joint Commission), `carf` (CARF), `hedis` (NCQA / HEDIS), `ahcccs` (AHCCCS), `azdhs_incident` (AZDHS Incident), `custom` (Custom) — from `REPORT_TYPE_OPTIONS` in `src/cores/cl/types/reporting.ts`.
  </Accordion>

  <Accordion title="Report format values">
    `pdf`, `csv`, `excel` — displayed as uppercase short codes in the Format column.
  </Accordion>

  <Accordion title="Empty and error states">
    When no definitions exist, an empty state with a FileText icon is shown. A "Create Definition" action appears if `cl.report_definitions.create` is held. A skeleton (header + 96px content block) is displayed while loading.
  </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/ReportDefinitionsListPage.tsx
  * src/cores/cl/types/reporting.ts
</Accordion>
