Quercus Message Link Developer’s Guide<>

Checking the status of a message send to Quercus Message Link

GetMessageStatus service

Each valid message that is sent to Quercus is processed by the message receiver process. This process will handle the message inserting or updating records into the database if possible or, if not possible, sending the message to the hospital queue. Whether or not the message is successfully handled or sent to the hospital queue it is recorded in a Message Status table which can be queried by the GetMessageStatus service.

For each valid message that is sent to the system Quercus Message Link returns a success message and a unique receipt. This unique receipt allows you to check the status of any given message. The diagram below illustrates the process.

The URL call for the GetMessageStatus service is:

https://<servername.domain>/<DAD>/qml_rest.GetMessageStatus

There are a number of parameters that must be appended to the service call:

Parameter name

Required

Description

Accessid

Yes

Minimum security access ID. The value passed must match the value stored in the database parameter QML.REST.ACCESS_ID

Receipt

No

This parameter allows you check the status of a particular message. The receipt is obtained from the system when you successfully send a message to the system.

Example 1

1A message is enqueued to the system and a response is received. The success response has a receipt as shown in the diagram below.

2The third party system can check the status of the message by calling the getMessageStatus service using the unique receipt from step 1. In this example the call to the system would be:

https://labs.campusit.net/qdev/qml_rest.GetMessageStatus?accessid=USERGROUP&receipt=DB06905B876E1D14E040A8C0CE3E6DF4

Note the accessid parameter which is a required parameter and the receipt parameter which is the unique receipt from the response in Step 1. This allows the system to retrieve the status from that particular message.

The response from the getMessageStatus will be returned to the querying system. It will contain a number of values:

Value label

Description

Receipt

The value of the receipt passed in to the service call.

MessageID

The messageID of the message that was enqueued to the system. This can be used by third parties to match back to their records.

timeEnqueued

The time the message was enqueued to Quercus

processingTime

The time it took Quercus to process the message

Status

The status of message. There are three possible statuses:

IN-PROGRESS – the system has not processed the message yet. This usually occurs when a message has been enqueued to Quercus between the batch processing periods which is run every 30 seconds by default.

PROCESSED – the message has been successfully processed by Quercus (A new record has been updated or an existing record has been updated)

FAILED – the message has failed for some reason and has been sent to the hospital queue for some reason.

hospitalReceipt

This will only appear in cases where the message has failed. The system returns a hospital receipt ID which can be used to interrogate the hospital queue to establish the reason why the message failed. See section Receiving Messages from the Hospital Queue for further details.

Example responses

A message that has not yet been processed by Quercus, it has a status of IN-PROGRESS:

A message that has been successfully processed by Quercus, it has a status of PROCESSED

A message that has been processed by Quercus and has failed, it has a status of FAILED and a unique hospitalReceipt.