Purpose: This guide helps administrators configure, manage, and troubleshoot EN-27 (Server-Side CDS Evaluation), EN-28 (Clinical Pathways), and EN-29 (CDS Alert Analytics).
Overview
These three enhancements extend the CL-08 Clinical Decision Support module:Admin Responsibilities
Prerequisites
Required Permissions
System Requirements
- CDS rules must be configured (
cl_cds_rulestable) before EN-27/EN-29 produce data - The
evaluate-cdsEdge Function is auto-deployed — no manual deployment needed
Initial Setup
Step 1: Assign Permissions
Assign permissions based on clinical roles:
To assign permissions:
- Go to Settings → Roles & Permissions
- Select the role to modify
- Under the Clinical module, enable the required permissions
- Save changes
Step 2: Configure CDS Rules
CDS rules drive both EN-27 (evaluation) and EN-29 (analytics). Without active rules, the system generates no alerts.- Navigate to Clinical → CDS Rules
- Create rules with appropriate types:
drug_interaction— Checks for interactions between drug classesdrug_allergy— Cross-references medications with allergiesquality_measure— Flags missing assessments
- Set each rule’s
trigger_event,severity, andcondition.parameters - Mark rules as Active
Step 3: Review Pathway Definitions
If clinical pathways have been created:- Navigate to Clinical → Clinical Pathways → Pathway Management
- Review each pathway for clinical accuracy
- Deactivate any pathways that are not yet approved for use
Configuration Reference
EN-27: Edge Function Configuration
Theevaluate-cds Edge Function requires no secrets or environment variables — it uses the public RxNav API (no authentication needed).
EN-28: Database Tables
RLS Policies:
- SELECT/INSERT/UPDATE:
cl_has_org_access(organization_id, auth.uid()) - DELETE:
cl_is_org_admin(organization_id, auth.uid())— admin only - UPDATE includes
WITH CHECKto prevent cross-tenant data movement
EN-29: Analytics Data Source
Analytics aggregate fromcl_cds_alerts with joins to cl_cds_rules (rule names) and pf_profiles (provider names).
Routine Administration
Weekly Tasks
- Review CDS Alert Fatigue Dashboard for override rates > 50%
- Check
evaluate-cdsEdge Function logs for errors or sustained degraded mode
Monthly Tasks
- Audit pathway definitions for clinical accuracy and relevance
- Review per-provider alert metrics for training opportunities
- Tune or deactivate CDS rules with consistently high override rates
Quarterly Tasks
- Comprehensive review of all active CDS rules against current clinical guidelines
- Evaluate pathway step content for evidence-based updates
- Generate alert fatigue report using 90-day time window
Monitoring and Reports
Edge Function Health (EN-27)
Monitor theevaluate-cds function:
Alert Fatigue Metrics (EN-29)
Pathway Usage (EN-28)
Troubleshooting
Issue: Users Can’t Access Pathways
Symptoms: Users see “Access Denied” shield on/cl/pathways
Diagnostic Steps:
- Check user’s role assignments in Settings → Roles & Permissions
- Verify role includes
cl.pathways.managepermission
cl.pathways.manage to the user’s role.
Issue: No Alerts Generated by EN-27
Symptoms:evaluate-cds returns { alerts: [], pass: true } even with known interactions.
Diagnostic Steps:
- Verify CDS rules exist and are active (
cl_cds_rules.is_active = true) - Check that medications have
status = 'active' - Check if medications include
rxcuivalues (required for RxNav checks) - Review Edge Function logs for errors
- Ensure active CDS rules with correct
condition.parameters(drug_class_a,drug_class_b) - For RxNav interaction checks, medications must have valid
rxcuicodes - For allergy checks, verify patient allergy records exist
Issue: CDS Analytics Shows Stale Data
Symptoms: Dashboard data doesn’t reflect recent alerts. Cause: Query cache (5-minute staleTime). Resolution: Refresh the page. Data updates automatically after 5 minutes.Issue: Edge Function in Sustained Degraded Mode
Symptoms: Logs show repeatedRxNav API unavailable warnings.
Diagnostic Steps:
- Check RxNav API status
- Review Edge Function logs for timeout or network errors
- Verify Edge Function can reach external URLs
- If RxNav is down, no action needed — the system operates safely in degraded mode
- Text-based rule matching continues to function as a fallback
- Monitor for when RxNav returns to normal operation
Escalation Path
- Check Edge Function logs at Supabase Dashboard
- Review
cl_cds_alertstable for recent entries - Contact technical support with:
request_idfrom the CDS evaluation response- Time range of the issue
- Screenshot of the analytics dashboard
Security Considerations
Data Access
- All CDS data is tenant-isolated via RLS policies with
organization_idfiltering - Provider metrics in analytics resolve names from
pf_profiles— no PHI exposed - The
evaluate-cdsEdge Function validates JWT auth and org access before processing
Audit Trail
- Every CDS evaluation includes
request_id,request_timestamp, andlatency_ms - Alert persistence creates records in
cl_cds_alertswith full provenance - Break-glass access to CDS data follows standard clinical audit patterns
External API Security
- RxNav API is public (no API key) — no secrets to manage
- 5-second timeout prevents Edge Function hangs
- No PHI is sent to RxNav — only RxCUI codes (standardized drug identifiers)
Best Practices
Configuration Best Practices
- ✅ Start with a small set of high-value CDS rules and expand based on analytics
- ✅ Set appropriate severity levels — reserve
criticalfor true hard-stop scenarios - ✅ Review override rates monthly and deactivate rules with > 70% override rates
- ✅ Define pathways with clear, measurable completion criteria at each step
Security Best Practices
- ✅ Restrict
cl.cds_rules.manageto supervisors and quality staff - ✅ Review provider-level alert metrics to identify potential compliance gaps
- ✅ Ensure all pathway definitions are reviewed by a licensed clinician before activation
Performance Best Practices
- ✅ Keep active CDS rule count reasonable (< 50 rules per organization)
- ✅ Use RxCUI codes on medications for more accurate interaction checks
- ✅ Archive completed pathway progress records periodically
Data Management
Data Retention
Soft Delete
Pathway definitions use soft delete (deleted_at timestamp):
- Deleted pathways are hidden from the UI but preserved in the database
- Only org admins can delete pathways (RLS policy)
- Existing progress records linked to deleted pathways remain accessible
Integration Points
Change Log
Related Documentation
- User Guide:
docs/guides/cl/cl-08-cds-enhancements-user-guide.md - Specification:
specs/cl/specs/CL-08-ENHANCEMENTS.md - Edge Function Logs: Supabase Dashboard
Last Updated: 2026-02-26
Technical Support: Contact your organization’s system administrator.