Skip to main content
All Integrations

HDIM + NextGen Healthcare

Quality Measurement for Specialty and Ambulatory Practices

Cardiology practices need quality measures for blood pressure control and anticoagulation management. Behavioral health practices need follow-up after hospitalization rates. Pediatric groups need well-child visit compliance. HEDIS covers 52 measures — but specialty practices are often accountable for a different set, and sometimes measures that don't exist in any standard library. HDIM deploys on your infrastructure, fronts your NextGen FHIR endpoint, and evaluates both standard HEDIS and custom CQL measures written for your specific contracts.

Deploys on Your Infrastructure

HDIM is a Java/Spring Boot platform that runs on your servers — RHEL, Ubuntu, or any cloud VPC. It fronts your CDR and FHIR server, processing clinical data into quality intelligence without transmitting PHI outside your network boundary.

This is not a SaaS integration that extracts your data. HDIM is clinical infrastructure that deploys alongside your EHR and makes data accessible that providers cannot reach today.

# Your infrastructure
┌─── Your Network Boundary ───────────┐
│ │
│ [CDR / FHIR Server] │
│ ↓ FHIR R4 (private network) │
│ [HDIM Platform] │
│ ├─ CQL Engine (quality measures) │
│ ├─ Care Gap Detection │
│ ├─ Risk Stratification │
│ └─ Quality Reporting │
│ ↓ │
│ [Clinical Workflows / Dashboards] │
│ │
└─────────────────────────────────────┘
# PHI never crosses this boundary

Overview

NextGen is heavily used in specialty practices — cardiology, behavioral health, orthopedics, gastroenterology, pediatrics — where the quality measurement problem is fundamentally different from primary care. Primary care practices can run the full NCQA HEDIS measure set and call it done. Specialty practices operate under payer-specific contracts, MIPS Alternative Payment Models, and ACO quality programs that define their own numerators and denominators. The standard 52 HEDIS measures may cover three or four of the metrics a cardiology group is actually accountable for.

HDIM is deployed on the practice's own infrastructure and sits in front of the NextGen FHIR endpoint. The CQL Engine supports both the NCQA-published HEDIS measure library and custom CQL logic authored by the practice or their quality team. A cardiology group can deploy a CQL measure for door-to-balloon time alongside standard HEDIS measures for Controlling High Blood Pressure — both evaluated against the same FHIR data stream, with results surfaced in the same care gap workflow. Providers see actionable gaps for the measures that matter to their contracts, not a generic HEDIS dashboard built for a primary care population.

Architecture

HDIM connects to NextGen Healthcare through the NextGen FHIR R4 endpoint, optionally routing through a Mirth Connect channel for HL7 v2 or CCDA transformation before entering the HDIM microservice pipeline.

┌──────────────────────────────────────────────────────────────────┐
│                    NextGen Healthcare                            │
│  ┌─────────────────────┐        ┌────────────────────────────┐  │
│  │ NextGen Office /    │        │ Mirth Connect              │  │
│  │ NextGen Enterprise  │──────→ │ (Integration Engine)       │  │
│  │ (EHR)               │        │ HL7 v2 / CCDA / FHIR       │  │
│  └─────────────────────┘        └──────────────┬─────────────┘  │
│           │                                    │                │
│           │ FHIR R4 REST API (direct)          │ FHIR R4 (out) │
│           └───────────────┬────────────────────┘                │
│                           │                                     │
│               ┌───────────▼──────────┐                          │
│               │ NextGen FHIR Server  │                          │
│               │ (R4 Endpoint)        │                          │
│               └───────────┬──────────┘                          │
└───────────────────────────┼──────────────────────────────────────┘
                            │ FHIR R4 REST API
                            ▼
┌───────────────────────────────────────────────────────────────────┐
│                           HDIM Platform                           │
│                                                                   │
│  ┌──────────┐   ┌──────────────┐   ┌──────────┐   ┌───────────┐ │
│  │ FHIR     │ → │ Patient      │ → │ CQL      │ → │ Care Gap  │ │
│  │ Service  │   │ Service      │   │ Engine   │   │ Service   │ │
│  │ (8085)   │   │ (8084)       │   │ (8081)   │   │ (8086)    │ │
│  └──────────┘   └──────────────┘   └──────────┘   └───────────┘ │
│       ↑                                                 │        │
│       │              ┌──────────────┐                   ▼        │
│       └──────────────│ Quality      │←── Quality Reports &      │
│                      │ Measure Svc  │    Care Gap Closures      │
│                      │ (8087)       │                            │
│                      └──────────────┘                            │
└───────────────────────────────────────────────────────────────────┘

