v50

latestOpenAPI 3.0.0Apache 2.0raw.githubusercontent.com2026-07-0381351.7 KB
Message

Process a message

Using $process-message

The inherent flexibility of the various workflows supported by BaRS is facilitated by the $process-message endpoint. The example in the "Try this API" feature for this endpoint is a referral request.

Function

FunctionAPI CallDescription
Making a referral requestPOST /$process-messageThe sender will POST a FHIR Bundle, including the FHIR resources defined in MessageDefinition requested previously, the 'focus' being a ServiceRequest resource, supported by Encounter, Observation, Flag etc. The MessageHeader resource will indicate the activity required through use of 'event', 'reason' and 'focus' data elements.<cr> The MessageHeader resource will indicate the activity required. An example of this can be found here.
Respond to a referralPOST /$process-messageA receiver wanting to respond to a request will direct their response to the Sender's $process-message endpoint, reversing the previous request/response roles. All implementers (senders or receivers) of BaRS must build a $process-message endpoint to be able to support the asynchronous workflows which involve such feedback responses. An example of this can be found here.
Cancelling a referralPOST /$process-messageAn updated payload request ensuring the status of the service request is set to 'revoked', as a minimum.An example of this can be found here.
Making a bookingPOST /$process-messageOnce a slot has been identified, the sender makes a request to book through the $process-message endpoint. The receivers MessageDefinition defines the required FHIR resources and must including reference to the service request, if applicable. The MessageHeader resource will indicate the activity required.An example of this can be found here.
Respond to a bookingPOST /$process-messageA sender may receive a response to a booking they've made, for example, where a patient fails to attend. The original receiver (now the sender, in effect) will respond to the original sender (now the receiver) with an updated payload to reflect the current state of the booking e.g. DNA.
Cancelling a booking (and rebook)POST /$process-messageAn updated payload request ensuring the status of the appointment is set to 'cancelled', as a minimum.

for more information on processing requests, please see the guidance within our End-to-End Workflow documentation.

post/$process-message

Response

Success