Process Message Operation
Overview
The Process Message operation enables asynchronous communication between healthcare systems through FHIR messaging. This operation processes message bundles containing clinical data, administrative information, or workflow notifications for various Netsmart solutions.
Before implementing, validate operation availability in the CapabilityStatement:
GET {base-url}/metadata
Check server-level operations for $process-message support and review supported message events.
Operation Schema
Endpoint: POST {base-url}/$process-message
Purpose: Process FHIR message bundles for healthcare communication
Reference: FHIR Messaging Specification
Workflow
This API uses the synchronous message exchange pattern for each message.
Authorization
This operation will require the application obtain authorization using one of the following custom scopes based on SMART.
- v1:
[patient|user|system]/Messaging.[write|*] - v2: To be determined. (future)
Parameters
| Use | Name | Cardinality | Type | Documentation |
|---|---|---|---|---|
| IN | content | 1..1 | Bundle | The request message to process. |
| IN | async | 0..1 | boolean | If true the message is process using asynchronous messaging pattern.None of our supported message types currently support the asynchronous message pattern. |
| IN | content | 0..1 | url | A URL to submit response messages to, if asynchronous messaging is being used, and if the MessageHeader.source.endpoint is not the appropriate place to submit responses. This is not currently supported by any of our existing message types. |
| OUT | return | 0..1 | Bundle | The response message returned directly as a resource. |
Supported Message Events
Netsmart-defined Message Events
All Netsmart-defined messaging events use the following system: http://ntst.com/fhir/message-events.
| Name | Type | Description | Supported CareRecord(s) and/or other Solutions |
|---|---|---|---|
| Submit Service Request | submit-service-request | Enables the submission of referrals ("Service Requests") to Referral Manager. | Referral Manager |
| Update Service Request | update-service-request | Enables the update of previously referrals ("Service Requests") to Referral Manager. | Referral Manager |
Examples
- Production
- Preview
curl -X POST 'https://fhir.netsmartcloud.com/v4/$process-message' \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json" \
-H "Content-Type: application/fhir+json" \
-d @message-bundle.json
curl -X POST 'https://fhirtest.netsmartcloud.com/v4/$process-message' \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json" \
-H "Content-Type: application/fhir+json" \
-d @message-bundle.json
Integration Patterns
Message Processing Workflow
-
Prepare Message Bundle
- Create Bundle with type "message"
- Include MessageHeader as first entry
- Add all referenced resources
-
Submit Message
- POST to
/$process-messageendpoint - Include proper authorization headers
- Use appropriate content type
- POST to
-
Handle Response
- Process returned Bundle or OperationOutcome
- Extract created resource IDs
- Handle any errors or warnings
Best Practices
- Validate message structure before submission
- Include all required resources in bundle
- Use appropriate message event types
- Handle both synchronous and asynchronous patterns
- Implement proper error recovery
Relationships to Other Resources
- FHIR Messaging - Message types and patterns
- MessageHeader Resource - Message header structure
- Bundle Resource - Message container format
- Submit Service Request - Example message type
Error Handling
For comprehensive error handling information, see Common Errors.
Support
For technical support with Process Message operations:
- Contact: Netsmart Technologies, Inc.
- Documentation: FHIR Messaging
- Specification: HL7 FHIR Messaging