HL7 Integration Solutions — Taction Software
Home/Blog/HL7 ADT A41 Message
HL7 MessagingADT · A41 Merge Account

HL7 ADT A41 Message: Merge Account, Patient Account Number, Structure, Segments & Examples

By Taction Software·October 15, 2026·20 min read
750+
HL7 integrations delivered
12+
Years in healthcare IT
30+
EHR platforms integrated
100%
HIPAA-compliant delivery

The HL7 A41 message is an Admit, Discharge, Transfer (ADT) event used to communicate the merging of patient account numbers between healthcare information systems. Officially known as ADT A41: Merge Account, Patient Account Number, this event belongs to the HL7 Version 2 patient administration message family.

Healthcare organizations use patient account numbers to associate administrative and financial information with an account. These identifiers may be connected to hospital billing, insurance claims, charges, payments, adjustments, and revenue cycle workflows. Duplicate account numbers can arise from registration errors, separate departmental workflows, system migrations, or inconsistent account creation processes. When an authorized account management workflow determines that two accounts should be consolidated, an A41 message can notify connected applications of the approved merge.

For example, a hospital discovers that account numbers ACC410001 and ACC410002 refer to accounts that should be consolidated. After financial and patient identity validation, the hospital designates ACC410001 as the surviving account. The registration or patient accounting system generates an A41 message identifying the surviving account and the prior account.

The central mapping rule for HL7 A41 is that PID-18 identifies the surviving patient account number, while MRG-3 identifies the prior patient account number being merged. A41 should not be confused with A40, which merges patient identifiers, or A42, which merges visit numbers. This guide explains HL7 A41 message structure, examples, important fields, Mirth Connect implementation, acknowledgment handling, troubleshooting, and best practices.

What Is an HL7 ADT A41 Message?

An HL7 ADT A41 message communicates an authorized merge of patient account numbers. The event is used when two account identifiers must be reconciled into a surviving account according to the healthcare organization's approved financial and administrative rules.

The receiving application identifies the surviving account and the prior account, validates their relationship, and applies its supported account merge procedure. A41 does not automatically merge patient identities or clinical encounters. Patient identifiers, account numbers, and visit numbers represent different concepts in HL7.

Understanding A41 within the broader HL7 ADT messaging framework helps integration teams implement account-level reconciliation without incorrectly changing patient or encounter identities.

Purpose of the HL7 A41 Event

A41 communicates that a prior patient account number should be merged into a surviving account number. Receiving applications use the notification to reconcile account references and preserve appropriate financial relationships.

When Is an ADT A41 Message Generated?

An A41 notification may be generated after authorized registration or patient accounting staff confirm duplicate account records and approve their consolidation through an established reconciliation workflow.

Which Healthcare Systems Receive A41 Messages?

Hospital billing systems, revenue cycle applications, EHRs, patient accounting platforms, and financial reporting systems may receive A41 messages when they maintain account identifiers requiring reconciliation.

How A41 Supports Revenue Cycle Data Consistency

A41 helps connected applications recognize the surviving account and reconcile references to the prior account. Correct processing reduces inconsistent financial and administrative account relationships.

Why Accurate A41 Processing Matters

Incorrect account merging can affect charges, claims, payments, or account balances. Reliable integration requires verified account ownership, correct merge direction, financial reconciliation controls, and audit records.

HL7 ADT A41 Message Structure and Segments

An HL7 ADT A41 message follows the segment-based format used by HL7 Version 2. The message identifies the patient associated with the account, the surviving patient account number, and the prior account number involved in the merge.

In HL7 v2.5, A41 uses the ADT_A39 message structure identifier. This shared structure supports several merge events, even though the events have different business meanings. The core account merge information is carried in PID and MRG, together with message header and event information.

MSH Segment: Message Header

MSH identifies the sending application, receiving application, message timestamp, trigger event, control identifier, and HL7 version. MSH-9 identifies A41 as the account merge event.

EVN Segment: Event Information

EVN records information about the account merge event, including the recorded timestamp. Receiving applications use it to investigate the sequence of account reconciliation changes.

PID Segment: Surviving Patient Account Information

PID identifies the patient and includes the surviving patient account number in PID-18. The destination should validate both the account and its relationship to the patient.

