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. For example, if you
12 // type "http://127.0.0.1/clinic/openemr/" to load OpenEMR, set $web_root
13 // to "/clinic/openemr" without the trailing slash.
14 $web_root = "/openemr";
16 ///////////////////////////////////////////////////////////////////
18 // This is the return mail address used when sending prescriptions by email:
19 $GLOBALS['practice_return_email_path'] = "prescription_mail@example.com";
21 // Root directory, relative to the webserver root:
22 $GLOBALS['rootdir'] = "$web_root/interface";
23 // Absolute path to the source code include and headers file directory (Full path):
24 $GLOBALS['srcdir'] = "$webserver_root/library";
25 // Absolute path to the location of documentroot directory for use with include statements:
26 $GLOBALS['fileroot'] = "$webserver_root";
27 // Absolute path to the location of interface directory for use with include statements:
28 $include_root = "$webserver_root/interface";
29 // Absolute path to the location of documentroot directory for use with include statements:
30 $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, Dutch:5, Hebrew:6
40 include_once (dirname(__FILE__
) . "/../library/translation.inc.php");
42 // Default category for find_patient screen
43 $GLOBALS['default_category'] = 5;
44 $GLOBALS['default_event_title'] = 'Office Visit';
46 // The session name appears in cookies stored in the browser. If you have
47 // multiple OpenEMR installations running on the same server, you should
48 // customize this name so they cannot interfere with each other.
49 session_name("OpenEMR");
53 // Set this to true to activate support for the new frame layout.
55 $GLOBALS['concurrent_layout'] = false;
58 if ($GLOBALS['concurrent_layout']) {
59 $top_bg_line = ' bgcolor="#dddddd" ';
60 $GLOBALS['style']['BGCOLOR2'] = "#dddddd";
61 $bottom_bg_line = $top_bg_line;
62 $title_bg_line = ' bgcolor="#bbbbbb" ';
63 $nav_bg_line = ' bgcolor="#94d6e7" ';
65 $top_bg_line = ' bgcolor="#94d6e7" ';
66 $GLOBALS['style']['BGCOLOR2'] = "#94d6e7";
67 $bottom_bg_line = ' background="'.$rootdir.'/pic/aquabg.gif" ';
68 $title_bg_line = ' bgcolor="#aaffff" ';
69 $nav_bg_line = ' bgcolor="#94d6e7" ';
71 $login_filler_line = ' bgcolor="#f7f0d5" ';
72 $login_body_line = ' background="'.$rootdir.'/pic/aquabg.gif" ';
73 $css_header = "$rootdir/themes/style_sky_blue.css";
74 $logocode="<img src='$rootdir/pic/logo_sky.gif'>";
75 $linepic = "$rootdir/pic/repeat_vline9.gif";
76 $table_bg = ' bgcolor="#cccccc" ';
77 $GLOBALS['style']['BGCOLOR1'] = "#cccccc";
78 $GLOBALS['style']['TEXTCOLOR11'] = "#222222";
79 $GLOBALS['style']['HIGHLIGHTCOLOR'] = "#dddddd";
80 $GLOBALS['style']['BOTTOM_BG_LINE'] = $bottom_bg_line;
82 // The height in pixels of the Logo bar at the top of the login page:
83 $GLOBALS['logoBarHeight'] = 110;
84 // The height in pixels of the Navigation bar:
85 $GLOBALS['navBarHeight'] = 22;
86 // The height in pixels of the Title bar:
87 $GLOBALS['titleBarHeight'] = 20;
89 // The assistant word, MORE printed next to titles that can be clicked:
91 // The assistant word, BACK printed next to titles that return to previous screens:
94 // This is the idle logout function:
95 // if a page has not been refreshed within this many seconds, the interface
96 // will return to the login page
97 if ($special_timeout > 0) {
98 $timeout = intval($special_timeout);
101 // Max Idle Time in seconds before logout. Default 7200 (2 hours):
110 $tag = '-dev'; // release candidate, e.g. '-rc1'
112 // This name appears on the login page and in the title bar of most windows.
113 // It's nice to customize this to be the name of your clinic.
114 $openemr_name = 'OpenEMR';
116 $openemr_version = "$v_major.$v_minor.$v_patch".$tag; // Version tag used by program
118 $rootdir = $GLOBALS['rootdir'];
119 $srcdir = $GLOBALS['srcdir'];
120 $login_screen = $GLOBALS['login_screen'];
121 $GLOBALS['css_header'] = $css_header;
122 $GLOBALS['backpic'] = $backpic;
123 $GLOBALS['rootdir'] = $rootdir;
125 // change these to reflect when the daily view should start to display times
126 // as well as it should end. ex schedule_start = 9 schedule_end = 17
127 // start end times in hours
128 $GLOBALS['schedule_start'] = 8;
129 $GLOBALS['schedule_end'] = 17;
131 // This is the time granularity of the calendar and the smallest interval
132 // in minutes for an appointment slot:
133 $GLOBALS['calendar_interval'] = 15;
135 // Include the authentication module code here, but the rule is
136 // if the file has the word "login" in the source code file name,
137 // don't include the authentication module - we do this to avoid
140 include_once("$srcdir/auth.inc");
143 // If you do not want your accounting system to have a customer added to it
144 // for each insurance company, then set this to true. SQL-Ledger currently
145 // (2005-03-21) does nothing useful with insurance companies as customers.
146 $GLOBALS['insurance_companies_are_not_customers'] = true;
148 // If OpenEMR is being used by an athletic team rather than in a traditional
149 // clinical setting, set this to true.
150 $GLOBALS['athletic_team'] = false;
152 // True if this is a weight loss clinic:
153 $GLOBALS['weight_loss_clinic'] = false;
155 // The telephone country code of this installation. 1 = USA.
156 // See http://www.wtng.info/ for a list.
157 $GLOBALS['phone_country_code'] = '1';
159 // This determines how appointments display on the calendar:
160 // 1 = lastname; 2 = last,first; 3 = last,first(title);
161 // 4 = last,first(title: description)
162 $GLOBALS['calendar_appt_style'] = 2;
164 // Make this true if you want providers to see all appointments by default
165 // and not just their own.
166 $GLOBALS['docs_see_entire_calendar'] = false;
168 // Set this to true if you want the drug database and support for in-house
169 // prescription dispensing.
170 $GLOBALS['inhouse_pharmacy'] = false;
172 // True to omit insurance and some other things from the demographics form:
173 $GLOBALS['simplified_demographics'] = false;
175 // You may put text here as the default complaint in the New Patient form:
176 $GLOBALS['default_chief_complaint'] = '';
178 // This was added for sports teams needing to fill out injury forms, but might
179 // have other applications.
180 $GLOBALS['default_new_encounter_form'] = '';
182 // If you want a new encounter to be automatically created when appointment
183 // status is set to "@" (arrived), then make this true.
184 $GLOBALS['auto_create_new_encounters'] = true;
186 // If you want Hylafax support then uncomment and customize the following
187 // statements, and also customize custom/faxcover.txt:
189 // $GLOBALS['hylafax_server'] = 'localhost';
190 // $GLOBALS['hylafax_basedir'] = '/var/spool/fax';
191 // $GLOBALS['hylafax_enscript'] = 'enscript -M Letter -B -e^ --margins=36:36:36:36';
193 // For scanner support, uncomment and customize the following. This is
194 // the directory in which scanned-in documents may be found, and may for
195 // example be a smbfs-mounted share from the PC supporting the scanner:
197 // $GLOBALS['scanner_output_directory'] = '/mnt/scan_docs';
199 // Customize these if you are using SQL-Ledger with OpenEMR.
200 $sl_cash_acc = '1060'; // sql-ledger account number for checking account
201 $sl_ar_acc = '1200'; // sql-ledger account number for accounts receivable
202 $sl_income_acc = '4320'; // sql-ledger account number for medical services income
203 $sl_services_id = 'MS'; // sql-ledger parts table id for medical services
204 $sl_dbname = 'sql-ledger'; // sql-ledger database name
205 $sl_dbuser = 'sql-ledger'; // sql-ledger database login name
206 $sl_dbpass = 'secret'; // sql-ledger database login password
208 // Don't change anything below this line. ////////////////////////////
210 $encounter = $_SESSION['encounter'];
212 if (!empty($_GET['pid']) && empty($_SESSION['pid'])) {
213 $_SESSION['pid'] = $_GET['pid'];
215 elseif (!empty($_POST['pid']) && empty($_SESSION['pid'])) {
216 $_SESSION['pid'] = $_POST['pid'];
218 $pid = $_SESSION['pid'];
219 $userauthorized = $_SESSION['userauthorized'];
220 $groupname = $_SESSION['authProvider'];
222 // global interface function to format text length using ellipses
223 function strterm($string,$length) {
224 if (strlen($string) >= ($length-3)) {
225 return substr($string,0,$length-3) . "...";
231 // required for normal operation because of recent changes in PHP:
232 $ps = strpos($_SERVER['REQUEST_URI'],"myadmin");
238 // turn off PHP compatibility warnings
239 ini_set("session.bug_compat_warn","off");