Reference·MRG Segment·MRG-1
HL7 v2 Reference

HL7 v2 MRG-1 (Prior Patient Identifier List): Format, Values, and Testing Notes

Jul 27, 2026 · 4 min read
MRG-3 →

Get MRG-1 backwards and a merge feed doesn't fail loudly — it quietly retires the wrong medical record number while the audit log reports success.

Quick answer

MRG-1 is a repeating field holding the medical record number (and any other identifiers sharing that namespace) that used to belong to the losing patient record in a merge. It's the field a receiving system reads to figure out which MRN just got absorbed into the patient named in PID-3 of the same message. Because it can repeat, one MRG-1 field can carry more than one prior identifier when a duplicate record itself had multiple MRNs across facilities.

What this field contains

ID Number
First component — the actual retiring identifier value, e.g. an MRN string
Assigning Authority
Fourth component — names the system or facility that issued the retiring ID, important when a merge spans multiple source systems
Identifier Type Code
Fifth component — usually MR for medical record number, distinguishing this identifier's purpose from an account or visit number

Example

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

This synthetic MRG-1 value, 847213609^^^HOSP^MR, is the retiring MRN being folded into the surviving patient identified elsewhere in the same message.

Where this trips people up

Teams frequently assume MRG-1 always contains exactly one identifier, then build parsers that only read the first repetition. When a source system sends a duplicate record that itself had two MRNs — one from a legacy registration system and one from the current EHR — the second repetition gets silently dropped, and that orphaned ID never gets reconciled against the surviving record. Test fixtures should include both single-value and multi-repetition MRG-1 fields.

HL7 v2 MRG Segment Guide: Fields, Format, and Testing Gotchas
HL7 ADT Messages: A01 through A08 Explained
How to Build a Synthetic Patient Registry for Healthcare Testing
Generate merge messages with realistic identifier repetition
Synthibase produces MRG-1 values with single and repeating identifiers across multiple assigning authorities, so your merge logic gets tested against the messy real-world cases before go-live.
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.