Use Case: EHR Integration

Add Drug Interaction Checking to Your EHR in Minutes

Integrate clinical decision support into your EHR, CPOE, or pharmacy system with a single REST API call. Structured severity scoring, FDA evidence citations, and sub-second response times.

Why EHR systems need drug interaction checking

Drug-drug interactions are a leading cause of preventable adverse drug events (ADEs) in both inpatient and outpatient settings. According to the FDA, adverse drug events account for approximately 1.3 million emergency department visits annually in the United States, and a significant portion of these involve interactions between concurrently prescribed medications that could have been caught by automated screening.

Electronic Health Record systems sit at the center of the prescribing workflow. When a clinician enters a medication order, the EHR has access to the patient's complete medication list, allergies, and diagnoses. This makes the EHR the single most effective point to intercept dangerous drug combinations before they reach the patient. However, interaction checking is only as good as the data and API behind it.

There are several clinical workflows where drug interaction checking is critical:

CPOE (Computerized Physician Order Entry)

CPOE is the primary workflow where drug interaction checking fires. When a prescriber enters a new medication order, the EHR should automatically check the new drug against every active medication in the patient's profile. If a clinically significant interaction is detected, the system displays an alert before the order is signed. This is the front line of medication safety in hospitals and clinics.

A drug interaction API integrated at the CPOE level enables real-time decision support without requiring the prescriber to leave the ordering screen. The API receives the full medication list (existing plus proposed), returns any detected interactions with severity and clinical context, and the EHR renders the appropriate alert based on the severity level.

Pharmacy dispensing safety checks

Even after a prescription clears the ordering workflow, a second safety net exists at the pharmacy. Pharmacy management systems perform their own interaction screening when processing new prescriptions. This catches interactions that may have been missed at the point of prescribing, especially when a patient fills prescriptions at multiple pharmacies or sees multiple providers who use different EHR systems.

Pharmacy software typically calls the interaction API when a pharmacist initiates the verification step, comparing the new fill against the patient's prescription history. Community pharmacies, hospital pharmacies, and mail-order pharmacies all benefit from automated interaction screening at this stage.

Medication reconciliation

Medication reconciliation occurs at transitions of care: hospital admission, transfer between units, discharge to home, or handoff to a new provider. During reconciliation, a clinician reviews the patient's complete medication list, which may include home medications, over-the-counter drugs, supplements, and newly prescribed inpatient medications.

Running the full medication list through a drug interaction API at admission and discharge surfaces interactions that may not have been caught individually. This is particularly valuable because reconciliation often reveals medications prescribed by different providers who were unaware of each other's orders.

Clinical decision support (CDS) at point of care

Beyond the ordering workflow, CDS systems provide ongoing safety monitoring. A CDS engine may periodically re-check a patient's medication list when lab results arrive (e.g., an elevated INR for a patient on warfarin), when a new diagnosis is documented, or when a medication is renewed. Drug interaction APIs feed into these broader CDS engines as one component of a comprehensive safety framework.

Joint Commission and regulatory requirements

The Joint Commission's National Patient Safety Goals include specific requirements around medication safety. NPSG.03.06.01 requires organizations to maintain and communicate an accurate patient medication list. CMS Meaningful Use (now Promoting Interoperability) criteria include drug-drug interaction checking as a core measure for certified EHR technology.

Organizations that fail to implement adequate drug interaction screening risk regulatory citations, accreditation issues, and increased liability exposure. Having a reliable, auditable drug interaction API is not just a technical feature; it is a compliance requirement for most healthcare organizations.

Integration architecture

Integrating a drug interaction API into an EHR follows a consistent architectural pattern regardless of the EHR platform (Epic, Cerner, Allscripts, athenahealth, or a custom-built system). The core flow involves intercepting the medication ordering workflow, calling the API, and rendering alerts based on the response.

Typical CPOE integration flow

