The CDS Rules screen is an admin management page atDocumentation 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/cds-rules that lists all configured Clinical Decision Support rules for the current organisation and allows users with the cl.cds_rules.manage permission to create, edit, and delete rules.
Overview
The screen displays a card titled “Active Rules (N)” listing all non-deleted rules fromcl_cds_rules for the current organisation, ordered alphabetically by rule name. Each row shows the rule name, rule type and trigger event labels, severity badge, optional “Hard Stop” badge, and active/inactive badge. Users with cl.cds_rules.manage see “Edit” and delete (trash icon) buttons per row, plus a “New Rule” button in the page header. Creating or editing a rule opens a modal dialog with a structured form covering: rule name, rule type, trigger event, severity, hard-stop toggle, active toggle, dynamic condition parameters (vary by rule type), and alert action fields (type, title, message, optional recommendation). Deleting a rule opens a confirmation dialog.
Who it’s for
- Viewing the rule list: requires the
cl.cds_rules.viewpermission. - Creating, editing, and deleting rules: additionally requires
cl.cds_rules.manage.
Before you start
- The
cl.cds_rules.viewpermission must be assigned to your role to access this page. - The
cl.cds_rules.managepermission is required to create, edit, or delete rules.
Steps
Open the CDS Rules page
Navigate to
/cl/cds-rules. The page loads all active (non-deleted) rules for your organisation.Review existing rules
Each row in the “Active Rules” card shows the rule name, type/trigger sub-line, severity badge, Hard Stop badge (if applicable), and Active/Inactive status.
Create a new rule (manage permission required)
Click “New Rule” to open the rule form dialog. Fill in Rule Name, Rule Type, Trigger Event, Severity, and optionally Hard Stop and Active flags.
Configure condition parameters
The Condition Parameters section is dynamic. For Drug Interaction or Drug Allergy rules enter Drug/Class A (and Drug/Class B for interactions). For Medication Monitoring rules enter a Lab Test LOINC code and Days Overdue. For Documentation Gap rules enter Note Type and Max Hours Overdue. Quality Measure rules have no configurable parameters in the current build.
Configure the alert action
Choose action type (Alert, Block, or Suggest), enter a Display Title, a Message shown to clinicians, and an optional Recommendation. Then click “Create Rule” (or “Update Rule” when editing).
Edit an existing rule
Click “Edit” on any rule row to re-open the form pre-populated with that rule’s values. Change fields as needed and click “Update Rule”.
Key concepts
rule types and trigger events as defined in code: Rule types:| Code | Display label |
|---|---|
drug_interaction | Drug Interaction |
drug_allergy | Drug Allergy |
medication_monitoring | Medication Monitoring |
documentation_gap | Documentation Gap |
quality_measure | Quality Measure |
| Code | Display label |
|---|---|
medication_add | Medication Add |
prescription_submit | Prescription Submit |
chart_open | Chart Open |
assessment_complete | Assessment Complete |
critical, major, moderate, minor, info. Critical and major render as destructive badges; moderate as default; minor as secondary; info as outline.
Action types: alert, block, suggest.
Empty state
Empty state
When no rules exist the card body shows a warning icon with “No CDS rules configured — Create rules to enable drug interaction, allergy, and monitoring alerts.”
Error state
Error state
If the query fails, a destructive text message is shown with the sanitised error.
Loading state
Loading state
Three skeleton rows are displayed while the rule list loads.
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/CdsRulesListPage.tsx
- src/cores/cl/hooks/useCdsRules.ts
- src/cores/cl/types/cds.ts