Skip to content

Commit

Permalink
Merge branch 'release/0.6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
pbchase committed Aug 1, 2016
2 parents ab101b0 + 0d483ee commit 75d1859
Show file tree
Hide file tree
Showing 9 changed files with 623 additions and 145 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
All notable changes to the REDCap Deployment project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [0.6.0] - 2016-08-01
### Changed
- Merge Requirements section from docs/creating_the_test_vm_with_vagrant.rst into README and update text of README (Philip Chase)

### Added
- Add condensed_pdf_report plugin (Philip Chase)


## [0.5.0] - 2016-06-14
### Changed
Expand Down
64 changes: 51 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,54 @@ includes a Vagrant VM on which these tools can be developed and tested.
This repo also contains the mapping of hooks to specific project id's for the
production and staging instances of REDCap at the CTSI.


## Requirements

A user of these tools will need to download and provide their own REDCap zip file,
downloaded from Vanderbilt. This REDCap .zip should be placed in the root folder.
It should not be renamed.

This VM requires that Vagrant, VirtualBox, the vagrant-hostsupdater plugin and the vagrant-env plugin be installed on the host system.
This VM requires that Vagrant, VirtualBox, the vagrant-hostsupdater plugin and
the vagrant-env plugin be installed on the host system.


### Install Vagrant and Virtual Box

On a Linux machine run these commands in a shell:

sudo apt-get install vagrant
sudo apt-get install virtualbox

On a Mac OSX machine:

- Download and install vagrant from <https://www.vagrantup.com/downloads.html>
- Download and install the latest virtual box from <http://download.virtualbox.org/virtualbox/>

