MessageHeader
Overview
The MessageHeader resource provides the header for FHIR message exchanges, containing metadata about message routing, event types, and participants. This resource enables structured messaging workflows between healthcare systems.
Important: Always validate MessageHeader resource support and available operations by retrieving the current CapabilityStatement from /metadata before implementing integrations.
Resource Schema
The MessageHeader resource follows the HL7 FHIR R4 MessageHeader specification.
Key elements include:
eventCoding- Code for the event this message representseventUri- Link to the definition of the eventdestination- Message destination application(s)sender- Real world sender of the messageenterer- The person that entered the dataauthor- The logical author of the messagesource- Message source applicationresponsible- Final responsibility for messagereason- Cause of eventresponse- If this is a reply to prior messagefocus- The actual content of the messagedefinition- Link to the definition of this message
Example MessageHeader Resource
{
"resourceType": "MessageHeader",
"id": "12345",
"eventCoding": {
"system": "http://example.org/fhir/message-events",
"code": "patient-link",
"display": "Patient Link"
},
"destination": [{
"name": "Destination System",
"target": {
"reference": "Device/destination-system"
},
"endpoint": "https://destination.example.org/fhir",
"receiver": {
"reference": "Organization/destination-org"
}
}],
"sender": {
"reference": "Organization/sender-org"
},
"enterer": {
"reference": "Practitioner/67890"
},
"author": {
"reference": "Practitioner/67890"
},
"source": {
"name": "Source System",
"software": "Netsmart FHIR Server",
"version": "4.0.1",
"contact": {
"system": "url",
"value": "https://source.example.org/contact"
},
"endpoint": "https://source.example.org/fhir"
},
"responsible": {
"reference": "Organization/responsible-org"
},
"reason": {
"coding": [{
"system": "http://terminology.hl7.org/CodeSystem/message-reason-encounter",
"code": "admit",
"display": "Admit"
}]
},
"focus": [{
"reference": "Patient/12345"
}]
}
Supported Profiles
This API supports the following FHIR profiles:
Operations
The General Purpose FHIR R4 MessageHeader resource supports the following standard operations. However, support varies by the targeted CareRecord or solution.
| CareRecord / Solution | Create | Read | Update | Search |
|---|---|---|---|---|
| GEHRIMED | - | - | - | - |
| myAvatar | - | - | - | - |
| myEvolv | - | - | - | - |
| myUnity | - | - | - | - |
| Referral Manager | - | - | - | - |
Search
Not all Netsmart solutions support MessageHeader search. See supported operations table above and consult your target solution's documentation for more information.
This resource supports a combination of standard and custom search parameters in addition to the common parameters.
Standard Parameters
| Name | Type | Description |
|---|---|---|
| event | token | Code for the event this message represents or link to event definition. |
| receiver | reference | Intended "real-world" recipient for the data |
| response-id | token | Id of original message |
| responsible | reference | Final responsibility for message |
| source-uri | uri | Actual message source address or id |
Custom Parameters
| Name | Type | Description |
|---|---|---|
| end | date | Deprecated. Use date parameter with le prefix instead. |
| start | date | Deprecated. Use date parameter with ge prefix instead. |
Search Examples
The POST method is recommended as it keeps health information out of the URL.
- Production
- Preview
curl -X POST https://fhir.netsmartcloud.com/v4/MessageHeader/_search \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json" \
-H "Content-Type: application/x-form-urlencoded" \
-d "id=12345" \
curl -X POST https://fhirtest.netsmartcloud.com/v4/MessageHeader/_search \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json" \
-H "Content-Type: application/x-form-urlencoded" \
-d "id=12345" \
Error Handling
For information about error responses when working with MessageHeader resources, see Common Errors.
Common MessageHeader-related errors include:
- Invalid event codes or message types
- Missing required destination or source information
- Malformed endpoint URLs
- Invalid sender or receiver references
Integration Patterns
Message Processing
Process FHIR messages with headers:
# Process message bundle
curl -X POST "https://fhir.netsmartcloud.com/v4/$process-message" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/fhir+json" \
-d @message-bundle.json
Event Tracking
Track messages by event type:
# Get messages by event
curl -X GET "https://fhir.netsmartcloud.com/v4/MessageHeader?event=patient-link" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/fhir+json"
Message Routing
Route messages to specific receivers:
# Get messages by receiver
curl -X GET "https://fhir.netsmartcloud.com/v4/MessageHeader?receiver=Organization/destination-org" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/fhir+json"
Relationships to Other Resources
The MessageHeader resource connects to various resources in messaging workflows:
- Patient - Subjects of messages
- Organization - Senders and receivers of messages
- Practitioner - Authors and enterers of messages
- Device - Source and destination systems
- Bundle - Message containers
Support
For questions about MessageHeader resource implementation or FHIR messaging workflows, contact Netsmart support through your designated support channels.