1
Prescriber enters medication order
New drug added to patient's medication list in CPOE
2
EHR sends drug list to RxLabelGuard API
POST /v1/interactions/check with all active medications + new order
3
API returns interactions with severity and evidence
Structured JSON response with pairs, severity levels, mechanisms, and citations
4
EHR displays alert to prescriber
Interruptive alert for contraindicated/major, informational for moderate/minor
5
Prescriber acknowledges or modifies order
Override with reason, adjust dose, select alternative, or cancel order

Where the API fits in your stack

The RxLabelGuard API is called server-side from your EHR's backend, not from the client browser. Your EHR backend acts as a middleware layer: it collects the patient's medication list from your database, makes a POST request to the RxLabelGuard API, and then returns the results to the frontend for rendering.

This server-to-server pattern keeps your API key secure (it never reaches the client), allows you to add business logic before and after the API call (e.g., filtering by facility preferences), and gives you full control over error handling and fallback behavior.

Common integration points

  • CPOE order entry hook: Triggered when a prescriber clicks "Sign Order" or "Submit." The EHR intercepts the submission, calls the API, and shows alerts before finalizing.
  • Medication reconciliation on admission/discharge: A batch check runs when a clinician opens the reconciliation screen, comparing all home meds against new inpatient orders.
  • Pharmacy verification workflow: Integrated into the pharmacist's review queue. When a pharmacist selects a prescription to verify, the system checks for interactions against the patient's profile.
  • Patient medication list review: Available as an on-demand check from the patient's medication summary screen. Clinicians can re-run the full list at any time during a visit.
  • FHIR CDS Hooks: If your EHR supports CDS Hooks, you can build a CDS service that wraps the RxLabelGuard API and responds to the order-select or order-sign hook with interaction cards.

Code examples

The RxLabelGuard API uses a simple REST interface. Send a list of drug names (or RxCUI codes, or NDC codes) and receive structured interaction data in return. Here are production-ready examples in three languages commonly used in EHR backend systems.

cURL

Quick test from the command line. Replace YOUR_API_KEY with the key from your dashboard.

Terminal
curl -X POST https://jd6095ijga.execute-api.us-east-2.amazonaws.com/v1/interactions/check \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "drugs": ["warfarin", "aspirin", "metformin"],
    "format": "structured"
  }'

Python (backend integration)

Suitable for Django, Flask, or FastAPI backends that serve EHR frontends.

Python
import requests
import os

RXLABELGUARD_URL = (
    "https://jd6095ijga.execute-api.us-east-2.amazonaws.com"
    "/v1/interactions/check"
)

def check_interactions(drug_names: list[str], api_key: str) -> dict:
    """Check drug interactions for a patient's medication list."""
    response = requests.post(
        RXLABELGUARD_URL,
        headers={
            "x-api-key": api_key,
            "Content-Type": "application/json",
        },
        json={"drugs": drug_names, "format": "structured"},
        timeout=10,
    )
    response.raise_for_status()
    return response.json()

# Example: Check a patient's medication list at admission
result = check_interactions(
    ["warfarin", "aspirin", "metformin"],
    os.environ["RXLABELGUARD_API_KEY"],
)

for pair in result.get("pairs", []):
    print(f"{pair['drug1']} + {pair['drug2']}: {pair['severity']}")
    print(f"  Mechanism: {pair['mechanism']}")
    print(f"  Recommendation: {pair['recommendation']}")
    print(f"  Source: SPL {pair['evidence']['splSetId']}")
    print()

TypeScript / JavaScript (Node.js)

For Node.js backends, Express/Fastify middleware, or serverless functions.

TypeScript
interface InteractionPair {
  drug1: string;
  drug2: string;
  severity: "contraindicated" | "major" | "moderate" | "minor" | "unknown";
  mechanism: string;
  recommendation: string;
  evidence: {
    splSetId: string;
    section: string;
    snippet: string;
  };
}

interface InteractionResponse {
  pairs: InteractionPair[];
  requestId: string;
  cached: boolean;
}

const API_URL =
  "https://jd6095ijga.execute-api.us-east-2.amazonaws.com/v1/interactions/check";

