Code Monkey home page Code Monkey logo

jhe4 / study_finder-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ahcis-rds/study_finder

0.0 2.0 0.0 1.51 MB

The goal for StudyFinder is to provide a flexible and configurable application to pull studies from clinicaltrials.gov and augment the data from alternate datasources such as a clinical trials management system. StudyFinder also has a basic theming component which allows for even further customizations.

Ruby 65.51% JavaScript 4.26% CSS 9.74% HTML 20.49%

study_finder-1's Introduction

StudyFinder

The goal for StudyFinder is to provide a flexible and configurable application to pull studies from clinicaltrials.gov and augment the data from alternate datasources such as a clinical trials management system. StudyFinder also has a basic theming component which allows for even further customizations.

Installation

You will need the following requirements to get StudyFinder up and running locally.

  • Ruby 1.9.3+

  • Rails 4.0+

  • A configured database w/ connection. Doesn't really matter which type (Postgres, Oracle, MySQL)

  • ElasticSearch 1.0 or higher. Official Instructions Mac Installation instructions

  • ElasticSearch synonyms file: (In trial.rb there is a configuration path to the synonyms file that is needed for elasticsearch to work properly. Please copy /config/analysis/synonym.txt to the location below and rename the file accordingly.)

  synonyms_path: '/etc/elasticsearch/trials_synonym.txt'.to_s

System Setup

Once everything is configured above, the following steps will need to be taken.

  • Setup the database connection in database.yml for local development
local:
  adapter: postgresql
  host: localhost
  database: studyfinder
  username: studyfinder
  password: studyfinder
  pool: 5
  timeout: 5000
  • Add a line to secrets.yml for the local environment
local:
  secret_key_base: SOME_SECRET_KEY
  • Add config/application.yml for application specific variables with the following format.
host: 'ldap.umn.edu'
port: 636
base: 'o=University of Minnesota,c=US'
encryption: :simple_tls
departmental_cn: 'USERNAME'
departmental_pw: 'PASSWORD'
theme: 'umn'
es_host: 'elastic.umn.edu'
  
  • Migrate the local database
$ rake db:migrate RAILS_ENV=local
  • Configure seed the data for your school. In the seeds.rb file there is "system" hash where you will want to change some of the data that is specific to your institution. You will be able to change this information later in the administration section, however it's good to do it before downloading any trials from clinicaltrials.gov.

  • Updating the seeds file The seeds file is responsible for seeding the database and will need to be updated to reflect the system data for your specific installation. Also note that the seeds file will create an initial admin user and should be changed to someone within your organization designated to managing the system.

  • Seed the database with initial data

$ rake db:seed RAILS_ENV=local
  • Load all trials. (Note: Dangerous business here!! This will delete and reload data from every StudyFinder table. Essentially starting from scratch. Use at your own risk!)
$ rake studyfinder:ctgov:reload_all RAILS_ENV=local
  • Once the trials are loaded initially, the "load" task updates them each night with the last "x" amount of days worth of trials from ctgov. (Note: The "days_previous" variable is configurable in lib/tasks/ctgov.rake)
$ rake studyfinder:ctgov:load RAILS_ENV=local
  • Trials should automatically add/update themselves into the elasticsearch index. If for some reason all the trials need to be re-indexed the following will do that.
$ rake studyfinder:trials:reindex RAILS_ENV=local

Embed Widget

The search screen within StudyFinder has the ability to be embedded into other websites. To do this add the following snippet to any other sites wanting to embed the search capability of StudyFinder.

<iframe src="https://studyfinder.url/embed" width="100%" height="350" frameborder="0"></iframe>

study_finder-1's People

Contributors

blackjk3 avatar ge3kusa avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.