MRG Segment: Prior Patient Account Information

MRG carries prior identity and account information. MRG-3 identifies the prior patient account number being merged into the surviving account. MRG-1 is a required field; in an account-only merge it repeats the patient identifier, which does not change.

Shared ADT_A39 Message Structure

HL7 v2.5 uses the ADT_A39 structure for A41. The trigger event still determines the operation, so an A41 message must follow account merge processing rather than patient identifier merge processing.

HL7 ADT A41 Message Example With Field Explanation

Consider a hospital where two account records have been created for the same authorized account relationship. The patient accounting system determines that ACC410001 will remain active and ACC410002 will be consolidated into it. After the reconciliation is approved, the system generates an A41 message for connected applications. The example below uses HL7 v2.5 conventions.

Complete HL7 ADT A41 Sample Message

MSH|^~\&|REGISTRATION|HOSPITAL|BILLING|MAIN|20261015120000||ADT^A41^ADT_A39|MSG41001|P|2.5
EVN|A41|20261015115500
PID|1||MRN410001^^^HOSPITAL^MR||BROWN^MICHAEL||19790416|M||||||||||ACC410001
MRG|MRN410001^^^HOSPITAL^MR||ACC410002

All patient information is fictional. The intended merge is:

Prior account · MRG-3

ACC410002

Surviving account · PID-18

ACC410001

The destination must verify that the accounts are eligible for consolidation before changing financial relationships.

Explore each segment and its key fields:

Illustrative ADT^A41 — HL7 v2.5 (fictional data)

Select a segment to see what it carries

MSH — Message Header

Required

MSH identifies REGISTRATION as the sender and BILLING as the receiver. ADT^A41^ADT_A39 identifies the account merge event and its shared message structure.

FieldMeaningValue in this message
MSH-3Sending applicationREGISTRATION
MSH-5Receiving applicationBILLING
MSH-7Message creation time20261015120000
MSH-9Message typeADT^A41^ADT_A39
MSH-10Message control IDMSG41001
MSH-12HL7 version2.5

MSH Segment Explained

MSH identifies REGISTRATION as the sender and BILLING as the receiver. ADT^A41^ADT_A39 identifies the account merge event and its shared message structure.

EVN Segment Explained

EVN identifies A41 and records the event timestamp. This helps receiving systems investigate when the account reconciliation was communicated.

PID-3: Patient Identifier Explained

PID-3 identifies the patient associated with the account merge. The destination should use the patient identifier and assigning authority to validate account ownership.

PID-18: Surviving Account Number Explained

PID-18 contains ACC410001, the account number intended to remain after reconciliation. The destination should preserve the identifier's applicable issuing domain.

MRG-3: Prior Account Number Explained

MRG-3 contains ACC410002, the account number being merged. Reversing PID-18 and MRG-3 would change the intended reconciliation direction.

Important HL7 ADT A41 Fields and Mapping

Reliable HL7 A41 integration depends on accurate account number mapping and patient identity validation. MSH-9 identifies the account merge event, MSH-10 provides message tracking, and MSH-12 identifies the HL7 version. PID-18 identifies the surviving account, while MRG-3 identifies the prior account. The destination should also use PID-3 to confirm the patient associated with the account relationship.

A robust HL7 v2 integration should preserve identifier values, issuing authorities, account ownership, and merge history.

HL7 FieldDescriptionExampleIntegration Purpose
MSH-3Sending ApplicationREGISTRATIONSource identification
MSH-4Sending FacilityHOSPITALSource facility
MSH-5Receiving ApplicationBILLINGDestination identification
MSH-9Message TypeADT^A41^ADT_A39Account merge event
MSH-10Message Control IDMSG41001Message correlation
MSH-12HL7 Version2.5Version validation
EVN-2Recorded Date/Time20261015115500Event timestamp
PID-3Patient Identifier ListMRN410001Patient identity context
PID-5Patient NameBROWN^MICHAELDemographic context
PID-18Patient Account NumberACC410001Surviving account
MRG-1Prior Patient Identifier ListMRN410001Same patient (required field)
MRG-3Prior Patient Account NumberACC410002Prior account

PID-18: Surviving Patient Account Number

