From e132b86c00da768cf7fc97dc965e5637baf96fdf Mon Sep 17 00:00:00 2001 From: James Curtis Date: Tue, 26 Nov 2019 14:28:09 +0000 Subject: [PATCH] Fix 'overdue: ' missing from 'Time to next Blood Glucose' [I60] Time to next Blood Glucose does not have the 'overdue: ' prefix (if it is overdue) on the desktop view (kanban tiles and patient summary). They are both derived from the same value in the nh.clinical.wardboard SQL view. --- nh_eobs/sql_statements.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nh_eobs/sql_statements.py b/nh_eobs/sql_statements.py index e93c46a4..7c5bde1a 100644 --- a/nh_eobs/sql_statements.py +++ b/nh_eobs/sql_statements.py @@ -89,6 +89,7 @@ class NHEobsSQL(orm.AbstractModel): ews0.date_scheduled)), 'HH24:MI') || ' hours' ELSE to_char((INTERVAL '0s'), 'HH24:MI') END AS next_diff, + bg0.next_diff_polarity || CASE WHEN bg0.date_scheduled IS NOT NULL THEN CASE WHEN extract(days FROM (greatest(now() AT TIME ZONE 'UTC',