Audit engine bug fix in sql_checksum_of_modified_row function

 -sql queries throw errors (this was not an issues until the queries
  were recently run through a function that died on errors). Fixed
  by running it through a function that skips errors.

 TODO:
 -sql_checksum_of_modified_row needs to be better optimized and also
  utilize binded values in order to be more successful on collecting
  hashes
 -hopefully can optimize sql_checksum_of_modified_row to not require
  a sql function that skips errors
utf8 bug fix - removed some casing functions calls that break utf8 encoding
If the patient_data is null Patient Portal get the pid for new patient is as null, so fixed to get as 1

Signed-off-by: Jacob T.Paul <jacob@zhservices.com>
minor comment fix in library/sql.inc
Financial summary by service code report

 Additional modifications by bradymiller:
 -Use administration->services interface rather than lists to set
  the important codes
 --Select the important codes in Administration->Services (set
   'Service Reporting' for the code)
 -Modified the Administration->Services to have option to only
  search for codes with 'Service Reporting' set.
 -Dealt with following issues in the report main query:
 --Removed the CPT4 hard-coding and instead join in code_types
   table to allow any code types with ct_fee selected
 --Modifier removed from join to the codes table
 --Billing table code_type is not the same as the codes table code_type
   so removed from the join
Support flexiblility in code types utilized in claims
Added a code_type column and support for it to the ar_activity sql table, take 4.

 -added a code_types sql column to ar_activity table
 -worked this into Z&H's previous code that migrated copays from billing to ar_session/activity tables
 -display code types in encounter history
 -incorporated storage of code type in ar_activity in arPostPayment/Adjustment functions
 -incorporated interface/billing/sl_eob_invoice.php to store code type in ar_activity
 -incorporated interface/billing/sl_eob_process.php
 -mapping of code_type in ar_activity table is flexible (ie. it will also support
  upgraders from previous versions where it is not mapped)
updated acknowledgments
Flexible Procedure/Service codetypes

 -Place an index on the code_type column in the codes table
 -Increase size of code_type column in the codes table (smallint)
 -Increase size of code_type column in the billing table (varchar(15))
 -Increase size of modifier column in the codes and ar_activity table (varchar(12))
 -Place code_types (inactive) for CPTII,ICD9-SG and ICD10-PCS (Change the labels of
  the current ICD dx code types and table search methods to clarify)
 -Documented the custom/code_types.inc.php script with DocBlock comments
 -Cleaned up the queries in the custom/code_types.inc.php script
Improve flexibility of which code types are used in claims and other misc.

 -Added ct_claim column to code_types table to set if
  code type is used in claims and supported this in
  the codebase.
 -Improved support for code types that are justified but
  have no fees (such as CPTII).
 -Set ct_mod to CPTII code_types to 0
 -Set the label for CPTII codes to CPTII Performance Measures
Contributed GYM Forms, some of the table.sql files include inserts into list_options for supporting selections
Revert "Contributed GYM Forms, some of the table.sql files include inserts into list_options for supporting selections"

This reverts commit 3c76a67ecc13ecd109cdfbdb601b175d1d8ec6bf.
Bug fix when using more than one word for Login string on the login page
Some corrections specific to athletic teams concerning creation of new encounters.
More minor fixes for athletic teams: new language menu item, and sorting squads by their order attribute.
More improved flexibility of code types.
Athletic teams: weekly exposures no longer propagate am/pm notes.
Added CSV export option to patient list report.
External database import utility.

 -Ability to add ICD9/ICD10 data tables.
 -Incorporated into left navigation menu at
  Administration->Other->External Data Loads
  (also can load RxNorm and SNOMED tables here)
  (uses a snazzy accordian/jquery gui)
 -Code type (ICD9/10) can bet turned on and
  configured at Administration->List->'Code Types'
 -Incorporated the active/revision flags in the ICD9/ICD10
  tables into the functions in custom/code_types.inc.php
 -Made the external ICD9 tables the default holding place
  in code_types sql table (only for new users, and not upgrader)
 -Includes the CMS ICD9 and ICD10 data files
 -Tested to work on Linux and Windows.

 Majority of code by Mac with some mods by brady.
Collation bug fix when making entering in new patient names that contain UTF8 characters, such as chinese characters.