Search by

claimrevolution / oe-module-dorn

bradsharp54

OpenEMR module — DORN (Diagnostic Ordering Result Network) lab integration

Package info

github.com/claimrevolution/oe-module-dorn

Type:openemr-module

pkg:composer/claimrevolution/oe-module-dorn

Statistics

Installs: 111

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v2.0.0 2026-12-04 20:02 UTC

This package is auto-updated.

Last update: 2026-12-04 22:30:01 UTC


README

Connects OpenEMR to the DORN (Diagnostic Ordering Result Network) to send lab orders (HL7) and receive results, through ClaimRev's DORN API (claimrevolution/DornApi).

Install

composer require claimrevolution/oe-module-dorn

Then enable it under Modules > Manage Modules, and run Setup > Run Upgrade for the module.

To pin an older release (for example on an OpenEMR line a newer one doesn't support), require the version explicitly:

composer require claimrevolution/oe-module-dorn:1.0.2

Every tag stays on Packagist, so a pin costs nothing to maintain.

Compatibility

Single binary supporting OpenEMR 7.x, 8.0.x, and flex/master via the runtime shims in src/Compat/. Requires PHP 8.1 or later.

Configuration

  1. Administration > Globals > "DORN Lab Integration"
    • ClaimRev Environment: P (production), S (staging) or D (development). It selects the ZITADEL instance the module signs in to: https://auth.claimrev.com for P, https://auth-staging.claimrev.com for S and D. P is ClaimRev production, which practices use even while their DORN account is still on DORN test (UAT).
    • API URL (optional): leave blank to use the DORN API of the ClaimRev environment. Set it only to point the module at another DORN API.
  2. DORN > Setup: upload the ZITADEL service-user key file (JSON) that ClaimRev provides, then Save Key and Test Connection. The key must come from the same environment as the setting above; a staging key will not work in production.

The Connectivity tab shows the instance, the service user, the API server, the account the key signs in as, and any sign-in error.

How sign-in works

The module authenticates as a ZITADEL service user with the JWT-bearer grant (RFC 7523): it signs a short RS256 assertion with the key file's private key and exchanges it at <instance>/oauth/v2/token, scoped to the ClaimRev project (urn:zitadel:iam:org:project:id:<projectId>:aud). The access token is cached until shortly before it expires. The key file and the token are stored encrypted in the mod_dorn_auth table; only the key id, service user id and expiry are ever shown.

DORN test and production

ClaimRev puts each DORN account on DORN test (UAT) or DORN production, and the module asks the API which one (GET api/Customer/v1/DornEnvironment, cached for a few minutes). The Connectivity and Setup tabs show it, and every DORN screen shows a TEST banner while the account is on DORN test.

The module remembers which DORN environment its setup (routes, the procedure providers it created, installed compendiums) was made in. One OpenEMR works with one DORN environment at a time, so after the key is replaced with one whose account is on the other environment, creating routes, installing compendiums and sending orders are blocked until an administrator presses Retire DORN test setup (or production) on the Setup tab. That retires the old routes, makes their procedure providers inactive and renames them (for example LabCorp (DORN test)), and makes their compendium tests inactive. Nothing is deleted, so past orders keep their history. Then create the routes again for the new environment. If the API can't report the environment (an older API, or a key not yet linked), nothing is blocked and no banner shows.

The DORN API maps the service user to your DORN account. If the Setup tab says the service user is not linked, ask ClaimRev to link it.

Notifications (webhook)

With notifications on, the Labs API POSTs to https://<site>/interface/modules/custom_modules/oe-module-dorn/public/notify.php?site=<site id> whenever a result, an order update or a compendium is ready. Turn them on from the Notifications card on the Setup tab.

  • The address must be https and reachable from the internet. A site behind a firewall leaves notifications off and still gets everything: Retrieve Results on the Results tab, or the background service below.
  • The web server must pass the Authorization header to PHP. With Apache and PHP-FPM that means CGIPassAuth On (or a rewrite that sets HTTP_AUTHORIZATION). Without it, every notification is refused with 401, and the card's Send Test says so.
  • notify.php answers before it imports when PHP-FPM is used (fastcgi_finish_request). Otherwise the background service imports within 5 minutes.
  • Background service: DORN_Results runs every 5 minutes from OpenEMR's background services (while someone is logged in, or from cron with php library/ajax/execute_background_services.php <site>). With "Automatically import results into the chart" on, it also imports ready results without notifications.

Development

composer install
composer test

The unit tests (tests/Unit) cover the module's pure code: key-file parsing, assertion signing and the environment-to-instance mapping. They run on every push in GitHub Actions (.github/workflows/tests.yml). Pages, database access and API calls need a real OpenEMR install and are checked by manual QA.

Releasing

  1. Update Bootstrap::MODULE_VERSION and CHANGELOG.md.
  2. Tag vX.Y.Z on main and publish a GitHub release from the tag. Packagist picks up the tag automatically. The release's source archive leaves out development files (see .gitattributes).

License

GNU General Public License v3.0 or later. See LICENSE.