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

# QI Reports

> Export Quality Improvement project data, PDSA cycles, metrics, and improvement records in PDF or other formats.

The QI Reports page provides tabbed export functionality for Quality Improvement data. It is located at route `/gr/quality-improvement/reports`.

## Overview

The page is rendered by `QIReports` and uses `useCurrentUser` to scope queries. Four report types are available via tabs: **Projects**, **PDSA Cycles**, **Metrics**, and **Improvements**. Each tab fetches the corresponding dataset from Supabase (tables: `gr_qi_projects`, PDSA cycles, metrics, improvements) and offers an export action. The export format selector supports `pdf` and potentially other formats via the `ExportFormat` type. An inline trend analysis panel (`QITrendAnalysisPanel`) is also rendered. No permission gate is declared on this route in `gr.tsx`.

## Who it's for

Access follows your organization's role and module configuration. ## Before you start

* QI projects, PDSA cycles, metrics, or improvement records must exist to export meaningful data.
* The user session must be active (`useCurrentUser`).

## Steps

1. Go to **Governance & Compliance → Quality Improvement → Reports** at `/gr/quality-improvement/reports`.
2. Select the report type tab: **Projects**, **PDSA**, **Metrics**, or **Improvements**.
3. Choose an export format from the selector.
4. Select the **Download** or export action for the chosen report type.
5. Review the trend analysis panel for a visual summary.

## Key concepts

| Concept              | Description                                                                           |
| -------------------- | ------------------------------------------------------------------------------------- |
| Report types         | Projects, PDSA Cycles, Metrics, Improvements — each fetches a distinct dataset        |
| `ExportFormat`       | Export format options (e.g., `pdf`); full list determined by `qiReportExport` utility |
| Trend analysis panel | Visual trend chart embedded alongside export options                                  |

## Related

<Columns cols={2}>
  <Card title="Governance & Compliance" icon="scale-balanced" href="/gr/overview">
    Governance & Compliance core overview.
  </Card>

  <Card title="Governance & parity" icon="clipboard-check" href="/governance/index" />
</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/gr.tsx
  * src/cores/gr/pages/QIReports.tsx
  * src/cores/gr/utils/qiReportExport.ts
  * src/platform/auth/useCurrentUser.ts
</Accordion>
