From 619ff7e29bd3e60ae21fc4065284699d28183d30 Mon Sep 17 00:00:00 2001 From: Alex Davydov Date: Tue, 13 Jul 2021 22:59:49 +0300 Subject: [PATCH] new concept added --- Read/load_stage.sql | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Read/load_stage.sql b/Read/load_stage.sql index cc8434f17..2fad00923 100644 --- a/Read/load_stage.sql +++ b/Read/load_stage.sql @@ -210,10 +210,9 @@ WHERE c2.concept_code LIKE c1.concept_code || '%' ); DROP INDEX trgm_idx; ---6. update domain_id for Read from SNOMED +--6. update domain_id for Read from target concepts (currently, limited to following vocabs: SNOMED, OMOP Extension, Race) --create temporary table read_domain --if domain_id is empty we use previous and next domain_id or its combination ---TODO: sync domains for concepts mapped to the Race Domain (e.g., 9SA3.11,9SA3.12,9SA3.13,9SA4.00 are Observations). DROP TABLE IF EXISTS read_domain; CREATE UNLOGGED TABLE read_domain AS SELECT concept_code, @@ -254,7 +253,8 @@ FROM ( AND r.vocabulary_id_1 = 'Read' AND r.vocabulary_id_2 IN ( 'SNOMED', - 'OMOP Extension' + 'OMOP Extension', + 'Race' ) AND r.invalid_reason IS NULL ) @@ -290,7 +290,8 @@ FROM ( AND r.vocabulary_id_2 = c2.vocabulary_id AND c2.vocabulary_id IN ( 'SNOMED', - 'OMOP Extension' + 'OMOP Extension', + 'Race' ) ) r1 ON r1.concept_code_1 = c1.concept_code AND r1.vocabulary_id_1 = c1.vocabulary_id