Reference·MRG Segment·MRG-4
HL7 v2 Reference

MRG-4 in HL7 v2: A Field Guide to Prior Patient Account Number

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

Merging the clinical chart is only half the job — if MRG-4 gets ignored, the retiring account number keeps generating charges that never reach the surviving patient's bill.

Quick answer

MRG-4 carries the account number tied to the losing patient record's billing activity, as opposed to the clinical MRN carried in MRG-1. A patient can have one medical record number but multiple account numbers across separate encounters or facilities, so when two patient records merge, the retiring account number in MRG-4 needs to be reassociated with the surviving patient independently of the MRN reconciliation.

What this field contains

ID Number
First component — the retiring account number value, distinct in format and namespace from an MRN
Assigning Authority
Fourth component — the billing system or facility that issued the retiring account number
Identifier Type Code
Fifth component — typically AN, marking this as an account number rather than a medical record or visit number

Example

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

This synthetic MRG-4 value, 55219847^^^HOSP^AN, is the retiring account number that needs to be reassociated with the surviving patient's billing record.

Where this trips people up

Clinical and billing systems often subscribe to the same merge feed but read different fields, and MRG-4 is the one billing depends on. If a test suite only validates that MRG-1's MRN gets reconciled, the billing side can pass every clinical test and still leave charges posting against a retired account number, because nothing exercised MRG-4 specifically. Treat clinical-ID and account-number reconciliation as two separate assertions in test coverage, not one.

HL7 v2 MRG Segment Guide: Fields, Format, and Testing Gotchas
Regression Testing for EHR Upgrades: A Complete Guide
How to Write EDI Test Cases That Actually Catch Go-Live Failures
Catch billing-side merge gaps before go-live
Synthibase generates merge scenarios that stress both clinical and billing identifiers independently, so a passing MRG-1 test doesn't mask a broken MRG-4 path.
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.