About this MSH Builder
Every HL7 v2 message starts with an MSH segment that tells the receiver who sent the message, who should receive it, what kind of event it represents, and which version to expect. This builder gives you a fast way to produce a basic header shell for testing and message examples.
Who this calculator is for
- Interface analysts and developers assembling sample HL7 messages from scratch.
- Teams documenting common sender, receiver, message type, and version combinations for an interface.
- Students learning which MSH fields drive routing, acknowledgement matching, and event identification.
When to use it
- Use it when you need a quick MSH header for a sample ADT, ORM, ORU, or other HL7 v2 message.
- Use it to generate test values for MSH-3 through MSH-12 before adding other message segments.
- Use it to check the basic placement of message type, control ID, and version fields during troubleshooting.
How to use this calculator
- Enter the Sending Application and Facility.
- Enter the Receiving Application and Facility.
- Specify the Message Type (e.g., ADT^A01) and Control ID.
- Click Generate to create the MSH segment.
Key assumptions
- This builder generates a basic MSH shell using standard delimiters and a browser-generated local timestamp.
- The processing ID is fixed to `P` in the output, and the tool does not validate whether the chosen message type and version are correct for your local interface.
- Only the header segment is produced here; downstream segments, acknowledgements, and implementation-specific requirements still need separate review.
Accuracy and testing
Review formula sources, default test cases, assumptions, unit handling, rounding rules, and changelog for this calculator.
How this calculator works
Inputs explained
Sending/Receiving
Identifies the systems involved (e.g., EMR -> LIS).
Message Type (MSH-9)
The Trigger Event. ADT is for Admit/Discharge/Transfer. ORU is for Observation Results. ORM is for Orders.
Control ID (MSH-10)
A unique ID for this specific message instance. Used for tracking and acknowledgement.
Understanding your results
Example scenarios
Admission
MSH|^~\&|EPIC|HOSP|LIS|LAB|...|ADT^A01|...|P|2.5
Key Features
- Auto Timestamp
- Standard Delimiters
- Version Control
Glossary of Terms
- MSH
- Message Header Segment.
- Trigger Event
- The real-world event (like a patient admission) that initiated the message.