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

# In-Service Compliance

> Monitor mandatory in-service training compliance across employees and courses in a filterable matrix view.

The In-Service Compliance page provides a monitoring matrix for mandatory in-service training completion across employees and courses. It is located at route `/gr/compliance/inservice`.

## Overview

The page is rendered by `InServiceCompliancePage`. It uses `useInServiceMatrix` (RPC-backed, server-side filtered by site or department) and `useInServiceCompliancePct` (overall percentage). Client-side filters for employee search (via `useDeferredValue`) and completion status further trim the matrix.

The layout includes:

* **Stat cards** (`InServiceMatrixStatCards`) showing compliance percentages
* **Filter bar** (`InServiceMatrixFilters`) for scope mode (site/department), site/department selection, employee search, and status
* **Matrix table** (`InServiceMatrixTable`) — employees as rows, courses as columns
* **Export** button (visible to users with the export permission) downloads the matrix as CSV via `exportInServiceMatrixToCsv`

The route is protected by `GR_PERMISSIONS.COMPLIANCE_VIEW` (`gr.compliance.view`). Export uses `PermissionGate` (permission not visible in the opened file; SME should confirm).

## Who it's for

Requires permission: `gr.compliance.view`

## Before you start

* Your account must have `gr.compliance.view`.
* Courses and employee enrollment data must be configured.

## Steps

1. Go to **Governance & Compliance → Compliance → In-Service Compliance** at `/gr/compliance/inservice`.
2. Select **Scope** (site or department) and choose a specific site or department.
3. Use the employee search to filter to specific staff.
4. Use the status filter to show all employees or only non-compliant ones.
5. Review the stat cards for overall and filtered compliance percentages.
6. Review the matrix table to identify specific employee/course gaps.
7. Select **Export CSV** to download the current filtered view (requires export permission).

## Key concepts

| Concept               | Description                                                            |
| --------------------- | ---------------------------------------------------------------------- |
| In-service matrix     | Employee-row × course-column compliance grid                           |
| Scope mode            | Filter by site or department (server-side via RPC)                     |
| Compliance percentage | `useInServiceCompliancePct` — overall rate for the selected site       |
| CSV export            | `exportInServiceMatrixToCsv` — exports visible matrix rows and courses |

## 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/InServiceCompliancePage.tsx
  * src/cores/gr/hooks/useInServiceMatrix.ts
  * src/platform/permissions/constants.ts
</Accordion>
