Short description and motivation.
How to use my plugin.
Add this line to your application's Gemfile:
gem 'redcap2omop'And then execute:
$ bundleOr install it yourself as:
$ gem install redcap2omopContribution directions go here.
The gem is available as open source under the terms of the MIT License.
Do not forget to create secrets.yaml or add to existing one the following keys:
development:
redcap:
api_url:
verify_ssl: true$ bundle exec rake db:create
$ rails g redcap2omop:installDownload the latest OMOP vocabulary distribution from http://athena.ohdsi.org Unzip and copy the vocabulary to /db/migrate/CommonDataModel-5.3.1/PostgreSQL/VocabImport
$ bundle exec rake redcap2omop:data:truncate_omop_vocabulary_tables
$ bundle exec rake redcap2omop:data:load_omop_vocabulary_tables
$ bundle exec rake redcap2omop:data:drop_omop_vocabulary_indexes
$ bundle exec rake redcap2omop:data:compile_omop_vocabulary_indexes$ bundle exec rake app:redcap2omop:setup:ccc19:project
$ bundle exec rake app:redcap2omop:ingest:data_dictionary:cleanup
$ bundle exec rake app:redcap2omop:ingest:data_dictionary:from_csv PROJECT_ID=0 FILE=lib/setup/data/data_dictionaries/CCC19_DataDictionary_clean.csv
$ bundle exec rake app:redcap2omop:setup:omop_tables
$ bundle exec rake app:redcap2omop:setup:ccc19:maps
$ bundle exec rake redcap2omop:ingest:data
$ bundle exec rake redcap2omop:ingest:redcap2omop$ bundle exec rake redcap2omop:data:compile_omop_indexes
$ bundle exec rake redcap2omop:data:compile_omop_constraints$ bundle exec rake redcap2omop:data:truncate_omop_clinical_data_tables
$ bundle exec rake redcap2omop:data:drop_omop_constraints
$ bundle exec rake redcap2omop:data:drop_omop_indexes
$ bundle exec rake redcap2omop:data:drop_omop_vocabulary_indexes
$ bundle exec rake redcap2omop:data:drop_all_tablesbrew install redis
brew services start redisDownload the latest OMOP vocabulary distribution from http://athena.ohdsi.org
Unzip and copy the vocabulary to spec/dummy/db/migrate/CommonDataModel-5.3.1/PostgreSQL/VocabImport
Run the following rake tasks to prepare the testing environment.
RAILS_ENV=test bundle exec rake db:create
rails g redcap2omop:install --migrations=falseDownload the latest OMOP vocabulary distribution from http://athena.ohdsi.org Unzip and copy the vocabulary to spec/dummy/db/migrate/CommonDataModel-5.3.1/PostgreSQL/VocabImport
RAILS_ENV=test bundle exec rake db:migrate
RAILS_ENV=test bundle exec rake app:redcap2omop:data:load_omop_vocabulary_tables
RAILS_ENV=test bundle exec rake app:redcap2omop:data:compile_omop_vocabulary_indexes
bundle exec rspec