async function checkInteractions(
  drugs: string[],
  apiKey: string
): Promise<InteractionResponse> {
  const response = await fetch(API_URL, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "x-api-key": apiKey,
    },
    body: JSON.stringify({ drugs, format: "structured" }),
  });

  if (!response.ok) {
    throw new Error(`RxLabelGuard API error: ${response.status}`);
  }

  return response.json();
}

// Example: CPOE integration middleware
const result = await checkInteractions(
  ["warfarin", "aspirin", "metformin"],
  process.env.RXLABELGUARD_API_KEY!
);

// Filter for clinically significant interactions
const criticalAlerts = result.pairs.filter(
  (p) => p.severity === "contraindicated" || p.severity === "major"
);

const informationalAlerts = result.pairs.filter(
  (p) => p.severity === "moderate"
);

C# (.NET)

Common in enterprise EHR backends built on the .NET stack.

C#
using System.Net.Http.Json;

public class RxLabelGuardClient
{
    private readonly HttpClient _http;
    private const string BaseUrl =
        "https://jd6095ijga.execute-api.us-east-2.amazonaws.com";

    public RxLabelGuardClient(string apiKey)
    {
        _http = new HttpClient();
        _http.DefaultRequestHeaders.Add("x-api-key", apiKey);
    }

    public async Task<InteractionResponse> CheckInteractionsAsync(
        string[] drugs)
    {
        var payload = new { drugs, format = "structured" };
        var response = await _http.PostAsJsonAsync(
            $"{BaseUrl}/v1/interactions/check", payload);
        response.EnsureSuccessStatusCode();
        return await response.Content
            .ReadFromJsonAsync<InteractionResponse>();
    }
}

// Usage in a CPOE controller
var client = new RxLabelGuardClient(
    Environment.GetEnvironmentVariable("RXLABELGUARD_API_KEY"));
var result = await client.CheckInteractionsAsync(
    new[] { "warfarin", "aspirin", "metformin" });

For more detailed API documentation, including error codes, rate limit headers, and advanced query parameters, see the Check Interactions endpoint reference.

Response handling for CDS alerts

The API response is designed to be directly consumable by clinical decision support alert rendering. Here is a representative response structure and guidance on how to map each field to your EHR's alert system.

JSON Response
{
  "pairs": [
    {
      "drug1": "warfarin",
      "drug2": "aspirin",
      "severity": "major",
      "mechanism": "Additive anticoagulant and antiplatelet effects increase bleeding risk",
      "recommendation": "Monitor INR closely if combination is necessary. Consider alternative analgesic. Assess bleeding risk factors.",
      "evidence": {
        "splSetId": "2c87a0a1-e0a5-4f38-bf35-82f3817fb7ca",
        "section": "drug_interactions",
        "snippet": "Concomitant use of anticoagulants with antiplatelet agents increases the risk of bleeding..."
      }
    },
    {
      "drug1": "warfarin",
      "drug2": "metformin",
      "severity": "minor",
      "mechanism": "Metformin may have minor effects on warfarin metabolism",
      "recommendation": "No dose adjustment typically needed. Monitor INR at standard intervals.",
      "evidence": {
        "splSetId": "2c87a0a1-e0a5-4f38-bf35-82f3817fb7ca",
        "section": "drug_interactions",
        "snippet": "..."
      }
    }
  ],
  "requestId": "req_8f3a2b1c",
  "cached": true
}

Mapping response fields to CDS alerts

Response FieldCDS Alert Usage
pairs[].severityDetermines alert type: interruptive (contraindicated, major) vs. informational (moderate, minor). Filter or suppress based on facility preferences.
pairs[].mechanismDisplay as the alert body text. Explains why the interaction occurs in clinical terms.
pairs[].recommendationActionable guidance for the prescriber. Display below the mechanism. May include dose adjustment, monitoring, or alternative therapy suggestions.
pairs[].evidence.splSetIdLink to the FDA source label. Construct a DailyMed URL: https://dailymed.nlm.nih.gov/dailymed/search.cfm?query={{splSetId}}
pairs[].evidence.snippetShow as "Evidence" or "Source text" in the alert detail view. Provides clinical context from the original FDA label.

