Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F80844008
ontology.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Sep 2, 21:30
Size
1 KB
Mime Type
text/x-shellscript
Expires
Wed, Sep 4, 21:30 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20463317
Attached To
R2664 SHRINE MedCo Fork
ontology.sh
View Options
#!/bin/bash
echo "[i2b2/ontology.sh] Begin."
#########
# I2B2 Ontology Setup for SHRINE
#
#########
source ./i2b2.rc
#########
#####
echo "[i2b2/ontology.sh] Creating shrine_ont user."
interpolate_file ./skel/ontology_create_user.sql "I2B2_DB_SHRINE_ONT_USER" "${I2B2_DB_SHRINE_ONT_USER}" | \
interpolate "I2B2_DB_SHRINE_ONT_PASSWORD" "${I2B2_DB_SHRINE_ONT_PASSWORD}" > ontology_create_user.sql.interpolated
sqlplus system/${I2B2_ORACLE_SYSTEM_PASSWORD}@${I2B2_ORACLE_SID} < ontology_create_user.sql.interpolated
sqlplus ${I2B2_DB_SHRINE_ONT_USER}/${I2B2_DB_SHRINE_ONT_PASSWORD}@${I2B2_ORACLE_SID} < ontology_create_tables.sql
sqlplus ${I2B2_DB_SHRINE_ONT_USER}/${I2B2_DB_SHRINE_ONT_PASSWORD}@${I2B2_ORACLE_SID} < ontology_table_access.sql
#echo "NEED TO DO SCHEMES"
#echo "select distinct c_key, c_name from i2b2demodata.schemes"
#########
echo "[i2b2/ontology.sh] Downloading shrine ontology."
SHRINE_ONTOLOGY_SQL_FILE="Shrine.sql"
SHRINE_ONTOLOGY_SQL_FILE_URL=`perl ../determine-shrine-sql-url.pl`
wget --no-clobber -O ${SHRINE_ONTOLOGY_SQL_FILE} ${SHRINE_ONTOLOGY_SQL_FILE_URL}
#####
echo "[i2b2/ontology.sh] Inserting shrine ontology."
sqlplus ${I2B2_DB_SHRINE_ONT_USER}/${I2B2_DB_SHRINE_ONT_PASSWORD}@${I2B2_ORACLE_SID} < ${SHRINE_ONTOLOGY_SQL_FILE}
#####
echo "[i2b2/ontology.sh] Done."
Event Timeline
Log In to Comment