anun333 / oe-module-ccbhc-report
The CCBHC clinic-collected quality measures for OpenEMR: Time to Services, social drivers screening and depression screening, in the shape of SAMHSA's reporting template.
Package info
github.com/anun333/oe-module-ccbhc-report
Type:openemr-module
pkg:composer/anun333/oe-module-ccbhc-report
Requires
- php: >=8.2
- anun333/openhealthcare-common: ^1.3.3
- openemr/oe-module-installer-plugin: ^0.1.5
Requires (Dev)
- phpunit/phpunit: ^11.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Status: 0.1.1, a pre-release. Tested on OpenEMR with synthetic data only.
The quality measures a Certified Community Behavioral Health Clinic (CCBHC) collects itself, computed from OpenEMR's records and laid out as SAMHSA's data reporting template lays them out, so each table copies into the workbook. The measures follow SAMHSA's Quality Measures for Behavioral Health Clinics Technical Specifications and Resource Manual (February 2024) and its March 2025 errata.
What installing it changes in your database, what it reads and writes, and what it hooks into are listed in FOOTPRINT.md, generated from the source.
What it does
- Time to Services (I-SERV): the average business days from a New Client's First Contact to the Initial Evaluation and to the Initial Clinical Service, and the average hours from a crisis contact to face-to-face crisis care. Business days leave out weekends, federal holidays (on their observed days) and the state holidays you list.
- Screening for Social Drivers of Health (SDOH): adults with a qualifying visit, and of them those screened for all five domains (food, housing, transportation, utilities, interpersonal safety) in the year, through OpenEMR's SDOH assessment or a billed M1207.
- Screening for Depression and Follow-Up Plan (CDF-AD, 18 and older; CDF-CH, 12 to 17): the most recent PHQ-9 or PHQ-2 on the day of a qualifying visit or in the 14 days before, negative, or positive with a follow-up (a referral or a care plan intervention) that day, or the G8431 and G8510 reporting codes. Bipolar disorder before the visit excludes; G8433 is an exception.
- Case Load Characteristics: clients seen in the year by age, sex, ethnicity, race, insurance and (where the UDS module records it) veteran status.
- Each measure is stratified as the template asks: age where it applies, payer (Medicaid, with CHIP under Medicaid and without dual eligibles, or Non-Medicaid, on the first visit of the year), ethnicity and race (from the CDC codes OpenEMR keeps on its race and ethnicity lists). A client list per measure (CSV) says, for each client, whether they counted and why.
- Requests for Services (menu): the front desk logs the day a person or guardian asks for services, the First Contact the measure counts from, which OpenEMR doesn't record. The Staff Worklist, when installed, gets a Requests for services tab: each request with no evaluation yet, high priority past 10 business days (1 for an urgent request).
- Crisis episodes: when a crisis contact came in and when face-to-face crisis care began. Contacts handled on the crisis line alone are logged but not measured.
What it does not compute
- Depression Remission at Six Months (DEP-REM-6) belongs to MN Community Measurement, which reserves all rights to it, and Unhealthy Alcohol Use: Screening and Brief Counseling (ASC) to NCQA, whose notice requires a custom license to identify records or calculate results with it. Both are required. Permission has been asked for; until it comes, compute them another way.
- The optional measures: TSC, WCC-CH and CBP-AD are NCQA's; the suicide risk measures (SRA-A, SRA-C) are reported through their electronic versions, CMS161 and CMS177.
Who can open what
patients/medfor the report, its client lists and the crisis log (write or addonly to log);patients/demofor the requests log (write or addonly to log), so the front desk can keep it;admin/superfor the settings: the visit categories that are Initial Evaluations and Initial Clinical Services, state holidays, and how each insurance company counts for the payer strata.
Every page view, download and change is in the audit log.
Install
From the OpenEMR directory:
composer require anun333/oe-module-ccbhc-report
The installer plugin places it in interface/modules/custom_modules/oe-module-ccbhc-report/, and Composer brings openhealthcare-common with it. Without Composer, copy this directory there and run composer install --no-dev in it, which puts openhealthcare-common in its own vendor/; the module stays switched off until it finds that package one way or the other.
Then go to Modules › Manage Modules › Unregistered, and Register, Install and Enable it. An administrator then chooses the visit categories in the settings; Time to Services needs them.
Compatibility
Written for OpenEMR 7.0 and later through openhealthcare-common's compatibility layer; its bootstrap never stops a page on any version. OpenEMR's SDOH assessment came in 7.0.4; before it, only a billed M1207 counts for the SDOH measure.
PHP security. PHP's php2shell advisory (2026-10-21; CVE-2026-109618 and CVE-2026-109619) is remote code execution without logging in, and it is being exploited. Run OpenEMR on PHP 8.2.35, 8.3.36, 8.4.27, 8.5.12 or later.
Development
composer install
vendor/bin/phpunit
php tools/footprint.php --check
Sources
- SAMHSA, Quality Measures for Behavioral Health Clinics Technical Specifications and Resource Manual (February 2024), the 2025 errata (March 2025) and its Appendices A and B, and the data reporting template (February 2024).
- The code lists in
data/codes.jsoncome from that manual. CPT codes are listed as numbers only; CPT is a registered trademark of the American Medical Association, and its descriptions are not reproduced. The manual's dental (CDT) codes are left out. - The SDOH measure is in the public domain (CMS). Time to Services is SAMHSA's own measure.
Other modules for OpenEMR
See openhealthcare-common for the modules that share it.
License
GPL-3.0-or-later, as OpenEMR. See LICENSE.