From 1e56353b5e98971cf88c306ec1aea4750e389b15 Mon Sep 17 00:00:00 2001 From: sunsetsystems Date: Thu, 30 Jun 2005 23:30:59 +0000 Subject: [PATCH] fixed time comparison bug --- .../PostCalendar/pntemplates/default/views/day/default.html | 9 +++++---- .../PostCalendar/pntemplates/default/views/week/default.html | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day/default.html b/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day/default.html index b12cdaf3d..ff66501f7 100644 --- a/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day/default.html +++ b/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day/default.html @@ -207,6 +207,7 @@ function goPid(pid) { $startampm = ($slottime['mer']) == "pm" ? 2 : 1; $starttimeh = $slottime['hour']; $starttimem = $slottime['minute']; + $slotendmins = $starttimeh * 60 + $starttimem + $interval; // Repeat doc names at 1PM. This is a kludge; omit it for released code. // if ($starttimeh == 13 && $starttimem == 0) $need_headers = true; @@ -220,8 +221,8 @@ function goPid(pid) { $starth = substr($slotevent['startTime'], 0, 2); $startm = substr($slotevent['startTime'], 3, 2); - if ($starth > $starttimeh) break; - if ($startm >= ($starttimem + $interval)) break; + if (($starth * 60 + $startm) > $slotendmins) break; + $arr_slot[$slotkey] = $slotevent; $catid = $slotevent['catid']; @@ -321,7 +322,7 @@ function goPid(pid) { $patient_age = $event['patient_age']; $catid = $event['catid']; $catname = $event['catname']; - $title = "$fname, age $patient_age ($patient_dob) " . addslashes($event['hometext']); + $title = "Age $patient_age ($patient_dob) " . addslashes($event['hometext']); if ($catid == 2 || $catid == 3 || $catid == 4 || $catid == 8 || $catid == 11) { if ($catid == 2) $catname = "IN"; else if ($catid == 3) $catname = "OUT"; @@ -339,7 +340,7 @@ function goPid(pid) { $content .= $startm . ""; $content .= "-"; if ($catid == 1) $content .= ""; - $content .= $lname; + $content .= $lname . "," . $fname; if ($catid == 1) $content .= ""; $content .= ""; } diff --git a/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/week/default.html b/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/week/default.html index b12cdaf3d..ff66501f7 100644 --- a/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/week/default.html +++ b/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/week/default.html @@ -207,6 +207,7 @@ function goPid(pid) { $startampm = ($slottime['mer']) == "pm" ? 2 : 1; $starttimeh = $slottime['hour']; $starttimem = $slottime['minute']; + $slotendmins = $starttimeh * 60 + $starttimem + $interval; // Repeat doc names at 1PM. This is a kludge; omit it for released code. // if ($starttimeh == 13 && $starttimem == 0) $need_headers = true; @@ -220,8 +221,8 @@ function goPid(pid) { $starth = substr($slotevent['startTime'], 0, 2); $startm = substr($slotevent['startTime'], 3, 2); - if ($starth > $starttimeh) break; - if ($startm >= ($starttimem + $interval)) break; + if (($starth * 60 + $startm) > $slotendmins) break; + $arr_slot[$slotkey] = $slotevent; $catid = $slotevent['catid']; @@ -321,7 +322,7 @@ function goPid(pid) { $patient_age = $event['patient_age']; $catid = $event['catid']; $catname = $event['catname']; - $title = "$fname, age $patient_age ($patient_dob) " . addslashes($event['hometext']); + $title = "Age $patient_age ($patient_dob) " . addslashes($event['hometext']); if ($catid == 2 || $catid == 3 || $catid == 4 || $catid == 8 || $catid == 11) { if ($catid == 2) $catname = "IN"; else if ($catid == 3) $catname = "OUT"; @@ -339,7 +340,7 @@ function goPid(pid) { $content .= $startm . ""; $content .= "-"; if ($catid == 1) $content .= ""; - $content .= $lname; + $content .= $lname . "," . $fname; if ($catid == 1) $content .= ""; $content .= ""; } -- 2.11.4.GIT