claimrevolution / oe-module-dorn
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
Requires
- php: >=8.1
- openemr/oe-module-installer-plugin: ^0.1.0
- symfony/event-dispatcher: ^4.4 || ^5.0 || ^6.0 || ^7.0
Requires (Dev)
- phpunit/phpunit: ^11.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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
- Administration > Globals > "DORN Lab Integration"
- ClaimRev Environment:
P(production),S(staging) orD(development). It selects the ZITADEL instance the module signs in to:https://auth.claimrev.comfor P,https://auth-staging.claimrev.comfor 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.
- ClaimRev Environment:
- 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
Authorizationheader to PHP. With Apache and PHP-FPM that meansCGIPassAuth On(or a rewrite that setsHTTP_AUTHORIZATION). Without it, every notification is refused with 401, and the card's Send Test says so. notify.phpanswers before it imports when PHP-FPM is used (fastcgi_finish_request). Otherwise the background service imports within 5 minutes.- Background service:
DORN_Resultsruns every 5 minutes from OpenEMR's background services (while someone is logged in, or from cron withphp 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
- Update
Bootstrap::MODULE_VERSIONandCHANGELOG.md. - Tag
vX.Y.Zonmainand 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.