From 95a233353c4b03e15c8c3a04d9d83b1c360545bc Mon Sep 17 00:00:00 2001 From: Rod Roark Date: Thu, 5 May 2011 09:53:28 -0700 Subject: [PATCH] Fixed to set session pid even when it is not changing... for some reason this fixes a glitch in clinical reminders. --- library/pid.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/pid.inc b/library/pid.inc index a17e0d6f8..ba3babcb7 100644 --- a/library/pid.inc +++ b/library/pid.inc @@ -11,14 +11,14 @@ require_once("$srcdir/log.inc"); function setpid($new_pid) { global $pid, $encounter; - if (isset($_SESSION['pid']) && $pid == $new_pid && $pid == $_SESSION['pid']) - return; + // Be careful not to clear the encounter unless the pid is really changing. + if (!isset($_SESSION['pid']) || $pid != $new_pid || $pid != $_SESSION['pid']) { + $_SESSION['encounter'] = $encounter = 0; + } $_SESSION['pid'] = $new_pid; $pid = $new_pid; - $_SESSION['encounter'] = $encounter = 0; - newEvent("view", $_SESSION["authUser"], $_SESSION["authProvider"], $pid); } ?> -- 2.11.4.GIT