diff --git a/Version4/Oracle/VocabImport/OMOP CDM vocabulary load - Oracle.bat b/Version4/Oracle/VocabImport/OMOP CDM vocabulary load - Oracle.bat new file mode 100644 index 0000000..5d621d5 --- /dev/null +++ b/Version4/Oracle/VocabImport/OMOP CDM vocabulary load - Oracle.bat @@ -0,0 +1,51 @@ +/********************************************************************************* +# Copyright 2015 Observational Health Data Sciences and Informatics +# +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License.4 +********************************************************************************/ + +/************************ + + ####### # # ####### ###### ##### ###### # # ## ####### + # # ## ## # # # # # # # # ## ## # # # # # + # # # # # # # # # # # # # # # # # # # # # # + # # # # # # # ###### # # # # # # # # ####### ####### + # # # # # # # # # # # # # # # # + # # # # # # # # # # # # # # # # # # + ####### # # ####### # ##### ###### # # ## # # ##### + + +script to load the Vocabulary related tables in the OMOP common data model, version 4.5 for Oracle database + +last revised: 19 Mar 2015 + +author: Lee Evans + +Notes + +1) This script assumes the CDM version 4.5 vocabulary zip file has been unzipped into the "C:\CDM" directory. +2) If you unzipped your CDM version 4.5 vocabulary files into a different directory then replace all file paths below, with your directory path. +3) If you have existing data in your CDM vocabulary tables then backup that data (if needed) and truncate those tables before loading + + +*************************/ + +sqlldr CDM/ CONTROL=CONCEPT.ctl LOG=C:\CDM\CONCEPT.log BAD=C:\CDM\CONCEPT.bad +sqlldr CDM/ CONTROL=CONCEPT_ANCESTOR.ctl LOG=C:\CDM\CONCEPT_ANCESTOR.log BAD=C:\CDM\CONCEPT_ANCESTOR.bad +sqlldr CDM/ CONTROL=CONCEPT_RELATIONSHIP.ctl LOG=C:\CDM\CONCEPT_RELATIONSHIP.log BAD=C:\CDM\CONCEPT_RELATIONSHIP.bad +sqlldr CDM/ CONTROL=CONCEPT_SYNONYM.ctl LOG=C:\CDM\CONCEPT_SYNONYM.log BAD=C:\CDM\CONCEPT_SYNONYM.bad +sqlldr CDM/ CONTROL=DRUG_STRENGTH.ctl LOG=C:\CDM\DRUG_STRENGTH.log BAD=C:\CDM\DRUG_STRENGTH.bad +sqlldr CDM/ CONTROL=RELATIONSHIP.ctl LOG=C:\CDM\RELATIONSHIP.log BAD=C:\CDM\RELATIONSHIP.bad +sqlldr CDM/ CONTROL=VOCABULARY.ctl LOG=C:\CDM\VOCABULARY.log BAD=C:\CDM\VOCABULARY.bad +sqlldr CDM/ CONTROL=SOURCE_TO_CONCEPT_MAP.ctl LOG=C:\CDM\SOURCE_TO_CONCEPT_MAP.log BAD=C:\CDM\SOURCE_TO_CONCEPT_MAP.bad diff --git a/Version4/Oracle/VocabImport/concept.ctl b/Version4/Oracle/VocabImport/concept.ctl new file mode 100644 index 0000000..cb49212 --- /dev/null +++ b/Version4/Oracle/VocabImport/concept.ctl @@ -0,0 +1,18 @@ +options (skip=1) +load data +infile concept.csv +into table concept +replace +fields terminated by '\t' +trailing nullcols +( + concept_id, + concept_name, + concept_level, + concept_class, + vocabulary_id, + concept_code, + valid_start_date DATE 'YYYYMMDD', + valid_end_date DATE 'YYYYMMDD', + invalid_reason +) \ No newline at end of file diff --git a/Version4/Oracle/VocabImport/concept_ancestor.ctl b/Version4/Oracle/VocabImport/concept_ancestor.ctl new file mode 100644 index 0000000..350015a --- /dev/null +++ b/Version4/Oracle/VocabImport/concept_ancestor.ctl @@ -0,0 +1,13 @@ +options (skip=1) +load data +infile concept_ancestor.csv +into table concept_ancestor +replace +fields terminated by '\t' +trailing nullcols +( + ancestor_concept_id, + descendant_concept_id, + min_levels_of_separation, + max_levels_of_separation +) \ No newline at end of file diff --git a/Version4/Oracle/VocabImport/concept_relationship.ctl b/Version4/Oracle/VocabImport/concept_relationship.ctl new file mode 100644 index 0000000..d26ce3e --- /dev/null +++ b/Version4/Oracle/VocabImport/concept_relationship.ctl @@ -0,0 +1,15 @@ +options (skip=1) +load data +infile concept_relationship.csv +into table concept_relationship +replace +fields terminated by '\t' +trailing nullcols +( + concept_id_1, + concept_id_2, + relationship_id, + valid_start_date DATE 'YYYYMMDD', + valid_end_date DATE 'YYYYMMDD', + invalid_reason +) \ No newline at end of file diff --git a/Version4/Oracle/VocabImport/concept_synonym.ctl b/Version4/Oracle/VocabImport/concept_synonym.ctl new file mode 100644 index 0000000..a7ef6fa --- /dev/null +++ b/Version4/Oracle/VocabImport/concept_synonym.ctl @@ -0,0 +1,12 @@ +options (skip=1) +load data +infile concept_synonym.csv +into table concept_synonym +replace +fields terminated by '\t' +trailing nullcols +( + concept_synonym_id, + concept_id, + concept_synonym_name CHAR(1000) +) \ No newline at end of file diff --git a/Version4/Oracle/VocabImport/drug_strength.ctl b/Version4/Oracle/VocabImport/drug_strength.ctl new file mode 100644 index 0000000..dc858c3 --- /dev/null +++ b/Version4/Oracle/VocabImport/drug_strength.ctl @@ -0,0 +1,19 @@ +options (skip=1) +load data +infile drug_strength.csv +into table drug_strength +replace +fields terminated by '\t' +trailing nullcols +( + drug_concept_id, + ingredient_concept_id, + amount_value, + amount_unit, + concentration_value, + concentration_enum_unit, + concentration_denom_unit, + valid_start_date DATE 'YYYYMMDD', + valid_end_date DATE 'YYYYMMDD', + invalid_reason +) \ No newline at end of file diff --git a/Version4/Oracle/VocabImport/relationship.ctl b/Version4/Oracle/VocabImport/relationship.ctl new file mode 100644 index 0000000..40daf29 --- /dev/null +++ b/Version4/Oracle/VocabImport/relationship.ctl @@ -0,0 +1,14 @@ +options (skip=1) +load data +infile relationship.csv +into table relationship +replace +fields terminated by '\t' +trailing nullcols +( + relationship_id, + relationship_name, + is_hierarchical, + defines_ancestry, + reverse_relationship +) \ No newline at end of file diff --git a/Version4/Oracle/VocabImport/source_to_concept_map.ctl b/Version4/Oracle/VocabImport/source_to_concept_map.ctl new file mode 100644 index 0000000..19c099b --- /dev/null +++ b/Version4/Oracle/VocabImport/source_to_concept_map.ctl @@ -0,0 +1,19 @@ +options (skip=1) +load data +infile source_to_concept_map.csv +into table source_to_concept_map +replace +fields terminated by '\t' +trailing nullcols +( + source_code, + source_vocabulary_id, + source_code_description, + target_concept_id, + target_vocabulary_id, + mapping_type, + primary_map, + valid_start_date DATE 'YYYYMMDD', + valid_end_date DATE 'YYYYMMDD', + invalid_reason +) \ No newline at end of file diff --git a/Version4/Oracle/VocabImport/vocabulary.ctl b/Version4/Oracle/VocabImport/vocabulary.ctl new file mode 100644 index 0000000..3f80f25 --- /dev/null +++ b/Version4/Oracle/VocabImport/vocabulary.ctl @@ -0,0 +1,11 @@ +options (skip=1) +load data +infile vocabulary.csv +into table vocabulary +replace +fields terminated by '\t' +trailing nullcols +( + vocabulary_id, + vocabulary_name +) \ No newline at end of file