/i2b2-send-patient-set-plugin

i2b2 web client plugin for sending the patient set from an i2b2 query to a Eureka! Clinical or other service

Primary LanguageJavaScriptApache License 2.0Apache-2.0

I2b2 Send Patient Set Plugin

Atlanta Clinical and Translational Science Institute (ACTSI), Emory University, Atlanta, GA

What does it do?

It is an i2b2 web client plugin for exporting patient data from i2b2 to CSV files. Users can configure the format of the CSV file using the plugin's interface, as well as save, load, and delete configurations. More information on doing so is available in the plugin's Help tab. The plugin communicates with i2b2's cells via the i2b2 Export Service, a RESTful web service that routes requests from the plugin to the appropriate i2b2 cell, as well as providing authentication.

Version 1.0 development series

This plugin was originally developed as part of the i2b2-eureka project. We have split that project's modules into separate projects, including the send patient set plugin.

Version history

No final releases yet

Requirements

Installation

These instructions assume your i2b2 web client installation is rooted at /var/www/html/webclient. This location will be referred to as $I2B2_ROOT.

  1. Locate your i2b2 installation's plugins directory: $I2B2_ROOT/js-i2b2/cells/plugins.

  2. Create a new directory inside the plugins directory. This directory defines a new plugin category and will be referred to as $CUSTOM_PLUGIN_DIR. The plugin will show up under a category with the name of this directory in the i2b2 plugin list.

  3. In cell_config_data.js, find the 'config' map and the 'category' key. Change the last value of the 'category' array to be $CUSTOM_PLUGIN_DIR.

  4. Inside $CUSTOM_PLUGIN_DIR, create a new directory, PatientSetSender.

  5. Copy the entire directory and its contents into the PatientSetSender directory.

  6. In PatientSetSender_config.js, change the value of i2b2.PatientSetSender.SERVICE_URL variable to the URL of the Eureka! Clinical i2b2 Integration webapp.

  7. In PatientSetSender_config.js, change the value of i2b2.PatientSetSender.EUREKA_SERVICES_URL variable to the URL of Eureka Webapp.

  8. In PatientSetSender_config.js, change the value of i2b2.PatientSetSender.RECEIVER_DISPLAY_NAME variable to the display name of where to send patient set.

  9. In PatientSetSender_config.js, change the value of i2b2.PatientSetSender.RECEIVER_SEND_URL variable to URL of the receiving service.

  10. If needed, change the JSON output shape by setting i2b2.PatientSetSender.contextualize in PatientSetSender_config.js to a function that returns the required structure. The default structure assumes that you are sending patient sets to a service that implements the Eureka! Clinical patient set REST API.

  11. Modify $I2B2_ROOT/js-i2b2/i2b2_loader.js to add the plugin to the list of plugins. Add the following JavaScript map to the i2b2.hive.tempCellsList array:

 { code: "PatientSetSender",
    forceLoading: true,
    forceConfigMsg: { params: [] },
    forceDir: "cells/plugins/$CUSTOM_PLUGIN_DIR"
 }

where $CUSTOM_PLUGIN_DIR is the name of the directory you created in step 2 (where the plugin was copied to). Where you place this block determines the order in which the plugin is displayed in the i2b2 plugin list.

For more information about i2b2 plugins, see: https://community.i2b2.org/wiki/display/webclient/Web+Client+Plug-in+Developers+Guide.

Getting help

Feel free to contact us at help@eurekaclinical.org.