OpenEMR's built-in drug interaction check calls NLM's RxNav interaction API, which NLM discontinued on January 2, 2024. That endpoint now returns HTTP 404, and OpenEMR's prescription controller reads the failure as an empty result. Any patient with two or more active prescriptions gets "No interactions found." To fix OpenEMR drug interaction checking, you need a different interaction source.
If you administer OpenEMR, customize it for clients, or host it, check whether the code below is in your builds. We wrote this for software builders and clinical informatics leads; it is not clinical guidance. Code references were verified on November 15, 2026 against master commit c6ef43a.
Where does OpenEMR's drug interaction check live?
The check is in controllers/C_Prescription.class.php, inside list_action(), and runs only when the global rx_show_drug_drug is on. It builds a list of RxCUIs from the patient's active prescriptions and sends them to rxnav.nlm.nih.gov/REST/interaction/list.json.
At commit c6ef43a, the block runs from line 183 to line 227 of C_Prescription.class.php. The same call appears in each of these release tags:
| OpenEMR version | Line of the RxNav interaction call |
|---|---|
| master (commit c6ef43a, November 15, 2026) | 209 |
| v8_5_0 (released October 27, 2026) | 209 |
| v7_0_3 | 183 |
| v7_0_2 | 168 |
Here is an abridged excerpt. The alert-building lines inside the loop are replaced with a comment:
$rxcui_list = implode("+", array_filter($nameList));
// Unable to urlencode the $rxcui, since this breaks the + items on call to rxnav.nlm.nih.gov; so need to include it in the path
$response = oeHttp::get('https://rxnav.nlm.nih.gov/REST/interaction/list.json?rxcuis=' . $rxcui_list);
$data = $response->body();
$json = json_decode((string) $data, true);
if (!empty($json['fullInteractionTypeGroup'][0]['fullInteractionType'])) {
foreach ($json['fullInteractionTypeGroup'][0]['fullInteractionType'] as $item) {
// [abridged] appends an alert-danger block with comment, drug names, severity, description
}
} else {
$interaction = xlt('No interactions found');
}
Two other files are part of the feature. The setting is defined in library/globals.inc.php as a boolean labeled "Rx NLM Drug-Drug" in the Rx section, default off. The output appears in templates/prescription/general_list.html.twig under a "Drug-Drug Interaction" heading on the patient's prescription list. A third file, src/Rx/RxList.php, is a separate feature that uses RxNav's /REST/Prescribe/drugs endpoint for drug name lookup. That endpoint still answers (a name=warfarin query returned HTTP 200 on November 15, 2026), so drug search keeps working while interaction checking does not.
What happens now that NLM retired the RxNav interaction API?
NLM's RxNav FAQ states that "RxNav's drug/drug interaction features were discontinued on January 2, 2024." OpenEMR still makes the call, gets a 404 with a plain-text body, and shows "No interactions found." The rest of RxNav, including the RxNorm API, is still running.
The RxNav FAQ names the two sources the interaction API drew on: the ONCHigh list of high-priority interactions for EHRs, supplemented with CredibleMeds' list of drugs with a known risk of torsades de pointes, and DrugBank's drug-drug interaction dataset. NLM adds that those sources "may remain available." Before the shutdown, the archived Interaction API page gave the date as "on or about January 2, 2024."
The request OpenEMR sends, for warfarin (RxCUI 11289) and ibuprofen (RxCUI 5640), returned HTTP 404 on November 15, 2026, with content type text/plain and body Not found.
The user never sees an error because OpenEMR's HTTP wrapper configures Guzzle with 'http_errors' => false, so a 404 does not throw. The controller passes the body "Not found" to json_decode(), which returns null. The !empty(...) test fails and the code falls through to the "No interactions found" branch. On screen, a dead dependency looks exactly like a medication list with no flagged pairs.
The OpenEMR project is tracking it. Issue #9772, opened December 12, 2025, says the endpoint "now returns a 'Not Found' response" and that the project needs to "either remove the feature or replace the endpoint." Issue #12354, opened June 2, 2026, reports the same silent failure. Both were open on November 15, 2026. Users have hit it too: in an April 2026 forum thread, a user on OpenEMR 8.0.0 reported that warfarin plus ibuprofen raised no alert on a fresh install, and replies pointed to the RxNav discontinuation. Because #9772 proposes removing or replacing the feature, recheck the line numbers above against whatever release you run.
How to check your own OpenEMR instance
Confirm the code, the global, the RxNorm tables, and the network response together. A test pair that returns "No interactions found" is a symptom; the code and the 404 together are the diagnosis.
- Search your deployed copy of
C_Prescription.class.phpforrxnav.nlm.nih.gov/REST/interaction. Client forks and hosted builds may carry the line unchanged, and a local patch may have replaced it. - Open Admin > Config, go to the Rx tab, and look at "Rx NLM Drug-Drug." If it is off, the interaction block never renders. Sites that never turned it on never had checking from this code path.
- Confirm RxNorm is loaded. Without an
RXNCONSOtable the screen shows "Could not find RxNorm Table! Please install." On OpenEMR 6.0 and later the load is under Administration > Coding > External Data Loads (see the OpenEMR wiki page on importing RxNorm). The full monthly RxNorm release needs a UMLS login, but NLM's Current Prescribable Content subset does not: NLM says it requires no license and no UMLS login. - Create a test patient (fake data only) and add two active prescriptions that your pharmacist or clinical lead confirms should interact. Open the patient's prescription list and read the "Drug-Drug Interaction" block. With only one active prescription you will see "Need more than one drug." instead.
- From the application server, run
curl -i "https://rxnav.nlm.nih.gov/REST/interaction/list.json?rxcuis=11289+5640". A 404 with body "Not found" confirms the endpoint is gone. It also tells you whether the server has outbound internet access, which any API-based replacement will need. - Record the result for each site you host: setting on or off, RxNorm loaded or not, which eRx service prescribers use, and what the test pair showed. That inventory becomes your fix list.
What else is wrong with the built-in check?
Restoring the endpoint would not make the old code dependable. Its name matching is loose, it reads medications from the prescriptions table alone, and it checks only drug pairs while ignoring the RxCUI column OpenEMR already has.
A line-by-line read of list_action() turns up these limits:
- It queries only the
prescriptionstable, filtered toactive = 1. Medications recorded elsewhere in the chart are not part of the check. - It splits each drug name on spaces, keeps the first word, and runs
str LIKE '%word%'againstRXNCONSO, keeping whichever row comes back first. That can match the wrong concept or a different product, and a misspelling can match nothing. - The prescriptions table already has an
rxnorm_drugcodecolumn. The check does not use it. - It reads only the first interaction group in the response and shows drug-drug results. It does no drug-allergy screening.
- The template carries a notice that "Severity information will be missing if interaction is found." That fits NLM's description of the DrugBank feed, which was drawn from the non-commercial version of DrugBank, "which does not carry severity information."
If you ship a certified build, compare this with 45 CFR 170.315(a)(4). It requires interventions that automatically indicate drug-drug and drug-allergy contraindications before a medication order is completed during CPOE, and it requires that the severity level of drug-drug interventions be adjustable, with that adjustment limited to specific users or to an administrative function.
Your options for fixing OpenEMR drug interaction checking
You have four realistic paths: rely on screening inside an e-prescribing service, patch the core controller, build a custom module, or pair an eRx service with a module that reviews the rest of the chart. Which one fits depends on whether your sites already e-prescribe through a vendor and how many installs you maintain.
| Option | What it covers | Maintenance | Best fit |
|---|---|---|---|
| Screening inside an eRx service (Ensora eRx or the Weno module) | Whatever the vendor screens, against the medications that vendor knows about, at prescribing time in its workflow | Low on your side; tied to the vendor contract | Sites that already e-prescribe through one of these services |
Patch C_Prescription.class.php to call a new API | The existing prescription list block only | A core change you must carry and regression-test through each upgrade, or contribute upstream | A single install, or a fix you plan to submit to the project |
| Custom module with its own check | Whatever medication data you choose to send, shown where you choose | Module code is separate from core, but template overrides still need review each release | Consultancies and hosting vendors running many installs |
| eRx service plus a custom module | Prescribing-time screening plus a review of all active meds on the prescription list | Both of the above | Clinics where many medications are recorded outside the eRx workflow |
On the eRx side, the OpenEMR ePrescribe wiki page lists two services. Ensora Health (formerly NewCrop) is enabled with the "Enable Ensora eRx Service" global, and its wiki section mentions medications being used in interaction checking. WENO Exchange offers an "EZ Integration" for OpenEMR 7.0.2 and later, and the module ships in core at interface/modules/custom_modules/oe-module-weno. The wiki's WENO section does not describe interaction screening. The most specific public statement on Weno's screening is a November 2020 Weno announcement that its curated drug database includes ingredient data "for allergy checks" and "the ONCHigh data, which is list of high-priority drug-to-drug interactions." For more on the integration itself, see our guide to Weno Exchange eRx integration.
Before you rely on either vendor, ask for written answers to these questions:
- Does screening cover drug-allergy as well as drug-drug interactions?
- Which medications does it screen against: only those ordered through the vendor's workflow, or the full active list in OpenEMR?
- Does it cover OTC drugs and supplements?
- How many severity levels are there, and who can adjust them?
- Is the interaction content limited to a short high-priority list such as ONCHigh, and how often is it updated?
The last question matters because ONCHigh is short by design. The 2012 JAMIA paper that defined it approved 15 interactions out of 31 considered, and its panel said the list "does not necessarily represent a complete list" of contraindicated pairs. Also note that eRx screening happens inside the vendor's workflow, so OpenEMR's own prescription list block stays dead unless you turn the global off.
How to build a replacement check in an OpenEMR custom module
Build it as a module under interface/modules/custom_modules/, register it through Modules > Manage Modules, and show results through a template override or your own page. Decide on the integration point first, because OpenEMR exposes few events for prescriptions.
The oe-module-custom-skeleton project is the usual starting point. Its README says to clone it into the custom modules directory, install it with Composer or the filesystem, then register and enable it under Modules > Manage Modules. Core modules use the same oe-module- naming, as with oe-module-weno. The README also warns that "there are a limited number of events currently in the OpenEMR codebase."
The skeleton's Bootstrap.php shows the hooks you can use. Modules subscribe through Symfony's EventDispatcher. GlobalsInitializedEvent lets you add your own settings section, which is where an API base URL and key belong. TwigEnvironmentEvent::EVENT_CREATED lets a module prepend its own template path, so a module copy of prescription/general_list.html.twig can replace the dead block with one that calls your module's endpoint. RestApiCreateEvent lets you add a REST route. The core src/Events directory has folders for patients, encounters, appointments, billing, and others, but no prescription folder, and list_action() dispatches no event. Search your version for dispatcher calls before you design around one.
A practical design: turn "Rx NLM Drug-Drug" off, override the prescription list template, and have it fetch results from a module endpoint. That endpoint collects the patient's active medications, prefers the stored rxnorm_drugcode over name matching, sends the list to an interaction API, and returns a result with an explicit status. Cache results keyed on the set of RxCUIs so every page view does not trigger a new call, and clear the cache when the medication list changes. Keep the template override small and diff it against each new release.
This design reviews the active prescription list when someone opens it. It does not intercept an order before it is completed, and it does not screen allergies unless you send them. Prescribing-time screening still has to come from the eRx workflow or deeper changes to core.
The snippet below is illustrative. The URL, route, and response fields are placeholders for no particular vendor, and it contains no real key. Keep the behavior: fewer than two drugs is "not checked," any failed call or unexpected response is an error, and medications the API could not evaluate make the result "partial."
<?php
// ILLUSTRATIVE ONLY. Placeholder endpoint and response fields.
namespace Example\OpenEMR\Modules\InteractionCheck;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;
final class InteractionClient
{
public function __construct(
private readonly Client $http,
private readonly string $baseUrl, // from module globals, e.g. https://interactions.example.com
private readonly string $apiKey // from module globals; never hard-code
) {
}
/**
* @param list<string> $rxcuis RxCUIs for one patient's active medications
* @return array{status: string, results: array, unevaluated: array}
*/
public function check(array $rxcuis): array
{
$rxcuis = array_values(array_unique(array_filter($rxcuis)));
if (count($rxcuis) < 2) {
return ['status' => 'not_checked', 'results' => [], 'unevaluated' => []];
}
try {
$response = $this->http->post($this->baseUrl . '/v1/interactions/check', [
'headers' => ['Authorization' => 'Bearer ' . $this->apiKey],
'json' => ['medications' => array_map(fn ($c) => ['rxcui' => $c], $rxcuis)],
'timeout' => 5,
'http_errors' => true, // a 4xx or 5xx must throw
]);
$body = json_decode((string) $response->getBody(), true, 512, JSON_THROW_ON_ERROR);
} catch (GuzzleException | \JsonException $e) {
return ['status' => 'error', 'results' => [], 'unevaluated' => $rxcuis];
}
// Validate the shape. A 200 with a missing or malformed list is an error, not "none found".
if (!is_array($body) || !isset($body['interactions']) || !is_array($body['interactions'])
|| !isset($body['evaluated']) || !is_array($body['evaluated'])) {
return ['status' => 'error', 'results' => [], 'unevaluated' => $rxcuis];
}
$unevaluated = array_values(array_diff($rxcuis, $body['evaluated']));
return [
'status' => $unevaluated === [] ? 'checked' : 'partial',
'results' => $body['interactions'],
'unevaluated' => $unevaluated,
];
}
}
Guzzle is already a dependency in OpenEMR's composer.json, so the module does not add a new HTTP library. Show each status differently in the UI: not checked, checked with results, checked with none, partial (with the unevaluated drugs listed by name), and unavailable. The old code shows "unavailable" as "checked with none," and that is how a retired API produced a reassuring message for almost three years.
Which interaction API should an OpenEMR module call?
Pick a source your license allows for your use, that can identify medications reliably from RxCUIs or from identifiers you can map to, and that returns severity. The free options each carry a license or structure limit.
- DrugBank's academic license is free only for academic researchers whose work is not primarily for a commercial third party, and DrugBank says academic downloads are temporarily paused. Commercial use needs a paid agreement.
- DDInter publishes its data under CC BY-NC-SA 4.0, which rules out most commercial products.
- openFDA's drug label API returns the free-text Drug Interactions section of FDA labeling, queryable by RxCUI, and openFDA says not to rely on it "to make decisions regarding medical care." You would have to parse prose into pairs yourself, or use a service such as RxLabelGuard that returns label-derived pairs with severity and SPL citations.
- Commercial drug knowledge bases and interaction APIs license structured, severity-graded content and differ in coverage, identifiers, and terms.
Our comparison of NLM drug interaction API alternatives covers these routes in more depth, and the openFDA drug interactions guide shows what the label field does and does not give you. For alert design and override logging in a wider EHR build, see how to add drug interaction checking to an EHR.
Orisan Sage is one API option. Sage evaluates a full medication list at once, including prescriptions, OTC drugs, and supplements, and explains the mechanism behind each interaction, such as a shared CYP450 pathway or additive toxicity. Results link to evidence, and the knowledge draws on FDA drug labeling, DailyMed, and our own clinical review. It is available over REST and GraphQL with usage-based pricing; the Sage interaction API for EHR developers page covers request formats. Sage has no affiliation with or endorsement from the OpenEMR project.
What to do first
Start with the inventory from the checklist. For every OpenEMR install you run or host, record whether "Rx NLM Drug-Drug" is on, whether its code still calls /REST/interaction/list.json, and which eRx service its prescribers use. Sites with the setting on and no eRx screening have been showing a "No interactions found" message with no data behind it, possibly since January 2024. Fix or disable the block there first, tell the clinicians who use it, and take the exposure window to whoever handles patient safety and risk review under your own policies. If you want a second set of eyes on a module design or a multi-site rollout, our integration engineering team does this kind of work.