internationalization bug fix
[openemr.git] / library / encounter.inc
blob5ee8f8e3ccade4ec3a1903863596800e5526de65
1 <?
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;