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

# HR Pathway Templates

> Apply pre-built AHCCCS qualification pathway templates (BHT, BHPP, PRSS, CFSP) to positions to seed required skills and competency checkpoints.

Pathway Templates let HR administrators apply pre-built qualification frameworks — such as BHT, BHPP, PRSS, and CFSP — to a position. Each template generates the position's skill and competency requirements in a single step.

## Overview

A pathway template is an organization-scoped competency framework tagged as `framework_type = 'qualification_pathway'`. Each template groups the skills, knowledge items, and training or competency checkpoints that satisfy a role's qualification. Items are organized into one or more pathway groups (for example, "Path A: degree + experience" or "Path B: training + experience + competency test").

When you apply a template to a position, the system upserts rows into `hr_position_skill_requirements` and never duplicates an active requirement. Each generated row records its source framework so you can trace which pathway produced it.

Seed templates ship inactive and are scoped via PF-96 jurisdiction profiles. Arizona/AHCCCS is the default profile; other states receive jurisdiction-appropriate templates through their PF-96 profile.

## Who it's for

* HR administrators with permission to manage position skill requirements (`canManage` on the position detail page).
* Compliance leads configuring AHCCCS-aligned roles (BHT, BHPP, PRSS, CFSP).

## Before you start

* Enable the feature on **HR → Settings → General** by turning on **Pathway templates enabled** (`pathway_templates_enabled`).
* Confirm that the skills referenced by the template exist in your **Skills Library** (`/hr/skills`).
* Confirm the target position exists at `/hr/positions/:id`.

## Steps

<Steps>
  <Step title="Enable pathway templates">
    Go to **HR → Settings** and turn on **Pathway templates enabled**. Save your changes.
  </Step>

  <Step title="Open the target position">
    Navigate to **HR → Positions** and open the position you want to configure. The **Qualification Pathway Templates** card appears above the position's skill requirements when the feature is enabled.
  </Step>

  <Step title="Review available templates">
    Each template card shows the template name, description, skill count, and regulatory source (for example, `AHCCCS`). Inactive seed templates are labeled and cannot be applied until enabled.
  </Step>

  <Step title="Apply a template">
    Click **Apply to Position** on the template you want, or use **Apply Pathway Template** in the skill requirements header. In the dialog, confirm the **Position** and **Template**, then click **Apply**.
  </Step>

  <Step title="Verify generated requirements">
    The position's **Skill Requirements** list refreshes with the template's skills. Each row records its `source_framework_id`, `pathway_group`, and `pathway_logic` so you can see which pathway it came from.
  </Step>
</Steps>

## Key concepts

* **framework\_type** — Set to `qualification_pathway` to mark a framework as a pathway template. Only frameworks with this type appear in the apply dialog.
* **pathway\_group** — Groups alternative routes within a pathway. For example, a BHT template may include Group A (degree + experience) and Group B (training + experience + competency test).
* **pathway\_logic** — Either `required` (every item in the group must be satisfied) or `one_of_group` (any complete group satisfies the requirement).
* **regulatory\_source** — Free-text reference to a PF-96 jurisdiction profile (for example, `AHCCCS`). Used to surface which regulatory program a template aligns with.
* **Clone-on-edit** — If a seed template is owned by another organization, applying it first clones the framework into your organization and then applies the clone. This keeps your edits isolated from the shared seed.
* **Idempotent apply** — Re-applying the same template updates existing requirements instead of duplicating them. The unique index on `(organization_id, position_id, skill_id)` enforces this.

## Configuration

Pathway templates are governed by the `pathway_templates_enabled` flag in HR module settings. Toggling it off hides the **Qualification Pathway Templates** card and the **Apply Pathway Template** button on position detail pages. Existing requirements generated by previous applies remain in place.

```ts theme={null}
// Example: enable pathway templates via HR settings
await updateHRSettings({
  pathway_templates_enabled: true,
});
```

To apply a template programmatically, call the `hr_apply_pathway_template` RPC:

```sql theme={null}
SELECT hr_apply_pathway_template(
  p_framework_id := '<template-uuid>',
  p_position_id  := '<position-uuid>',
  p_org_id       := '<organization-uuid>'
);
```

The function only accepts frameworks where `framework_type = 'qualification_pathway'` and `organization_id` matches `p_org_id`, and it upserts on the partial unique index that excludes soft-deleted rows.

## Related

<Columns cols={2}>
  <Card title="Skills Library" icon="book-open" href="/hr/skills-library">
    Manage the catalog of skills referenced by pathway templates.
  </Card>

  <Card title="Position Details" icon="briefcase" href="/hr/positions">
    Open a position to apply a pathway template.
  </Card>

  <Card title="Competencies" icon="id-badge" href="/hr/competencies">
    Track competency gaps surfaced from performance reviews.
  </Card>

  <Card title="HR Settings" icon="settings" href="/hr/hr-settings">
    Enable or disable pathway templates for the organization.
  </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/cores/hr/components/skills/PathwayTemplateList.tsx
  * src/cores/hr/components/skills/PathwayTemplateApplyDialog.tsx
  * src/cores/hr/components/skills/PositionSkillRequirementsList.tsx
  * src/cores/hr/hooks/skills/usePathwayTemplates.ts
  * src/cores/hr/hooks/skills/useApplyPathwayTemplate.ts
  * src/cores/hr/hooks/skills/useClonePathwayTemplate.ts
</Accordion>
