-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #410 from OHDSI/OMOP_Extension_release
OMOP Extension release
- Loading branch information
Showing
2 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/************************************************************************** | ||
* Copyright 2016 Observational Health Data Sciences and Informatics (OHDSI) | ||
* | ||
* 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. | ||
* | ||
* Authors: Medical team | ||
* Date: 2020 | ||
**************************************************************************/ | ||
|
||
DO $_$ | ||
BEGIN | ||
PERFORM VOCABULARY_PACK.SetLatestUpdate( | ||
pVocabularyName =>'OMOP Extension', | ||
pVocabularyDate => CURRENT_DATE, | ||
pVocabularyVersion => 'OMOP Extension '||TO_CHAR(CURRENT_DATE,'YYYYMMDD'), | ||
pVocabularyDevSchema => 'DEV_OMOPEXT' | ||
); | ||
END $_$; | ||
|
||
-- 2. Truncate all working tables | ||
TRUNCATE TABLE concept_stage; | ||
TRUNCATE TABLE concept_relationship_stage; | ||
TRUNCATE TABLE concept_synonym_stage; | ||
TRUNCATE TABLE pack_content_stage; | ||
TRUNCATE TABLE drug_strength_stage; | ||
|
||
--3. Manual concepts | ||
DO $_$ | ||
BEGIN | ||
PERFORM VOCABULARY_PACK.ProcessManualConcepts(); | ||
END $_$; | ||
|
||
--4. Manual mappings | ||
DO $_$ | ||
BEGIN | ||
PERFORM VOCABULARY_PACK.ProcessManualRelationships(); | ||
END $_$; | ||
|
||
--5. Manual synonyms | ||
DO $_$ | ||
BEGIN | ||
PERFORM VOCABULARY_PACK.ProcessManualSynonyms(); | ||
END $_$; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
### Manual content processing: | ||
1.Extract the following csv file into the concept_manual table: https://drive.google.com/file/d/1j5AlnUzvpNrCf9dMdol4gRq5QImGkegY/view?usp=sharing | ||
|
||
File is generated using the query: | ||
|
||
`SELECT concept_name, | ||
domain_id, | ||
vocabulary_id, | ||
concept_class_id, | ||
standard_concept, | ||
concept_code, | ||
valid_start_date, | ||
valid_end_date, | ||
invalid_reason | ||
FROM concept_manual | ||
ORDER BY vocabulary_id, concept_code, invalid_reason, valid_start_date, valid_end_date, concept_name` | ||
|
||
2.Extract the following csv file into the concept_synonym_manual table: https://drive.google.com/file/d/1AdzCBO-hc_l2udDrM-I52pYZLlFbzR73/view?usp=sharing | ||
|
||
`SELECT synonym_name, | ||
synonym_concept_code, | ||
synonym_vocabulary_id, | ||
language_concept_id | ||
FROM concept_synonym_manual | ||
ORDER BY synonym_vocabulary_id, synonym_concept_code, language_concept_id, synonym_name` | ||
|
||
3.Extract the following csv file into the concept_relationship_manual table: https://drive.google.com/file/d/1gMqPAl2TimE-6T5Zf45TzYit1jHiV_Ju/view?usp=sharing | ||
|
||
`SELECT concept_code_1, | ||
concept_code_2, | ||
vocabulary_id_1, | ||
vocabulary_id_2, | ||
relationship_id, | ||
valid_start_date, | ||
valid_end_date, | ||
invalid_reason | ||
FROM concept_relationship_manual | ||
ORDER BY vocabulary_id_1, vocabulary_id_2, relationship_id, concept_code_1, concept_code_2, invalid_reason, valid_start_date, valid_end_date | ||
;` | ||
|
||
|
||
##### csv format: | ||
- delimiter: ',' | ||
- encoding: 'UTF8' | ||
- header: ON | ||
- decimal symbol: '.' | ||
- quote escape: with backslash \ | ||
- quote always: FALSE | ||
- NULL string: empty |