Download
REDCap PHP plugin: To download the REDCap_PHP file, please contact Krishagni.
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
Log in to the REDCap server and navigate to the REDCap install directory containing the file redcap_connect.php and database.php files.
Following are example commands executed in our dev environment.
$ cd /home/var-www/html/redcap/ $ ls database.php redcap_connect.php database.php redcap_connect.php
Create a new 'plugins' directory if not present.
$ mkdir -p plugins
Copy the REDCap_PHP file to the plugin's directory.
$ cp $RC_OS_PLUGIN/openspecimen_plugin.php plugins
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.
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
Exact the JAR file from your downloaded zip file.
Login to your OpenSpecimen server and navigate to the
$TOMCAT_HOME/bin
directory.Stop the tomcat service using the command:
./shutdown.sh force
Now, navigate to the
$plugins/paid
directory and remove an older copy of the REDCap-OpenSpecimen plugin (if any) and copy the current version.Navigate back to the
$TOMCAT_HOME/bin
directory and restart the tomcat service using the command:./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
$ 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)