PID-18 identifies the account intended to remain after the merge. The destination must confirm that the account exists and belongs to the correct patient relationship.

MRG-3: Prior Patient Account Number

MRG-3 identifies the account being merged. Accurate extraction is essential because incorrect mapping can reverse merge direction or affect unrelated financial information.

PID-3: Patient Identifier List

PID-3 provides patient identity context for the account merge. The destination should validate the patient's relationship to both account identifiers before reconciliation.

MSH-9: Trigger Event and Structure

MSH-9 identifies A41 as the trigger event and ADT_A39 as the message structure in the illustrated HL7 v2.5 profile. Both should be validated.

MSH-10: Message Control Identifier

MSH-10 provides a unique message identifier for acknowledgment correlation and duplicate detection. Integration teams should preserve it throughout account reconciliation processing.

How HL7 ADT A41 Account Merge Workflows Operate

An HL7 A41 workflow begins when an authorized patient accounting or registration process identifies duplicate account records. The source determines which account number will remain authoritative and generates an A41 notification. An integration engine receives the message, validates the identifiers, and routes it to the destination.

The receiving application verifies the account relationship and applies its approved financial reconciliation procedure. Because account merging may affect charges, claims, payments, and balances, production processing requires controlled authorization and detailed audit records.

Step 1: Identify Duplicate Account Numbers

A registration or patient accounting application identifies accounts that may require consolidation. Authorized staff verify the relationship before approving a merge.

Step 2: Determine the Surviving Account

The source establishes which account will remain authoritative and which account will be retired. This decision must follow the organization's financial reconciliation rules.

Step 3: Generate the A41 Notification

The source creates an A41 message containing the surviving account in PID-18 and the prior account in MRG-3, together with patient and event information.

Step 4: Validate and Process the Merge

The destination confirms the patient-account relationship, verifies the account state, and applies its supported reconciliation procedure. Financial records must remain accurate.

Step 5: Acknowledge and Audit the Outcome

The receiving application returns an acknowledgment according to the configured processing mode. Audit records document both account identifiers, merge direction, and processing result.

How to Implement HL7 ADT A41 Messages Using Mirth Connect

Mirth Connect can receive, validate, transform, and route HL7 A41 account merge messages between patient registration systems, billing applications, EHRs, and revenue cycle platforms. A typical integration receives the A41 message through an MLLP listener, validates the event and account identifiers, and forwards a structured merge request to an authorized patient accounting system.

The integration engine should not independently modify financial ledgers or combine accounts through direct database updates. Account consolidation must follow the destination application's supported reconciliation procedures. Organizations can use Mirth Connect development services to support these integrations.

Configure the HL7 Source Connector

Create a Mirth Connect channel using an MLLP Listener and the HL7 v2.x inbound data type. Configure the source connection, transport security, acknowledgment settings, and message retention according to the interface agreement.

Filter HL7 ADT A41 Messages

Use a JavaScript filter to accept A41 events for the supported HL7 version and message structure.

Mirth Connect JavaScript filter:

var messageType =
    msg['MSH']['MSH.9']['MSH.9.1'].toString();

var triggerEvent =
    msg['MSH']['MSH.9']['MSH.9.2'].toString();

var structure =
    msg['MSH']['MSH.9']['MSH.9.3'].toString();

var version =
    msg['MSH']['MSH.12']['MSH.12.1'].toString();

return messageType === 'ADT' &&
       triggerEvent === 'A41' &&
       structure === 'ADT_A39' &&
       version === '2.5';

This filter is designed for the illustrated HL7 v2.5 profile. Interfaces that permit a missing third component in MSH-9 must document and implement that exception explicitly.

Extract the Surviving and Prior Account Numbers

Use a JavaScript transformer to extract the surviving account from PID-18 and the prior account from MRG-3.

Mirth Connect JavaScript transformer:

function getComponent(segment, field, component) {
    var fieldName = segment + '.' + field;
    var componentName = fieldName + '.' + component;

    var fieldNode = msg[segment][fieldName];

    if (fieldNode.length() === 0) {
        return '';
    }

    var componentNode = fieldNode[componentName];

    if (componentNode.length() === 0) {
        return '';
    }

    return componentNode.toString().trim();
}

