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