Skip to main content

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.

The Pathway Templates screen (/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 queries cl_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 the cl.pathways.manage permission. Templates are scoped to your organization. At least one template must exist before row-level actions are available.

Steps

1

Navigate to /cl/pathway-templates

Open the Clinical module and navigate to Pathway Templates. The page loads the template table for your organization.
2

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

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

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

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

Delete a draft template

Click the Delete (trash) icon on a draft row. Confirm the destruction in the dialog that appears. This action cannot be undone from the UI.

Key concepts

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.
When no templates exist for the organization, the page shows: “No pathway templates yet — Create your first protocol-driven care pathway.”
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.
The Milestones column shows the length of milestones_parsed — a parsed array derived from the raw milestones JSONB column.

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.
  • src/routes/cl.tsx
  • src/cores/cl/pages/PathwayTemplateListPage.tsx
  • src/cores/cl/hooks/pathways/usePathwayTemplates.ts
  • src/cores/cl/hooks/pathways/index.ts