Skip to content

Instantly share code, notes, and snippets.

@kosar
Last active January 26, 2021 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kosar/6f64ff26c6ba63922fe156c8bb96535d to your computer and use it in GitHub Desktop.
Save kosar/6f64ff26c6ba63922fe156c8bb96535d to your computer and use it in GitHub Desktop.
Active Tasks Query in Info Layer Task_DTL table
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;
@kosar
Copy link
Author

kosar commented Jan 22, 2021

update from Matt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment