i2b2 Cell Messaging #
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”
Introduction #
This document gives an overview of i2b2 cell messaging as well as a more detailed description of message formats specific to the Data Repository (CRC) Cell.
The i2b2 Hive #
The Informatics for Integrating Biology and the Bedside (i2b2) is one of the sponsored initiatives of the NIH Roadmap National Centers for Biomedical Computing (http://www.bisti.nih.gov/ncbc/). One of the goals of i2b2 is to provide clinical investigators broadly with the software tools necessary to collect and manage project-related clinical research data in the genomics age as a cohesive entity – a software suite to construct and manage the modern clinical research chart. The i2b2 hive is a set of cells or modules that have a common messaging protocol that allow the cells to interact using web services and XML messages.
i2b2 Messaging Overview #
All cells in the i2b2 hive must communicate using standard i2b2 XML messages. This message specifies certain properties that are common to cells and essential to the administration tasks associated with sending, receiving and processing messages.
All requests are sent using a
The XSD specification of the i2b2 message permits individual cells to add cell-specific XML in the
The following image illustrates the basic top-level elements contained within the request and response messages.
XSD Files for i2b2 XML Schema #
The i2b2 XML schema consists of three XSD files:
i2b2.xsd #
This schema is not used directly to create i2b2 messages, but is included in the i2b2_request.xsd and the i2b2_response.xsd. It defines the
i2b2_request.xsd #
This schema is used for validating i2b2 request messages. It defines the
i2b2_response.xsd #
This schema is used for validating i2b2 request messages. It defines the
i2b2 Messaging Detail #
Use Cases #
All i2b2 cells must satisfy one specific use case which is to communicate. The specific types of communication are defined by each cell. Any client of an i2b2 cell must communicate by sending a message to the cell and the cell responds by sending a response. The generic cell communication is defined in this document which the cell-specific communication is described in each cell messaging document.
Services / Messages #
Each cell in the i2b2 Hive must communicate via web services using the XML messages that can be validated by the i2b2_request.xsd and i2b2_response.xsd schemas. The actual services provided by a cell depend on its use case. Cell-specific xml must be placed inside the
The generic i2b2 request is satisfied by a
The generic i2b2 response is satisfied by a
Sequence Diagrams #
All i2b2 cells must satisfy the generic use case of communicating messages. The typical scenario for a communication between any client and any cell is illustrated below. The client sends a
XML Schema Definitions #
The i2b2 XML schema consists of three XSD files:
i2b2.xsd #
This schema is not used directly to create i2b2 messages, but is included in the i2b2_request.xsd and the i2b2_response.xsd. It defines the
i2b2_request.xsd #
This schema is used for validating i2b2 request messages. It defines the
i2b2_response.xsd #
This schema is used for validating i2b2 request messages. It defines the
Example Messages #
Request Example Message #
“1.0” encoding=“UTF-8”?>
Response Example Message #
“1.0” encoding=“UTF-8”?>
xmlns:i2b2=http://i2b2.mgh.harvard.edu/message
xsi:schemaLocation=”http://i2b2.mgh.harvard.edu/message ./i2b2_response.xsd”>
Message Explanations #
This section describes, in more detail, elements and attributes in the i2b2 request and response header.
Request Description #
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
In general, the request header specifies the necessary information for the receiving cell to process the request. Also, inside the
Response Description #
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
Status Type “DONE” #
In a
Status Type “PENDING” #
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”.
Status Type “ERROR” #
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.


