This repository provides a set of scripts for importing the Aggregate Analysis of ClincalTrials.gov provided by the Clinical Trial Transformation Initiative. This includes data on all studies listed on ClinicalTrials.gov. More information can be found here.
This code does not yet import the results tables in the aact dataset.
- Ruby
- Rubygems
- The sequel and activesupport gems. Install using the commands below.
gem install sequel
gem install activesupport
The data can be obtained here.
Be sure to download the pipe delimited text output. Once downloaded, extract the contents into a directory named 'data' inside the aact_import directory.
Make a copy of the database.yml.tpl file, naming it database.yml. Then edit the file with your relevant details. This can use any adapter supported by the ruby sequel gem [docs]. Below is an example for a postgres databse connection.
adapter: postgres
host: localhost
database: aact
user: my_db_user
password: my_db_pass
In the aact_import directory, run the following from the console.
ruby create_schema.rb
This takes a very long time.
ruby import_data.rb
If anything is confusing or just not working either create an issue or feel free to make changes and create a pull request. Contributions are welcome.