Versions Compared

Key

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

This is a paid plugin. Please email contact@krishagni.com for more details

Table of Contents

Introduction

The OpenSpecimen-REDCap plugins are paid plugins available to clients who have an Enterprise Support contract with Krishagni. This plugin supports the following use cases:

  1. It will link a REDCap Project with an Openspecimen Collection Protocol.

  2. It will fetch all the clinical data from REDCap and store it in OpenSpecimen.

  3. It will support both types of studies from REDCap: Classical and Longitudinal.

Advantage

This plugin is particularly beneficial for those institutes that store clinical data in REDCap and biospecimen data in OpenSpecimen. Hence, it acts as a bridge between two datasets helping to combine the scattered data across multiple platforms. Some of the highlights of installing this plugin are as follow:

  1. Productivity: It saves time and avoids human errors in doing duplicate data entries

  2. Powerful queries: It helps to find specimens and participants using integrated queries across datasets from OpenSpecimen and REDCap.

  3. SpecimenCatalog: You can also include REDCap data in the SpecimenCatalog.

Deployment

...

Download

  1. REDCap PHP plugin:

...

  1. To download the REDCap_PHP

...

  1. file, please contact Krishagni.

  2. OpenSpecimen-REDCap Plugin: To download the OpenSpecimen-REDCap plugin, please contact Krishagni.

Installation

Installation of these plugins to the remote server helps in sharing data or information across datasets. There are two parts to this process:

Installation of REDCap PHP

...

Plugin

  1. Log in to the REDCap server and navigate to the REDCap install directory containing the file redcap_connect.php and database.php files.

  2. Following are example commands executed in our dev environment.

    Code Block
    languagenone
    $ cd /home/var-www/html/redcap/
    $ ls database.php redcap_connect.php
    database.php  redcap_connect.php
  3. Create a new 'plugins' directory if not present.

    Code Block
    $ mkdir -p plugins

...

  1. Copy the REDCap_PHP file to the plugin's directory.

    Code Block
    $ cp $RC_OS_PLUGIN/openspecimen_plugin.php plugins
  2. To ensure that the plugins are correctly installed, you can invoke the following API using the HTTP client program of choice or run the commands as shown below.

Expand
titleClick here to see the example done using Postman
  1. Below is an example done using Postman

    1. Replace <host> with hostname where REDCap server is deployed

    2. Replace <Project API token> with actual API token issued for accessing REDCap project using APIs

    3. In response, you should see the REDCap audit log events nicely formatted using JSON.

      Image Added

  2. The following commands should succeed with printing JSON string on the console. 

    1. RC_HOST - URL of the REDCap server. E.g. https://redcap.openspecimen.org

    2. RC_DOCROOT - Document root of the REDCap server. E.g. /, /r

    3. OS_PLUGIN - Relative path of the OpenSpecimen REDCap plugin w.r.t document root. E.g. /plugins/openspecimen_plugin.php

Test Project Details

Code Block
$ curl -X POST -D "token=<Project API token>" -d "content=project" -d "format=json" -d "returnFormat=json" $RC_HOST/$RC_DOCROOT/api/

Example command:
curl -X POST -d "token=xxxx" -d "content=project" -d "format=json" -d "returnFormat=json" https://redcap.openspecimen.org/r/api/
// project details JSON

Output

<!DOCTYPE html>
<html>
<head>
<title>REDCap Project</title>
</head>
<body>
...
Image Removed
.....
</body>
</html>

Test Events list

Code Block
$ curl -X POST -d "token=<Project API token>" -d "content=event" -d "format=json" -d "returnFormat=json" $RC_HOST/$RC_DOCROOT/$OS_PLUGIN
// events list JSON

Example command:
curl -X POST -d "token=xxxx" -d "content=event" -d "format=json" -d "returnFormat=json" https://redcap.openspecimen.org/r/plugins/openspecimen_plugin.php

Output
>>[{"event_id":"40","day_offset":"1","offset_min":"0","offset_max":"0","event_name":"Event 1","arm_num":"1","repeatable":"0"}]
Info

Please contact your REDCap system admin for these steps. There might be slight differences based on the REDCap version, operating system, etc.

Installation of

...

OpenSpecimen plugin

  1. Exact the JAR file from your downloaded zip file.

  2. Login to your OpenSpecimen server and navigate to the

...

  1. $TOMCAT_HOME/bin directory.

...

  1. Stop the tomcat service using the command:

    Code Block
    ./shutdown.sh force
  2. Now, navigate to the $plugins/paiddirectory and remove an older copy of the REDCap-OpenSpecimen plugin (if any) and copy the current version.

...

  1. Navigate back to the $TOMCAT_HOME/bin directory and restart the tomcat service using the command:

    Code Block
    ./startup.sh

How to check the plugin version?

Use the below command to check the version of the plugin installed on the REDCap server-side

PHP plugin version

Code Block
$ curl -X POST -d "token=<Project API token>" -d "content=version" -d "format=json" -d "returnFormat=json" $RC_HOST/$RC_DOCROOT/$OS_PLUGIN

Example command:
curl -X POST -d "token=xxxx" -d "content=version" -d "format=json" -d "returnFormat=json" https://redcap.openspecimen.org/r/plugins/openspecimen_plugin.php

Output

>>{"version":"2020-10-12T07:58:48.225Z"} (Before OS v8.2)
>>{"version":"2021-10-11T09:30:00.000Z"} (After OS v8.2)
>>{"version":"2024-03-25T02:24:38.307Z"} (After RCv14 support)