4.1.1 Upgrade woes

hitechelp wrote on Thursday, January 03, 2013:

This did not go well at all…  Here’s how we did it.
1 We ran a backup
2 We ran the command line sudo aptitude update and upgrade commands as Brady instructed to get our SQL, Apache, and PHP current. 
The last line on the terminal reported the following  W:  GPG Error; http://extras.ubuntu.com oneiric Release: The following signatures couldn’t be verified because the public key is not available:  NO_PUBKEY 16126D3A3ESC1192

At that point I should have stopped and sought help, but  I continued hoping that (extras) would not be a show-stopper.

3 The wget, sudo apt-get and sudo dpkg commands ran without erorrs

4. modified the httpd.conf file
5. restarted Apache
6. The next step (Then login to openemr) was mistakenly done at the terminal because the second part of that instruction (Desktop - Browse to http://localhost/openemr) was located on the next page of my instructions printout!  (I did however, get a colorful confirmation page on the terminal monitor stating that the upgrade was successful.)
7.  Ran patch 8 as instructed  (noted this differed from past patches in that there was no reference to first removing everything in the openemr/interface/main/calendar/modules/PostCalendar/pntemplates/compiled/ directory.)
It reported that database patch 0 was successful (this raised an eyebrow)

We were able to login at the new 4.1.1 screen and see the calendar and appointments, so we called it good and left.  
On Jan 2nd the first day back to work after the upgrade, the issues quickly emerged.

We now have many of the issues that were reported soon after the release of 4.1.1 and corrected in the various patches.
The first being 
Changing the patient status in calendar from none to no-show gives us a - Find Available Appointments pop-up with a dialog that says This appointment slot is already used, use it anyway?  Clicking OK results in the following SQL error

Input Array does not match ?: UPDATE openemr_postcalendar_events SET pc_catid = ‘10’, pc_aid = ‘2’, pc_pid = ‘687’, pc_title = ‘New Patient’, pc_time = NOW(), pc_hometext = ‘’, pc_informant = ‘1’, pc_eventDate = ‘2013-01-02’, pc_endDate = ‘0000-00-00’, pc_duration = ‘3600’, pc_recurrtype = ‘0’, pc_recurrspec = ‘a:6:{s:17:“event_repeat_freq”;N;s:22:“event_repeat_freq_type”;N;s:19:“event_repeat_on_num”;s:1:“1”;s:19:“event_repeat_on_day”;s:1:“0”;s:20:“event_repeat_on_freq”;s:1:“0”;s:6:“exdate”;s:0:"";}’, pc_startTime = ‘10:40:00’, pc_endTime = ‘11:40:00’, pc_alldayevent = ‘0’, pc_apptstatus = ‘‘2368’’, pc_prefcatid = ‘0’ ,pc_facility = ‘3’ ,pc_billing_location = ‘3’ WHERE pc_eid =

ERROR: query failed: UPDATE openemr_postcalendar_events SET pc_catid = ‘10’, pc_aid = ‘2’, pc_pid = ‘687’, pc_title = ‘New Patient’, pc_time = NOW(), pc_hometext = ‘’, pc_informant = ‘1’, pc_eventDate = ‘2013-01-02’, pc_endDate = ‘0000-00-00’, pc_duration = ‘3600’, pc_recurrtype = ‘0’, pc_recurrspec = ‘a:6:{s:17:“event_repeat_freq”;N;s:22:“event_repeat_freq_type”;N;s:19:“event_repeat_on_num”;s:1:“1”;s:19:“event_repeat_on_day”;s:1:“0”;s:20:“event_repeat_on_freq”;s:1:“0”;s:6:“exdate”;s:0:"";}’, pc_startTime = ‘10:40:00’, pc_endTime = ‘11:40:00’, pc_alldayevent = ‘0’, pc_apptstatus = ‘?’, pc_prefcatid = ‘0’ ,pc_facility = ‘3’ ,pc_billing_location = ‘3’ WHERE pc_eid = ?

We applied patch 8  a second time thinking that maybe it didn’t take the first time, and it still reported that database patch 0 was successful,  no joy that time either.

Is release 4.1.1 dependent on newer SQL and PHP versions?   I’m thinking maybe we need Ubuntu upgraded to 12.4 to support those newer versions.   We show  Apache 2.2.20, MySQL 5.1.66, and  PHP 5.3.6    We are limping pretty bad here and could use some direction.

Thank you all in advance.

yehster wrote on Thursday, January 03, 2013:

I think you upgrade actually went fine…
What you are seeing is related to a bug introduced in 4.1.1 in the calendar. 
I can reproduce your issue on the 4.1.1 Demo.
Your problem is another manifestation of the issue discussed in this thread.

https://sourceforge.net/projects/openemr/forums/forum/202506/topic/5312116

yehster wrote on Thursday, January 03, 2013:

If you decide you need professional assistance, contact me offline.
kevin.y@integralemr.com

yehster wrote on Thursday, January 03, 2013:

Seems that “No Show” problem is separate from the “Find Appointment issue.”

The “?” is causing a problem because of what basically amounts to a SQL injection issue. It doesn’t seem to be related to the appointment slots issue. It’s a 4.1.1 bug

yehster wrote on Thursday, January 03, 2013:

It looks like Brady addressed the “No Show” Issue a while ago. It must not be in a patch yet.

https://github.com/openemr/openemr/commit/880132cc459e5e495d2556a6407a712a884e0ffb

hitechelp wrote on Thursday, January 03, 2013:

No worries, we are using the No-Show calendar category.  No-shows will appear in the Appt-Enc report.  

bradymiller wrote on Friday, January 04, 2013:

Hi yehster and hitehelp,

That fix is in the patch. It looks like the problem is the patch. Having a patch of 0 means that there is no patch installed (this is taken from the version.php file of the patch that you installed); for example see what happens when you try to do it on the online demo which also has no patch:
http://demo.open-emr.org:2102/openemr/sql_patch.php

Some things to confirm:
What is in your version.php file?

To confirm the upgrade went well, feel free to paste the stuff from the following:
/etc/openemr/<the_file_here_i_forgot_the_name_of_it>
/var/log/openemr/<the_file_here_i_forgot_the_name_of_it>

Again, though, I think you issue is that you installed the patch in the wrong place.

-brady
OpenEMR

hitechelp wrote on Friday, January 04, 2013:

Brady,  Many thanks for your fast response.

I’m sure I followed the patch instructions to the letter. 
(done these patches many times, but I always print out the instructions and follow along in case of changes)

Following the instructions under Linux (Ubuntu not listed) at http://open-emr.org/wiki/index.php/OpenEMR_Patches
Patch 8 was placed in the /var/www/openemr directory
and the command sudo unzip 4-1-1-Patch-8.zip  issued and overwrite confirmed with “Y”
Extraction proceeded normally and no errors were reported.
Using firefox from an ethernet connected office pc, navigated to http://(our local ip)/openemr/sql_patch.php
where we got the report; “database patch 0 was successful”

To answer your questions;

/var/www/openemr/version.php contains the following;

<?php
// Software version identification.
// This is used for display purposes, and also the major/minor/patch
// numbers are stored in the database and used to determine which sql
// upgrade file is the starting point for the next upgrade.
$v_major = ‘4’;
$v_minor = ‘1’;
$v_patch = ‘1’;
$v_tag   = ‘’; // minor revision number, should be empty for production releases

// A real patch identifier. This is incremented when release a patch for a
// production release. Not the above $v_patch variable is a misnomer and actually
// stores release version information.
$v_realpatch = ‘0’;

// Database version identifier, this is to be incremented whenever there
// is a database change in the course of development.  It is used
// internally to determine when a database upgrade is needed.
//
$v_database = 80;
?>

****  The  /etc/openemr/openemr.conf  looks like this;  ****

#Optional settings
#(currently empty, plan to use in subsequent versions of OpenEMR)

#Installation settings
# (DO NOT EDIT below!!!)
process=complete

****  And here are the contents of   /var/log/openemr/install  ****

Sun Feb 26 14:00:02 EST 2012: Configuring package…
Sun Feb 26 14:00:02 EST 2012: Installing OpenEMR
Sun Feb 26 14:00:02 EST 2012: Passed the mysql check loop
Sun Feb 26 14:00:03 EST 2012: Installing/Configuring OpenEMR…
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/library/classes/Installer.class.php on line 298
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/library/classes/Installer.class.php on line 298
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/library/classes/Installer.class.php on line 298
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/library/classes/Installer.class.php on line 298
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/library/classes/Installer.class.php on line 298
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/library/classes/Installer.class.php on line 298
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/library/classes/Installer.class.php on line 298
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/library/classes/Installer.class.php on line 298
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/library/classes/Installer.class.php on line 298
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/library/classes/Installer.class.php on line 298
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/library/classes/Installer.class.php on line 298
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/library/classes/Installer.class.php on line 298
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/library/classes/Installer.class.php on line 298
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/library/classes/Installer.class.php on line 298
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/library/classes/Installer.class.php on line 298
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/library/classes/Installer.class.php on line 298
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/library/classes/Installer.class.php on line 298
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/library/classes/Installer.class.php on line 298
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/library/classes/Installer.class.php on line 298
PHP Deprecated:  Assigning the return value of new by reference is deprecated in /var/www/openemr/gacl/adodb/adodb-xmlschema.inc.php on line 367
PHP Deprecated:  Assigning the return value of new by reference is deprecated in /var/www/openemr/gacl/adodb/adodb-xmlschema.inc.php on line 379
PHP Deprecated:  Function set_magic_quotes_runtime() is deprecated in /var/www/openemr/gacl/adodb/adodb-xmlschema.inc.php on line 1305
<b>Configuration:</b><br/>
driver = <b>mysql</b>,<br/>
host = <b>localhost</b>,<br/>
user = <b>openemr</b>,<br/>
database = <b>openemr</b>,<br/>
table prefix = <b>gacl_</b>Testing database connection…<br/>
<font color=“green”><b>Success!</b></font> Connected to &quot;<b>mysql</b>&quot; database on &quot;<b>localhost</b>&quot;.<br/>
Testing database type…<br/>
<font color=“green”><b>Success!</b></font> Compatible database type “<b>mysql</b>” detected!<br/>
Making sure database “<b>openemr</b>” exists…<br/>
<font color=“green”><b>Success!</b></font> Good, database “<b>openemr</b>” already exists!<br/>
<font color=“green”><b>Success!</b></font>
First Step of Access Control Installation Successful!!!<br><br/>
<html>
<head>
<title>OpenEMR ACL Setup</title>
<link rel=STYLESHEET href=“interface/themes/style_blue.css”>
</head>
<body>
<b>OpenEMR ACL Setup</b>
<br>
All done configuring and installing access controls (php-GACL)!
</body>
</html>

Sun Feb 26 14:00:26 EST 2012: Done configuring OpenEMR
Sun Feb 26 14:00:26 EST 2012: Configuring Apache for OpenEMR
Sun Feb 26 14:01:48 EST 2012: Added entries to apache configuration to secure directories with patient information.
Sun Feb 26 14:01:48 EST 2012: Placed backup of your original apache configuration file to /etc/apache2/httpd.conf.BAK
Sun Feb 26 14:01:48 EST 2012: Done configuring Apache
Sun Feb 26 14:01:48 EST 2012: Configuring PHP for OpenEMR
Sun Feb 26 14:01:48 EST 2012: We changed the following setting(s) in your php configuration file at /etc/php5/apache2/php.ini :
Sun Feb 26 14:01:59 EST 2012: (We have placed a backup of your php configuration at /etc/php5/apache2/php.ini.BAK)
Sun Feb 26 14:01:59 EST 2012: Successfully set max_execution_time = 60
Sun Feb 26 14:01:59 EST 2012: Successfully set max_input_time = 90
Sun Feb 26 14:01:59 EST 2012: Successfully set post_max_size = 30M
Sun Feb 26 14:01:59 EST 2012: Successfully set magic_quotes_gpc = On
Sun Feb 26 14:01:59 EST 2012: Successfully set upload_max_filesize = 30M
Sun Feb 26 14:01:59 EST 2012: Done configuring PHP
Sun Feb 26 14:01:59 EST 2012: Restarting Apache service
* Restarting web server apache2
apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
… waiting apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
   …done.
Sun Feb 26 14:02:25 EST 2012: You can now use OpenEMR by browsing to:
Sun Feb 26 14:02:25 EST 2012: http://localhost/openemr
Sun Feb 26 14:02:25 EST 2012: user is ‘admin’ and password is ‘pass’
Sun Feb 26 14:02:25 EST 2012: See the openemr man page for further instructions:
Sun Feb 26 14:02:25 EST 2012: type ‘man openemr’ at command line
Tue Jan  1 12:36:24 EST 2013: For upgrade, confirmed that the mysql database (openemr) and mysql user (openemr) exist
Tue Jan  1 12:36:45 EST 2013: Upgrading OpenEMR from 4.1.0-1…
Tue Jan  1 12:36:52 EST 2013: Configuring package…
Tue Jan  1 12:36:52 EST 2013: Continuing Upgrade from (4.1.0-1)
Tue Jan  1 12:36:52 EST 2013: Configuring Site (default)
PHP Notice:  Undefined index: REQUEST_URI in /var/www/openemr/interface/globals.php on line 45
Session site ID has been set to ‘default’
PHP Notice:  Undefined index: SERVER_NAME in /var/www/openemr/sites/default/config.php on line 107
<html>
<head>
<title>OpenEMR Database Upgrade</title>
<link rel=‘STYLESHEET’ href=‘interface/themes/style_blue.css’>
</head>
<body>
<center>
<span class=‘title’>OpenEMR Database Upgrade</span>
<br>
</center>
<font color=‘green’>Processing 4_1_0-to-4_1_1_upgrade.sql …</font><br />
<font color=‘green’>Skipping section #IfNotIndex lists type</font><br />
<font color=‘green’>Skipping section #IfNotIndex lists pid</font><br />
<font color=‘green’>Skipping section #IfNotIndex form_vitals pid</font><br />
DROP INDEX `pid` ON `forms`<br />
DROP INDEX `pid` ON `form_encounter`<br />
CREATE INDEX `pid_encounter` ON `forms` (`pid`, `encounter`)<br />
CREATE INDEX `pid_encounter` ON `form_encounter` (`pid`, `encounter`)<br />
<font color=‘green’>Skipping section #IfNotIndex immunizations patient_id</font><br />
<font color=‘green’>Skipping section #IfNotIndex procedure_order patient_id</font><br />
<font color=‘green’>Skipping section #IfNotIndex pnotes pid</font><br />
<font color=‘green’>Skipping section #IfNotIndex transactions pid</font><br />
<font color=‘green’>Skipping section #IfNotIndex extended_log patient_id</font><br />
<font color=‘green’>Skipping section #IfNotIndex prescriptions patient_id</font><br />
CREATE INDEX `pc_eventDate` ON `openemr_postcalendar_events` (`pc_eventDate`)<br />
<font color=‘green’>Skipping section #IfMissingColumn version v_realpatch</font><br />
<font color=‘green’>Skipping section #IfMissingColumn prescriptions drug_info_erx</font><br />
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`) VALUES (‘lists’,‘nation_notes_replace_buttons’,‘Nation Notes Replace Buttons’,1)<br />
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`) VALUES (‘nation_notes_replace_buttons’,‘Yes’,‘Yes’,10)<br />
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`) VALUES (‘nation_notes_replace_buttons’,‘No’,‘No’,20)<br />
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`) VALUES (‘nation_notes_replace_buttons’,‘Normal’,‘Normal’,30)<br />
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`) VALUES (‘nation_notes_replace_buttons’,‘Abnormal’,‘Abnormal’,40)<br />
<font color=‘green’>Skipping section #IfMissingColumn insurance_data policy_type</font><br />
ALTER TABLE drugs ADD max_level float NOT NULL DEFAULT 0.0<br />
ALTER TABLE drugs CHANGE reorder_point reorder_point float NOT NULL DEFAULT 0.0<br />
CREATE TABLE `product_warehouse` (  `pw_drug_id`   int(11) NOT NULL,  `pw_warehouse` varchar(31) NOT NULL,  `pw_min_level` float       DEFAULT 0,  `pw_max_level` float       DEFAULT 0,  PRIMARY KEY  (`pw_drug_id`,`pw_warehouse`)) ENGINE=MyISAM<br />
<font color=‘green’>Skipping section #IfNotColumnType billing modifier varchar(12)</font><br />
<font color=‘green’>Skipping section #IfMissingColumn billing notecodes</font><br />
<font color=‘green’>Skipping section #IfNotTable dated_reminders</font><br />
<font color=‘green’>Skipping section #IfNotTable dated_reminders_link</font><br />
ALTER TABLE `x12_partners` ADD COLUMN `x12_gs03` VARCHAR(15) NOT NULL DEFAULT ‘’<br />
CREATE TABLE `payment_gateway_details` (  `id` int(11) NOT NULL AUTO_INCREMENT,  `service_name` varchar(100) DEFAULT NULL,  `login_id` varchar(255) DEFAULT NULL,  `transaction_key` varchar(255) DEFAULT NULL,  `md5` varchar(255) DEFAULT NULL,  PRIMARY KEY (`id`)) ENGINE=InnoDB<br />
insert into `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`) values(‘lists’,‘payment_gateways’,‘Payment Gateways’,‘297’,‘1’,‘0’,’’,’’)<br />
insert into `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`) values(‘payment_gateways’,‘authorize_net’,‘Authorize.net’,‘1’,‘0’,‘0’,’’,’’)<br />
insert into `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`) values(‘payment_method’,‘authorize_net’,‘Authorize.net’,‘60’,‘0’,‘0’,’’,’’)<br />
ALTER TABLE `patient_access_offsite` ADD COLUMN `authorize_net_id` VARCHAR(20) COMMENT ‘authorize.net profile id’<br />
ALTER TABLE `facility` ADD COLUMN `website` varchar(255) default NULL<br />
ALTER TABLE `facility` ADD COLUMN `email` varchar(255) default NULL<br />
ALTER TABLE `code_types` ADD COLUMN `ct_active` tinyint(1) NOT NULL default 1 COMMENT ‘1 if this is active’<br />
ALTER TABLE `code_types` ADD COLUMN `ct_label` varchar(31) NOT NULL default ‘’ COMMENT ‘label of this code type’<br />
UPDATE `code_types` SET ct_label = ct_key<br />
ALTER TABLE `code_types` ADD COLUMN `ct_external` tinyint(1) NOT NULL default 0 COMMENT ‘0 if stored codes in codes tables, 1 or greater if codes stored in external tables’<br />
DROP TABLE IF EXISTS `temp_table_one`<br />
CREATE TABLE `temp_table_one` (  `id` int(11) NOT NULL DEFAULT ‘0’,  `seq` int(11) NOT NULL DEFAULT ‘0’) ENGINE=MyISAM <br />
INSERT INTO `temp_table_one` (`id`, `seq`) VALUES ( IF( ((SELECT MAX(`ct_id`) FROM `code_types`)>=100), ((SELECT MAX(`ct_id`) FROM `code_types`) + 1), 100 ) , IF( ((SELECT MAX(`ct_seq`) FROM `code_types`)>=100), ((SELECT MAX(`ct_seq`) FROM `code_types`) + 1), 100 )  )<br />
INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external ) VALUES (‘DSMIV’ , (SELECT MAX(`id`) FROM `temp_table_one`), (SELECT MAX(`seq`) FROM `temp_table_one`), 2, ‘’, 0, 0, 0, 1, 0, ‘DSMIV’, 0)<br />
DROP TABLE `temp_table_one`<br />
DROP TABLE IF EXISTS `temp_table_one`<br />
CREATE TABLE `temp_table_one` (  `id` int(11) NOT NULL DEFAULT ‘0’,  `seq` int(11) NOT NULL DEFAULT ‘0’) ENGINE=MyISAM <br />
INSERT INTO `temp_table_one` (`id`, `seq`) VALUES ( IF( ((SELECT MAX(`ct_id`) FROM `code_types`)>=100), ((SELECT MAX(`ct_id`) FROM `code_types`) + 1), 100 ) , IF( ((SELECT MAX(`ct_seq`) FROM `code_types`)>=100), ((SELECT MAX(`ct_seq`) FROM `code_types`) + 1), 100 )  )<br />
INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external ) VALUES (‘ICD10’ , (SELECT MAX(`id`) FROM `temp_table_one`), (SELECT MAX(`seq`) FROM `temp_table_one`), 2, ‘’, 0, 0, 0, 1, 0, ‘ICD10’, 1)<br />
DROP TABLE `temp_table_one`<br />
DROP TABLE IF EXISTS `temp_table_one`<br />
CREATE TABLE `temp_table_one` (  `id` int(11) NOT NULL DEFAULT ‘0’,  `seq` int(11) NOT NULL DEFAULT ‘0’) ENGINE=MyISAM <br />
INSERT INTO `temp_table_one` (`id`, `seq`) VALUES ( IF( ((SELECT MAX(`ct_id`) FROM `code_types`)>=100), ((SELECT MAX(`ct_id`) FROM `code_types`) + 1), 100 ) , IF( ((SELECT MAX(`ct_seq`) FROM `code_types`)>=100), ((SELECT MAX(`ct_seq`) FROM `code_types`) + 1), 100 )  )<br />
INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external ) VALUES (‘SNOMED’ , (SELECT MAX(`id`) FROM `temp_table_one`), (SELECT MAX(`seq`) FROM `temp_table_one`), 2, ‘’, 0, 0, 0, 1, 0, ‘SNOMED’, 2)<br />
DROP TABLE `temp_table_one`<br />
ALTER TABLE `ar_activity` ADD COLUMN `code_type` varchar(12) NOT NULL DEFAULT ‘’<br />
DROP TABLE IF EXISTS `temp_table_one`<br />
CREATE TABLE `temp_table_one` (  id             int unsigned  NOT NULL AUTO_INCREMENT,  session_id     int unsigned  NOT NULL,  payer_id       int(11)       NOT NULL DEFAULT 0,  user_id        int(11)       NOT NULL,  pay_total      decimal(12,2) NOT NULL DEFAULT 0,  payment_type varchar( 50 ) NOT NULL DEFAULT ‘patient’,  description text NOT NULL,  adjustment_code varchar( 50 ) NOT NULL DEFAULT ‘patient_payment’,  post_to_date date NOT NULL,  patient_id int( 11 ) NOT NULL,  payment_method varchar( 25 ) NOT NULL DEFAULT ‘cash’,  pid            int(11)       NOT NULL,  encounter      int(11)       NOT NULL,  code_type      varchar(12)   NOT NULL DEFAULT ‘’,  code           varchar(9)    NOT NULL,  modifier       varchar(5)    NOT NULL DEFAULT ‘’,  payer_type     int           NOT NULL DEFAULT 0,  post_time      datetime      NOT NULL,  post_user      int(11)       NOT NULL,  pay_amount     decimal(12,2) NOT NULL DEFAULT 0,  account_code varchar(15) NOT NULL DEFAULT ‘PCP’,  PRIMARY KEY (id)) ENGINE=MyISAM AUTO_INCREMENT=1<br />
INSERT INTO `temp_table_one` (`user_id`, `pay_total`, `patient_id`, `post_to_date`, `pid`, `encounter`, `post_time`, `post_user`, `pay_amount`, `description`) SELECT `user`, (`fee`*-1), `pid`, `date`, `pid`, `encounter`, `date`, `user`, (`fee`*-1), ‘COPAY’ FROM `billing` WHERE `code_type`=‘COPAY’ AND `activity`!=0<br />
UPDATE `temp_table_one` SET `session_id`= ((SELECT MAX(session_id) FROM ar_session)+`id`)<br />
UPDATE `billing`, `code_types`, `temp_table_one` SET temp_table_one.code_type=billing.code_type, temp_table_one.code=billing.code, temp_table_one.modifier=billing.modifier WHERE billing.code_type=code_types.ct_key AND code_types.ct_fee=1 AND temp_table_one.pid=billing.pid AND temp_table_one.encounter=billing.encounter AND billing.activity!=0<br />
INSERT INTO `ar_session` (`payer_id`, `user_id`, `pay_total`, `payment_type`, `description`, `patient_id`, `payment_method`, `adjustment_code`, `post_to_date`) SELECT `payer_id`, `user_id`, `pay_total`, `payment_type`, `description`, `patient_id`, `payment_method`, `adjustment_code`, `post_to_date` FROM `temp_table_one`<br />
INSERT INTO `ar_activity` (`pid`, `encounter`, `code_type`, `code`, `modifier`, `payer_type`, `post_time`, `post_user`, `session_id`, `pay_amount`, `account_code`) SELECT `pid`, `encounter`, `code_type`, `code`, `modifier`, `payer_type`, `post_time`, `post_user`, `session_id`, `pay_amount`, `account_code` FROM `temp_table_one`<br />
UPDATE `billing` SET `activity`=0 WHERE `code_type`=‘COPAY’<br />
DROP TABLE IF EXISTS `temp_table_one`<br />
CREATE TABLE  `facility_user_ids` (  `id` bigint(20) NOT NULL AUTO_INCREMENT,  `uid` bigint(20) DEFAULT NULL,  `facility_id` bigint(20) DEFAULT NULL,  `field_id`    varchar(31)  NOT NULL COMMENT ‘references layout_options.field_id’,  `field_value` TEXT NOT NULL,  PRIMARY KEY (`id`),  KEY `uid` (`uid`,`facility_id`,`field_id`)) ENGINE=MyISAM  AUTO_INCREMENT=1 <br />
INSERT INTO `layout_options` (form_id, field_id, group_name, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES (‘FACUSR’, ‘provider_id’, ‘1General’, ‘Provider ID’, 1, 2, 1, 15, 63, ‘’, 1, 1, ‘’, ‘’, ‘Provider ID at Specified Facility’)<br />
ALTER TABLE `patient_data` ADD COLUMN `ref_providerID` int(11) default NULL<br />
UPDATE `patient_data` SET `ref_providerID`=`providerID`<br />
INSERT INTO `layout_options` (form_id, field_id, group_name, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES (‘DEM’, ‘ref_providerID’, ‘3Choices’, ‘Referring Provider’, 2, 11, 1, 0, 0, ‘’, 1, 3, ‘’, ‘’, ‘Referring Provider’)<br />
UPDATE `layout_options` SET `description`=‘Provider’ WHERE `form_id`=‘DEM’ AND `field_id`=‘providerID’<br />
UPDATE `layout_options` SET `seq`=(1+`seq`) WHERE `form_id`=‘DEM’ AND `group_name` LIKE ‘%Choices’ AND `field_id` != ‘providerID’ AND `field_id` != ‘ref_providerID’<br />
ALTER TABLE `documents` ADD COLUMN `couch_docid` VARCHAR(100) NULL<br />
ALTER TABLE `documents` ADD COLUMN `couch_revid` VARCHAR(100) NULL<br />
ALTER TABLE `documents` ADD COLUMN `storagemethod` TINYINT(4) DEFAULT ‘0’ NOT NULL COMMENT ‘0->Harddisk,1->CouchDB’<br />
insert into list_options (list_id, option_id, title, seq, option_value, mapping, notes) values(‘lists’,‘ptlistcols’,‘Patient List Columns’,‘1’,‘0’,’’,’’)<br />
insert into list_options (list_id, option_id, title, seq, option_value, mapping, notes) values(‘ptlistcols’,‘name’      ,‘Full Name’     ,‘10’,‘3’,’’,’’)<br />
insert into list_options (list_id, option_id, title, seq, option_value, mapping, notes) values(‘ptlistcols’,‘phone_home’,‘Home Phone’    ,‘20’,‘3’,’’,’’)<br />
insert into list_options (list_id, option_id, title, seq, option_value, mapping, notes) values(‘ptlistcols’,‘ss’        ,‘SSN’           ,‘30’,‘3’,’’,’’)<br />
insert into list_options (list_id, option_id, title, seq, option_value, mapping, notes) values(‘ptlistcols’,‘DOB’       ,‘Date of Birth’ ,‘40’,‘3’,’’,’’)<br />
insert into list_options (list_id, option_id, title, seq, option_value, mapping, notes) values(‘ptlistcols’,‘pubpid’    ,‘External ID’   ,‘50’,‘3’,’’,’’)<br />
UPDATE `code_types` SET `ct_mod`=0 WHERE `ct_key`=‘DSMIV’ OR `ct_key`=‘ICD9’ OR `ct_key`=‘ICD10’ OR `ct_key`=‘SNOMED’<br />
ALTER TABLE `layout_options` ADD COLUMN `fld_rows` int(11) NOT NULL default ‘0’<br />
UPDATE `layout_options` SET `fld_rows`=max_length WHERE `data_type`=‘3’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `data_type`=‘3’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `data_type`=‘34’<br />
UPDATE `layout_options` SET `max_length`=‘20’ WHERE `field_id`=‘financial_review’ AND `form_id`=‘DEM’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `field_id`=‘history_father’ AND `form_id`=‘HIS’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `field_id`=‘history_mother’ AND `form_id`=‘HIS’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `field_id`=‘history_siblings’ AND `form_id`=‘HIS’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `field_id`=‘history_spouse’ AND `form_id`=‘HIS’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `field_id`=‘history_offspring’ AND `form_id`=‘HIS’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `field_id`=‘relatives_cancer’ AND `form_id`=‘HIS’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `field_id`=‘relatives_tuberculosis’ AND `form_id`=‘HIS’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `field_id`=‘relatives_diabetes’ AND `form_id`=‘HIS’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `field_id`=‘relatives_high_blood_pressure’ AND `form_id`=‘HIS’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `field_id`=‘relatives_heart_problems’ AND `form_id`=‘HIS’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `field_id`=‘relatives_stroke’ AND `form_id`=‘HIS’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `field_id`=‘relatives_epilepsy’ AND `form_id`=‘HIS’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `field_id`=‘relatives_mental_illness’ AND `form_id`=‘HIS’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `field_id`=‘relatives_suicide’ AND `form_id`=‘HIS’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `field_id`=‘coffee’ AND `form_id`=‘HIS’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `field_id`=‘tobacco’ AND `form_id`=‘HIS’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `field_id`=‘alcohol’ AND `form_id`=‘HIS’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `field_id`=‘recreational_drugs’ AND `form_id`=‘HIS’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `field_id`=‘counseling’ AND `form_id`=‘HIS’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `field_id`=‘exercise_patterns’ AND `form_id`=‘HIS’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `field_id`=‘hazardous_activities’ AND `form_id`=‘HIS’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `field_id`=‘sleep_patterns’ AND `form_id`=‘HIS’<br />
UPDATE `layout_options` SET `max_length`=‘0’ WHERE `field_id`=‘seatbelt_use’ AND `form_id`=‘HIS’<br />
ALTER TABLE `history_data` CHANGE `usertext11` `usertext11` TEXT NOT NULL<br />
ALTER TABLE x12_partners ADD COLUMN x12_isa01 VARCHAR( 2 ) NOT NULL DEFAULT ‘00’ COMMENT ‘User logon Required Indicator’<br />
ALTER TABLE x12_partners ADD COLUMN x12_isa02 VARCHAR( 10 ) NOT NULL DEFAULT ’          ’ COMMENT ‘User Logon’<br />
ALTER TABLE x12_partners ADD COLUMN x12_isa03 VARCHAR( 2 ) NOT NULL DEFAULT ‘00’ COMMENT ‘User password required Indicator’<br />
ALTER TABLE x12_partners ADD COLUMN x12_isa04 VARCHAR( 10 ) NOT NULL DEFAULT ’          ’ COMMENT ‘User Password’<br />
ALTER TABLE `codes` ADD COLUMN `financial_reporting` TINYINT(1) DEFAULT 0 COMMENT ‘0 = negative, 1 = considered important code in financial reporting’<br />
ALTER TABLE `codes` CHANGE `code_type` `code_type` SMALLINT(6) default NULL<br />
CREATE INDEX `code_type` ON `codes` (`code_type`)<br />
ALTER TABLE `billing` CHANGE `code_type` `code_type` VARCHAR(15) default NULL<br />
ALTER TABLE `codes` CHANGE `modifier` `modifier` VARCHAR(12) NOT NULL default ‘’<br />
ALTER TABLE `ar_activity` CHANGE `modifier` `modifier` VARCHAR(12) NOT NULL default ‘’<br />
DROP TABLE IF EXISTS `temp_table_one`<br />
CREATE TABLE `temp_table_one` (  `id` int(11) NOT NULL DEFAULT ‘0’,  `seq` int(11) NOT NULL DEFAULT ‘0’) ENGINE=MyISAM <br />
INSERT INTO `temp_table_one` (`id`, `seq`) VALUES ( IF( ((SELECT MAX(`ct_id`) FROM `code_types`)>=100), ((SELECT MAX(`ct_id`) FROM `code_types`) + 1), 100 ) , IF( ((SELECT MAX(`ct_seq`) FROM `code_types`)>=100), ((SELECT MAX(`ct_seq`) FROM `code_types`) + 1), 100 )  )<br />
INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external ) VALUES (‘CPTII’ , (SELECT MAX(`id`) FROM `temp_table_one`), (SELECT MAX(`seq`) FROM `temp_table_one`), 12, ‘ICD9’, 1, 0, 0, 0, 0, ‘CPTII’, 0)<br />
DROP TABLE `temp_table_one`<br />
DROP TABLE IF EXISTS `temp_table_one`<br />
CREATE TABLE `temp_table_one` (  `id` int(11) NOT NULL DEFAULT ‘0’,  `seq` int(11) NOT NULL DEFAULT ‘0’) ENGINE=MyISAM <br />
INSERT INTO `temp_table_one` (`id`, `seq`) VALUES ( IF( ((SELECT MAX(`ct_id`) FROM `code_types`)>=100), ((SELECT MAX(`ct_id`) FROM `code_types`) + 1), 100 ) , IF( ((SELECT MAX(`ct_seq`) FROM `code_types`)>=100), ((SELECT MAX(`ct_seq`) FROM `code_types`) + 1), 100 )  )<br />
INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external ) VALUES (‘ICD9-SG’ , (SELECT MAX(`id`) FROM `temp_table_one`), (SELECT MAX(`seq`) FROM `temp_table_one`), 12, ‘ICD9’, 1, 0, 0, 0, 0, ‘ICD9 Procedure/Service’, 5)<br />
DROP TABLE `temp_table_one`<br />
DROP TABLE IF EXISTS `temp_table_one`<br />
CREATE TABLE `temp_table_one` (  `id` int(11) NOT NULL DEFAULT ‘0’,  `seq` int(11) NOT NULL DEFAULT ‘0’) ENGINE=MyISAM <br />
INSERT INTO `temp_table_one` (`id`, `seq`) VALUES ( IF( ((SELECT MAX(`ct_id`) FROM `code_types`)>=100), ((SELECT MAX(`ct_id`) FROM `code_types`) + 1), 100 ) , IF( ((SELECT MAX(`ct_seq`) FROM `code_types`)>=100), ((SELECT MAX(`ct_seq`) FROM `code_types`) + 1), 100 )  )<br />
INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external ) VALUES (‘ICD10-PCS’ , (SELECT MAX(`id`) FROM `temp_table_one`), (SELECT MAX(`seq`) FROM `temp_table_one`), 12, ‘ICD10’, 1, 0, 0, 0, 0, ‘ICD10 Procedure/Service’, 6)<br />
DROP TABLE `temp_table_one`<br />
UPDATE `code_types` SET `ct_label`=‘ICD9 Diagnosis’ WHERE `ct_key`=‘ICD9’<br />
UPDATE `code_types` SET `ct_label`=‘CPT4 Procedure/Service’ WHERE `ct_key`=‘CPT4’<br />
UPDATE `code_types` SET `ct_label`=‘HCPCS Procedure/Service’ WHERE `ct_key`=‘HCPCS’<br />
UPDATE `code_types` SET `ct_label`=‘CVX Immunization’ WHERE `ct_key`=‘CVX’<br />
UPDATE `code_types` SET `ct_label`=‘DSMIV Diagnosis’ WHERE `ct_key`=‘DSMIV’<br />
UPDATE `code_types` SET `ct_label`=‘ICD10 Diagnosis’ WHERE `ct_key`=‘ICD10’<br />
UPDATE `code_types` SET `ct_label`=‘SNOMED Diagnosis’ WHERE `ct_key`=‘SNOMED’<br />
ALTER TABLE `code_types` ADD COLUMN `ct_claim` tinyint(1) NOT NULL default 0 COMMENT ‘1 if this is used in claims’<br />
UPDATE `code_types` SET `ct_claim`=‘1’ WHERE `ct_key`=‘ICD9’ OR `ct_key`=‘CPT4’ OR `ct_key`=‘HCPCS’ OR `ct_key`=‘DSMIV’ OR `ct_key`=‘ICD10’ OR `ct_key`=‘SNOMED’ OR `ct_key`=‘CPTII’ OR `ct_key`=‘ICD9-SG’ OR `ct_key`=‘ICD10-PCS’<br />
UPDATE `code_types` SET `ct_fee`=‘0’, `ct_mod`=‘0’, `ct_label`=‘CPTII Performance Measures’ WHERE `ct_key`=‘CPTII’<br />
CREATE TABLE `icd9_dx_code` (  `dx_id` SERIAL,  `dx_code`             varchar(5),  `formatted_dx_code`   varchar(6),  `short_desc`          varchar(60),  `long_desc`           varchar(300),  `active` tinyint default 0,  `revision` int default 0,  KEY `dx_code` (`dx_code`),  KEY `formatted_dx_code` (`formatted_dx_code`),  KEY `active` (`active`)) ENGINE=MyISAM<br />
CREATE TABLE `icd9_sg_code` (  `sg_id` SERIAL,  `sg_code`             varchar(5),  `formatted_sg_code`   varchar(6),  `short_desc`          varchar(60),  `long_desc`           varchar(300),  `active` tinyint default 0,  `revision` int default 0,  KEY `sg_code` (`sg_code`),  KEY `formatted_sg_code` (`formatted_sg_code`),  KEY `active` (`active`)) ENGINE=MyISAM<br />
CREATE TABLE `icd9_dx_long_code` (  `dx_id` SERIAL,  `dx_code`             varchar(5),  `long_desc`           varchar(300),  `active` tinyint default 0,  `revision` int default 0) ENGINE=MyISAM<br />
CREATE TABLE `icd9_sg_long_code` (  `sq_id` SERIAL,  `sg_code`             varchar(5),  `long_desc`           varchar(300),  `active` tinyint default 0,  `revision` int default 0) ENGINE=MyISAM<br />
CREATE TABLE `icd10_dx_order_code` (  `dx_id`               SERIAL,  `dx_code`             varchar(7),  `formatted_dx_code`   varchar(10),  `valid_for_coding`    char,  `short_desc`          varchar(60),  `long_desc`           varchar(300),  `active` tinyint default 0,  `revision` int default 0,  KEY `formatted_dx_code` (`formatted_dx_code`),  KEY `active` (`active`)) ENGINE=MyISAM<br />
CREATE TABLE `icd10_pcs_order_code` (  `pcs_id`              SERIAL,  `pcs_code`            varchar(7),  `valid_for_coding`    char,  `short_desc`          varchar(60),  `long_desc`           varchar(300),  `active` tinyint default 0,  `revision` int default 0,  KEY `pcs_code` (`pcs_code`),  KEY `active` (`active`)) ENGINE=MyISAM<br />
CREATE TABLE `icd10_gem_pcs_9_10` (  `map_id` SERIAL,  `pcs_icd9_source` varchar(5) default NULL,  `pcs_icd10_target` varchar(7) default NULL,  `flags` varchar(5) default NULL,  `active` tinyint default 0,  `revision` int default 0) ENGINE=MyISAM<br />
CREATE TABLE `icd10_gem_pcs_10_9` (  `map_id` SERIAL,  `pcs_icd10_source` varchar(7) default NULL,  `pcs_icd9_target` varchar(5) default NULL,  `flags` varchar(5) default NULL,  `active` tinyint default 0,  `revision` int default 0) ENGINE=MyISAM<br />
DROP TABLE IF EXISTS `icd10_gem_dx_9_10`<br />
CREATE TABLE `icd10_gem_dx_9_10` (  `map_id` SERIAL,  `dx_icd9_source` varchar(5) default NULL,  `dx_icd10_target` varchar(7) default NULL,  `flags` varchar(5) default NULL,  `active` tinyint default 0,  `revision` int default 0) ENGINE=MyISAM<br />
CREATE TABLE `icd10_gem_dx_10_9` (  `map_id` SERIAL,  `dx_icd10_source` varchar(7) default NULL,  `dx_icd9_target` varchar(5) default NULL,  `flags` varchar(5) default NULL,  `active` tinyint default 0,  `revision` int default 0) ENGINE=MyISAM<br />
CREATE TABLE `icd10_reimbr_dx_9_10` (  `map_id` SERIAL,  `code`        varchar(8),  `code_cnt`    tinyint,  `ICD9_01`     varchar(5),  `ICD9_02`     varchar(5),  `ICD9_03`     varchar(5),  `ICD9_04`     varchar(5),  `ICD9_05`     varchar(5),  `ICD9_06`     varchar(5),  `active` tinyint default 0,  `revision` int default 0) ENGINE=MyISAM<br />
CREATE TABLE `icd10_reimbr_pcs_9_10` (  `map_id`      SERIAL,  `code`        varchar(8),  `code_cnt`    tinyint,  `ICD9_01`     varchar(5),  `ICD9_02`     varchar(5),  `ICD9_03`     varchar(5),  `ICD9_04`     varchar(5),  `ICD9_05`     varchar(5),  `ICD9_06`     varchar(5),  `active` tinyint default 0,  `revision` int default 0) ENGINE=MyISAM<br />
CREATE TABLE `supported_external_dataloads` (  `load_id` SERIAL,  `load_type` varchar(24) NOT NULL DEFAULT ‘’,  `load_source` varchar(24) NOT NULL DEFAULT ‘CMS’,  `load_release_date` date NOT NULL,  `load_filename` varchar(256) NOT NULL DEFAULT ‘’,  `load_checksum` varchar(32) NOT NULL DEFAULT ‘’) ENGINE=MyISAM<br />
INSERT INTO `supported_external_dataloads` (`load_type`, `load_source`, `load_release_date`, `load_filename`, `load_checksum`) VALUES(‘ICD9’, ‘CMS’, ‘2011-10-01’, ‘cmsv29_master_descriptions.zip’, ‘c360c2b5a29974d6c58617c7378dd7c4’)<br />
INSERT INTO `supported_external_dataloads` (`load_type`, `load_source`, `load_release_date`, `load_filename`, `load_checksum`) VALUES(‘ICD9’, ‘CMS’, ‘2012-10-01’, ‘cmsv30_master_descriptions.zip’, ‘eb26446536435f5f5e677090a7976b15’)<br />
INSERT INTO `supported_external_dataloads` (`load_type`, `load_source`, `load_release_date`, `load_filename`, `load_checksum`) VALUES(‘ICD10’, ‘CMS’, ‘2011-10-01’, ‘2012_PCS_long_and_abbreviated_titles.zip’, ‘201a732b649d8c7fba807cc4c083a71a’)<br />
INSERT INTO `supported_external_dataloads` (`load_type`, `load_source`, `load_release_date`, `load_filename`, `load_checksum`) VALUES(‘ICD10’, ‘CMS’, ‘2011-10-01’, ‘DiagnosisGEMs_2012.zip’, ‘6758c4a3384c47161ce24f13a2464b53’)<br />
INSERT INTO `supported_external_dataloads` (`load_type`, `load_source`, `load_release_date`, `load_filename`, `load_checksum`) VALUES(‘ICD10’, ‘CMS’, ‘2011-10-01’, ‘ICD10OrderFiles_2012.zip’, ‘a76601df7a9f5270d8229828a833f6a1’)<br />
INSERT INTO `supported_external_dataloads` (`load_type`, `load_source`, `load_release_date`, `load_filename`, `load_checksum`) VALUES(‘ICD10’, ‘CMS’, ‘2011-10-01’, ‘ProcedureGEMs_2012.zip’, ‘f37416d8fab6cd2700b634ca5025295d’)<br />
INSERT INTO `supported_external_dataloads` (`load_type`, `load_source`, `load_release_date`, `load_filename`, `load_checksum`) VALUES(‘ICD10’, ‘CMS’, ‘2011-10-01’, ‘ReimbursementMapping_2012.zip’, ‘8b438d1fd1f34a9bb0e423c15e89744b’)<br />
ALTER TABLE `standardized_tables_track` ADD COLUMN `file_checksum` varchar(32)<br />
ALTER TABLE `code_types` ADD COLUMN `ct_proc` tinyint(1) NOT NULL default 0 COMMENT ‘1 if this is a procedure type’<br />
UPDATE `code_types` SET `ct_proc`=‘1’ WHERE `ct_key`=‘CPT4’ OR `ct_key`=‘HCPCS’ OR `ct_key`=‘ICD9-SG’ OR `ct_key`=‘ICD10-PCS’<br />
CREATE INDEX `form_id` ON `forms` (`form_id`)<br />
<font color=‘green’>Updating global configuration defaults…</font><br />
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/TEMPsql_upgrade.php on line 70
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/TEMPsql_upgrade.php on line 70
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/TEMPsql_upgrade.php on line 70
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/TEMPsql_upgrade.php on line 70
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/TEMPsql_upgrade.php on line 70
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/TEMPsql_upgrade.php on line 70
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/TEMPsql_upgrade.php on line 70
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/TEMPsql_upgrade.php on line 70
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/TEMPsql_upgrade.php on line 70
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/TEMPsql_upgrade.php on line 70
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/TEMPsql_upgrade.php on line 70
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/TEMPsql_upgrade.php on line 70
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/TEMPsql_upgrade.php on line 70
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/TEMPsql_upgrade.php on line 70
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/TEMPsql_upgrade.php on line 70
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/TEMPsql_upgrade.php on line 70
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/TEMPsql_upgrade.php on line 70
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/TEMPsql_upgrade.php on line 70
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/TEMPsql_upgrade.php on line 70
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/TEMPsql_upgrade.php on line 70
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/TEMPsql_upgrade.php on line 70
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/TEMPsql_upgrade.php on line 70
PHP Warning:  substr() expects parameter 1 to be string, array given in /var/www/openemr/TEMPsql_upgrade.php on line 70
<font color=‘green’>Updating version indicators…</font><br />
<p><font color=‘green’>Database upgrade finished.</font></p>
</body></html>
PHP Notice:  Undefined index: REQUEST_URI in /var/www/openemr/interface/globals.php on line 45
Session site ID has been set to ‘default’
PHP Notice:  Undefined index: SERVER_NAME in /var/www/openemr/sites/default/config.php on line 107
<B>Checking to ensure all the proper ACL(access control list) are present:</B></BR>‘Administrators’ group ‘write’ ACL is present.</BR>‘Physicians’ group ‘write’ ACL is present.</BR>‘Clinicians’ group ‘write’ ACL is present.</BR>‘Clinicians’ group ‘addonly’ ACL is present.</BR>‘Front Office’ group ‘write’ ACL is present.</BR>‘Accounting’ group ‘write’ ACL is present.</BR><BR/><B>Adding new object sections</B><BR/>The ‘Sensitivities’ object section already exist.</BR>The ‘Lists’ object section already exist.</BR>The ‘Placeholder’ object section already exist.</BR>The ‘Nation Notes’ object section already exist.</BR>The ‘Patient Portal’ object section already exist.</BR><BR/><B>Adding new objects</B><BR/>The ‘Normal’ object in the ‘Sensitivities’ section already exist.</BR>The ‘High’ object in the ‘Sensitivities’ section already exist.</BR>The ‘Pharmacy Dispensary’ object in the ‘Administration’ section already exist.</BR>The ‘ACL Administration’ object in the ‘Administration’ section already exist.</BR>The ‘Price Discounting’ object in the ‘Accounting’ section already exist.</BR>The ‘Default List (write,addonly optional)’ object in the ‘Lists’ section already exist.</BR>The ‘State List (write,addonly optional)’ object in the ‘Lists’ section already exist.</BR>The ‘Country List (write,addonly optional)’ object in the ‘Lists’ section already exist.</BR>The ‘Language List (write,addonly optional)’ object in the ‘Lists’ section already exist.</BR>The ‘Ethnicity-Race List (write,addonly optional)’ object in the ‘Lists’ section already exist.</BR>The ‘Placeholder (Maintains empty ACLs)’ object in the ‘Placeholder’ section already exist.</BR>The ‘Sign Lab Results (write,addonly optional)’ object in the ‘Patients’ section already exist.</BR>The ‘Nation Notes Configure’ object in the ‘Nation Notes’ section already exist.</BR>The ‘Patient Portal’ object in the ‘Patient Portal’ section already exist.</BR><BR/><B>Upgrading objects</B><BR/>The ‘High’ object in the ‘Sensitivities’ section has been successfully updated.</BR><BR/><B>Adding ACLs(Access Control Lists) and groups</B><BR/>‘Physicians’ group ‘addonly’ ACL already exist.</BR>‘Front Office’ group ‘addonly’ ACL already exist.</BR>‘Accounting’ group ‘addonly’ ACL already exist.</BR>‘Emergency Login’ group ‘write’ ACL already exist.</BR><BR/><B>Updating the ACLs(Access Control Lists)</B><BR/>The ‘Superuser’ object of the ‘Administration’ section is already found in the ‘Administrators’ group ‘write’ ACL.</BR>The ‘High’ object of the ‘Sensitivities’ section is already found in the ‘Administrators’ group ‘write’ ACL.</BR>The ‘Normal’ object of the ‘Sensitivities’ section is already found in the ‘Administrators’ group ‘write’ ACL.</BR>The ‘High’ object of the ‘Sensitivities’ section is already found in the ‘Physicians’ group ‘write’ ACL.</BR>The ‘Normal’ object of the ‘Sensitivities’ section is already found in the ‘Physicians’ group ‘write’ ACL.</BR>The ‘Normal’ object of the ‘Sensitivities’ section is already found in the ‘Clinicians’ group ‘addonly’ ACL.</BR>The ‘Pharmacy Dispensary’ object of the ‘Administration’ section is already found in the ‘Administrators’ group ‘write’ ACL.</BR>The ‘Pharmacy Dispensary’ object of the ‘Administration’ section is already found in the ‘Physicians’ group ‘write’ ACL.</BR>The ‘Pharmacy Dispensary’ object of the ‘Administration’ section is already found in the ‘Clinicians’ group ‘write’ ACL.</BR>The ‘ACL Administration’ object of the ‘Administration’ section is already found in the ‘Administrators’ group ‘write’ ACL.</BR>The ‘Price Discounting’ object of the ‘Accounting’ section is already found in the ‘Administrators’ group ‘write’ ACL.</BR>The ‘Price Discounting’ object of the ‘Accounting’ section is already found in the ‘Accounting’ group ‘write’ ACL.</BR>The ‘Price Discounting’ object of the ‘Accounting’ section is already found in the ‘Physicians’ group ‘write’ ACL.</BR>The ‘Default List (write,addonly optional)’ object of the ‘Lists’ section is already found in the ‘Administrators’ group ‘write’ ACL.</BR>The ‘State List (write,addonly optional)’ object of the ‘Lists’ section is already found in the ‘Administrators’ group ‘write’ ACL.</BR>The ‘Country List (write,addonly optional)’ object of the ‘Lists’ section is already found in the ‘Administrators’ group ‘write’ ACL.</BR>The ‘Language List (write,addonly optional)’ object of the ‘Lists’ section is already found in the ‘Administrators’ group ‘write’ ACL.</BR>The ‘Ethnicity-Race List (write,addonly optional)’ object of the ‘Lists’ section is already found in the ‘Administrators’ group ‘write’ ACL.</BR>The ‘Price Discounting’ object of the ‘Accounting’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Billing (write optional)’ object of the ‘Accounting’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘EOB Data Entry’ object of the ‘Accounting’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Financial Reporting - my encounters’ object of the ‘Accounting’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Financial Reporting - anything’ object of the ‘Accounting’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Calendar Settings’ object of the ‘Administration’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Database Reporting’ object of the ‘Administration’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Forms Administration’ object of the ‘Administration’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Practice Settings’ object of the ‘Administration’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Superbill Codes Administration’ object of the ‘Administration’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Users/Groups/Logs Administration’ object of the ‘Administration’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Batch Communication Tool’ object of the ‘Administration’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Language Interface Tool’ object of the ‘Administration’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Superuser’ object of the ‘Administration’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Pharmacy Dispensary’ object of the ‘Administration’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘ACL Administration’ object of the ‘Administration’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Authorize - any encounters’ object of the ‘Encounters’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Coding - any encounters (write,wsome optional)’ object of the ‘Encounters’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Notes - any encounters (write,addonly optional)’ object of the ‘Encounters’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Fix encounter dates - any encounters’ object of the ‘Encounters’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Default List (write,addonly optional)’ object of the ‘Lists’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘State List (write,addonly optional)’ object of the ‘Lists’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Country List (write,addonly optional)’ object of the ‘Lists’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Language List (write,addonly optional)’ object of the ‘Lists’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Ethnicity-Race List (write,addonly optional)’ object of the ‘Lists’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Appointments (write,wsome optional)’ object of the ‘Patients’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Demographics (write,addonly optional)’ object of the ‘Patients’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Medical/History (write,addonly optional)’ object of the ‘Patients’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Transactions (write optional)’ object of the ‘Patients’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Documents (write,addonly optional)’ object of the ‘Patients’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Patient Notes (write,addonly optional)’ object of the ‘Patients’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘High’ object of the ‘Sensitivities’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Normal’ object of the ‘Sensitivities’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Sign Lab Results (write,addonly optional)’ object of the ‘Patients’ section is already found in the ‘Physicians’ group ‘write’ ACL.</BR>The ‘Nation Notes Configure’ object of the ‘Nation Notes’ section is already found in the ‘Administrators’ group ‘write’ ACL.</BR>The ‘Nation Notes Configure’ object of the ‘Nation Notes’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR>The ‘Patient Portal’ object of the ‘Patient Portal’ section is already found in the ‘Administrators’ group ‘write’ ACL.</BR>The ‘Patient Portal’ object of the ‘Patient Portal’ section is already found in the ‘Emergency Login’ group ‘write’ ACL.</BR></BR><B>ALL DONE</B>Tue Jan  1 12:37:00 EST 2013: Upgraded OpenEMR site (default) with sql database (openemr) and sql user (openemr).

Again,  Thank You for your long hours of hard work. 
This solo practice would not exist without OpenEMR and the team of true professionals who stand behind it. 
We serve > 750 patients who would otherwise go untreated or have to travel an hour or more for psychiatric help.
 
Regards,

David  
I.T.  Admin for  J. VanVleet, D.O.  www.flpsychiatry.com

bradymiller wrote on Friday, January 04, 2013:

Hi David,

The version.php file is not from the patch (look inside the zip package version.php file). I know this because in that file should have the following:
$v_realpatch = ‘8’;

I am not sure why the zip is not unzipping for you. Try to do the following before the unzip command:
cd /var/www/openemr

-brady
OpenEMR

bradymiller wrote on Friday, January 04, 2013:

Also,
The other files (log and /etc files) look good.
-brady
OpenEMR

hitechelp wrote on Saturday, January 05, 2013:

Thank you Brady, you nailed it.
Why the terminal report showed unzip running without errors but not really doing anything is still a mystery to me.
When run from inside the /var/www/openemr directory, it worked!
We are now breathing much easier, thanks to your help.
Regards,
David