The query below allows you to validate all EDH process.
select '1', 'edh_patient_day', max(edh_udt_utc_ts) from epic_clarity.edh_patient_dayunionselect '99','dm_ed_enc', max(edh_udt_utc_ts) from epic_clarity.dm_ed_encunionselect '48','patient', max(edh_udt_utc_ts) from epic_clarity.patientunionselect '2','srn_encounter', max(edh_udt_ts) from rdc_views.srn_encounterunionselect '52','social_hx', max(edh_udt_utc_ts) from epic_clarity.social_hx----52 social_hx 2021-11-16 21:03:38.600unionselect '52','pat_enc_2', max(edh_udt_utc_ts) from epic_clarity.pat_enc_2unionselect '61','edh_antibiotic', max(edh_udt_utc_ts) from epic_clarity.edh_antibioticunionselect '46','clarity_ser_dept', max(edh_udt_utc_ts) from epic_clarity.clarity_ser_deptunionselect '46','clarity_ser_2', max(edh_udt_utc_ts) from epic_clarity.clarity_ser_2unionselect '48','bpa_act_smartdata', max(edh_udt_utc_ts) from epic_clarity.bpa_act_smartdataunionselect '52','v_order_medications', max(edh_udt_utc_ts) from epic_clarity.v_order_medicationsunionselect '47','or_case_all_proc', max(edh_udt_utc_ts) from epic_clarity.or_case_all_procunionselect '49','identity_id', max(edh_udt_utc_ts) from epic_clarity.identity_idorder by 3
Once the job has been completed, you will need to run the following query to enable the RDC ETL in the RDC config database.
update etl_run.config_main set run_schedule = '0 22-23 * * 0-4' where department_name = 'rdc3';
RDC - Monitor active ETL
Once the RDC ETL jobs have been enabled, you will need to this query to monitor the status in the RDC config database.
with a as(selectmax(job_id) idfrometl_run.controller_generated_sql cgs)selectcount(case when parent_stage = 'Ingress' and complete = true then 1 end) ingress_done,count(case when parent_stage = 'Ingress' and complete = false then 1 end) ingress_left,(sum(case when parent_stage = 'Ingress' and complete = true then 1.0 end)/sum(case when parent_stage = 'Ingress' then 1.0 end)*100)::decimal(5,2) || '%' ingress_status,count(case when parent_stage = 'Stage.SH' and complete = true then 1 end) stage_done,count(case when parent_stage = 'Stage.SH' and complete = false then 1.0 end) stage_left,(sum(case when parent_stage = 'Stage.SH' and complete = true then 1.0 end)/sum(case when parent_stage = 'Stage.SH' then 1.0 end)*100)::decimal(5,2) || '%' stage_status,count(case when parent_stage = 'OmopStage.SH' and complete = true then 1 end) omopstage_done,count(case when parent_stage = 'OmopStage.SH' and complete = false then 1 end) omopstage_left,(sum(case when parent_stage = 'OmopStage.SH' and complete = true then 1.0 end)/(sum(case when parent_stage = 'OmopStage.SH' then 1.0 end)*100)::decimal(5,2)) || '%' omopstage_status,count(case when parent_stage = 'omop_staging/MERGE_OMOP' and complete = true then 1 end) mergeomop_done,count(case when parent_stage = 'omop_staging/MERGE_OMOP' and complete = false then 1 end) mergeomop_left,(sum(case when parent_stage = 'omop_staging/MERGE_OMOP' and complete = true then 1.0 end)/sum(case when parent_stage = 'omop_staging/MERGE_OMOP' then 1.0 end) * 100)::decimal(5,2)|| '%' mergeomop_status,max(job_id) job_idfrometl_run.controller_generated_sql cgs2where job_id = (select id from a);