Page History
...
The first thing you will need to do is to create the shrine_ont database user within i2b2 and a schema with the same name:
Code Block | ||||
---|---|---|---|---|
| ||||
$ psql -U postgres i2b2
create user shrine_ont with password 'demouser';
create schema authorization shrine_ont;
grant all privileges on all tables in schema shrine_ont to shrine_ont;
grant all privileges on all sequences in schema shrine_ont to shrine_ont;
grant all privileges on all functions in schema shrine_ont to shrine_ont; |
Next, you will need to create the tables that will contain the SHRINE ontology.
Please refer to this file for the script: ontology_create_tables.sql
...
Code Block | ||||
---|---|---|---|---|
| ||||
$ psql -U postgres "dbname=i2b2 options=--search_path=shrine_ont" -a -f ShrineDemo.sql |
NextFinally, you will need to point i2b2 the DB lookup tables within i2b2hive to look at the newly created schemas in its database for the SHRINE ontology. You will also add the SHRINE demo ontology path into the TABLE_ACCESS table within the shrine_ont schema.
Please refer to this file for the script: dbont_post_lookupssetup.sql
You can run this script by running:
Code Block | ||||
---|---|---|---|---|
| ||||
$ psql -U postgres "dbname=i2b2 options=--search_path=i2b2hive" -a-d i2b2 -f db_lookups.sql |
...
ont |
...
Code Block | ||||
---|---|---|---|---|
| ||||
$ psql -U postgres i2b2 i2b2=# set search_path = shrine_ont; i2b2=# INSERT into shrine_ont.TABLE_ACCESS ( C_TABLE_CD, C_TABLE_NAME, C_PROTECTED_ACCESS, C_HLEVEL, C_NAME, C_FULLNAME, C_SYNONYM_CD, C_VISUALATTRIBUTES, C_TOOLTIP, C_FACTTABLECOLUMN, C_DIMTABLENAME, C_COLUMNNAME, C_COLUMNDATATYPE, C_DIMCODE, C_OPERATOR) values ( 'SHRINE', 'SHRINE', 'N', 0, 'SHRINE Ontology', '\SHRINE\', 'N', 'CA', 'SHRINE Ontology', 'concept_cd', 'concept_dimension', 'concept_path', 'T', '\SHRINE\', 'LIKE');_post_setup.sql |
Overview
Content Tools