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.

Spec: CL-35 Audience: CL admins, compliance officers, integration engineers Last Updated: 2026-05-11

Configuration

All CL-35 configuration is stored in cl_module_settings.custom_fields under the population_health key, scoped per organization.

Care gap thresholds

SettingDefaultRange / ConstraintDescription
assessment_due_warn_days601–180Days before due date to flag an assessment as “due soon”.
assessment_due_overdue_days907–365Days after due date when assessment becomes “overdue”.
followup_not_scheduled_warn_days71–30Days post-discharge to warn if no follow-up is scheduled.
followup_not_scheduled_overdue_days147–60Days post-discharge after which the follow-up gap is overdue.
screening_due_warn_days301–180Days before screening due date to flag.
Jurisdiction note (PF-96): These thresholds are clinical defaults, not state-Medicaid mandates. If a state defines stricter timeliness requirements, the values are overridden via the org’s PF-96 jurisdiction profile (useJurisdictionProfile(siteId) on the frontend; pf_resolve_jurisdiction_profile() in edge functions). Arizona AHCCCS is the default profile, not a universal default.

Risk stratification weights

SettingDefaultSumNotes
risk_weight_safety0.401.00CL-07 safety component
risk_weight_outcome0.30CL-10 outcome component
risk_weight_metabolic0.20CL-22 metabolic component
risk_weight_moud0.10CL-21 MOUD adherence; gated on 42 CFR Part 2 consent
Weights MUST sum to 1.00. The risk engine validates and rejects configurations that violate this constraint. When MOUD is excluded (no consent or no MOUD enrollment), its weight is redistributed proportionally across the remaining components.

Risk tier thresholds

SettingDefaultRange
risk_tier_low250–100
risk_tier_medium500–100
risk_tier_high750–100
A patient with a composite score ≥ high is “critical”; ≥ medium is “high”; ≥ low is “medium”; otherwise “low”.

Feature Flags

Configured in pf_feature_flags:
FlagDefaultEffect
cl.pop_health_enabledfalse (per org)Master switch — when off, all CL-35 routes return 404 / are hidden from the navigation.
care_gap_engine_enabledtrueEnables the nightly care gap evaluation cron. Set false to pause gap creation/auto-close (e.g. during data migration).

Cron / Scheduled Jobs

JobSchedulePurpose
cl-care-gap-enginenightly 02:00 localRe-evaluates all open gaps; emits cl_care_gap_closed for auto-closures.
cl-risk-stratificationnightly 03:00 localRecomputes composite risk scores for every active patient.
cl-hedis-calculatorweekly Sun 04:00 localComputes/UPSERTs cl_quality_measure_periods; emits cl_quality_measure_period_calculated.
All cron functions are deployed via Supabase Edge Functions and use createCronHandler from _shared/cron-handler.ts.

HEDIS / MA STARS Measure Definitions

Measure definitions live as versioned JSON under supabase/seeds/cl_hedis_measure_definitions/. Each annual NCQA spec update is added as a new variant rather than overwriting prior years to maintain auditability. FUH/FUM are consumed from CL-29-EN-65 and not re-implemented in CL-35. To add a new measure year:
  1. Update the relevant JSON file with a new effective_year variant.
  2. Re-deploy cl-hedis-calculator (no schema migration needed).
  3. Re-run the calculator for any year requiring re-computation.

Permissions

CL-35 ships these permission keys (registered in PF-30):
  • cl.care-gaps.view
  • cl.care-gaps.close
  • cl.risk-stratifications.view
  • cl.population-dashboard.view
  • cl.quality-measures.view
  • cl.quality-measures.export
Assign to roles via Settings → Permissions.

Compliance Controls (built-in)

RegulationControl
HIPAA Privacy (45 CFR 164.514(b))Small-cell suppression (n < 5 → '<5') on all aggregates and exports.
42 CFR Part 2MOUD risk component gated on cl_check_sud_consent().
AHCCCS VBPVBP CSV export with required aggregate columns.
NCQA HEDIS MY 2026AMM/IET thresholds 84/180/14/2 days; FUH/FUM via CL-29-EN-65.
CMS MA STARSSeparate MA-specific measure definitions in seed files.
SAMHSA CCBHCSystematic panel management + proactive gap identification.
CARFAggregate trend dashboards for program evaluation.
See REGULATORY_COMPLIANCE_TRACKER.md for current status.