Page History
...
Anchor | ||||
---|---|---|---|---|
|
Table of Contents
Introduction
The i2b2 Hive
i2b2 Messaging Overview
XSD Files for i2b2 XML Schema
i2b2.xsd
i2b2_request.xsd
i2b2_response.xsd
i2b2 Messaging Detail
Use Cases
Services / Messages
Sequence Diagrams
XML Schema Definitions
i2b2.xsd
i2b2_request.xsd
i2b2_response.xsd
Example Messages
Request Example Message
Response Example Message
Message Explanations
Request Description
Response Description
Status Type "DONE"
Status Type "PENDING"
Status Type "ERROR"
Anchor |
---|
...
|
...
Anchor | |||
---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
...
When an i2b2 cell sends a XML request message, the i2b2 request message header must be included in the message along with the cell-specific message body. An example request message is shown below with empty cell-specific <message_body/> tag.
In general, the request header specifies the necessary information for the receiving cell to process the request. Also, inside the <request_header/> tag, the cell can define the maximum waiting time for a request. The receiving cell is guaranteed to send back a response after that waiting time is expired regardless of the process status of the request.
...
Similar to the request messages, the i2b2 cells construct response XML messages by combining the i2b2 common response header and the cell-specific message body. As shown in the example response XML message below, the response header provides all the necessary data for the original requesting cell to process the response message.
Moreover, the <response_header> tag allows the responding cell to indicate the process status of a request in the response message. For example, if an error occurs, it can send back a message back in the result status type inside the <response_header>.
...
In a <response_header> the status should be set to "DONE" only when the request has finished successfully and all results have been returned via previous responses and the current response.
<results_status>
<status type="DONE">Successfully completed.</status>
<polling_url interval_ms="50"/>
<conditions/>
</result_status>
...
The cell wrapper may set the status type to "PENDING" and set the polling_url to something that the client may use to poll for results. The cell wrapper does not have to send a pending message back to the client until the initial waiting period has expired. It will continue to send a pending message back on subsequent polls until the status is set to "DONE" or "ERROR".
<results_status>
<status type="PENDING">Processing your request.</status>
<polling_url interval_ms="50">http://i2b2/polling</polling_url>
<conditions/>
</result_status>
...
If the cell wrapper encounters some error verifying, authenticating, or validating a message then the cell wrapper will set the status type attribute to "ERROR" and should include a text message inside the status tag with a more detailed error message.
<results_status>
<status type="ERROR">Your request was not formatted correctly.</status>
<polling_url interval_ms="50"/>
<conditions>
<condition type="ERROR" coding_system="i2b2">Missing ...</condition>
</conditions>
</result_status>