PHPackages                             claimrevolution/oe-module-claimrev-connect - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. claimrevolution/oe-module-claimrev-connect

ActiveOpenemr-module[Utility &amp; Helpers](/categories/utility)

claimrevolution/oe-module-claimrev-connect
==========================================

OpenEMR Custom Module Claim Revolution, LLC Connector

v2.1.6(1w ago)299.5k1[1 issues](https://github.com/claimrevolution/oe-module-claimrev-connect/issues)GPL-3.0PHPPHP &gt;=7.1

Since Aug 21Pushed 1w ago2 watchersCompare

[ Source](https://github.com/claimrevolution/oe-module-claimrev-connect)[ Packagist](https://packagist.org/packages/claimrevolution/oe-module-claimrev-connect)[ RSS](/packages/claimrevolution-oe-module-claimrev-connect/feed)WikiDiscussions main Synced yesterday

READMEChangelog (6)Dependencies (9)Versions (36)Used By (0)

ClaimRev Connect for OpenEMR
============================

[](#claimrev-connect-for-openemr)

Connects OpenEMR to the [Claim Revolution, LLC](https://www.claimrev.com)clearinghouse and adds revenue-cycle dashboards on top of the data the clearinghouse returns. Claim and ERA exchange runs over the ClaimRev REST API; eligibility, reconciliation, denial analytics, AR aging, and a claim status dashboard run on the local copy of that data plus OpenEMR's billing tables.

---

Features
--------

[](#features)

### Billing flow

[](#billing-flow)

PageWhat it does`public/x12Tracker.php`Tracks claim files sent to ClaimRev (status, retry).`public/era.php`Lists ERA / 835 files received from ClaimRev with download.`public/payment_advice.php`ERA-driven payment advice search + posting to OpenEMR's `ar_session` / `ar_activity`. Single-row + batch post supported.`public/claims.php`Claim search against the ClaimRev portal with detail expansion, sort, CSV export, requeue, mark-worked, and editor links.`public/claim_status.php`Work queue: claims needing attention, with timeline of every status event we've seen.`public/reconciliation.php`Side-by-side OpenEMR claim status vs ClaimRev status with discrepancy classification.### Eligibility

[](#eligibility)

PageWhat it does`public/appointments.php`Upcoming appointments with their primary-insurance eligibility status and "check now" / queue actions.Eligibility card on patient chartPer-product (Eligibility / Coverage Discovery / Demographics / MBI Finder) results with AI chat over the saved response.Calendar indicatorsColor codes events on the OpenEMR calendar by eligibility status — green / red / yellow / grey. Off by default.Eligibility sweepBackground service that proactively queues eligibility checks for the next N days of appointments on configured weekdays.### Reporting / dashboards

[](#reporting--dashboards)

PageWhat it does`public/aging_report.php`AR aging by payer with current / 30 / 60 / 90 / 120 / 120+ buckets and CSV export.`public/denial_analytics.php`Denial rollups by reason code, by payer, by month with date filters.`public/recoupment_report.php`Identifies negative ERA adjustments (recoupments / takebacks).`public/patient_balance.php`Patient-responsibility queue: encounters with outstanding balance after insurance closed, with statement tracking.Dashboard KPIs`DashboardService` exposes claim throughput, AR, denial, collection, and patient-AR metrics for the home tile.---

Configuration
-------------

[](#configuration)

All settings live under **Admin → Globals → ClaimRev Connect**. Names are the `oe_claimrev_*` keys defined in `src/GlobalConfig.php`.

### Required to function

[](#required-to-function)

SettingNotes`oe_claimrev_config_environment``P` for production (default), `D` for a custom identity provider (Entra ID External, Zitadel, …).`oe_claimrev_config_clientid`OAuth client ID. Available in the ClaimRev Portal under **Client Connect**.`oe_claimrev_config_clientsecret`OAuth client secret. Encrypted at rest. Contact ClaimRev support for this value.Without these three set, `GlobalConfig::isConfigured()` returns false and the module skips event registration entirely (no menu item, no eligibility events, no posting endpoints) — pages that try to load show `ModuleNotConfiguredException`.

### Optional

[](#optional)

SettingWhat it does`oe_claimrev_x12_partner_name`X12 partner record name. Default `ClaimRev`. Used by `ClaimRevModuleSetup::createPartnerRecord`.`oe_claimrev_config_service_type_codes`Comma-separated 270 service-type codes. Empty asks for all benefits.`oe_claimrev_benefit_code_filter`Comma-separated benefit codes (1, 6, A, B, C, …). Filters the eligibility detail view locally; not sent to ClaimRev.`oe_claimrev_config_auto_send_claim_files`Auto-send X12 claim files. When off, files queue but are sent manually.`oe_claimrev_config_add_menu_button`Add the module's top-nav menu item (re-login required).`oe_claimrev_config_add_eligibility_card`Add the eligibility card to the patient dashboard.`oe_claimrev_config_use_facility_for_eligibility`Use the facility (rather than the appointment provider) as the 270 information receiver.`oe_claimrev_enable_rte`Real-time eligibility — kick off a check when an appointment is created.`oe_claimrev_eligibility_results_age`Days before a stored eligibility result is considered stale. Used by the sweep + calendar indicators.`oe_claimrev_send_eligibility`Master switch for the background eligibility send service.`oe_claimrev_enable_watchdog`Auto-resets ClaimRev background services that stay in `running=1` for &gt;10 minutes (PHP crash, OOM kill). Default on.`oe_claimrev_enable_notifications`Poll ClaimRev for portal notifications and deliver them as OpenEMR pnotes. Default on.`oe_claimrev_notification_recipient`Semicolon-separated OpenEMR usernames to receive notifications. Default `admin`.`oe_claimrev_enable_test_mode`Switches every test-mode-capable page (Payment Advice, ERA, Reconciliation, Eligibility) to mock data generated from local billing rows. ERA Download returns a 0-byte placeholder; Reconciliation row actions short-circuit to fake-success.`oe_claimrev_enable_sweep`Master switch for the eligibility sweep background service.`oe_claimrev_sweep_days`Comma-separated day-of-week numbers (`0` = Sunday … `6` = Saturday). Default `1,4` (Mon + Thu).`oe_claimrev_sweep_lookahead`Days ahead to sweep. Default `7`.`oe_claimrev_enable_calendar_indicators`Color-code OpenEMR calendar events by eligibility status. May impact calendar performance on busy schedules.### Identity-provider overrides

[](#identity-provider-overrides)

Auto-configured for production. Only override when pointing at a custom identity provider:

`oe_claimrev_config_portal_url`, `oe_claimrev_config_dev_api_url`, `oe_claimrev_config_dev_scope`, `oe_claimrev_config_dev_authority`.

---

Background services
-------------------

[](#background-services)

Registered in `background_services` by `table.sql` and re-enabled on module enable via `ModuleManagerListener::enable`. Each one has a `@phpstan-ignore openemr.noGlobalNsFunctions` shim that delegates to a namespaced service class so the cron table can address it by name.

ServiceFunctionCadenceDelegate`ClaimRev_Send``start_X12_Claimrev_send_files`1 minute`ClaimUpload::sendWaitingFiles``ClaimRev_Receive``start_X12_Claimrev_get_reports`240 minutes`ReportDownload::getWaitingFiles``ClaimRev_Elig_Send_Receive``start_send_eligibility`1 minute`EligibilityTransfer::sendWaitingEligibility``ClaimRev_Notifications``start_claimrev_notifications`60 minutes`NotificationPollService::run``ClaimRev_Watchdog``start_claimrev_watchdog`20 minutes`ClaimRevModuleSetup::resetStuckServices``ClaimRev_Elig_Sweep``start_eligibility_sweep`1440 minutes (daily)`EligibilitySweepService::run`The watchdog only resets services other than itself; otherwise a watchdog run that exceeds 10 minutes would clear its own running flag mid-execution.

---

Database tables
---------------

[](#database-tables)

All created by `table.sql`. Migrations run once on enable via `ClaimRevModuleSetup::runMigrations`, which understands the standard OpenEMR `#IfNotRow / #IfNotColumnType / #IfNotTable / #EndIf` directives.

TablePurpose`mod_claimrev_eligibility`One row per (patient, payer responsibility, request) eligibility check + JSON result.`mod_claimrev_notifications`Tracks which portal notifications have already been delivered as pnotes.`mod_claimrev_claims`Per-claim mirror of ClaimRev status (object id, status name/id, ERA classification, paid amount, ar\_session\_id, last sync).`mod_claimrev_claim_events`Append-only event log per claim (submitted, rejected, accepted, denied, status\_check\_276, era\_received, payment\_posted, requeued, corrected, manual\_note, claimrev\_sync).`mod_claimrev_patient_statements`Statement history for the patient balance queue (date, method, amount, status, notes).---

Development
-----------

[](#development)

### Code conventions

[](#code-conventions)

This module follows the OpenEMR developer conventions documented in the top-level `CLAUDE.md`. In particular:

- Every PHP file starts with `declare(strict_types=1)`.
- Superglobal access goes through `ModuleInput` (which routes through `filter_input` so the `openemr.forbiddenRequestGlobals` PHPStan rule passes).
- Mixed cells from `QueryUtils::fetchRecords` are narrowed with `TypeCoerce::asString / asInt / asFloat / asBool / asNullableInt`rather than bare casts (`(int) $mixed` is rejected at PHPStan level 10).
- `catch (\Throwable)` and `catch (\Exception)` are forbidden by `openemr.forbiddenCatchType`. Use `catch (\RuntimeException | \LogicException)` instead. `ClaimRevException`extends `RuntimeException` so this still catches our own throws.
- Database calls go through `QueryUtils`; legacy `sqlStatement` / `sqlInsert` / `sqlQuery` / `sqlStatementNoLog` are blocked by `openemr.deprecatedSqlFunction`.
- Error reporting uses the PSR-3 logger via `ServiceContainer::getLogger`, not `error_log()`.

### Tests

[](#tests)

Pure helpers have isolated test coverage in `tests/Tests/Isolated/Modules/ClaimRevConnector/`:

```
TypeCoerceTest                  asString / asInt / asFloat / asBool / asNullableInt
ValueMappingTest                mapPayerResponsibility (case-insensitive primary/secondary/tertiary → p/s/t)
AgingReportServiceTest          toCsv with RFC 4180 escape
ClaimTrackingServiceTest        parsePcn (mirrors PaymentAdvicePostingService)
PaymentAdvicePostingServiceTest buildIdempotencyReference, parsePatientControlNumber, getClaimStatusLabel, sumServiceAmounts
ReconciliationServiceTest       computeDiscrepancy classifier

```

Run them from the repo root:

```
composer phpunit-isolated -- --filter ClaimRevConnector
```

DB-bound and API-bound code paths (the `reconcile()` / `searchClaims()` / `post()` entry points) need a real OpenEMR install; they are exercised by manual QA through the UI.

### Static analysis

[](#static-analysis)

`composer phpstan` runs at level 10. Custom rules in `tests/PHPStan/Rules/`enforce the conventions above. Avoid adding new baseline entries — fix the underlying type error.

`composer rector-check` keeps the module on modern PHP idioms; run `composer rector-fix` to apply suggestions.

### Branches

[](#branches)

This module is maintained on two branches in the ClaimRev fork:

- **`master`** — targets upstream OpenEMR's master branch. No back-compat shims, latest PHP / Symfony / dependency versions.
- **`release/v7-compat`** — targets OpenEMR 7.x. Adds a thin `src/Compat/` shim layer plus a reflection-based `CsrfHelper` that detects the 7.x vs 8.x `CsrfUtils::collectCsrfToken` signature. The module-internal API is the same; only the OpenEMR-internal API hooks differ.

After merging changes from `master` into `release/v7-compat`, run `tools/v7-overlay-restore.sh` to put the shim files back. The script is idempotent.

---

Troubleshooting
---------------

[](#troubleshooting)

### `ModuleNotConfiguredException` on every module page

[](#modulenotconfiguredexception-on-every-module-page)

The required globals (`oe_claimrev_config_clientid`, `oe_claimrev_config_clientsecret`, `oe_claimrev_config_environment`) aren't set. Go to **Admin → Globals → ClaimRev Connect**, fill the three values, save. Re-login (the module's menu item only renders after a fresh login).

### Background services stuck in `running=1`

[](#background-services-stuck-in-running1)

The watchdog should reset stuck services every 20 minutes. To reset manually:

```
UPDATE background_services
SET running = 0
WHERE running = 1
  AND name LIKE '%ClaimRev%'
  AND name != 'ClaimRev_Watchdog';
```

The watchdog excludes itself for the reason noted above.

### Wrong build for the OpenEMR version

[](#wrong-build-for-the-openemr-version)

The `master` branch ships clean for OpenEMR 8.x. For 7.x, install from the `release/v7-compat` branch — the shim layer is required there. Symptoms of running the wrong build are typically `Class not found`errors for `OpenEMR\Common\Csrf\CsrfUtils` (8.x build on 7.x) or unexpected method-signature errors (7.x build on 8.x).

### "Already posted" warnings on a payment advice that wasn't

[](#already-posted-warnings-on-a-payment-advice-that-wasnt)

`PaymentAdvicePostingService::isAlreadyPosted` keys off the `ar_session.reference` value, which uses a fixed `ClaimRev-{paymentAdviceId}` prefix (`PaymentAdvicePostingService::REFERENCE_PREFIX`). If the prefix or the paymentAdviceId changes between runs, the dedup check stops matching and the same advice can post twice. The shape is regression-tested in `PaymentAdvicePostingServiceTest::testReferencePrefixHasExpectedShape`.

---

License
-------

[](#license)

GPL v3 — see [`LICENSE`](LICENSE) and the [OpenEMR project license](https://github.com/openemr/openemr/blob/master/LICENSE).

Contributing
------------

[](#contributing)

Open an issue or send a pull request against [claimrevolution/openemr\_fork](https://github.com/claimrevolution/openemr_fork)or the upstream module path [`interface/modules/custom_modules/oe-module-claimrev-connect`](https://github.com/openemr/openemr/tree/master/interface/modules/custom_modules/oe-module-claimrev-connect)in the main OpenEMR repo.

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance88

Actively maintained with recent releases

Popularity38

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~42 days

Recently: every ~172 days

Total

34

Last Release

12d ago

Major Versions

V1.0.29 → v2.1.32026-05-22

PHP version history (2 changes)v1.0.0PHP ^7.1

v1.0.18PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a7f485599763f2a24b029b06259de733dcec192d26093deab2725b8a3accb47?d=identicon)[bradsharp54](/maintainers/bradsharp54)

---

Top Contributors

[![claimrevolution](https://avatars.githubusercontent.com/u/37876876?v=4)](https://github.com/claimrevolution "claimrevolution (99 commits)")[![juggernautsei](https://avatars.githubusercontent.com/u/834958?v=4)](https://github.com/juggernautsei "juggernautsei (1 commits)")[![robertdown](https://avatars.githubusercontent.com/u/1381170?v=4)](https://github.com/robertdown "robertdown (1 commits)")

---

Tags

openemropenemr-moduleclearinghouseclaimrev

### Embed Badge

![Health badge](/badges/claimrevolution-oe-module-claimrev-connect/health.svg)

```
[![Health](https://phpackages.com/badges/claimrevolution-oe-module-claimrev-connect/health.svg)](https://phpackages.com/packages/claimrevolution-oe-module-claimrev-connect)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M204](/packages/sulu-sulu)[blackfire/player

A powerful web crawler and web scraper with Blackfire support

49617.1k](/packages/blackfire-player)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M577](/packages/shopware-core)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[cpsit/project-builder

Composer package to create new projects from project templates

2639.3k3](/packages/cpsit-project-builder)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
