Reference·MRG Segment·MRG-3
HL7 v2 Reference

Testing HL7 v2 MRG-3: What Prior Alternate Patient ID Actually Needs to Handle

Jul 27, 2026 · 4 min read
← MRG-1 MRG-4 →

A patient merged in the EHR can still have an orphaned record sitting in a lab or scheduling system, because MRG-3's alternate ID never made it into that system's reconciliation logic.

Quick answer

MRG-3 holds a secondary identifier that belonged to the losing patient record, separate from the primary MRN carried in MRG-1. It exists because a duplicate record can be known to more than one system under more than one ID scheme — a feeder lab system, a legacy scheduling platform, a regional HIE. When present, MRG-3 tells downstream systems which of their own local identifiers now needs to be pointed at the surviving patient.

What this field contains

ID Number
First component — the alternate identifier value from the retiring record, e.g. a feeder-system patient ID
Assigning Authority
Fourth component — identifies which external system issued this alternate ID, distinct from the authority in MRG-1
Identifier Type Code
Fifth component — a code distinguishing this ID's purpose from a medical record number or account number

Example

Synthetic example Generated by Synthibase
MRG|847213609^^^HOSP^MR|||55219847^^^HOSP^AN|ACC-102938

This synthetic example omits MRG-3 to show a common real-world case — many merge messages leave it blank because the losing record had no alternate ID from an external system.

Where this trips people up

Because MRG-3 is empty far more often than it's populated, some integrations never build a code path to handle it at all — until a merge involving a patient with a legacy feeder-system ID arrives and the alternate identifier is dropped on the floor. The system of record updates cleanly, but the feeder system never learns its own local ID is now stale. Test coverage should deliberately include a populated MRG-3 alongside the far more common blank case.

HL7 v2 MRG Segment Guide: Fields, Format, and Testing Gotchas
How to Build a Synthetic Patient Registry for Healthcare Testing
Regression Testing for EHR Upgrades: A Complete Guide
Exercise the alternate-ID path before it breaks in production
Synthibase generates merge messages with both populated and blank MRG-3 values across varied assigning authorities, so feeder-system reconciliation gets tested, not assumed.
Start free trial →
This page is written independently by Synthibase for testing and informational purposes. It is not an official publication of HL7 International or X12/Washington Publishing Company, and is not a substitute for reviewing the official standard or your trading partner's companion guide. See our Terms of Service for full legal terms.