Emergency User Access Changes
[openemr.git] / interface / globals.php
blobc75d38e2c66af23f8f684ca3c521bd16f5790339
1 <?php
2 /* $Id$ */
3 // ------------------------------------------------------------------------ //
4 // OpenEMR Electronic Medical Records System //
5 // Copyright (c) 2005-2008 oemr.org //
6 // <http://www.oemr.org/> //
7 // ------------------------------------------------------------------------ //
8 // This program is free software; you can redistribute it and/or modify //
9 // it under the terms of the GNU General Public License as published by //
10 // the Free Software Foundation; either version 2 of the License, or //
11 // (at your option) any later version. //
12 // //
13 // You may not change or alter any portion of this comment or credits //
14 // of supporting developers from this source code or any supporting //
15 // source code which is considered copyrighted (c) material of the //
16 // original comment or credit authors. //
17 // //
18 // This program is distributed in the hope that it will be useful, //
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
21 // GNU General Public License for more details. //
22 // //
23 // You should have received a copy of the GNU General Public License //
24 // along with this program; if not, write to the Free Software //
25 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
26 // ------------------------------------------------------------------------ //
28 // Is this windows or non-windows? Create a boolean definition.
29 if (!defined('IS_WINDOWS'))
30 define('IS_WINDOWS', (stripos(PHP_OS,'WIN') === 0));
32 // Some important php.ini overrides. Defaults for these values are often
33 // too small. You might choose to adjust them further.
35 ini_set('memory_limit', '64M');
36 ini_set('session.gc_maxlifetime', '14400');
38 // Emulates register_globals = On. Moved to here from the bottom of this file
39 // to address security issues. Need to change everything requiring this!
40 $ps = strpos($_SERVER['REQUEST_URI'],"myadmin");
41 if ($ps === false) {
42 extract($_GET);
43 extract($_POST);
46 require_once(dirname(__FILE__) . "/../includes/config.php");
47 // Global variable file in which colors and paths are set for the interface.
48 ///////////////////////////////////////////////////////////////////
49 // THESE VALUES MUST BE SET BEFORE OPENEMR WILL FUNCTION:
50 ///////////////////////////////////////////////////////////////////
51 // Set this to the full absolute directory path for openemr:
52 $webserver_root = "/var/www/openemr";
54 // Set this to the relative html path, ie. what you would type into the web
55 // browser after the server address to get to OpenEMR. For example, if you
56 // type "http://127.0.0.1/clinic/openemr/" to load OpenEMR, set $web_root
57 // to "/clinic/openemr" without the trailing slash.
58 $web_root = "/openemr";
60 ///////////////////////////////////////////////////////////////////
62 // Collecting the utf8 disable flag from the sqlconf.php file in order
63 // to set the correct html encoding. utf8 vs iso-8859-1. If flag is set
64 // then set to iso-8859-1.
65 require_once(dirname(__FILE__) . "/../library/sqlconf.php");
66 if (!$disable_utf8_flag) {
67 ini_set('default_charset', 'utf-8');
69 else {
70 ini_set('default_charset', 'iso-8859-1');
73 // This is the return mail address used when sending prescriptions by email:
74 $GLOBALS['practice_return_email_path'] = "prescription_mail@example.com";
76 // Root directory, relative to the webserver root:
77 $GLOBALS['rootdir'] = "$web_root/interface";
78 // Absolute path to the source code include and headers file directory (Full path):
79 $GLOBALS['srcdir'] = "$webserver_root/library";
80 // Absolute path to the location of documentroot directory for use with include statements:
81 $GLOBALS['fileroot'] = "$webserver_root";
82 // Absolute path to the location of interface directory for use with include statements:
83 $include_root = "$webserver_root/interface";
84 // Absolute path to the location of documentroot directory for use with include statements:
85 $GLOBALS['webroot'] = $web_root;
87 $GLOBALS['template_dir'] = $GLOBALS['fileroot'] . "/templates/";
88 $GLOBALS['incdir'] = $include_root;
89 // Location of the login screen file
90 $GLOBALS['login_screen'] = "$rootdir/login_screen.php";
93 // Operating system specific settings
94 // Currently used in the Adminstration->Backup page within OpenEMR
95 // -Note the temporary file directory parameter is only used when
96 // php version is < 5.2.1 (otherwise the temporary directory that
97 // is set within php is used)
99 // WINDOWS Specific Settings
100 $GLOBALS['mysql_bin_dir_win'] = "C:/xampp/mysql/bin";
101 $GLOBALS['perl_bin_dir_win'] = "C:/xampp/perl/bin";
102 $GLOBALS['temporary_files_dir_win'] = "C:/windows/temp";
103 $GLOBALS['backup_log_dir_win']="C:/windows/temp"; // Event log backup directory
105 // LINUX (non-Windows) Specific Settings
106 $GLOBALS['mysql_bin_dir_linux'] = "/usr/bin";
107 $GLOBALS['perl_bin_dir_linux'] = "/usr/bin";
108 $GLOBALS['temporary_files_dir_linux'] = "/tmp";
109 $GLOBALS['backup_log_dir_linux']="/tmp"; // Event log backup directory
113 // Print command for spooling to printers, used by statements.inc.php
114 // This is the command to be used for printing (without the filename).
115 // The word following "-P" should be the name of your printer. This
116 // example is designed for 8.5x11-inch paper with 1-inch margins,
117 // 10 CPI, 6 LPI, 65 columns, 54 lines per page.
119 // IF lpr services are installed on Windows this setting will be similar
120 // Otherwise configure it as needed (print /d:PRN) might be an option for Windows parallel printers
121 $GLOBALS['print_command'] = "lpr -P HPLaserjet6P -o cpi=10 -o lpi=6 -o page-left=72 -o page-top=72";
124 // Language Translations Control Section
127 // Current supported languages: // Allow capture of term for translation:
128 // Arabic // xl('Arabic')
129 // Armenian // xl('Armenian')
130 // Bahasa Indonesia // xl('Bahasa Indonesia')
131 // Chinese (Simplified) // xl('Chinese (Simplified)')
132 // Chinese (Traditional) // xl('Chinese (Traditional)')
133 // Dutch // xl('Dutch')
134 // English (Indian) // xl('English (Indian)')
135 // English (Standard) // xl('English (Standard)')
136 // French // xl('French')
137 // German // xl('German')
138 // Greek // xl('Greek')
139 // Hebrew // xl('Hebrew')
140 // Norwegian // xl('Norwegian')
141 // Portuguese (Brazilian) // xl('Portuguese (Brazilian)')
142 // Portuguese (European) // xl('Portuguese (European)')
143 // Russian // xl('Russian')
144 // Slovak // xl('Slovak')
145 // Spanish // xl('Spanish')
146 // Swedish // xl('Swedish')
148 // Login Menu Language Translation Configuration
150 // 'language_menu_login' toggle
151 // -If set to true then will allow language selection on login
152 // -If set to false then will not show menu in login and will use default (see below)
153 $GLOBALS['language_menu_login'] = true;
155 // 'language_menu_all' toggle
156 // -If set to true then show all languages in login menu
157 // -If set to false then only show chosen (see below) languages in login menu
158 $GLOBALS['language_menu_showall'] = true;
160 // 'language_menu_show' array
161 // -ONLY pertinent if above 'language_menu_all' toggle is set to false
162 // -Displays these chosen languages in the login menu
163 $GLOBALS['language_menu_show'] = array('English (Standard)','Swedish');
165 // 'language_default'
166 // -Sets the default language
167 // -If login menu is on, then it will be the 'Default' choice in menu
168 // -If login menu is off, then it will choose this language
169 $GLOBALS['language_default'] = "English (Standard)";
171 // Language translation options
172 // -The globals below allow granular control to turn off translation of
173 // several specific parts of OpenEMR.
175 // 'translate_layout'
176 // -If true, then will translate the layout information.
177 // -If false, will not translate the layout information.
178 // If false, then most of the demographics and patient data
179 // entry forms will not be translated.
180 $GLOBALS['translate_layout'] = true;
182 // 'translate_lists'
183 // -If true, then will translate the lists information.
184 // -If false, will not translate the lists information.
185 // If false, then many lists of information in forms
186 // and templates will be untranslated.
187 $GLOBALS['translate_lists'] = true;
189 // 'translate_gacl_groups'
190 // -If true, then will translate the access control group names.
191 // -If false, will not translate the access control group names.
192 $GLOBALS['translate_gacl_groups'] = true;
194 // 'translate_note_titles'
195 // -If true, then will translate the patient Form (note) titles.
196 // -If false, will not translate the patient Form (note) titles.
197 $GLOBALS['translate_form_titles'] = true;
199 // 'translate_document_categories'
200 // -If true, then will translate the document categories.
201 // -If false, will not translate the document categories.
202 $GLOBALS['translate_document_categories'] = true;
204 // 'translate_appt_categories'
205 // -If true, then will translate the appt categories.
206 // -If false, will not translate the appt categories.
207 $GLOBALS['translate_appt_categories'] = true;
209 // Include the translation engine. This will also call sql.inc to
210 // open the openemr mysql connection.
211 include_once (dirname(__FILE__) . "/../library/translation.inc.php");
213 // Includes functions for date internationalization
214 include_once (dirname(__FILE__) . "/../library/date_functions.php");
217 // Lists and Layouts Control Section
220 // 'state_custom_addlist_widget'
221 // - If true, then will display a customized addlist widget for
222 // state list entries (will ask for title and abbreviation)
223 $GLOBALS['state_custom_addlist_widget'] = true;
225 // Data type options. This will set data types in forms that are not
226 // covered by a layout.
227 // 1 = single-selection list
228 // 2 = text field
229 // 26 = single-selection list with ability to add to the list (addlist widget)
230 // (the list entries below are only pertinent for data types 1 or 26)
232 // 'state_data_type'
233 $GLOBALS['state_data_type'] = 26;
234 $GLOBALS['state_list'] = "state";
236 // 'country_data_type'
237 $GLOBALS['country_data_type'] = 26;
238 $GLOBALS['country_list'] = "country";
240 // Vitals form and growth chart units (US and-or metrics)
241 // 1 = Show both US and metric (main unit is US)
242 // 2 = Show both US and metric (main unit is metric)
243 // 3 = Show US only
244 // 4 = Show metric only
245 $GLOBALS['units_of_measurement'] = 1;
247 // Flag to not show the old deprecated metric form in
248 // the unregistered section of the admin->forms module.
249 // (since 3.1.0, metric units are now used along with US units
250 // in the main vitals form; controlled by above setting)
251 $GLOBALS['disable_deprecated_metrics_form'] = true;
253 // Flags to turn off/on specific OpenEMR modules
254 $GLOBALS['disable_calendar'] = false;
255 $GLOBALS['disable_chart_tracker'] = false;
256 $GLOBALS['disable_immunizations'] = false;
257 $GLOBALS['disable_prescriptions'] = false;
259 // Option to set the top default window. By default, it is set
260 // to the calendar screen. The starting directory is
261 // interface/main/ , hence:
262 // The calendar screen is 'main_info.php' .
263 // The patient search/add screen is '../new/new.php' .
264 $GLOBALS['default_top_pane'] = 'main_info.php';
266 // Option to set the 'Online Support' link. By default, it is
267 // set to the Sourceforge support forums. Note you can also remove
268 // the link entirely by simple commenting out below line.
269 $GLOBALS['online_support_link'] = 'http://sourceforge.net/projects/openemr/support';
271 // Default category for find_patient screen
272 $GLOBALS['default_category'] = 5;
273 $GLOBALS['default_event_title'] = 'Office Visit';
275 // The session name appears in cookies stored in the browser. If you have
276 // multiple OpenEMR installations running on the same server, you should
277 // customize this name so they cannot interfere with each other.
279 // Also, if modify session_name, then need to place the identical name in
280 // the phpmyadmin file here: openemr/phpmyadmin/libraries/session.inc.php
281 // at line 71. This was required after embedded new phpmyadmin version on
282 // 05-12-2009 by Brady. Hopefully will figure out a more appropriate fix.
283 session_name("OpenEMR");
285 session_start();
287 // Set this to 1 or 2 to activate support for the new frame layout.
288 // 0 = Old-style layout
289 // 1 = Navigation menu consists of pairs of radio buttons
290 // 2 = Navigation menu is a tree view
292 $GLOBALS['concurrent_layout'] = 2;
294 // If >0 this will enforce a separate PHP session for each top-level
295 // browser window. You must log in separately for each. This is not
296 // thoroughly tested yet and some browsers might have trouble with it,
297 // so make it 0 if you must. Alternatively, you can set it to 2 to be
298 // notified when the session ID changes.
299 $GLOBALS['restore_sessions'] = 1; // 0=no, 1=yes, 2=yes+debug
301 // used in Add new event for multiple providers
302 $GLOBALS['select_multi_providers'] = false;
304 // Theme definition:
305 if ($GLOBALS['concurrent_layout']) {
306 $top_bg_line = ' bgcolor="#dddddd" ';
307 $GLOBALS['style']['BGCOLOR2'] = "#dddddd";
308 $bottom_bg_line = $top_bg_line;
309 $title_bg_line = ' bgcolor="#bbbbbb" ';
310 $nav_bg_line = ' bgcolor="#94d6e7" ';
311 } else {
312 $top_bg_line = ' bgcolor="#94d6e7" ';
313 $GLOBALS['style']['BGCOLOR2'] = "#94d6e7";
314 $bottom_bg_line = ' background="'.$rootdir.'/pic/aquabg.gif" ';
315 $title_bg_line = ' bgcolor="#aaffff" ';
316 $nav_bg_line = ' bgcolor="#94d6e7" ';
318 $login_filler_line = ' bgcolor="#f7f0d5" ';
319 $login_body_line = ' background="'.$rootdir.'/pic/aquabg.gif" ';
320 $css_header = "$rootdir/themes/style_sky_blue.css";
321 $logocode="<img src='$rootdir/pic/logo_sky.gif'>";
322 $linepic = "$rootdir/pic/repeat_vline9.gif";
323 $table_bg = ' bgcolor="#cccccc" ';
324 $GLOBALS['style']['BGCOLOR1'] = "#cccccc";
325 $GLOBALS['style']['TEXTCOLOR11'] = "#222222";
326 $GLOBALS['style']['HIGHLIGHTCOLOR'] = "#dddddd";
327 $GLOBALS['style']['BOTTOM_BG_LINE'] = $bottom_bg_line;
329 // The height in pixels of the Logo bar at the top of the login page:
330 $GLOBALS['logoBarHeight'] = 110;
331 // The height in pixels of the Navigation bar:
332 $GLOBALS['navBarHeight'] = 22;
333 // The height in pixels of the Title bar:
334 $GLOBALS['titleBarHeight'] = 20;
336 // The assistant word, MORE printed next to titles that can be clicked:
337 // Note this label gets translated here via the xl function
338 // -if you don't want it translated, then strip the xl function away
339 $tmore = xl('(More)');
340 // The assistant word, BACK printed next to titles that return to previous screens:
341 // Note this label gets translated here via the xl function
342 // -if you don't want it translated, then strip the xl function away
343 $tback = xl('(Back)');
345 // This is the idle logout function:
346 // if a page has not been refreshed within this many seconds, the interface
347 // will return to the login page
348 if (!empty($special_timeout)) {
349 $timeout = intval($special_timeout);
351 else {
352 // Max Idle Time in seconds before logout. Default 7200 (2 hours):
353 $timeout = 7200;
356 //Version tags
358 $v_major = '3';
359 $v_minor = '3';
360 $v_patch = '0';
361 $tag = '-dev'; // minor revision number, should be empty for production releases
363 // This name appears on the login page and in the title bar of most windows.
364 // It's nice to customize this to be the name of your clinic.
365 $openemr_name = 'OpenEMR';
367 $openemr_version = "$v_major.$v_minor.$v_patch".$tag; // Version tag used by program
369 $rootdir = $GLOBALS['rootdir'];
370 $srcdir = $GLOBALS['srcdir'];
371 $login_screen = $GLOBALS['login_screen'];
372 $GLOBALS['css_header'] = $css_header;
373 $GLOBALS['backpic'] = $backpic;
374 $GLOBALS['rootdir'] = $rootdir;
376 // change these to reflect when the daily view should start to display times
377 // as well as it should end. ex schedule_start = 9 schedule_end = 17
378 // start end times in hours
379 $GLOBALS['schedule_start'] = 8;
380 $GLOBALS['schedule_end'] = 17;
382 // This is the time granularity of the calendar and the smallest interval
383 // in minutes for an appointment slot:
384 $GLOBALS['calendar_interval'] = 15;
387 Set 1 to enable strong password feature in openemr
388 Set 0 to disable strong password feature in openemr
389 Strong password means the user password must be at least 8 characters, and should contain at least three of the four following items:
390 -A number
391 -A lowercase letter
392 -An uppercase letter
393 -A special character (not a letter or number).
394 For example: healthCare@09
396 $GLOBALS['secure_password'] = 0;
398 //Set 1 to enable password history feature in openemr
399 //Set 0 to disable password history feature in openemr
400 //Password History means last three passwords of user should not be allowed while changing the password
401 $GLOBALS['password_history'] = 0;
403 // Set the default password expiration period, in days. if it is 0 this feature is disabled.
404 // The administrator can override this value when editing a user.
405 // Set the grace login period in days, only when $GLOBALS['password_expiration_days'] is set to some values(like 180 days).
406 $GLOBALS['password_expiration_days'] = 0;
408 // Set the grace login period where the user can login with an expired password.
409 $GLOBALS['password_grace_time'] = 0;
411 //path to Certificate Authority crt file. Set this to full absolute path.
412 //Used for creating client SSL certificates for https connections.
413 $GLOBALS['certificate_authority_crt'] = "";
415 //path to Certificate Authority key file. Set this to full absolute path.
416 //Used for creating client SSL certificates for https connections.
417 $GLOBALS['certificate_authority_key'] = "";
419 //Enable or Disable client SSL Certificate Authentication
420 $GLOBALS['is_client_ssl_enabled'] = false;
422 //Default validity for Client certificate
423 $GLOBALS['client_certificate_valid_in_days'] = "365";
425 //Set 1 to send email message to given id for Emergency Login user activation.
426 //Default value is 0.
427 $GLOBALS['Emergency_Login_email'] = 0;
429 //Set the admin email id
430 $GLOBALS['Emergency_Login_email_id'] = "";
432 // Include the authentication module code here, but the rule is
433 // if the file has the word "login" in the source code file name,
434 // don't include the authentication module - we do this to avoid
435 // include loops.
437 if (!$ignoreAuth) {
438 include_once("$srcdir/auth.inc");
441 // If you do not want your accounting system to have a customer added to it
442 // for each insurance company, then set this to true. SQL-Ledger currently
443 // (2005-03-21) does nothing useful with insurance companies as customers.
444 $GLOBALS['insurance_companies_are_not_customers'] = true;
446 // If OpenEMR is being used by an athletic team rather than in a traditional
447 // clinical setting, set this to true.
448 $GLOBALS['athletic_team'] = false;
450 // True if this is a weight loss clinic:
451 $GLOBALS['weight_loss_clinic'] = false;
453 // The telephone country code of this installation. 1 = USA.
454 // See http://www.wtng.info/ for a list.
455 $GLOBALS['phone_country_code'] = '1';
457 // This determines how appointments display on the calendar:
458 // 1 = lastname; 2 = last,first; 3 = last,first(title);
459 // 4 = last,first(title: description)
460 $GLOBALS['calendar_appt_style'] = 2;
462 // Make this true if you want providers to see all appointments by default
463 // and not just their own.
464 $GLOBALS['docs_see_entire_calendar'] = false;
466 // Set this to true if you want the drug database and support for in-house
467 // prescription dispensing.
468 $GLOBALS['inhouse_pharmacy'] = false;
470 // Make this nonzero if you want the ability to sell products other than
471 // prescription drugs. Also requires inhouse_pharmacy to be true.
472 // This allows selection of products from the Fee Sheet.
473 // Set this to 2 if you want a simplified interface (no templates, no
474 // prescription drugs), otherwise to 1.
475 $GLOBALS['sell_non_drug_products'] = 0;
477 // True to omit insurance and some other things from the demographics form:
478 $GLOBALS['simplified_demographics'] = false;
480 // True to omit form, route and interval which then become part of dosage:
481 $GLOBALS['simplified_prescriptions'] = false;
483 // True to omit method of payment from the copay panel:
484 $GLOBALS['simplified_copay'] = false;
486 // You may put text here as the default complaint in the New Patient form:
487 $GLOBALS['default_chief_complaint'] = '';
489 // This was added for sports teams needing to fill out injury forms, but might
490 // have other applications.
491 $GLOBALS['default_new_encounter_form'] = '';
493 // If you want a new encounter to be automatically created when appointment
494 // status is set to "@" (arrived), then make this true.
495 $GLOBALS['auto_create_new_encounters'] = true;
497 // If you don't want employer information, country, title in patient demographics.
498 $GLOBALS['omit_employers'] = false;
500 // This is for insurance billing and is specific to Medicare. Make it true
501 // to force the referring provider to be the same as the rendering provider,
502 // instead of coming from the patient demographics.
503 $GLOBALS['MedicareReferrerIsRenderer'] = false;
505 // You can set this to the category name of a document to link to from the
506 // patient summary page. Normally this is the category for insurance cards.
507 // This lets you click on the patient's name to see their ID card.
508 $GLOBALS['patient_id_category_name'] = '';
510 // Traditionally OpenEMR has allowed creation of user groups (not the same
511 // as access control groups). However this has never done anything very
512 // useful and creates confusion. Make this false if you really want it.
513 $GLOBALS['disable_non_default_groups'] = true;
515 // These are flags for some installation-specific customizations for which
516 // we have not yet figured out better parameters.
517 $GLOBALS['ippf_specific'] = false;
518 $GLOBALS['cene_specific'] = false;
520 // True to support discounts in the Checkout form by dollars instead of percentage.
521 $GLOBALS['discount_by_money'] = false;
523 // Set this to false if you want the doctors to be prompted to authorize
524 // patient notes created by others.
525 $GLOBALS['ignore_pnotes_authorization'] = true;
527 // This controls the style of the "new patient" form and its search and
528 // duplication check features. Options are:
529 // 0 = Old-style static form without search or duplication check
530 // 1 = All demographics fields, with search and duplication check
531 // 2 = Mandatory fields only, with search and duplication check
532 $GLOBALS['full_new_patient_form'] = 1;
534 // This is the background color to apply to form fields that are searchable.
535 // Currently it is applicable only to the "Search or Add Patient" form.
536 $GLOBALS['layout_search_color'] = '#ffff55';
538 // This can be used to enable the old Charges panel for entering billing
539 // codes and payments. It is not recommended, as it was obsoleted by the
540 // Fee Sheet which is more complete and comprehensive.
541 $GLOBALS['use_charges_panel'] = false;
543 // This was added for Wellcare EDI which can accept a special kind of claim
544 // containing diagnoses but not requiring procedures or charges. If you
545 // don't know what this is about then you don't want it!
546 $GLOBALS['support_encounter_claims'] = false;
548 // Multi-facility Configuration
550 // Restrict non-authorized users to the "Schedule Facilities" (aka user_facilities table)
551 // set in User admin.
552 $GLOBALS['restrict_user_facility'] = false;
554 // Set a facility cookie, so browser keeps a default selected facility between logins.
555 $GLOBALS['set_facility_cookie'] = false;
557 // Control the display of Advance Directives in demographics page
558 $GLOBALS['advance_directives_warning'] = true;
560 // Make this true to add options for configuration export and import to the
561 // Backup page.
562 $GLOBALS['configuration_import_export'] = false;
564 // Style for patient search results. 0 = with encounter statistics, 1 = alternate.
565 $GLOBALS['patient_search_results_style'] = 0;
567 //EMAIL SETTINGS
568 // EMAIL METHOD (PHPMAIL, SMTP, SENDMAIL)
569 $EMAIL_METHOD = "SMTP";
570 // HTML CHARSET
571 $HTML_CHARSET = "UTF-8";
572 // SMTP SETTINGS
573 $SMTP_Auth = true;
574 $SMTP_HOST = "";
575 $SMTP_PORT = 25;
576 $SMTP_USER = "";
577 $SMTP_PASS = "";
579 //settings for cronjob of the sms/email module
580 // SEND SMS NOTIFICATION BEFORE HH HOUR
581 $SMS_NOTIFICATION_HOUR = 50;
582 // SEND EMAIL NOTIFICATION BEFORE HH HOUR
583 $EMAIL_NOTIFICATION_HOUR = 50;
584 $SMS_GATEWAY_USENAME = 'SMS_GATEWAY_USENAME';
585 $SMS_GATEWAY_PASSWORD = 'SMS_GATEWAY_PASSWORD';
586 $SMS_GATEWAY_APIKEY = 'SMS_GATEWAY_APIKEY';
588 // If you want Hylafax support then uncomment and customize the following
589 // statements, and also customize custom/faxcover.txt:
591 // $GLOBALS['hylafax_server'] = 'localhost';
592 // $GLOBALS['hylafax_basedir'] = '/var/spool/fax';
593 // $GLOBALS['hylafax_enscript'] = 'enscript -M Letter -B -e^ --margins=36:36:36:36';
595 // For scanner support, uncomment and customize the following. This is
596 // the directory in which scanned-in documents may be found, and may for
597 // example be a smbfs-mounted share from the PC supporting the scanner:
599 // $GLOBALS['scanner_output_directory'] = '/mnt/scan_docs';
601 // Customize these if you are using SQL-Ledger with OpenEMR, or if you are
602 // going to run sl_convert.php to convert from SQL-Ledger.
604 $sl_cash_acc = '1060'; // sql-ledger account number for checking account
605 $sl_ar_acc = '1200'; // sql-ledger account number for accounts receivable
606 $sl_income_acc = '4320'; // sql-ledger account number for medical services income
607 $sl_services_id = 'MS'; // sql-ledger parts table id for medical services
608 $sl_dbname = 'sql-ledger'; // sql-ledger database name
609 $sl_dbuser = 'sql-ledger'; // sql-ledger database login name
610 $sl_dbpass = 'secret'; // sql-ledger database login password
612 ///////////////////////// AUDIT LOGGING CONFIG ////////////////
613 //$GLOBALS["enable_auditlog"]=0 is to off the logging feature in openemr
614 //$GLOBALS["enable_auditlog"]=1 is to on the logging feature in openemr
615 //patient-record:- set 1 (0 to off) to log the patient related activites like creation of new patient, encounters, history//etc.
616 //scheduling:- set 1 (0 to off) to log the patient related scheduling like Appointments.
617 //query:- set 1 (0 to off) to log all SQL SELECT queries.
618 //order:- set 1 (0 to off) to log an orders like medical service or medical item (like a prescription).
619 //security-administration:- set 1 to (0 to off) to log events such as creating/updating users/facility etc.
620 //backup:- set 1 (0 to off) to log backup related activites.
622 //Turning off Auditing. It is currently broken due to the conflicts with LAST_INSERT_ID
623 $GLOBALS["enable_auditlog"]=0;
624 $GLOBALS["audit_events"]=array("patient-record"=>1,
625 "scheduling"=>1,
626 "query"=>0,
627 "order"=>1,
628 "security-administration"=>1,
629 "backup"=>1,
632 // Configure the settings below to enable Audit Trail and Node Authentication (ATNA).
633 // See RFC 3881, RFC 5424, RFC 5425 for details.
634 // atna_audit_host = The hostname of the audit repository machine
635 // atna_audit_port = Listening port of the RFC 5425 TLS syslog server
636 // atna_audit_localcert - Certificate to send to RFC 5425 TLS syslog server
637 // atna_audit_cacert - CA Certificate for verifying the RFC 5425 TLS syslog server
638 $GLOBALS['atna_audit_host'] = '';
639 $GLOBALS['atna_audit_port'] = 6514;
640 $GLOBALS['atna_audit_localcert'] = '';
641 $GLOBALS['atna_audit_cacert'] = '';
642 //////////////////////////////////////////////////////////////////
644 // Don't change anything below this line. ////////////////////////////
646 $encounter = empty($_SESSION['encounter']) ? 0 : $_SESSION['encounter'];
648 if (!empty($_GET['pid']) && empty($_SESSION['pid'])) {
649 $_SESSION['pid'] = $_GET['pid'];
651 elseif (!empty($_POST['pid']) && empty($_SESSION['pid'])) {
652 $_SESSION['pid'] = $_POST['pid'];
654 $pid = empty($_SESSION['pid']) ? 0 : $_SESSION['pid'];
655 $userauthorized = empty($_SESSION['userauthorized']) ? 0 : $_SESSION['userauthorized'];
656 $groupname = empty($_SESSION['authProvider']) ? 0 : $_SESSION['authProvider'];
658 // global interface function to format text length using ellipses
659 function strterm($string,$length) {
660 if (strlen($string) >= ($length-3)) {
661 return substr($string,0,$length-3) . "...";
662 } else {
663 return $string;
667 // OS specific configuration (do not modify this)
668 $GLOBALS['mysql_bin_dir'] = IS_WINDOWS ? $GLOBALS['mysql_bin_dir_win'] : $GLOBALS['mysql_bin_dir_linux'];
669 $GLOBALS['perl_bin_dir'] = IS_WINDOWS ? $GLOBALS['perl_bin_dir_win'] : $GLOBALS['perl_bin_dir_linux'];
670 $GLOBALS['backup_log_dir'] = IS_WINDOWS ? $GLOBALS['backup_log_dir_win'] : $GLOBALS['backup_log_dir_linux'];
671 if (version_compare(phpversion(), "5.2.1", ">=")) {
672 $GLOBALS['temporary_files_dir'] = rtrim(sys_get_temp_dir(),'/'); // only works in PHP >= 5.2.1
674 else {
675 $GLOBALS['temporary_files_dir'] = IS_WINDOWS ? $GLOBALS['temporary_files_dir_win'] : $GLOBALS['temporary_files_dir_linux'];
678 // turn off PHP compatibility warnings
679 ini_set("session.bug_compat_warn","off");
681 //////////////////////////////////////////////////////////////////