Developers Getting Started With i2b2
Space shortcuts
Space Tools

Versions Compared

Key

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

...

  1. The manager logs into the webclient and finds the query from their e-mail by locating the query master id, which is now part of the title of the previous query.

  2. Manager user then re-runs the previous query and clicks on export.  The In the Run Query dialog, the managers selects the requested export option is displayed selected in the Data export breakdown list.

    Info

    It is very important to put the original query master id (or some other identifier that links the export to the request) into the query name. The export letter will contain the query name, and this is the only way to trace the export back to the original request. 


  3. Data export runs in the background and file is generated in a specified folder 

  4. Manger user manually sends a confirmation email to the user on the file generation and retrieval info.

...

Export File format, location and email server parameters are configurable in the HIVE_CELL_PARAMS

Info

The <Filename> parameter  in the QT_BREAKDOWN_PATH  definition will override the default value specified in the HIVE_CELL_PARAMS. 

Wildfly must be restarted for changes to the HIVE_CELL_PARAMs to take effect.



Cell IDParameter NameExample ValueNotes
CRCedu.harvard.i2b2.crc.exportcsv.datamanageremailuserid@partners.orgEmail address used for sending request/export e-mails
CRCedu.harvard.i2b2.crc.smtp.hostsmtp.partners.orgSMTP host
CRCedu.harvard.i2b2.crc.smtp.port25SMTP port
CRCedu.harvard.i2b2.crc.smtp.ssl.enableenabledFALSETRUE 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.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.resultfetchsize50000??????
CRCedu.harvard.i2b2.crc.exportcsv.filename{{{PROJECT_ID}}}/{{{DATE_yyyyMMdd}}}_{{{FULL_NAME}}}.tsvParameterized template for export file names
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.zipencryptmethodnone?????????

...

Value

Description

{{{USER_NAME}}}

Current user running query

{{{PROJECT_ID}}}

The project name

{{{RESULT_INSTANCE_ID}}}

The result instance ID <--- THIS IS COMMENTED OUT IN THE CODE https://github.com/i2b2/i2b2-core-server/blob/668813d1b50d6299d003b4418b9e0f61b4cea842/edu.harvard.i2b2.crc/src/server/edu/harvard/i2b2/crc/dao/setfinder/QueryResultPatientRequest.java#L483ID 

{{{RANDOM_xxx}}}

A random integer where xxx is the max integer size

{{{DATE_xxx}}}

Date/Time format, where xxx can be from the table below.  The string yyyy-MM-dd would output dates that look like 2022-07-26

{{{QUERY_NAME}}}

Query Name

{{{QUERY_STARTDATE}}}

Query Start date/time

{{{QUERY_ENDDATE}}}

Query End date/time

{{{PATIENT_COUNT}}}

Number of patients

{{{FULL_NAME}}}

Fullname of user who ran query

{{{QUERY_MASTER_ID}}}

The query Master ID

{{{QUERY_RUNTIME}}}

Time to run the query

...

  • Data: New entries in HIVE_CELL_PARAMS, QT_QUERY_RESULT_TYPE, and QT_BREAKDOWN_PATH define the exporter configuration.
  • Java code: New breakdown classes and updates to existing java classes to support the data exporter functionality.

Limitations in current functionality

The current data exporter functionality has the following design limitations

Important Design Notes

Database Configuration

  • QT_BREAKDOWN_PATH table configuration for Request/Export file XML definition support is limited to SQL statements only.
  • HIVE_CELL_PARAMS /QT_BREAKDOWN_PATH defaultseperator value parameter overrides the file type parameter set in exportcsv.filename value column parameter 

...