https://github.com/aces/data-query-tool
LORIS's Data Query Tool, written as a CouchApp
https://github.com/aces/data-query-tool
Last synced: 8 months ago
JSON representation
LORIS's Data Query Tool, written as a CouchApp
- Host: GitHub
- URL: https://github.com/aces/data-query-tool
- Owner: aces
- Created: 2013-06-03T17:42:10.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T14:04:38.000Z (over 3 years ago)
- Last Synced: 2025-09-08T23:28:33.249Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 2.32 MB
- Stars: 2
- Watchers: 32
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DQT 2.0
The new Loris Data Query Tool.
## Prerequisites
Before using this code, you must have the following prerequisites installed
* CouchDB >= 1.2 (http://couchdb.apache.org)
## Installation
### The Easy Way
Create a database on your local CouchDB instance
```bash
curl -X PUT $YOURCOUCHDBADMIN:$YOURCOUCHADMINPASS@127.0.0.1:5984/$YOURDATABASENAME
```
Clone the code from the server http://couchdb.loris.ca:5984/dataquerytool-$VERSION where `$VERSION` is separated by underscores rather than dots (because dots are not allowed in CouchDB database names.)
Example:
```bash
curl -H 'Content-Type: application/json' -X POST http://$YOURCOUCHDBADMIN:$YOURCOUCHADMINPASS@$YOURSERVERNAME:5984/_replicate -d '{"source":"http://couchdb.loris.ca:5984/dataquerytool-1_0_0", "target":"$YOURDATABASENAME"}'
```
### The Hard Way (for development)
You will need the following dependency:
* Erica (https://github.com/benoitc/erica)
First, create a CouchDB database using Futon (http://127.0.0.1:5984/_utils/index.html).
In the following example, the database is named "dqg".
Next, clone this repository:
```bash
git clone git@github.com:aces/Data-Query-Tool.git
```
Finally, push to CouchDB using erica
```bash
cd Data-Query-Tool
erica push http://adminuser:adminpass@127.0.0.1:5984/dqg
```
Visit http://127.0.0.1:5984/dqg/_design/DQG-2.0/_rewrite/ to ensure code was pushed.
## Populating data from Loris
Amend the section of your LORIS config.xml
```xml
true
dqg
localhost
5984
adminuser
adminpass
```
In your Loris tools directory run the `CouchDB_Import_*` scripts
```bash
cd $lorisroot/tools
# Import the base candidate data
php CouchDB_Import_Demographics.php
# Import the Loris instrument data
# This step is optional and not required if
# only the MRI portion of Loris is used
php CouchDB_Import_Instruments.php
# Import the Loris MRI data
# This step is optional and not required
# if the MRI portion of Loris isn't installed
php CouchDB_Import_MRI.php
```