Skip to content

Commit eec86d3

Browse files
committed
Allow for the ETL to use schema names other than 'omop':Fix visit_detail and note_nlp
1 parent 25bbbbb commit eec86d3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: etl/StandardizedClinicalDataTables/NOTE_NLP/etl.sql

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ select
1313
, now() as nlp_datetime
1414
, gcpt_note_section_to_concept.label as section_source_value
1515
, gcpt_note_section_to_concept.mimic_id as section_source_concept_id
16-
from omop.tmp_note_nlp
16+
from :OMOP_SCHEMA.tmp_note_nlp
1717
join noteevents using (row_id)
1818
left join gcpt_note_section_to_concept ON section_code = section_id
19-
left join omop.concept on label = concept_name AND concept_code = 'MIMIC Generated' AND domain_id = 'Note Nlp' and concept.vocabulary_id = noteevents.category
19+
left join :OMOP_SCHEMA.concept on label = concept_name AND concept_code = 'MIMIC Generated' AND domain_id = 'Note Nlp' and concept.vocabulary_id = noteevents.category
2020
WHERE iserror IS NULL
2121
)
22-
INSERT INTO omop.note_nlp
22+
INSERT INTO :OMOP_SCHEMA.note_nlp
2323
(
2424
note_nlp_id
2525
, note_id

Diff for: etl/StandardizedClinicalDataTables/VISIT_DETAIL/etl.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ WITH
264264
LEFT JOIN gcpt_care_site ON (care_site_name = curr_service)
265265
LEFT JOIN patients using (subject_id)
266266
)
267-
INSERT INTO OMOP.visit_detail -- SERVICE INFORMATIONS
267+
INSERT INTO :OMOP_SCHEMA.visit_detail -- SERVICE INFORMATIONS
268268
(
269269
visit_detail_id
270270
, person_id

0 commit comments

Comments
 (0)