Bug fix to allow choosing times in Calendar to work in Firefox and IE9 (already worki...
[openemr.git] / library / encounter.inc
blob15c36b8d521212ddaaa1ff3d450e0979df84150a
1 <?php
2 include_once("../../globals.php");
3 include_once("$srcdir/forms.inc");
5 //function called to set the global session variable for encounter number
6 function setencounter($enc) {
7         
8         $return_val = 1;
9         global $encounter;
10         global $pid;
11         
12         if ($enc == "" ) {
13                 $enc = date("Ymd");
14                 if (getFormByEncounter($pid,$enc)) {
15                         //there is an encounter enterred for today
16                 } else {
17                         //addForm($enc, "New Patient Encounter", 0, $pid, 1);
18                         $return_val = 0;
19                 }
20         }
21         
22         $_SESSION['encounter']=$enc;
23         $encounter=$enc;
24         
25         
26         //returns 1 on successful global set, or 0 if there was no
27         //current encounter, signifying that the interface should load
28         //the screen for a new encounter
29         return $return_val;