var messageType = getComponent('MSH', 9, 1);
var triggerEvent = getComponent('MSH', 9, 2);
var structure = getComponent('MSH', 9, 3);
var version = getComponent('MSH', 12, 1);

var patientId = getComponent('PID', 3, 1);
var patientAuthority = getComponent('PID', 3, 4);

var survivingAccount = getComponent('PID', 18, 1);
var survivingAccountAuthority =
    getComponent('PID', 18, 4);

var priorAccount = getComponent('MRG', 3, 1);
var priorAccountAuthority =
    getComponent('MRG', 3, 4);

var controlId = getComponent('MSH', 10, 1);
var eventTimestamp = getComponent('EVN', 2, 1);

if (messageType !== 'ADT' ||
    triggerEvent !== 'A41' ||
    structure !== 'ADT_A39' ||
    version !== '2.5') {
    throw new Error(
        'Unsupported HL7 event, structure, or version'
    );
}

if (!patientId) {
    throw new Error(
        'Missing patient identifier'
    );
}

if (!survivingAccount || !priorAccount) {
    throw new Error(
        'Missing account merge identifiers'
    );
}

if (survivingAccount === priorAccount &&
    survivingAccountAuthority ===
        priorAccountAuthority) {
    throw new Error(
        'Cannot merge an account into itself'
    );
}

if (!controlId) {
    throw new Error(
        'Missing message control identifier'
    );
}

var accountMerge = {
    eventType: 'A41',
    hl7Version: version,

    patient: {
        identifier: patientId,
        assigningAuthority: patientAuthority
    },

    survivingAccount: {
        identifier: survivingAccount,
        assigningAuthority: survivingAccountAuthority
    },

    priorAccount: {
        identifier: priorAccount,
        assigningAuthority: priorAccountAuthority
    },

    messageControlId: controlId,
    eventTimestamp: eventTimestamp
};

channelMap.put(
    'accountMerge',
    JSON.stringify(accountMerge)
);

This example reads the first occurrence of each identifier and the namespace portion of its assigning authority. Production implementations should handle complete CX identifiers, repetitions, and the identifier requirements of both systems.

Transform A41 Into an Account Merge Request

The destination may require a JSON request containing both account identifiers and the patient identity context.

Example JSON transformation:

var event = JSON.parse(
    channelMap.get('accountMerge')
);

var request = {
    eventType: 'A41',
    action: 'requestPatientAccountMerge',

    patient: event.patient,

    survivingAccount: event.survivingAccount,
    priorAccount: event.priorAccount,

    processingStatus: 'pending_validation',

    sourceEvent: {
        hl7Version: event.hl7Version,
        messageControlId: event.messageControlId,
        timestamp: event.eventTimestamp
    }
};

channelMap.put(
    'jsonPayload',
    JSON.stringify(request)
);

This payload is illustrative and not a standardized HL7 API. The destination must independently verify account ownership, authorization, and financial reconciliation requirements.

Validate Account Ownership and Financial Status

Before forwarding the merge for execution, verify that both account numbers refer to the intended patient relationship. The destination should also evaluate outstanding claims, payments, and other financial restrictions.

Configure Destination Connectors and Error Handling

Use an approved API or supported HL7 destination interface. Configure acknowledgment correlation, controlled retries, dead-letter handling, and alerts for failed account merges.

HL7 ADT A41 ACK Message Examples and Error Handling

HL7 acknowledgments indicate whether an A41 message was accepted or rejected under the configured acknowledgment mode. A typical acknowledgment contains MSH and MSA segments. An ERR segment can provide additional information about processing failures.

In original acknowledgment mode, AA indicates application acceptance, AE indicates an application error, and AR indicates rejection. For account merges, the interface agreement should clarify whether acceptance confirms receipt, validation, or completion of the financial reconciliation.

Successful ACK Response: AA

An AA acknowledgment indicates application acceptance under the configured mode. MSA-2 references the original A41 message control identifier.

MSH|^~\&|BILLING|MAIN|REGISTRATION|HOSPITAL|20261015120001||ACK^A41^ACK|ACK41001|P|2.5
MSA|AA|MSG41001

Application Error Response: AE

An AE acknowledgment indicates an application processing error. The destination may be unable to locate the prior account or validate the requested merge.

