Last active
January 26, 2021 14:12
-
-
Save kosar/6f64ff26c6ba63922fe156c8bb96535d to your computer and use it in GitHub Desktop.
Active Tasks Query in Info Layer Task_DTL table
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
select distinct wd.first_name, | |
wd.family_name, | |
wd.job_profile_txt, | |
t.task_id, | |
priority, | |
person_id, | |
task_sts, | |
est_task_created_dtm, | |
est_restriction_end_dtm as est_due_date, | |
task_cd, | |
rsn_cd, | |
rsn_cd_desc, | |
reqstr_type, | |
case when reqstr_type in ('Practitioner', 'Patient') then false else true end as automated_task_flg, | |
te.task_ext_cnt | |
from acp_edw.info_layer.task_dtl t | |
join acp_edw.info_layer.work_force_dtl wd | |
on t.owner_id = wd.practitioner_id | |
join acp_edw.edw.task_extension te | |
on te.task_id = t.task_id | |
and te.task_ext_url = 'task-contact-attempt-count' | |
where task_sts in ('draft', 'requested', 'received', 'accepted', 'rejected', 'in-progress', 'on-hold') | |
order by te.task_ext_cnt desc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
update from Matt.