Developers Getting Started With i2b2
Space shortcuts
Space Tools
Developers Getting Started With i2b2 getstarted

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Data Exporter functionality enables an i2b2 user to create a data table definition and request patient data for a desired cohort. First, a table of variables is designed using create data table for export tool. The defined data tables are then displayed under the Data Request(s) breakdown types that can be selected in the Run Query dialog, After the query run, the Manager user can view and manage the data requests under the Data Request Manager tool. i2b2 Users will be able to view their data requests  status and details .  Email are generated both An e-mail is generated for the Data Manager and the i2b2 User when the request is submitted. The Data Manager processes the request by generating the data file under the Data Request Manager tool. The patient data is exported as a file and stored in a specified location for retrieval, and the user is notified by e-mail.

Info

The patient data file  is generated as per the data table definition design specification

...

  1. User logs into web client and creates a query.
  2. In the Run Query dialog box, User created table definitions are displayed under Data Request(s) section
  3. Select one or more data request checkboxes.
    1. 1.8.2 requests (custom tables) appear as  User Created:<table definition Request> checkboxes
    2. 1.8.1 data requests (long fact-oriented tables) appear as Request <xx> Data checkboxes.

4. Click run query 

5. Emails are automatically sent - one to the User, to inform them the request has been made; and one An email is automatically sent to the data manager to inform them on the User of a new data request.

6. The table definition name with the FINISHED status is displayed as one of the breakdown items in the previous query results.

...

  • Query Name (Click on Query ID number to display the previous query in the Find Patients window)
  • Data Table Definition (Click on View under Data Request Type drop down Request item)
  • Option to Withdraw Request 
  • Option to enter Comments
  • Log info box displays the User's actions. and log of the Request status

...

The data export runs in the background and the file is generated in a specified folder .as defined in the HIVE_CELL_PARAMS (see Configuration below). Data file generation status is displayed under the Status column under Data Request Manager

Status is updated as the Data File is processed. , from Submitted to File in Progress to File Available. When the file is available, the requesting user is informed via e-mail. The process for giving the user access to the file will be site-specific.


Example Export files (all data are Example Export files (all data are fake)

Two files are generated for each data table exported. 

...

Cell IDParameter NameExample ValueNotes
CRCedu.harvard.i2b2.crc.smtp.hostsmtp.partners.orgSMTP host
CRCedu.harvard.i2b2.crc.smtp.port25SMTP port
CRCedu.harvard.i2b2.crc.smtp.ssl.enabledFALSETRUE will enable SSL
CRCedu.harvard.i2b2.crc.smtp.authFALSETRUE will enable SMTP authentication
CRCedu.harvard.i2b2.crc.smtp.usernamenoneSMTP username (required for SMTP authentication)
CRCedu.harvard.i2b2.crc.smtp.passwordnoneSMTP password (required for SMTP authentication)
CRCedu.harvard.i2b2.crc.smtp.enabledFALSETRUE will enable e-mails
CRCedu.harvard.i2b2.crc.exportcsv.defaultescapecharacter"Escape character for export files
CRCedu.harvard.i2b2.crc.exportcsv.maxfetchrows-1Maximum number of rows to export, or -1 for no limit
CRCedu.harvard.i2b2.crc.exportcsv.defaultlineend\nLine ending for export files
CRCedu.harvard.i2b2.crc.exportcsv.defaultseperator\tField separator for export files
CRCedu.harvard.i2b2.crc.exportcsv.resultfetchsize50000Number of records retrieved during each database fetch.
CRCedu.harvard.i2b2.crc.exportcsv.filename{{{PROJECT_ID}}}/{{{DATE_yyyyMMdd}}}_{{{FULL_NAME}}}.tsvParameterized template for export file names. If the extension is .zip, the file is zipped.
CRCedu.harvard.i2b2.crc.exportcsv.defaultquotechar"Quote character for export files
CRCedu.harvard.i2b2.crc.exportcsv.workfolder/tmp/i2b2Folder on the i2b2 server for data exports
CRCedu.harvard.i2b2.crc.exportcsv.zipencryptmethodnoneEncryption method for the exported ZIP file. One of STANDARD, NONE, or AES.
PM_PROJECT_PARAMS

...

Stores the The parameters for the emails sent 

...

sent to the project's Data Manager about a data request and to the requesting user when export is complete are set on a per-project basis.


Parameter NameExample ValueNotes
Data Request TemplateThis user {{{USER_NAME}}} in project {{{PROJECT_ID}}} requested ...Template text for the body of the data request message; supports placeholders like {{{USER_NAME}}} and {{{PROJECT_ID}}}.
Data Request Email Addresssomeone@somewhere.org

Email address E-mail address of the Data Manager, where the data request e-mail will be sent.
Data Request Letter"Results of the i2b2 request entitled - '{{{QUERY_NAME}}}', ..."Template text for the letter or result messagethe e-mail to the user announcing the successful completion of the data export; supports placeholders like {{{QUERY_NAME}}}.
Data Request Subjecti2b2 Data RequestSubject line for the data request emaile-mail.

Image Removed


Info

The e-mail address for the data request letter (sent when export is complete) is

Info

User receives email entered in the Query Options Email box at the time of data request submission


Template substitution variables (parameters/placeholders inside VALUE)
PlaceholderMeaning (inferred)Example
{{{USER_NAME}}}Display name / username of the requesterJon Smith
{{{PROJECT_ID}}}i2b2 project ID in which the request was runACT
{{{QUERY_NAME}}}Name/title of the query the user executedHypertension Adults
{{{QUERY_STARTDATE}}}Timestamp when the query was submitted2025-09-19 09:42
{{{QUERY_MASTER_ID}}}Internal i2b2 Query Master ID of the request5412
{{{PATIENT_COUNT}}}Number of patients returned by the request1999


Image Added

Design and Design and Architecture

The i2b2 breakdown architecture is modified to support the data table definition and new breakdown types for User created data requests. The database tables have been modified to support the data table definitions.

  • RPDO_TABLE_REQUEST table stores the data table definitions
  • HIVE_CELL_PARAMS has new parameters for global and email configurations and the data file generation location (defaults to the server's drive)
  • PM_PROJECT_PARAMS has new parameters for e-mail notifications of data export
  • QT_RESULT_TYPE table will contain a new entry for each data table definition
  • QT_BREAKDOWN_PATH will contain a new entry for each data table definition which has the data export execution details.
  • QT_XML_RESULT contains metadata about each data request, such as status and e-mail details.  

...

Developers Getting Started With i2b2 getstarted