Skip to main content

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 represents
  • eventUri - Link to the definition of the event
  • destination - Message destination application(s)
  • sender - Real world sender of the message
  • enterer - The person that entered the data
  • author - The logical author of the message
  • source - Message source application
  • responsible - Final responsibility for message
  • reason - Cause of event
  • response - If this is a reply to prior message
  • focus - The actual content of the message
  • definition - 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 / SolutionCreateReadUpdateSearch
GEHRIMED----
myAvatar----
myEvolv----
myUnity----
Referral Manager----
info

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

NameTypeDescription
eventtokenCode for the event this message represents or link to event definition.
receiverreferenceIntended "real-world" recipient for the data
response-idtokenId of original message
responsiblereferenceFinal responsibility for message
source-uriuriActual message source address or id

Custom Parameters

NameTypeDescription
enddateDeprecated. Use date parameter with le prefix instead.
startdateDeprecated. Use date parameter with ge prefix instead.

Search Examples

The POST method is recommended as it keeps health information out of the URL.

Search Message Headers by ID
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" \

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.