Reference·MSH Segment·MSH-5
HL7 v2 Reference

HL7 v2 MSH-5 Field Guide: Receiving Application Codes and Common Mistakes

Jul 27, 2026 · 4 min read
← MSH-4 MSH-6 →

MSH-5 names where a message is supposed to end up, but very few interface engines actually validate that the message reached the system it claims to be addressed to — so a mismatch here tends to surface only after someone notices data is missing on the receiving end.

Quick answer

MSH-5 is the fifth field of the MSH segment — a short identifier naming the application system the message is intended for.

What this field contains

BILLSYS
Example identifier for a billing or revenue cycle system
PHARMSYS
Example identifier for a pharmacy system
REGSYS
Example identifier for a patient registration system

Example

Synthetic example Generated by Synthibase
MSH|^~\&|ADTSYS|HOSP|BILLSYS|HOSP|20260727143000||ADT^A01|MSG00001458|P|2.5.1

The 5th field, BILLSYS, identifies the receiving application as the billing system. Synthetic message — not a real transmission.

Where this trips people up

MSH-5 is descriptive metadata, not an actual routing instruction — the interface engine decides where the message physically goes based on its own configuration, not on what this field says. When the two drift apart, usually after a system is decommissioned or replaced, messages keep flowing to the real destination while MSH-5 still names a system that no longer exists, which confuses anyone debugging the interface later by log alone.

HL7 v2 MSH Explained: Structure, Fields, and Common Mistakes
Regression Testing for EHR Upgrades: A Complete Guide
How to Test EHR Upgrades Without Touching Production Data
Catch stale routing metadata before it misleads a debug session
Synthibase generates synthetic MSH headers you can use to verify receiving application and facility values stay in sync with actual interface routing.
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.