Align registration status and crisp slice masks
This commit is contained in:
@@ -529,10 +529,16 @@ def relation_cte() -> str:
|
||||
r AS (
|
||||
SELECT
|
||||
upper(ct_number) AS ct_key,
|
||||
count(*)::int AS registration_count,
|
||||
count(DISTINCT series_instance_uid) FILTER (WHERE series_instance_uid <> '')::int AS registered_series,
|
||||
count(*) FILTER (WHERE locked)::int AS locked_count,
|
||||
max(updated_at) AS registration_updated_at
|
||||
count(*) FILTER (WHERE COALESCE(registration_status, 'unregistered') = 'registered')::int AS registration_count,
|
||||
count(DISTINCT series_instance_uid) FILTER (
|
||||
WHERE COALESCE(registration_status, 'unregistered') = 'registered'
|
||||
AND series_instance_uid <> ''
|
||||
)::int AS registered_series,
|
||||
count(*) FILTER (
|
||||
WHERE COALESCE(registration_status, 'unregistered') = 'registered'
|
||||
AND COALESCE(locked, false)
|
||||
)::int AS locked_count,
|
||||
max(updated_at) FILTER (WHERE COALESCE(registration_status, 'unregistered') = 'registered') AS registration_updated_at
|
||||
FROM public.{REGISTRATION_TABLE_SQL}
|
||||
GROUP BY upper(ct_number)
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user