REDCap: A Tool for Collecting Clinical Trials Data
In the course of my day job I tend to get drawn into interesting niche projects because of my Linux expertise. Recall that the Mothership (that corporate entity located somewhere on the East coat which pays me fairly well to work for them) is *shudder* a Windows shop, primarily.
However, Open Source Software is making not-too-subtle encroachments into even this bastion of All Windows All The Time. I got a call one day a couple of weeks ago from a semi-stressed project leader who at the suggestion of the client was being encouraged to use an application built entirely out of open source components. We have it running on a virtual Linux server. It’s called REDCap, and was developed by Vanderbilt University. Basically, it is a web-based interface to an underlying mysql engine. It is a highly specialized database tool developed specifically to support data collection for clinical studies.
Understand, REDCap is built entirely from open source components, but it is not FOSS. In order to be allowed to use it, you must join the REDCap Consortium. Nothing wrong with that, I assure you. In fact, I’m quite pleased to see pressure coming down from the government client encouraging (translated: We’re making you an offer you can’t refuse...) their contractors to take advantage of certain open source products.
What is it that makes REDCap special? Good question. After tinkering with our REDCap install for about a week now, I can say that it is a very well designed, tight system which serves a very specific purpose (data collection for clinical studies), and serves it well. Plus it provides a simple, yet flexible API to allow the users of it to get info in and out of the REDCap databases. Using the provided API, it turns out to be a snap to develop php scripts that allow the system integrator to interface REDCap with other running systems. Even those running *shudder* Windows.
Sorry about the *shudder* thing. Can’t help myself.
Anyhow, as I was saying, using fairly simple php scripts, it is easy to get data into and out of the REDCap repository. Here’s one small example of how to export data out of a REDCap database:
#!/usr/bin/php <?php // // Export Screening Data // # the class that performs the API call require_once('RestCallRequest.php'); # arrays to contain elements you want to filter results by # example: array('item1', 'item2', 'item3'); $records = array(); $events = array(); $fields = array(); $forms = array(); # an array containing all the elements that must be submitted to the API $data = array('content' => 'record', 'type' => 'flat', 'format' => 'csv', 'records' => $records, 'events' => $events, 'fields' => $fields, 'forms' => $forms, 'token' => '59E3E2981CDCB7D1BF1817C8024BD51B'); // Doug # create a new API request object $request = new RestCallRequest("https://redcap.xxx.org/redcap/api/", 'POST', $data); # initiate the API request $request->execute(); /********* Handle the return from the API *********/ # OPTION 1: for testing purposes and small datasets you can just output the data to screen # get the content type of the data being returned $response = $request->getResponseInfo(); $type = explode(";", $response['content_type']); $contentType = $type; # set the content type of page //header("Content-type: $contentType; charset=utf-8"); #print the data to the screen //echo $request->getResponseBody(); # the following line will print out the entire HTTP request object # good for testing purposes to see what is sent back by the API and for debugging //echo '<pre>' . print_r($request, true) . '</pre>'; # OPTION 2: save the output to a file $the_date = getdate(); //print_r ($the_date); $month = $the_date['mon']; $year = $the_date['year']; $day = $the_date['mday']; $minutes = $the_date['minutes']; $hours = $the_date['hours']; $seconds = $the_date['seconds']; $path = "/usr/local/redcap/output/"; $filename = $path . "Screening_Data-" . $month . "-" . $day . "-" . $year . "-" . $hours . "." . $minutes . "." . $seconds . ".csv"; file_put_contents($filename, $request->getResponseBody()) ?>
What might not be obvious from this example is that access control is accomplished via a token system that allows the REDCap administrator to easily manage access permissions to the system. Bottom line: REDCap is good stuff. That fact that it is sort of being shoved down the throats of certain Windows shops is a small added bonus.
The developers of REDCap have requested that we cite their work whenever we use it.
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- Stunnel Security for Oracle
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- SUSE LLC's SUSE Manager
- SourceClear Open
- Managing Linux Using Puppet
- My +1 Sword of Productivity
- Google's SwiftShader Released
- Parsing an RSS News Feed with a Bash Script
- Non-Linux FOSS: Caffeine!
- SuperTuxKart 0.9.2 Released
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide