forked from MIT-LCP/mimic-omop
-
Notifications
You must be signed in to change notification settings - Fork 1
/
load.sql
24 lines (22 loc) · 772 Bytes
/
load.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- useful for note_nlp etl integration
--CREATE TABLE omop.tmp_note_nlp_concept
--(
-- section_code integer
--, category_code integer
--, section_text text
--);
--
--CREATE TABLE omop.tmp_note_nlp
--(
-- row_id integer
--, section_index integer
--, section_count integer
--, section_code integer
--, section_begin integer
--, section_end integer
--, section_text text
--);
TRUNCATE TABLE omop.tmp_note_nlp;
\copy omop.tmp_note_nlp FROM PROGRAM 'gzip -dc ~/git/mimic-omop/extras/private/fait_doc_section_mimic.csv.gz' CSV DELIMITER ';' NULL '' QUOTE '"' ESCAPE E'\\';
TRUNCATE TABLE omop.tmp_note_nlp_concept;
\copy omop.tmp_note_nlp_concept FROM '~/git/mimic-omop/extras/private/ref_doc_section.csv' CSV DELIMITER ',' NULL '' QUOTE '"' ESCAPE E'\\';