MSH|^~\&|BILLING|MAIN|REGISTRATION|HOSPITAL|20261015120002||ACK^A41^ACK|ACK41002|P|2.5
MSA|AE|MSG41001
ERR|||204^Unknown Key Identifier^HL70357|E

Application Rejection Response: AR

An AR acknowledgment indicates rejection. Unsupported merge events, invalid message structures, or unauthorized source systems may cause the destination to reject the request.

MSH|^~\&|BILLING|MAIN|REGISTRATION|HOSPITAL|20261015120003||ACK^A41^ACK|ACK41003|P|2.5
MSA|AR|MSG41001

Correlate Acknowledgments With Account Merges

MSA-2 identifies the original message control identifier. Integration teams should associate each acknowledgment with the surviving account, prior account, and destination processing outcome.

Handle Failed ACKs and Safe Retries

Before retrying a failed or unacknowledged message, check whether the destination already completed the merge. Repeated notifications must not duplicate financial transactions or reverse account relationships.

Common HL7 ADT A41 Integration Errors and Troubleshooting

HL7 A41 integration problems frequently involve incorrect account number mapping, missing prior accounts, mismatched patient identifiers, and financial reconciliation conflicts. A destination may reject a merge because the prior account has already been consolidated or because the account numbers belong to different patients.

Other failures occur when an interface confuses account numbers with visit numbers or incorrectly maps A41 to a patient identifier merge. Accurate HL7 parsing and data mapping helps reduce these problems.

PID-18 and MRG-3 Are Reversed

PID-18 identifies the surviving account, while MRG-3 identifies the prior account. Reversing these fields changes the intended merge direction and can affect financial records.

Prior Account Number Cannot Be Found

The destination may not recognize the prior account or may have already merged it. Review account history, identifier domains, and earlier reconciliation events before retrying.

Account Numbers Belong to Different Patients

An account merge should not proceed when the identifiers have an unresolved patient ownership conflict. Route the request to an authorized reconciliation process.

Financial Transactions Prevent Consolidation

Outstanding claims, posted payments, or other financial restrictions may prevent automatic account merging. The destination should apply its approved accounting rules rather than bypassing controls.

Duplicate A41 Notifications Cause Processing Conflicts

Transport retries can deliver an A41 message multiple times. Use message control identifiers and current account relationships to prevent repeated or inconsistent processing.

HL7 ADT A41 vs A35, A40, A42, and A45

HL7 Version 2 includes different events for merging patient identifiers, account numbers, and visit numbers. A41 specifically communicates the merging of patient account numbers. A35 represents an older account-number-only merge event, while A40 merges patient identifiers. A42 merges visit numbers, and A45 moves visit information.

Although these events may involve related patient administration records, they have different meanings and require different processing rules.

HL7 EventMeaningPrimary Purpose
A35Merge Patient Information, Account Number OnlyLegacy account number merge
A40Merge Patient, Patient Identifier ListPatient identifier merge
A41Merge Account, Patient Account NumberPatient account number merge
A42Merge Visit, Visit NumberVisit number merge
A45Move Visit Information, Visit NumberMove visit information

A41 vs A35: Current and Legacy Account Merge Events

A35 belongs to an older account merge model. A41 provides the later patient account number merge event, using the supported version's PID and MRG mappings.

A41 vs A40: Account and Patient Identity Merging

A41 merges patient account numbers, while A40 merges patient identifiers. Account consolidation should not automatically merge two patient identities.

A41 vs A42: Account and Visit Number Merging

A41 concerns patient account numbers, while A42 concerns visit numbers. An account may be associated with one or more visits depending on the destination's data model.

A41 vs A45: Merge and Move Operations

A41 merges account identifiers, while A45 moves visit information. Moving an encounter to another relationship is not the same as consolidating two accounts.

Best Practices for Reliable HL7 A41 Integration

Reliable HL7 A41 integration requires accurate account matching, controlled financial reconciliation, and dependable acknowledgment handling. Healthcare organizations should identify the authoritative patient accounting application and define which account remains after a merge.

Interfaces must distinguish account numbers from patient identifiers and visit numbers. They should also detect duplicate messages and preserve financial audit history.

Verify the Surviving and Prior Account Numbers

