-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
253 additions
and
185 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
with args as ( | ||
select | ||
cast(%(notification_id)s as int) as notification_id | ||
) | ||
select | ||
n.id | ||
p.id as prediction_id, | ||
p.run_id, | ||
p.csn, | ||
p.empi, | ||
p.score, | ||
r.as_of | ||
from | ||
args | ||
join runs as r | ||
upper(r.interval) != 'infinity' | ||
join predictions as p on | ||
p.run_id = r.id | ||
join epic_notifications as n on | ||
n.prediction_id = p.id | ||
and n.id <= args.notification_id | ||
left join epic_verifcations as v on | ||
v.notification_id = n.id | ||
left join epic_verification_errors as e on | ||
e.notification_id = n.id | ||
and e.acknowledged_on is null | ||
where | ||
v.id is null | ||
and e.id is null | ||
order by | ||
r.id, p.id |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
with args as ( | ||
select | ||
cast(%(prediction_id)s as int) as prediction_id | ||
) | ||
select | ||
p.id, | ||
p.run_id, | ||
p.csn, | ||
p.empi, | ||
p.score, | ||
r.as_of | ||
from | ||
args | ||
join runs as r | ||
upper(r.interval) != 'infinity' | ||
join predictions as p on | ||
p.id <= args.prediction_id | ||
and p.run_id = r.id | ||
left join epic_notifications as n on | ||
n.prediction_id = p.id | ||
left join epic_notification_errors as e on | ||
e.prediction_id = p.id | ||
and e.acknowledged_on is null | ||
where | ||
n.id is null | ||
and e.id is null | ||
order by | ||
r.id, p.id |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,4 @@ where | |
n.id is null | ||
and e.id is null | ||
order by | ||
p.id | ||
r.id, p.id |
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
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
Oops, something went wrong.