Integration Guide

Follow these six steps to connect HDIM with your NextGen Healthcare deployment.

  1. 1
    Configure the NextGen FHIR endpoint URLLocate your NextGen FHIR R4 base URL in the NextGen Administrator console under Integration > FHIR Configuration. For NextGen Office it typically follows the pattern https://<practice>.nextgen.com/fhir/r4; for NextGen Enterprise it is the URL configured during your FHIR module installation. Set FHIR_SERVER_URL in your HDIM .env file to this value.
  2. 2
    Set up OAuth2 authenticationNextGen uses OAuth2 SMART on FHIR for third-party app authorization. Register HDIM as an application in the NextGen Developer Portal, obtain a client ID and client secret, and configure FHIR_AUTH_TYPE=oauth2, FHIR_CLIENT_ID, FHIR_CLIENT_SECRET, and FHIR_TOKEN_URL in your HDIM environment. Scopes required: patient/*.read, launch/patient, openid.
  3. 3
    Configure a Mirth Connect channel (optional)If your NextGen deployment uses Mirth Connect for HL7 v2 or CCDA message routing, deploy the HDIM Mirth Connect channel bundle included in the installer package. The channel transforms inbound HL7 v2 ADT/ORU messages and C-CDA documents into FHIR R4 resources and forwards them to HDIM's FHIR Service ingestion endpoint. Skip this step if you are using the NextGen FHIR R4 API directly.
  4. 4
    Map FHIR resources to the HDIM patient modelReview the FHIR resource mapping configuration in hdim-fhir-mapping.yml. NextGen uses standard FHIR R4 resource profiles with US Core extensions. Confirm that your NextGen FHIR server's CapabilityStatement includes the resource types required for your quality measures (Patient, Encounter, Condition, Observation, Procedure, MedicationRequest, Immunization, DiagnosticReport, AllergyIntolerance, DocumentReference).
  5. 5
    Deploy HDIM on your infrastructureSet spring.profiles.active=production and configure FHIR_SERVICE_URL to your NextGen FHIR R4 endpoint. For practice-scale deployments, set FHIR_CONNECTION_POOL_SIZE=20 and PATIENT_BATCH_SIZE=1000. For large multi-specialty groups spanning hundreds of thousands of patients, increase KAFKA_PARTITIONS and deploy HDIM's CQL Engine pods with horizontal autoscaling enabled.
  6. 6
    Verify end-to-end connectivityConfirm FHIR endpoint reachability via the health check endpoint, verify OAuth2 token acquisition, test FHIR resource retrieval (Patient, Encounter, Observation), and validate CQL measure evaluation and care gap detection are functioning end-to-end against your NextGen environment.

Configuration

HDIM deploys on your infrastructure. Configure these Spring Boot properties to connect to your NextGen FHIR endpoint.

# Configuration reference — actual property names may vary by release

# Active profile — controls logging, cache TTLs, and connection pool sizing
spring.profiles.active=production

# NextGen FHIR R4 endpoint (on your network or NextGen-hosted)
FHIR_SERVICE_URL=https://your-practice.nextgen.com/fhir/r4
FHIR_AUTH_TYPE=oauth2

# OAuth2 / SMART on FHIR
FHIR_CLIENT_ID=<your-hdim-client-id>
FHIR_CLIENT_SECRET=<your-client-secret>
FHIR_TOKEN_URL=https://your-practice.nextgen.com/oauth2/token
FHIR_SCOPES=patient/*.read launch/patient openid

# Mirth Connect (optional — omit if using the FHIR API directly)
MIRTH_CONNECT_ENABLED=true
MIRTH_CONNECT_HOST=<your-mirth-host>
MIRTH_CONNECT_PORT=6661
MIRTH_CONNECT_CHANNEL_ID=<hdim-inbound-channel-id>

# Connection tuning for practice-scale deployments
FHIR_CONNECTION_POOL_SIZE=20
KAFKA_PARTITIONS=8
PATIENT_BATCH_SIZE=1000

Specialty Practice Quality Measurement

NextGen Healthcare is the EHR of choice for specialty practices — including cardiology, orthopedics, dermatology, gastroenterology, and behavioral health — where quality measurement requirements differ significantly from primary care.

HDIM addresses specialty-specific quality measurement with NextGen in three key ways:

  • Specialty HEDIS Measures — HDIM supports the full NCQA HEDIS measure set, including measures relevant to specialty care such as Controlling High Blood Pressure (CBP), Diabetes Care (HbA1c, eye exams, nephropathy), Follow-Up After Hospitalization for Mental Illness (FUH), and Antidepressant Medication Management (AMM). Measure libraries are pre-packaged for common NextGen specialty configurations.
  • CQL Measure Customization — For practices participating in MIPS, APM, or payer-specific quality programs, HDIM's CQL Engine allows custom measure logic to be authored and deployed without modifying the core platform. NextGen's FHIR R4 resource profiles map cleanly to standard CQL data requirements.
  • Mirth Connect Specialty Workflows — Specialty practices commonly generate HL7 v2 ORU messages (lab results) and structured observation data that may not yet flow through the NextGen FHIR API. HDIM's Mirth Connect channel bundle captures these messages, transforms them to FHIR R4 Observation resources, and incorporates them into quality measure evaluation — ensuring complete data for numerator and denominator population identification.
  • Multi-Location Practice Support — NextGen Enterprise deployments frequently span multiple clinic locations with separate organizational units. HDIM's multi-tenant architecture maps NextGen practice groups to HDIM tenants, enabling location-level quality reporting and aggregate population views within a single HDIM deployment.

Data Exchange Protocols

HDIM supports multiple data exchange protocols with NextGen Healthcare.

ProtocolDescription
FHIR R4 RESTPrimary — real-time patient queries and resource retrieval via the NextGen FHIR R4 endpoint (SMART on FHIR OAuth2)
Mirth ConnectOptional middleware — transforms HL7 v2 ADT/ORU messages and C-CDA documents to FHIR R4 before ingestion into HDIM; recommended for practices with existing Mirth Connect channels
HL7 v2Legacy message ingestion (ADT A01/A03/A08, ORU R01) via Mirth Connect channel; supports lab results and admission/discharge events for care gap triggers
CCDAClinical document import (Continuity of Care Document, Referral Note, Discharge Summary) with automatic FHIR R4 conversion via Mirth Connect or direct HDIM CDA parser

Supported FHIR R4 Resources

Patient

Demographics, identifiers, contact information

Encounter

Ambulatory visits, specialty consultations, and clinical interactions

Condition

Diagnoses, problems, and health concerns (ICD-10)

Observation

Lab results, vitals, specialty assessments, and social history

Procedure

Specialty procedures, interventions, and preventive screenings

MedicationRequest

Prescriptions and medication orders

Immunization

Vaccination records and immunization history

DiagnosticReport

Pathology, radiology, and laboratory reports

AllergyIntolerance

Allergy and adverse reaction records

DocumentReference

Clinical documents (CDA, C-CDA, PDF, Direct messages)

Deployment Options

On-Premises

Deploy HDIM on your own infrastructure alongside NextGen Enterprise. Data never leaves your network. Recommended for practices with strict data residency requirements or existing Mirth Connect infrastructure. Supports RHEL 7/8, Ubuntu 20.04+, and Windows Server 2019+.

Docker Compose

Single-command deployment with Docker Compose using the ambulatory profile. Ideal for pilot programs, NextGen Office integrations, and smaller specialty practices. Includes all HDIM services pre-configured with NextGen-optimized defaults.

Kubernetes

Production-grade orchestration with auto-scaling, rolling updates, and high availability. Recommended for large multi-specialty group practices or organizations running NextGen Enterprise across multiple clinic locations.

Ready to Connect HDIM with NextGen Healthcare?

Schedule a personalized demo to see HDIM working with your NextGen Healthcare environment.