The Pathway Templates screen (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.
/cl/pathway-templates) lists all reusable care pathway templates for the organization and provides lifecycle controls to create, edit, publish, archive, and delete them.
Overview
The page queriescl_pathway_templates (soft-delete filtered, ordered by updated_at descending) via usePathwayTemplates. Templates are displayed in a table with columns for Name, Program (clinical_program), Status, Milestones count, and Updated date. Templates have three statuses — draft, published, and archived — rendered as badges. Row-level actions (gated on cl.pathways.manage) depend on status: draft templates show Edit, Publish, and Delete buttons; published templates show an Archive button; archived templates have no row actions. Deleting a draft opens a ConfirmationDialog with a destructive confirmation step. Errors surface as sanitized toast messages via Sonner.
Who it’s for
Requires permission:cl.pathways.manage
Before you start
You must hold thecl.pathways.manage permission. Templates are scoped to your organization. At least one template must exist before row-level actions are available.
Steps
Navigate to /cl/pathway-templates
Open the Clinical module and navigate to Pathway Templates. The page loads the template table for your organization.
Create a new template
Click “New template” (visible to users with
cl.pathways.manage) to open the PathwayTemplateFormDialog. Fill in name, clinical program, and milestones, then save.Edit a draft template
Click the Edit (pencil) icon on any draft-status row to reopen the form dialog pre-populated with the existing template data.
Publish a draft template
Click the Publish (check-circle) icon on a draft row. The template status changes to
published and a success toast confirms the action.Archive a published template
Click the Archive icon on a published row. The template status changes to
archived and a success toast confirms the action.Key concepts
Template status lifecycle
Template status lifecycle
Templates move through three states:
draft (editable) → published (read-only, archivable) → archived (no further UI actions). Status badges use secondary, default, and outline variants respectively.Empty state
Empty state
When no templates exist for the organization, the page shows: “No pathway templates yet — Create your first protocol-driven care pathway.”
Error state
Error state
If the data fetch fails, a destructive alert banner renders above the table with a sanitized error message. Mutation errors surface as Sonner toast notifications.
Milestones count
Milestones count
The Milestones column shows the length of
milestones_parsed — a parsed array derived from the raw milestones JSONB column.Related
Clinical
Overview of the Clinical core.
Governance & parity
Documentation coverage and governance.
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.
Documentation sources
Documentation sources
- src/routes/cl.tsx
- src/cores/cl/pages/PathwayTemplateListPage.tsx
- src/cores/cl/hooks/pathways/usePathwayTemplates.ts
- src/cores/cl/hooks/pathways/index.ts