Confirm that PID-18 contains the intended surviving account and MRG-3 contains the prior account. Validate the identifiers against the authoritative account management system.

Preserve Account Ownership and Identifier Domains

Validate the patient associated with both accounts. Preserve issuing authorities and other identifier components to prevent collisions across facilities and applications.

Protect Charges, Claims, and Payment Relationships

Use the destination's approved account reconciliation functionality. Preserve appropriate associations with charges, insurance claims, payments, adjustments, and account balances.

Implement Idempotency and Controlled Retries

Track message control identifiers and account merge history. Before retrying, verify whether the destination has already completed the requested consolidation.

Maintain Audit Records and Reconciliation Monitoring

Record the source application, both account identifiers, merge direction, authorization, and processing outcome. Investigate unresolved downstream account references through a monitored exception workflow.

Frequently Asked Questions About HL7 ADT A41 Messages

HL7 A41 integration raises questions about patient account numbers, merge direction, and the differences between account, patient, and visit identifiers. Healthcare developers must understand which account survives, how the prior account is represented, and how receiving systems should protect financial relationships. The following answers address common technical questions about A41 processing.

What does A41 mean in HL7?

A41 is the HL7 Version 2 event called Merge Account, Patient Account Number. It communicates the merging of a prior patient account number into a surviving account number.

What is the difference between PID-18 and MRG-3 in A41?

PID-18 identifies the surviving patient account number, while MRG-3 identifies the prior patient account number being merged. The receiving application must preserve this direction.

What is the difference between HL7 A40 and A41?

A40 merges patient identifiers, while A41 merges patient account numbers. These events affect different types of records and require separate validation procedures.

What is the difference between HL7 A41 and A42?

A41 merges patient account numbers, while A42 merges visit numbers. An account number and a visit number are not interchangeable identifiers.

Does an A41 message merge patient identities?

No. A41 communicates an account number merge. If patient identifiers also require reconciliation, the appropriate patient identity workflow must be handled separately.

Can Mirth Connect process HL7 A41 messages?

Yes. Mirth Connect can receive, validate, transform, and route A41 notifications. The actual account merge should be performed by an authorized destination application.

How do you troubleshoot a failed HL7 A41 message?

Verify MSH-9, MSH-12, PID-18, and MRG-3. Review account ownership, identifier domains, merge direction, acknowledgment responses, and the destination's financial reconciliation rules.

Need Help With HL7 ADT A41 Integration?

Patient account number merging requires careful coordination between registration systems, billing applications, EHRs, and revenue cycle platforms. Taction Software supports HL7 interface development, Mirth Connect configuration, patient account mapping, and healthcare financial application integration.

Our engineers can help organizations implement A41 workflows, investigate account mapping errors, configure acknowledgments, and establish reliable exception handling. Whether you are connecting a patient accounting system to an EHR or modernizing existing HL7 interfaces, controlled account reconciliation helps maintain consistent administrative and financial information.

HL7 Account Merge Interface Development

We develop HL7 A41 interfaces based on source and destination requirements, including PID-18 and MRG-3 mapping, account validation, and reconciliation workflows.

Mirth Connect Development and Integration

Our engineers configure Mirth Connect channels for account merge notifications, including JavaScript transformations, secure routing, acknowledgments, and exception management.

EHR and Revenue Cycle System Connectivity

We support integration between EHRs, registration systems, billing platforms, and revenue cycle applications using approved account reconciliation procedures.

Production Monitoring and Troubleshooting

We help investigate failed account merges, missing identifiers, acknowledgment errors, and inconsistent downstream account relationships.

Need help with HL7 account merge integration? Explore our HL7 interface messaging services to discuss your requirements.

ShareLinkedInXEmail

Need an HL7 ADT A41 Interface Built or Fixed?

Tell us your registration and billing systems, HL7 version, and transport method. Our engineers will scope PID-18 and MRG-3 mapping, account ownership validation, Mirth Connect channels, acknowledgments, and monitoring for your account reconciliation workflow.

  • Free 30-minute technical consultation
  • A41 account merge mapping and ACK review
  • NDA available upon request
  • Response within 24 hours

Talk to an HL7 Expert

Share your ADT^A41 interface requirements and our team will respond within 24 hours.

Loading verification…