A well-designed CDS alert shows the drug pair and severity as the headline, the mechanism and recommendation as the body, and provides a link to the full FDA label for clinicians who want to review the source. For a deeper look at response structure, see the Check Interactions endpoint documentation.

Alert fatigue and severity-based filtering

Alert fatigue is the single biggest obstacle to effective drug interaction checking in clinical settings. Research consistently shows that clinicians override 90-96% of drug interaction alerts in EHR systems. When providers are bombarded with low-value warnings for every minor interaction, they develop alert blindness and begin dismissing all alerts without reading them, including the critical ones.

The root cause is simple: most systems present all interactions at the same urgency level, or use only two tiers (major vs. minor). When a prescriber sees dozens of "major" alerts per shift, the alert system loses credibility and becomes counterproductive.

RxLabelGuard's five-level severity classification is designed specifically to combat alert fatigue. By providing granular severity data, your EHR can implement tiered alert rules that match clinical significance to alert intrusiveness:

Contraindicated
Hard stop

Block the order from being signed. Require the prescriber to cancel or document a clinical override with a reason. Log every override for audit.

Major
Interruptive alert (soft stop)

Display a modal dialog that interrupts the workflow. Require the prescriber to acknowledge the alert before proceeding. Offer alternatives if available.

Moderate
Non-interruptive alert

Display in a sidebar panel or notification area. Do not interrupt the ordering workflow. Allow the prescriber to review at their discretion.

Minor
Informational

Log the interaction for the audit trail but do not display an alert unless the prescriber explicitly requests a full interaction report.

Unknown
Clinical judgment

Flag for pharmacist review during the verification step. Do not alert the prescriber directly, as insufficient evidence means the interaction significance is uncertain.

This tiered approach means that a prescriber writing orders on a typical shift sees only the genuinely dangerous interactions (contraindicated and major) as interruptive alerts, while moderate interactions appear as passive notifications. Minor and unknown interactions are captured in the audit trail without disrupting clinical workflow.

The result is higher alert compliance rates, fewer overrides, and better patient safety outcomes. For a detailed discussion of severity-based alert design, including configurable thresholds for different clinical settings, see our guide on alert fatigue and severity scoring. For the full severity level definitions, refer to the severity levels reference.

Compliance and audit trail

In healthcare software, every clinical decision support alert must be traceable to its source. Regulatory bodies, legal counsel, and quality assurance teams need to verify that alerts are based on authoritative data, that the data is current, and that there is a clear chain of evidence from the source documentation to the alert displayed to the clinician.

RxLabelGuard addresses this with comprehensive evidence citations in every API response. Each interaction pair includes:

  • SPL Set ID -- a stable, globally unique identifier for the FDA drug label from which the interaction was extracted. This ID persists across label revisions, allowing you to trace the source even when the label is updated.
  • Label section -- the specific section of the Structured Product Labeling document where the interaction is documented (e.g., drug_interactions, warnings, contraindications).
  • Evidence snippet -- a relevant excerpt from the original label text that documents the interaction. This allows reviewers to see the exact language without navigating to the full label.

With these three fields, an auditor can independently verify every alert by navigating to DailyMed or openFDA, searching for the SPL Set ID, and reading the original label section. This level of transparency is essential for regulatory compliance and legal defensibility.

Why FDA-sourced data matters

Unlike proprietary clinical databases where the methodology and data sources may be opaque, RxLabelGuard's interaction data is derived entirely from publicly available FDA Structured Product Labeling. This means:

  • The data source is publicly verifiable by anyone with internet access
  • There is no "black box" between the source documentation and the alert
  • Label updates from the FDA are reflected in the API as labels are refreshed
  • Your organization retains full audit capability without depending on a vendor's proprietary methodology

This transparency is particularly valuable for organizations undergoing Joint Commission surveys, CMS audits, or legal review of clinical decision support systems.

Performance for clinical workflows

