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

# Population Health & Care Gap Management — Admin Guide

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

**Spec:** [CL-35](../../specs/cl/specs/CL-35-population-health-care-gap-management.md)
**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

| Setting                               | Default | Range / Constraint | Description                                                   |
| ------------------------------------- | ------- | ------------------ | ------------------------------------------------------------- |
| `assessment_due_warn_days`            | 60      | 1–180              | Days before due date to flag an assessment as "due soon".     |
| `assessment_due_overdue_days`         | 90      | 7–365              | Days after due date when assessment becomes "overdue".        |
| `followup_not_scheduled_warn_days`    | 7       | 1–30               | Days post-discharge to warn if no follow-up is scheduled.     |
| `followup_not_scheduled_overdue_days` | 14      | 7–60               | Days post-discharge after which the follow-up gap is overdue. |
| `screening_due_warn_days`             | 30      | 1–180              | Days 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

| Setting                 | Default | Sum  | Notes                                                    |
| ----------------------- | ------- | ---- | -------------------------------------------------------- |
| `risk_weight_safety`    | 0.40    | 1.00 | CL-07 safety component                                   |
| `risk_weight_outcome`   | 0.30    |      | CL-10 outcome component                                  |
| `risk_weight_metabolic` | 0.20    |      | CL-22 metabolic component                                |
| `risk_weight_moud`      | 0.10    |      | CL-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

| Setting            | Default | Range |
| ------------------ | ------- | ----- |
| `risk_tier_low`    | 25      | 0–100 |
| `risk_tier_medium` | 50      | 0–100 |
| `risk_tier_high`   | 75      | 0–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`:

| Flag                      | Default           | Effect                                                                                                                 |
| ------------------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `cl.pop_health_enabled`   | `false` (per org) | Master switch — when off, all CL-35 routes return 404 / are hidden from the navigation.                                |
| `care_gap_engine_enabled` | `true`            | Enables the nightly care gap evaluation cron. Set false to pause gap creation/auto-close (e.g. during data migration). |

***

## Cron / Scheduled Jobs

| Job                      | Schedule               | Purpose                                                                                      |
| ------------------------ | ---------------------- | -------------------------------------------------------------------------------------------- |
| `cl-care-gap-engine`     | nightly 02:00 local    | Re-evaluates all open gaps; emits `cl_care_gap_closed` for auto-closures.                    |
| `cl-risk-stratification` | nightly 03:00 local    | Recomputes composite risk scores for every active patient.                                   |
| `cl-hedis-calculator`    | weekly Sun 04:00 local | Computes/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)

| Regulation                        | Control                                                                |
| --------------------------------- | ---------------------------------------------------------------------- |
| HIPAA Privacy (45 CFR 164.514(b)) | Small-cell suppression (`n < 5 → '<5'`) on all aggregates and exports. |
| 42 CFR Part 2                     | MOUD risk component gated on `cl_check_sud_consent()`.                 |
| AHCCCS VBP                        | VBP CSV export with required aggregate columns.                        |
| NCQA HEDIS MY 2026                | AMM/IET thresholds 84/180/14/2 days; FUH/FUM via CL-29-EN-65.          |
| CMS MA STARS                      | Separate MA-specific measure definitions in seed files.                |
| SAMHSA CCBHC                      | Systematic panel management + proactive gap identification.            |
| CARF                              | Aggregate trend dashboards for program evaluation.                     |

See [REGULATORY\_COMPLIANCE\_TRACKER.md](../compliance/REGULATORY_COMPLIANCE_TRACKER.md)
for current status.

***

## Related Docs

* [Population Health User Guide](./population-health-user-guide.md)
* [CL-35 Integration Doc](../architecture/integrations/population-health-integration.md)
* [CL–FA VBP Quality Data Pipeline](../architecture/integrations/CL-FA-VBP-QUALITY-DATA-PIPELINE.md)
* [CL–FW Event Automation Integration](../architecture/integrations/CL-FW-EVENT-AUTOMATION-INTEGRATION.md)