On Mac OSX users using [Homebrew](http://brew.sh/) can install these packages
using the _brew_ command. Run these commands at a shell:

brew install virtualbox
brew install vagrant


See [Creating the Test VM With Vagrant](docs/creating_the_test_vm_with_vagrant.rst) for details on how to meet those requirements.
### Install Vagrant plugins

Vagrant will need a few plugins for this VM. On any platform, run these commands in a shell:

vagrant plugin install vagrant-hostsupdater
vagrant plugin install vagrant-env

Mac OSX users might enjoy the functionality of the vagrant-triggers plugin. CTS-IT used it to open the Chrome browser to the just -deployed REDCap instance. Run this command at a shell to install it.

vagrant plugin install vagrant-triggers

For more details about Vagrant software you can go to [why-vagrant](https://docs.vagrantup.com/v2/why-vagrant/) page.


### Get your REDCap zip file

You must provide a copy of the REDCap software from http ://project-redcap.org/. Save the .zip file with its default name to the root of this repository. This ensures the provisioning script [bootstrap.sh](bootstrap.sh) script can extract the files to the virtual machine path "**/var/www/redcap**".

If you put multiple redcap\*.zip files in the vagrant folder, the provisioning script will use the one with the highest version number.


## Configure the Development Environment
Expand All @@ -29,6 +67,7 @@ use. Minimally, you will need to set _smtp\_smarthost_ the dns name of a mail
server your development host can use to deliver mail. This will allow you to
better test features that send email.


## Using the Development Environment

With the above requirements and configuration completed, start the VM with the command
Expand All @@ -38,33 +77,32 @@ With the above requirements and configuration completed, start the VM with the c
After about two minutes, the VM should be accessible at [http://redcap.dev/redcap/](http://redcap.dev/redcap/) and at [https://redcap.dev/redcap/](https://redcap.dev/redcap/) (or whatever URL _URL\_OF\_DEPLOYED\_APP_ is set to in _.env_)


## Hook and Plugin deployment
## Hook and Plugin Deployment

CTSI REDCap Hooks and Plugins are deployed using the script
deploy_extensions.sh in this repo. This repo also contains the data files
need to configure hook deployment for the CTSI REDCap instances. See [Hook
Deployment ](README-hooks.md) for usage instructions and details.


## REDCap upgrade
## REDCap Upgrade

Upgrade instructions currently live in a Wiki article found at
[CTS-IT Wiki Article on REDCap Upgrades](https://ctsit-forge.ctsi.ufl.edu/projects/redcap/wiki/REDCap_Upgrade_Instructions)
At the moment, CTS-IT does not have a fully scripted upgrade or procedures
that can be be shared publicly. The upgrade procedures used live in a private
Wiki article found at [CTS-IT Wiki Article on REDCap Upgrades](https://ctsit-
forge.ctsi.ufl.edu/projects/redcap/wiki/REDCap_Upgrade_Instructions)

ToDo: Move wiki article to a markdown doc in this repo.
ToDo: Convert steps of wiki article to shell script.


## REDCap installation
## REDCap Installation

CTS-IT does not currently have a bare-metal installation procedure. That said, the
vagrant files presented in this repo contain many of the required steps in
such a deployment process. Other steps can be found in the above upgrade
instructions.
such a deployment process.

ToDo: Make vagrant provisioning scripts more like a production deployment, but
don't be too wed to the prod and stage instance we have today. Make the
deployment we _want_, not the deployment we have.
ToDo: Make vagrant provisioning scripts more like a production deployment.


## Contributions
Expand Down
132 changes: 0 additions & 132 deletions docs/creating_the_test_vm_with_vagrant.rst

This file was deleted.

7 changes: 7 additions & 0 deletions plugins/condensed_pdf_report/ORIGIN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Condensed PDF Report (aka PDF Modified Report)

* Source: https://stanfordmedicine.app.box.com/s/eeej6fwiiv3j8t2c473g/1/6402668221/52116944057/1
* Authors: Andy Martin, Stanford University; Vanderbilt University staff
* Last updated: 2016-07-21
* Version: 2016-02-04
* License: REDCap
64 changes: 64 additions & 0 deletions plugins/condensed_pdf_report/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Condensed PDF Report

The Condensed PDF Report plugin is a REDCap plugin that creates a condensed
version of the report REDCap creates when selecting _This data entry form with
saved data_ from the _Download PDF of instrument(s)_ menu while viewing a
record. The condensed report only prints fields that have saved data. This
makes for much shorter reports when print the records fro reserahc subjects
who have sparse data.

The software for this plugin was written by Andy Martin of Stanford University
and released under the name _PDF Modified Report_.


## Basic Usage

To use the Condensed PDF Report, add a project bookmark titled "Condensed PDF
Report" pointing at the installed plugin. At the UF CTSI, this plugin is
located at [https://redcap.ctsi.ufl.edu/redcap/plugins/condensed_pdf_report/index.php]
(https://redcap.ctsi.ufl.edu/redcap/plugins/condensed_pdf_report/index.php) Check the
_Append record into to URL_ and _Append project info to URL_ boxes.

![Making a project bookmark](making_a_project_bookmark.png)

This will create a Project Bookmark in the left hand column named "Condensed
PDF Report". To use this bookmark, first access a form for a subject, then
click the bookmark. This will create and download a PDF of the form you are
viewing at that moment. The PDF will show only those fields that have data
elements.


## Advanced Usage

You can supply a few optional parameters to specify the form(s) you want to
print and how you want to print them.

If you want to include a field even if it is blank, you should append a comma-
separated list of fields with the _always\_include_ parameter.

https://redcap.ctsi.ufl.edu/redcap/plugins/condensed_pdf_report/index.php?always_include=consent_date

If you want to exclude a field no matter what, you should append a comma-
separated list of fields with the _always\_exclude_ parameter

https://redcap.ctsi.ufl.edu/redcap/plugins/condensed_pdf_report/index.php?always_exclude=mrn

You can print multiple forms using the _forms_ parameter. To print all forms,
set _forms_ to _all_. To specify multiple forms, specify them in a comma-
separated list.

https://redcap.ctsi.ufl.edu/redcap/plugins/condensed_pdf_report/index.php?forms=all
https://redcap.ctsi.ufl.edu/redcap/plugins/condensed_pdf_report/index.php?forms=demographics,cbc

Omitting the list of form names or omitting the form parameter
entirely results in only the current form being printed. That's the behavior describe above in _Basic Usage_.

Parameters can also be combined:

https://redcap.ctsi.ufl.edu/redcap/plugins/condensed_pdf_report/index.php
?forms=demographics,cbc
&always_exclude=mrn
&always_include=consent_date

When making the bookmark, the _Link Label_ field should reflect the contents of the
report generated.
14 changes: 14 additions & 0 deletions plugins/condensed_pdf_report/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
set -e

export MYTARGETDIR=$1

# determine the directory where this script resides
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# copy files to the correct target locations
mkdir -p $MYTARGETDIR
cp $DIR/index.php $MYTARGETDIR
cp $DIR/ORIGIN.md $MYTARGETDIR

echo "$DIR: Access the PDF Modified Report plugin at /redcap/plugins/condensed_pdf_report/"
Loading

0 comments on commit 75d1859

Please sign in to comment.