2 // This program is free software; you can redistribute it and/or
3 // modify it under the terms of the GNU General Public License
4 // as published by the Free Software Foundation; either version 2
5 // of the License, or (at your option) any later version.
7 require_once("$srcdir/../interface/globals.php");
8 require_once("$srcdir/log.inc");
10 // Function called to set the global session variable for patient id (pid) number.
11 function setpid($new_pid) {
12 global $pid, $encounter;
14 if (isset($_SESSION['pid']) && $pid == $new_pid && $pid == $_SESSION['pid'])
17 $_SESSION['pid'] = $new_pid;
20 $_SESSION['encounter'] = $encounter = 0;
22 newEvent("view", $_SESSION["authUser"], $_SESSION["authProvider"], $pid);