samsalas wrote on Friday, January 24, 2014:
Thu Jan 23 18:24:04 PST 2014: For upgrade, confirmed that the mysql database (oemr) and mysql user (root) exist
Thu Jan 23 18:28:08 PST 2014: Upgrading OpenEMR from 4.1.0-1…
Thu Jan 23 18:37:46 PST 2014: Configuring package…
Thu Jan 23 18:37:46 PST 2014: Continuing Upgrade from (4.1.0-1)
Thu Jan 23 18:37:46 PST 2014: Configuring Site (default)
PHP Notice: Undefined index: REQUEST_URI in /var/www/openemr/interface/globals.php on line 19
PHP Notice: Undefined index: SERVER_NAME in /var/www/openemr/sites/default/config.php on line 82
OpenEMR Database Upgrade
OpenEMR Database Upgrade
Processing 4_1_0-to-4_1_1_upgrade.sql ...
Skipping section #IfNotIndex lists type
Skipping section #IfNotIndex lists pid
Skipping section #IfNotIndex form_vitals pid
DROP INDEX `pid` ON `forms`
DROP INDEX `pid` ON `form_encounter`
CREATE INDEX `pid_encounter` ON `forms` (`pid`, `encounter`)
CREATE INDEX `pid_encounter` ON `form_encounter` (`pid`, `encounter`)
Skipping section #IfNotIndex immunizations patient_id
Skipping section #IfNotIndex procedure_order patient_id
Skipping section #IfNotIndex pnotes pid
Skipping section #IfNotIndex transactions pid
Skipping section #IfNotIndex extended_log patient_id
Skipping section #IfNotIndex prescriptions patient_id
CREATE INDEX `pc_eventDate` ON `openemr_postcalendar_events` (`pc_eventDate`)
Skipping section #IfMissingColumn version v_realpatch
Skipping section #IfMissingColumn prescriptions drug_info_erx
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`) VALUES ('lists','nation_notes_replace_buttons','Nation Notes Replace Buttons',1)
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`) VALUES ('nation_notes_replace_buttons','Yes','Yes',10)
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`) VALUES ('nation_notes_replace_buttons','No','No',20)
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`) VALUES ('nation_notes_replace_buttons','Normal','Normal',30)
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`) VALUES ('nation_notes_replace_buttons','Abnormal','Abnormal',40)
Skipping section #IfMissingColumn insurance_data policy_type
ALTER TABLE drugs ADD max_level float NOT NULL DEFAULT 0.0
ALTER TABLE drugs CHANGE reorder_point reorder_point float NOT NULL DEFAULT 0.0
Skipping section #IfNotTable product_warehouse
Skipping section #IfNotColumnType billing modifier varchar(12)
Skipping section #IfMissingColumn billing notecodes
Skipping section #IfNotTable dated_reminders
Skipping section #IfNotTable dated_reminders_link
ALTER TABLE `x12_partners` ADD COLUMN `x12_gs03` VARCHAR(15) NOT NULL DEFAULT ''
Skipping section #IfNotTable payment_gateway_details
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','','')
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','','')
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','','')
ALTER TABLE `patient_access_offsite` ADD COLUMN `authorize_net_id` VARCHAR(20) COMMENT 'authorize.net profile id'
ALTER TABLE `facility` ADD COLUMN `website` varchar(255) default NULL
ALTER TABLE `facility` ADD COLUMN `email` varchar(255) default NULL
ALTER TABLE `code_types` ADD COLUMN `ct_active` tinyint(1) NOT NULL default 1 COMMENT '1 if this is active'
ALTER TABLE `code_types` ADD COLUMN `ct_label` varchar(31) NOT NULL default '' COMMENT 'label of this code type'
UPDATE `code_types` SET ct_label = ct_key
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'
DROP TABLE IF EXISTS `temp_table_one`
CREATE TABLE `temp_table_one` ( `id` int(11) NOT NULL DEFAULT '0', `seq` int(11) NOT NULL DEFAULT '0') ENGINE=MyISAM
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 ) )
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)
DROP TABLE `temp_table_one`
DROP TABLE IF EXISTS `temp_table_one`
CREATE TABLE `temp_table_one` ( `id` int(11) NOT NULL DEFAULT '0', `seq` int(11) NOT NULL DEFAULT '0') ENGINE=MyISAM
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 ) )
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)
DROP TABLE `temp_table_one`
DROP TABLE IF EXISTS `temp_table_one`
CREATE TABLE `temp_table_one` ( `id` int(11) NOT NULL DEFAULT '0', `seq` int(11) NOT NULL DEFAULT '0') ENGINE=MyISAM
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 ) )
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)
DROP TABLE `temp_table_one`
ALTER TABLE `ar_activity` ADD COLUMN `code_type` varchar(12) NOT NULL DEFAULT ''
DROP TABLE IF EXISTS `temp_table_one`
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
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
UPDATE `temp_table_one` SET `session_id`= ((SELECT MAX(session_id) FROM ar_session)+`id`)
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
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`
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`
UPDATE `billing` SET `activity`=0 WHERE `code_type`='COPAY'
DROP TABLE IF EXISTS `temp_table_one`
Skipping section #IfNotTable facility_user_ids
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')
ALTER TABLE `patient_data` ADD COLUMN `ref_providerID` int(11) default NULL
UPDATE `patient_data` SET `ref_providerID`=`providerID`
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')
UPDATE `layout_options` SET `description`='Provider' WHERE `form_id`='DEM' AND `field_id`='providerID'
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'
ALTER TABLE `documents` ADD COLUMN `couch_docid` VARCHAR(100) NULL
ALTER TABLE `documents` ADD COLUMN `couch_revid` VARCHAR(100) NULL
ALTER TABLE `documents` ADD COLUMN `storagemethod` TINYINT(4) DEFAULT '0' NOT NULL COMMENT '0->Harddisk,1->CouchDB'
insert into list_options (list_id, option_id, title, seq, option_value, mapping, notes) values('lists','ptlistcols','Patient List Columns','1','0','','')
insert into list_options (list_id, option_id, title, seq, option_value, mapping, notes) values('ptlistcols','name' ,'Full Name' ,'10','3','','')
insert into list_options (list_id, option_id, title, seq, option_value, mapping, notes) values('ptlistcols','phone_home','Home Phone' ,'20','3','','')
insert into list_options (list_id, option_id, title, seq, option_value, mapping, notes) values('ptlistcols','ss' ,'SSN' ,'30','3','','')
insert into list_options (list_id, option_id, title, seq, option_value, mapping, notes) values('ptlistcols','DOB' ,'Date of Birth' ,'40','3','','')
insert into list_options (list_id, option_id, title, seq, option_value, mapping, notes) values('ptlistcols','pubpid' ,'External ID' ,'50','3','','')
UPDATE `code_types` SET `ct_mod`=0 WHERE `ct_key`='DSMIV' OR `ct_key`='ICD9' OR `ct_key`='ICD10' OR `ct_key`='SNOMED'
ALTER TABLE `layout_options` ADD COLUMN `fld_rows` int(11) NOT NULL default '0'
UPDATE `layout_options` SET `fld_rows`=max_length WHERE `data_type`='3'
UPDATE `layout_options` SET `max_length`='0' WHERE `data_type`='3'
UPDATE `layout_options` SET `max_length`='0' WHERE `data_type`='34'
UPDATE `layout_options` SET `max_length`='20' WHERE `field_id`='financial_review' AND `form_id`='DEM'
UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='history_father' AND `form_id`='HIS'
UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='history_mother' AND `form_id`='HIS'
UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='history_siblings' AND `form_id`='HIS'
UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='history_spouse' AND `form_id`='HIS'
UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='history_offspring' AND `form_id`='HIS'
UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='relatives_cancer' AND `form_id`='HIS'
UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='relatives_tuberculosis' AND `form_id`='HIS'
UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='relatives_diabetes' AND `form_id`='HIS'
UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='relatives_high_blood_pressure' AND `form_id`='HIS'
UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='relatives_heart_problems' AND `form_id`='HIS'
UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='relatives_stroke' AND `form_id`='HIS'
UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='relatives_epilepsy' AND `form_id`='HIS'
UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='relatives_mental_illness' AND `form_id`='HIS'
UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='relatives_suicide' AND `form_id`='HIS'
UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='coffee' AND `form_id`='HIS'
UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='tobacco' AND `form_id`='HIS'
UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='alcohol' AND `form_id`='HIS'
UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='recreational_drugs' AND `form_id`='HIS'
UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='counseling' AND `form_id`='HIS'
UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='exercise_patterns' AND `form_id`='HIS'
UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='hazardous_activities' AND `form_id`='HIS'
UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='sleep_patterns' AND `form_id`='HIS'
UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='seatbelt_use' AND `form_id`='HIS'
ALTER TABLE `history_data` CHANGE `usertext11` `usertext11` TEXT NOT NULL
ALTER TABLE x12_partners ADD COLUMN x12_isa01 VARCHAR( 2 ) NOT NULL DEFAULT '00' COMMENT 'User logon Required Indicator'
ALTER TABLE x12_partners ADD COLUMN x12_isa02 VARCHAR( 10 ) NOT NULL DEFAULT ' ' COMMENT 'User Logon'
ALTER TABLE x12_partners ADD COLUMN x12_isa03 VARCHAR( 2 ) NOT NULL DEFAULT '00' COMMENT 'User password required Indicator'
ALTER TABLE x12_partners ADD COLUMN x12_isa04 VARCHAR( 10 ) NOT NULL DEFAULT ' ' COMMENT 'User Password'
ALTER TABLE `codes` ADD COLUMN `financial_reporting` TINYINT(1) DEFAULT 0 COMMENT '0 = negative, 1 = considered important code in financial reporting'
ALTER TABLE `codes` CHANGE `code_type` `code_type` SMALLINT(6) default NULL
CREATE INDEX `code_type` ON `codes` (`code_type`)
ALTER TABLE `billing` CHANGE `code_type` `code_type` VARCHAR(15) default NULL
ALTER TABLE `codes` CHANGE `modifier` `modifier` VARCHAR(12) NOT NULL default ''
ALTER TABLE `ar_activity` CHANGE `modifier` `modifier` VARCHAR(12) NOT NULL default ''
DROP TABLE IF EXISTS `temp_table_one`
CREATE TABLE `temp_table_one` ( `id` int(11) NOT NULL DEFAULT '0', `seq` int(11) NOT NULL DEFAULT '0') ENGINE=MyISAM
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 ) )
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)
DROP TABLE `temp_table_one`
DROP TABLE IF EXISTS `temp_table_one`
CREATE TABLE `temp_table_one` ( `id` int(11) NOT NULL DEFAULT '0', `seq` int(11) NOT NULL DEFAULT '0') ENGINE=MyISAM
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 ) )
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)
DROP TABLE `temp_table_one`
DROP TABLE IF EXISTS `temp_table_one`
CREATE TABLE `temp_table_one` ( `id` int(11) NOT NULL DEFAULT '0', `seq` int(11) NOT NULL DEFAULT '0') ENGINE=MyISAM
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 ) )
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)
DROP TABLE `temp_table_one`
UPDATE `code_types` SET `ct_label`='ICD9 Diagnosis' WHERE `ct_key`='ICD9'
UPDATE `code_types` SET `ct_label`='CPT4 Procedure/Service' WHERE `ct_key`='CPT4'
UPDATE `code_types` SET `ct_label`='HCPCS Procedure/Service' WHERE `ct_key`='HCPCS'
UPDATE `code_types` SET `ct_label`='CVX Immunization' WHERE `ct_key`='CVX'
UPDATE `code_types` SET `ct_label`='DSMIV Diagnosis' WHERE `ct_key`='DSMIV'
UPDATE `code_types` SET `ct_label`='ICD10 Diagnosis' WHERE `ct_key`='ICD10'
UPDATE `code_types` SET `ct_label`='SNOMED Diagnosis' WHERE `ct_key`='SNOMED'
ALTER TABLE `code_types` ADD COLUMN `ct_claim` tinyint(1) NOT NULL default 0 COMMENT '1 if this is used in claims'
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'
UPDATE `code_types` SET `ct_fee`='0', `ct_mod`='0', `ct_label`='CPTII Performance Measures' WHERE `ct_key`='CPTII'
Skipping section #IfNotTable icd9_dx_code
Skipping section #IfNotTable icd9_sg_code
Skipping section #IfNotTable icd9_dx_long_code
Skipping section #IfNotTable icd9_sg_long_code
Skipping section #IfNotTable icd10_dx_order_code
Skipping section #IfNotTable icd10_pcs_order_code
Skipping section #IfNotTable icd10_gem_pcs_9_10
Skipping section #IfNotTable icd10_gem_pcs_10_9
Skipping section #IfNotTable icd10_gem_dx_9_10
Skipping section #IfNotTable icd10_gem_dx_10_9
Skipping section #IfNotTable icd10_reimbr_dx_9_10
Skipping section #IfNotTable icd10_reimbr_pcs_9_10
Skipping section #IfNotTable supported_external_dataloads
ALTER TABLE `standardized_tables_track` ADD COLUMN `file_checksum` varchar(32)
ALTER TABLE `code_types` ADD COLUMN `ct_proc` tinyint(1) NOT NULL default 0 COMMENT '1 if this is a procedure type'
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'
CREATE INDEX `form_id` ON `forms` (`form_id`)
Processing 4_1_1-to-4_1_2_upgrade.sql ...
Skipping section #IfNotTable report_results
ALTER TABLE `version` ADD COLUMN `v_acl` int(11) NOT NULL DEFAULT 0
ALTER TABLE `documents_legal_detail` ADD COLUMN `dld_moved` tinyint(4) NOT NULL DEFAULT '0'
ALTER TABLE `documents_legal_detail` ADD COLUMN `dld_patient_comments` text COMMENT 'Patient comments stored here'
ALTER TABLE `documents_legal_master` ADD COLUMN `dlm_upload_type` tinyint(4) DEFAULT '0' COMMENT '0-Provider Uploaded,1-Patient Uploaded'
ALTER TABLE `list_options` ADD COLUMN `codes` varchar(255) NOT NULL DEFAULT ''
UPDATE list_options SET `codes`='SNOMED-CT:449868002' WHERE list_id='smoking_status' AND option_id='1' AND title='Current every day smoker'
UPDATE list_options SET `codes`='SNOMED-CT:428041000124106' WHERE list_id='smoking_status' AND option_id='2' AND title='Current some day smoker'
UPDATE list_options SET `codes`='SNOMED-CT:8517006' WHERE list_id='smoking_status' AND option_id='3' AND title='Former smoker'
UPDATE list_options SET `codes`='SNOMED-CT:266919005' WHERE list_id='smoking_status' AND option_id='4' AND title='Never smoker'
UPDATE list_options SET `codes`='SNOMED-CT:77176002' WHERE list_id='smoking_status' AND option_id='5' AND title='Smoker, current status unknown'
UPDATE list_options SET `codes`='SNOMED-CT:266927001' WHERE list_id='smoking_status' AND option_id='9' AND title='Unknown if ever smoked'
INSERT INTO list_options ( list_id, option_id, title, seq, is_default, codes ) VALUES ('smoking_status', '15', 'Heavy tobacco smoker', 70, 0, "SNOMED-CT:428071000124103")
INSERT INTO list_options ( list_id, option_id, title, seq, is_default, codes ) VALUES ('smoking_status', '16', 'Light tobacco smoker', 80, 0, "SNOMED-CT:428061000124105")
ALTER TABLE `code_types` ADD COLUMN ct_term tinyint(1) NOT NULL default 0 COMMENT '1 if this is a clinical term'
DROP TABLE IF EXISTS `temp_table_one`
CREATE TABLE `temp_table_one` ( `id` int(11) NOT NULL DEFAULT '0', `seq` int(11) NOT NULL DEFAULT '0') ENGINE=MyISAM
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 ) )
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, ct_claim, ct_proc, ct_term ) VALUES ('SNOMED-CT' , (SELECT MAX(`id`) FROM `temp_table_one`), (SELECT MAX(`seq`) FROM `temp_table_one`), 0, '', 0, 0, 1, 0, 0, 'SNOMED Clinical Term', 7, 0, 0, 1)
DROP TABLE `temp_table_one`
ALTER TABLE `codes` CHANGE `code` `code` varchar(25) NOT NULL default ''
ALTER TABLE `billing` CHANGE `code` `code` varchar(20) default NULL
ALTER TABLE `ar_activity` CHANGE `code` `code` varchar(20) NOT NULL COMMENT 'empty means claim level'
Skipping section #IfNotTable procedure_questions
ALTER TABLE `procedure_type` ADD COLUMN `activity` tinyint(1) NOT NULL default 1
ALTER TABLE `procedure_type` ADD COLUMN `notes` varchar(255) NOT NULL default ''
Skipping section #IfNotTable procedure_answers
Skipping section #IfNotTable procedure_providers
Skipping section #IfNotTable procedure_order_code
ALTER TABLE `procedure_order` ADD COLUMN `lab_id` bigint(20) NOT NULL DEFAULT 0 COMMENT 'references procedure_providers.ppid', ADD COLUMN `specimen_type` varchar(31) NOT NULL DEFAULT '' COMMENT 'from the Specimen_Type list', ADD COLUMN `specimen_location` varchar(31) NOT NULL DEFAULT '' COMMENT 'from the Specimen_Location list', ADD COLUMN `specimen_volume` varchar(30) NOT NULL DEFAULT '' COMMENT 'from a text input field'
UPDATE procedure_order AS po, procedure_order_code AS pc, procedure_type AS pt SET po.lab_id = pt.lab_id WHERE po.lab_id = 0 AND pc.procedure_order_id = po.procedure_order_id AND pt.procedure_type_id = pc.procedure_type_id AND pt.lab_id != 0
ERROR: query failed: UPDATE procedure_order AS po, procedure_order_code AS pc, procedure_type AS pt SET po.lab_id = pt.lab_id WHERE po.lab_id = 0 AND pc.procedure_order_id = po.procedure_order_id AND pt.procedure_type_id = pc.procedure_type_id AND pt.lab_id != 0
Error: Unknown column 'pc.procedure_type_id' in 'where clause'
Thu Jan 23 18:37:54 PST 2014: Upgraded OpenEMR site (default) with sql database (oemr) and sql user (root).
Thu Jan 23 18:40:26 PST 2014: OpenEMR upgrade is complete.
Thu Jan 23 18:40:26 PST 2014: Recommend setting optional configuration settings in:
Thu Jan 23 18:40:26 PST 2014: /var/www/openemr/sites//config.php
Thu Jan 23 18:40:26 PST 2014: (We have renamed your old configuration files to *.OLD)
Thu Jan 23 18:40:26 PST 2014: (We recommend you delete the *.OLD files when done)
Thu Jan 23 18:40:26 PST 2014: We have placed backup of your old OpenEMR in /tmp/openemr-tmp
Thu Jan 23 18:40:26 PST 2014: (We recommend you copy this somewhere protected since it
Thu Jan 23 18:40:26 PST 2014: contains confidential patient information)