tentative completion of in-house drugs and POS checkout
[openemr.git] / interface / globals.php
blob9ea710c6f5ff01c0747d4ffa6ab7811f3b0c40fa
1 <?
2 require_once(dirname(__FILE__) . "/../includes/config.php");
3 //Global variable file in which colors and paths are set for the interface.
4 ///////////////////////////////////////////////////////////////////
5 //THESE VALUES MUST BE SET BEFORE OPENEMR WILL FUNCTION:
6 ///////////////////////////////////////////////////////////////////
7 //Set this to the full absolute directory path for openemr:
8 $webserver_root = "/var/www/html/openemr";
10 //Set this to the relative html path, ie. what you would type into the web
11 //browser after the server address to get to OpenEMR
12 //For example, if you type "http://127.0.0.1/pennfirm/openemr/"
13 //to load OpenEMR, set $web_root to "/pennfirm/openemr" without the
14 //trailing slash.
15 $web_root = "/openemr";
17 ///////////////////////////////////////////////////////////////////
19 //This is the return mail address used when sending prescriptions by email
20 $GLOBALS['practice_return_email_path'] = "prescription_mail@example.com";
22 //root directory, relative to the webserver root:
23 $GLOBALS['rootdir'] = "$web_root/interface";
24 //absolute path to the source code include and headers file directory (Full path):
25 $GLOBALS['srcdir'] = "$webserver_root/library";
26 //absolute path to the location of interface root directory for use with include statements:
27 $GLOBALS['fileroot'] = "$webserver_root";
28 //absolute path to the location of interface root directory for use with include statements:
29 $include_root = "$webserver_root/interface";
30 //absolute path to the location of interface root directory for use with include statements:
31 $GLOBALS['webroot'] = $web_root;
32 $GLOBALS['template_dir'] = $GLOBALS['fileroot'] . "/templates/";
33 $GLOBALS['incdir'] = $include_root;
34 //location of the login screen file
35 $GLOBALS['login_screen'] = "$rootdir/login_screen.php";
37 //Language Control Section (will add toggling)
38 //English:1, Swedish:2, Spanish:3, German:4,
39 define (LANGUAGE,1);
40 include_once (dirname(__FILE__) . "/../library/translation.inc.php");
43 //default category for find_patient screen
44 $GLOBALS['default_category'] = 5;
45 $GLOBALS['default_event_title'] = 'Office Visit';
47 //SESSION SETTINGS
48 session_name("OpenEMR");
49 session_start();
50 #print(session_id());
52 //this is the theme definition for a beige theme:
53 $top_bg_line = ' bgcolor="#94d6e7" ';
54 $GLOBALS['style']['BGCOLOR2'] = "#94d6e7";
55 $bottom_bg_line = ' background="'.$rootdir.'/pic/aquabg.gif" ';
56 $login_filler_line = ' bgcolor="#f7f0d5" ';
57 $login_body_line = ' background="'.$rootdir.'/pic/aquabg.gif" ';
58 $title_bg_line = ' bgcolor="#aaffff" ';
59 $nav_bg_line = ' bgcolor="#94d6e7" ';
60 $css_header = "$rootdir/themes/style_sky_blue.css";
61 $logocode="<img src='$rootdir/pic/logo_sky.gif'>";
62 $linepic = "$rootdir/pic/repeat_vline9.gif";
63 $table_bg = ' bgcolor="#cccccc" ';
64 $GLOBALS['style']['BGCOLOR1'] = "#cccccc";
65 $GLOBALS['style']['TEXTCOLOR11'] = "#222222";
66 $GLOBALS['style']['HIGHLIGHTCOLOR'] = "#dddddd";
67 $GLOBALS['style']['BOTTOM_BG_LINE'] = $bottom_bg_line;
69 // the height in pixels of the Logo bar at the top of the login page.
70 $GLOBALS['logoBarHeight'] = 110;
71 // the height in pixels of the Navigation bar
72 $GLOBALS['navBarHeight'] = 22;
73 // the height in pixels of the Title bar
74 $GLOBALS['titleBarHeight'] = 20;
76 //the assistant word, MORE printed next to titles that can be clicked
77 $tmore = "(More)";
79 //the assistant word, BACK printed next to titles that return to previous screens
80 $tback = "(Back)";
82 //This is the idle logout function:
83 //if a page has not been refreshed within this many seconds, the interface
84 //will return to the login page
85 if ($special_timeout > 0) {
86 $timeout = intval($special_timeout);
87 //echo "Setting special timeout as $special_timeout";
89 else {
90 //echo "setting regular timeout";
91 // Max Idle Time before logout. Default 3600 (60 minutes)
92 $timeout = 3600;
95 //Version tags
97 $v_major = '2';
98 $v_minor = '8';
99 $v_patch = '2';
101 $tag = '-dev'; // release candidate, e.g. '-rc1'
103 $openemr_version = "$v_major.$v_minor.$v_patch".$tag; // Version tag used by program
105 $rootdir = $GLOBALS['rootdir'];
106 $srcdir = $GLOBALS['srcdir'];
107 $login_screen = $GLOBALS['login_screen'];
108 $GLOBALS['css_header'] = $css_header;
109 $GLOBALS['backpic'] = $backpic;
110 $GLOBALS['rootdir'] = $rootdir;
111 //change these to reflect when the daily view should start to display times
112 //as well as it should end. ex schedule_start = 9 schedule_end = 17
113 // start end times in hours
114 $GLOBALS['schedule_start'] = 8;
115 $GLOBALS['schedule_end'] = 17;
116 // the interval in minutes that the day calendar will display
117 $GLOBALS['calendar_interval'] =15;
118 // the width in charactors that the day view calendar will display the title and patient name
119 $GLOBALS['day_view_td_width'] =30;
120 //include the authentication module code here, but the rule is
121 //if the file has the word "login" in the source code file name,
122 //don't include the authenticatio module - we do this to avoid
123 //include loops
124 if (!$ignoreAuth) {
125 include_once("$srcdir/auth.inc");
128 // If you do not want your accounting system to have a customer added to it
129 // for each insurance company, then set this to true. SQL-Ledger currently
130 // (2005-03-21) does nothing useful with insurance companies as customers.
131 $GLOBALS['insurance_companies_are_not_customers'] = true;
133 // If OpenEMR is being used by an athletic team rather than in a traditional
134 // clinical setting, set this to true.
135 $GLOBALS['athletic_team'] = false;
137 // The telephone country code of this installation.
138 // See http://www.wtng.info/ for a list.
139 $GLOBALS['phone_country_code'] = '1'; // 1 = USA
141 // This determines how appointments display on the calendar:
142 // 1 = lastname; 2 = last,first; 3 = last,first(title);
143 // 4 = last,first(title: description)
144 $GLOBALS['calendar_appt_style'] = 2;
146 // These are needed only if you are using SQL-Ledger and you want to see
147 // the cash receipts report by practitioner (sl_receipts_report.php),
148 // which is invoked from the billing page. We will probably have more
149 // uses for these later.
150 $sl_cash_acc = '1060'; // sql-ledger account number for checking
151 $sl_ar_acc = '1200'; // sql-ledger account number for a/r
152 $sl_income_acc = '4320'; // sql-ledger account number for medical services income
153 $sl_services_id = 'MS'; // sql-ledger parts table id for medical services
154 $sl_dbname = 'sql-ledger'; // sql-ledger database name
155 $sl_dbuser = 'sql-ledger'; // sql-ledger database login name
156 $sl_dbpass = 'secret'; // sql-ledger database login password
158 // Set this to 1 if you want the drug database and support for
159 // prescription dispensing, otherwise 0.
161 $GLOBALS['inhouse_pharmacy'] = 0;
163 $encounter = $_SESSION['encounter'];
165 if (!empty($_GET['pid']) && empty($_SESSION['pid'])) {
166 $_SESSION['pid'] = $_GET['pid'];
168 elseif (!empty($_POST['pid']) && empty($_SESSION['pid'])) {
169 $_SESSION['pid'] = $_POST['pid'];
171 $pid = $_SESSION['pid'];
172 $userauthorized = $_SESSION['userauthorized'];
173 $groupname = $_SESSION['authProvider'];
175 //global interface function to format text length using ellipses
176 function strterm($string,$length) {
177 if (strlen($string) >= ($length-3)) {
178 return substr($string,0,$length-3) . "...";
179 } else {
180 return $string;
184 //required for normal operation because of recent changes in PHP:
185 $ps = strpos($_SERVER['REQUEST_URI'],"myadmin");
186 if ($ps === false) {
187 extract($_GET);
188 extract($_POST);
191 //turn off PHP compatibility warnings
192 ini_set("session.bug_compat_warn","off");