Nirmitee.io
Mirth Connect

Electronic Case Reporting (eCR) with Mirth Connect: Building the CDC-Mandated Pipeline

July 24, 202610 min readUpdated Oct 19, 2026
Written by
Jitendra Choudhary
Jitendra Choudhary

CTO & Co-Founder

CTO & Co-Founder at Nirmitee.io. Architects healthcare integrations across FHIR, SMART on FHIR, ABDM and NHCX, writing from production experience taking hospital software from sandbox to go-live.

Electronic Case Reporting (eCR) with Mirth Connect: Building the CDC-Mandated Pipeline

Electronic Case Reporting (eCR) is the CDC's program for automating the reporting of notifiable conditions — over 1,500 reportable conditions including COVID-19, hepatitis, Lyme disease, and influenza — from EHRs to state and local public health agencies. The mandate is in the CARES Act. The technical standard is an eICR (electronic Initial Case Report) transmitted as a FHIR R4 document. Mirth Connect is the most common integration engine for assembling and routing eICR documents. This guide covers the complete pipeline. For TEFCA context, see our TEFCA and information blocking guide.

New to Mirth? Start with our Mirth Connect guide: what it is, how it works, and when it fits.

The Three-Component eCR Architecture

eCR workflows have three components: (1) The EHR (trigger source) provides clinical data — diagnoses, lab results, patient demographics. (2) The RCKMS (Reportable Conditions Knowledge Management System), operated by APHL, evaluates the clinical data against condition-specific trigger criteria and returns a reportability determination. (3) Mirth assembles the eICR FHIR Bundle and submits it to the AIMS Platform for routing to the appropriate state and local health departments.

Teams that want this built rather than researched can work with our Mirth Connect integration team.

RCKMS Rule Evaluation from Mirth

// Call RCKMS Reportability Response API
var rkcmsUrl = 'https://rckms.aimsplatform.org/v1/decision';
var httpClient = Packages.org.apache.commons.httpclient.HttpClient();
var post = new Packages.org.apache.commons.httpclient.methods.PostMethod(rkcmsUrl);
post.setRequestBody(encounterFHIRJson);
post.setRequestHeader('Content-Type', 'application/fhir+json');
post.setRequestHeader('Authorization', 'Bearer ' + globalMap.get('rkcms_token'));
httpClient.executeMethod(post);

var response = JSON.parse(post.getResponseBodyAsString());
var reportability = response.extension.find(function(e) {
    return e.url.indexOf('reportability-information-extension') !== -1;
});

if (!reportability || reportability.valueCode === 'NOREPORT') {
    channelMap.put('suppress_ecr', 'true');
} else {
    channelMap.put('suppress_ecr', 'false');
    channelMap.put('reportable_condition', response.reasonCode[0].text);
}

eICR FHIR Composition: Required Sections

The eICR is a FHIR R4 Composition containing these required sections per the HL7 US eCR Implementation Guide:

  • Patient Demographics — Patient resource with identifiers (required always)
  • Problem List — Conditions with ICD-10 trigger codes (required — primary trigger source)
  • Results — Lab values that triggered the report (required — secondary trigger source)
  • Medications — Active medications at time of report (required always)
  • Chief Complaint / Reason for Visit — Encounter reason text (required always)
  • Travel History — Recent travel when clinically relevant (conditional)
  • Social History — Occupation, living situation for epidemiological context (required)
  • Plan of Treatment — Isolation orders, referrals, treatment planned (required always)

For C-CDA to FHIR conversion patterns used when extracting the eICR sections from EHR C-CDA output, see our dedicated C-CDA guide.

AIMS Platform Submission

var aimsUrl = 'https://aims.aimsplatform.org/ecr/fhir/Bundle';
var post = new Packages.org.apache.commons.httpclient.methods.PostMethod(aimsUrl);
post.setRequestBody(JSON.stringify(eicrBundle));
post.setRequestHeader('Content-Type', 'application/fhir+json');
post.setRequestHeader('Authorization', 'Bearer ' + globalMap.get('aims_token'));
httpClient.executeMethod(post);

var statusCode = post.getStatusCode();
if (statusCode === 200 || statusCode === 201) {
    var responseId = JSON.parse(post.getResponseBodyAsString()).id;
    channelMap.put('ecr_submission_id', responseId);
    logger.info('eCR submitted: ' + responseId);
} else {
    logger.error('eCR submission failed: ' + statusCode);
    channelMap.put('ecr_error', post.getResponseBodyAsString());
}

For security configuration of the AIMS HTTPS connection including certificate management in Mirth, see our Mirth Connect security guide.

Managing Trigger Condition Lists

RCKMS trigger conditions update regularly. Maintain the trigger condition list in a database table that can be updated without channel redeployment. Load into globalMap at channel startup. Pre-filter messages in the source filter — check the patient's active diagnoses against the trigger list before calling RCKMS to avoid unnecessary API calls for clearly non-reportable encounters.

Further Reading

Ready to scale?

Talk to our healthcare engineering team about building, integrating, and shipping faster.

Frequently Asked Questions

Is electronic case reporting legally required?

Yes. Electronic case reporting is mandated under the CARES Act and through state public health laws requiring reporting of nationally notifiable conditions. The specific technical standard is the eICR (electronic Initial Case Report) FHIR document, governed by the HL7 US eCR Implementation Guide. Organizations must report within 24 hours of identifying urgent reportable conditions. The automated eCR workflow achieves submission within minutes of a diagnosis being entered, far exceeding the statutory requirement.

What is RCKMS and how does it determine reportability?

RCKMS (Reportable Conditions Knowledge Management System) is operated by APHL and evaluates clinical data against condition-specific trigger criteria maintained for all 50 states. It returns Reportable, Not Reportable, or May Be Reportable. RCKMS knows that a condition reportable in all stages in California may only be reportable when lab-confirmed in Texas. Do not replicate RCKMS logic locally — use the API. Access requires APHL registration for the AIMS Platform credentials.

What clinical data must be included in an eICR?

Required sections per the HL7 US eCR IG: Patient Demographics, Chief Complaint, Reason for Visit, Problem List (with triggering ICD-10 codes), Results (lab values that triggered), Medications, Plan of Treatment, Immunization History, Social History, and Travel History. All required sections must be present in the Composition even if empty — AIMS will reject submissions with missing required sections. The trigger condition sections (Problem List, Results) are the primary focus of RCKMS evaluation.

How does Mirth Connect submit to the AIMS Platform?

Mirth submits the assembled eICR FHIR Bundle to the AIMS REST API via HTTPS. AIMS validates the bundle, determines appropriate health departments based on patient jurisdiction, and routes the report to each agency. Authentication requires an organizational certificate from APHL — this is separate from your EHR vendor relationship and requires direct APHL registration. The AIMS API endpoint is at ecr.aimsplatform.org. Allow 4–8 weeks for credentialing before your target go-live date.

How long does eCR submission take from trigger to AIMS delivery?

CDC requirement is within 24 hours for most reportable conditions. The automated Mirth eCR pipeline described in this guide achieves submission within minutes of the triggering diagnosis being entered in the EHR — the RCKMS API call takes 1–3 seconds, eICR assembly takes under 1 second, and AIMS submission completes in 2–5 seconds. The end-to-end latency from EHR trigger to AIMS receipt is typically under 30 seconds in well-architected production deployments.
Share