Improving Public Access to Aggregate Content of ClinicalTrials.gov
Ruby HTML CSS JavaScript PLpgSQL Shell
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bin
config
db
db_admin
lib
public
spec
vendor/assets
.buildpacks
.ctags
.gitignore
.hound.yml
.rspec
.ruby-version
Capfile
Gemfile
Gemfile.lock
LICENSE
README.md
Rakefile
Readme.contributing.md
app.json
config.ru

README.md

AACT

Aggregated Analysis of ClinicalTrials.gov

Getting Started

After you have cloned this repo, run this setup script to set up your machine with the necessary dependencies to run and test this app:

% ./bin/setup

It assumes you have a machine equipped with Ruby, Postgres, etc. If not, set up your machine with this script.

Environment variables

After running bin/setup, you'll have a .env file that contains an empty template for the environment variables you'll need. These variables are copied from .env.example

Importing studies from clinicaltrials.gov

Full import

bundle exec rake import:full:run

The full import will download the entire dataset from clinicaltrials.gov. This rake task is designed to only work on the first of the month. To run the task and ignore the date, run bundle exec rake import:full:run[force]

Daily import

bundle exec rake import:daily:run[{days_back}]

The daily import will check the RSS feed at clinicaltrials.gov for studies that have been added or changed. You can specify how many days back to look in the dataset with the days_back argument above. To import changed/new studies from two days back: bundle exec rake import:daily:run[2]

Sanity checks

Sanity checks are a simple way for us to check that the tables in the database have been imported correctly and gives some insight into how the data looks at a high level. Both the daily and full import rake tasks run the sanity check automatically. To run it manually, open up a Rails console and enter SanityCheck.run. This will create a record in the sanity_checks table with a report represented in JSON.

Guidelines

Use the following guides for getting things done, programming well, and programming in style.