In a clinical environment, API response time directly affects user experience and adoption. A drug interaction check that takes 3-5 seconds will disrupt the ordering workflow and encourage providers to bypass the safety check. An API that responds in under one second feels seamless and transparent.

RxLabelGuard is designed for the latency requirements of clinical workflows:

Cached drug pairs
< 200ms

Previously resolved drug pairs are served from DynamoDB cache with sub-200ms response times.

Uncached (first lookup)
< 2s

First-time lookups involve RxNorm resolution + openFDA label retrieval + AI extraction. Results are then cached.

Bulk medication list
Up to 10 drugs

Send up to 10 drugs per request. The API checks all pairwise combinations in a single call.

Availability
99.5% SLA

Professional tier includes a 99.5% uptime SLA backed by AWS Lambda and DynamoDB infrastructure.

Rate limits by tier

Rate limits are designed to accommodate different integration scales, from development and testing through production clinical workloads.

TierRequests/MinuteRequests/MonthUse Case
Sandbox1050Development and testing
Developer602,000Pilot deployments, small clinics
Professional24020,000Production EHR, multi-site pharmacy

For deployments that need higher throughput, contact us to discuss enterprise arrangements. The underlying architecture (AWS Lambda + DynamoDB) scales horizontally to accommodate significantly higher volumes.

Pricing for EHR integrations

Start with a free sandbox for development. Scale to production without enterprise sales cycles.

Sandbox
$0/month

Development and testing

  • 50 requests/month
  • 1 API key
  • Full structured responses
  • Severity scoring
  • Evidence citations
  • Community support
Developer
$20/month

Pilot deployments

  • 2,000 requests/month
  • 5 API keys
  • All response formats
  • 60 requests/minute
  • Email support
  • Usage analytics
Professional
$99/month

Production clinical workloads

  • 20,000 requests/month
  • Unlimited API keys
  • 240 requests/minute
  • 99.5% uptime SLA
  • Priority support (24h SLA)
  • IP restriction controls

All tiers include structured JSON responses, severity scoring, and FDA evidence citations. No hidden fees.

View full pricing details and feature comparison

Getting started with EHR integration

Integrating drug interaction checking into your EHR typically takes a few hours of development time. Here is the recommended workflow from first API call to production deployment.

1

Create an account and generate an API key

Sign up at rxlabelguard.com/register. No credit card required for the free Sandbox tier. Once registered, navigate to your dashboard and generate an API key. You will need the key for the x-api-key header in all API requests.

2

Test with known drug pairs

Use the cURL or code examples above to verify your setup. Start with well-known interaction pairs like warfarin + aspirin or simvastatin + erythromycin to confirm you receive structured responses. Review the API documentation for the full request and response schemas.

3

Build the integration layer

Create a service in your EHR backend that collects the patient's active medication list, calls the RxLabelGuard API, and returns results to your frontend. This service should handle authentication, error cases, timeouts, and caching of results per patient session.

4

Design your alert UI

Map severity levels to alert types in your EHR frontend. Use contraindicated for hard stops, major for interruptive modals, moderate for sidebar notifications, and minor for audit-only logging. See our guide on severity-based alert design for detailed UX recommendations.

5

Validate with your clinical team

Before going live, run your most common drug combinations through the API and review the results with your clinical team. Verify that severity levels, mechanisms, and recommendations align with your organization's clinical expectations and policy.

6

Deploy to production and upgrade your tier

When you are ready for production traffic, upgrade to the Developer ($20/mo) or Professional ($99/mo) tier from your dashboard. Monitor usage via the dashboard analytics and adjust your tier as your patient volume grows.

Ready to add interaction checking to your EHR?

Create a free account, generate an API key, and start making requests in under five minutes. No sales calls, no procurement cycles, no credit card required.

Already have an account? Go to your dashboard

Medical Disclaimer

This information is derived from FDA Structured Product Labeling and is provided for informational purposes only. It should not be used as a substitute for professional medical advice, diagnosis, or treatment. Always consult a qualified healthcare provider before making clinical decisions. RxLabelGuard provides drug interaction data for integration into clinical decision support systems and is not a substitute for clinical judgment.