Revert "Fix to return correct value instead of boolean from acl_check()."
incremented patch version 2
bug fix in appointment setting authorization
incremented patch version 3
Bug fix to add appt with multi provider feature (note Find Available appt is not available with this option)
Improved performance and memory management of CDR engine.

 -Batching of CDR reports and patient reminders.
 -Utilized session_write_close(); in reports, patient reminders and
  patient summary screen reminder widgets
 -Option in Globals for core CDR engine sql queries to bypass the
  audit engine (set to bypass audit engine by default)
bug fix in billing module pt name filter - bug reported by Jeff
incremented patch version 4
pending icon for the cqm/acm/rules reporting
billing bug fix
incremented patch version 5
bug fix to show sql errors
minor bug fix in sql error reporting
Improved/optimized CDR engine reports (and patient reminders) and added a
generic report result tracking/storing/viewing feature (final revision).

 --Added option to set processing priorities at Administration->Globals->CDR:
     CDR Reports Processing Priority
     Patient Reminder Creation Processing Priority
     This is only functional in linux (and other OS's that support NICE priority
     setting; note Windows does not support this). This is a nice way to allow
     running these reports without hogging up computational processing.

 --Added features to store/track/view reports (and patient reminders). This
   feature is actually rather generic and could support other reports, if
   desired. The following reports are supported:
    -Reports->Clinic->Standard Measures
    -Reports->Clinic->Quality Measures(CQM)
    -Reports->Clinic->Automated Measures(AMC)
    -Administration->Patient Reminders
     (Both 'Process Reminders' and 'Process and Send Reminders')
   To view previous report results and follow status of pending reports, go
   to:
    -Reports->Clinic->Report Results
      This screen lists previous and pending reports:
       -Can see results by clicking on Title
       -Date of reports are listed
       -If report was completed, then time to completion is listed
       -If report is pending, then a status (ie. how many patients are left) is listed
   To support this, a database table report_results was added (in vertical style to
   allow flexibility in supporting reports) with a library of function at
   library/library/report_database.inc and a relatively generic report result
   listing script at interface/reports/report_results.php.

 --Some real examples on using the store/track/view report features include (in order
   of intensity):
   1. Go to Reports->Clinic->Standard Measures and click Submit. Every ten seconds
      you will be updated with the status and when it's done, you'll be shown the
      results and can always go back and view them at Reports->Clinic->Report Results.
   2. Go to Reports->Clinic->Standard Measures and click Submit. Leave the screen
      to do other things or can even log off. Can then see the results (or status
      if still pending) at Reports->Clinic->Report Results.
   3. Go to Administration->Globals->CDR and set both 'CDR Reports Processing Priority'
      and 'Patient Reminder Creation Processing Priority' to 'Lowest Priority'. Now
      go to the following screens, click Submit and then go to the next screen etc.:
       Reports->Clinic->Standard Measures        (click Submit)
       Reports->Clinic->Quality Measures(CQM)    (click Submit)
       Reports->Clinic->Automated Measures(AMC)  (click Submit)
       Administration->Patient Reminders         (click Process Reminders)
      Now can work on other stuff or logout and can see results (or status
      if still pending) at Reports->Clinic->Report Results.

  --A json library was added to support php versions < 5.2, since the report results
    are saved in json format in the database.

  -Modifications for 4.1.1 patch include migrating the upgrade sql instructions to
   the sql patch file.
Turned off a debugging statement in globals.php
Claim submission bug fix

For more details, see following forum thread:
http://sourceforge.net/projects/openemr/forums/forum/202505/topic/5802360
The bugs in the patient portal are rectified.  The code 'require_once("$srcdir/csv_like_join.php");' threw a fatal error.

We have changed the line 51 of the file 'openemr\custom\code_types.inc.php' from 'require_once("$srcdir/csv_like_join.php");' to 'require_once(dirname(__FILE__)."/../library/csv_like_join.php");'.That fixed the bugs.

Signed-off-by: Teny <teny@zhservices.com>
incremented patch version 6
Fixed an issue in showing insurance balance in payment pop-up.

Signed-off-by: Ajil <ajilpm@zhservices.com>
Fixed Patient Portal Offsite-mailbox bug