Reference·MSH Segment·MSH-4
HL7 v2 Reference

What Is HL7 v2 MSH-4? Sending Facility, Explained for Testers

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

A single sending application can serve multiple hospitals or clinics at once, and MSH-4 is the only field in the header telling a receiving system which one a given message actually came from — miss that distinction and multi-site deployments quietly mix up facility-scoped data.

Quick answer

MSH-4 is the fourth field of the MSH segment — an identifier naming the physical facility or site that sent the message, distinct from the application that generated it.

What this field contains

HOSP
Example identifier for a main hospital campus
CLINIC01
Example identifier for an affiliated outpatient clinic
ERWING
Example identifier for a specific department or wing treated as its own facility

Example

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

The 4th field, HOSP, identifies the sending facility as the main hospital campus. Synthetic message — not a real transmission.

Where this trips people up

Health systems that stand up a shared instance of an application across multiple facilities sometimes configure every site to send the same MSH-4 value out of convenience, which works fine until a downstream system tries to scope billing, reporting, or record retention by facility and finds every message indistinguishable from every other one.

HL7 v2 MSH Explained: Structure, Fields, and Common Mistakes
How to Build a Test Environment Strategy for a Multi-Hospital System
Healthcare System Cutover Planning: A Step-by-Step Guide
Test multi-facility scenarios before consolidation
Synthibase generates synthetic HL7 messages tagged with distinct sending facilities, so facility-scoping bugs surface before a multi-site rollout goes 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.