Upgrade 5.0.0 to 5.0.1 and getting Unknown column 'group_id' in 'field list'

question

(Craig Tucker) #1

I have ran the upgrade routine for 5.0.0 to 5.0.1 and the demographics page is not loading. I am getting an error:

Query Error
ERROR: query failed: SELECT distinct group_id FROM layout_options WHERE form_id = ? AND uor > 0 ORDER BY group_id

Error: Unknown column ‘group_id’ in ‘field list’

/volume1/homes/user/www/openemr/library/options.inc.php at 3059:sqlStatement
/volume1/homes/user/www/openemr/interface/patient_file/summary/demographics.php at 910:display_layout_tabs(DEM,Array,Array)

Any idea what may be the issue here? Is group_id one of the new fields in the database to facilitate group notes?

I am looking at my layout_options table and I do not see a group_id field so did something get missed in the update?

–Craig


(ViSolve) #2

@Craig_Tucker,
Can you please check whether you have ran the sql_upgrade.php file. If yes, whether you have found any errors while executing it. If so, can you please share it.
For your reference, we have attached the link stating the upgrade procedures.
https://www.open-emr.org/wiki/index.php/Linux_Upgrade_5.0.0_to_5.0.1

Thanks,
ViSolve


(Craig Tucker) #3

Yes I ran the sql_upgrade.php from Version Number: v5.0.0 (6) to v5.0.1 and did the upgrade procedure as noted, indicating that I was upgrading from 5.0.0 and it appeared to complete. As I recall, there was a statement in green to the effect that the upgrade was completed. I did not see any errors. Everything was green. Since you mention the upgrade file, I looked at the 5_0_0-to-5_0_1_upgrade.sql file and see the routines there for setting up the group therapy files and the ‘group_id’ field there. I see those files and fields for the group therapy adition constructed in phpMyAdmin. I do not see within the layout_options table a group_id field constructed in phpMyAdmin however and I do not see a routine for adding it in the 5_0_0-to-5_0_1_upgrade.sql file. Am I mistaken?


(ViSolve) #4

@Craig_Tucker,
We tried the same. On execution of sql_upgrade.php file, we could able to see the insertion of group_id. For your reference attached the screenshot.


In the corresponding file 5_0_0-to-5_0_1_upgrade.sql, Line Number 655, we could able to find the query for inserting group_id in layout_options table.
Whether could you find the same.

Thanks,
ViSolve


(Craig Tucker) #5

I see it there in the file now, thanks. However it was missed on the update and the others were added. The group_name field remains in my layout_options table and the group_id was not added. So, I will restore from backup and try again. Fortunately I am starting with my auxiliary server. The main is still running with 5.0.0.


(Craig Tucker) #6

I started over. This is the result of my upgrade screen. It looks like the upgrade sequence is skipping the group therapy upgrades. Why might it be doing this? Well, I can see that the layout_group_properties table does in fact exist in my 5.0.0 build. Looking at 5_0_0-to-5_0_1_upgrade.sql I can see that within the if statement–#IfNotTable layout_group_properties, the necessary upgrades are contained. So I can see why it appears to be skipping the routine to add ‘group_id’ field to ‘layout_options’ because it is within the if statement. Perhaps #EndIf should be at the closed parentheses?:

OpenEMR Database Upgrade
Processing 5_0_0-to-5_0_1_upgrade.sql ...
ALTER TABLE `list_options` ADD `edit_options` TINYINT(1) NOT NULL DEFAULT '1'
ALTER TABLE `list_options` ADD `timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
Skipping section #IfNotTable multiple_db
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `notes`, `activity`) VALUES ('page_validation', 'therapy_groups_add#addGroup', '/interface/therapy_groups/index.php?method=addGroup', 120, '{group_name:{presence: true}}', 1)
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `notes`, `activity`) VALUES ('page_validation', 'therapy_groups_edit#editGroup', '/interface/therapy_groups/index.php?method=groupDetails', 125, '{group_name:{presence: true}}', 1)
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `notes`, `activity`) VALUES ('page_validation', 'tg_add#add-participant-form', '/interface/therapy_groups/index.php?method=groupParticipants', 130, '{participant_name:{presence: true}, group_patient_start:{presence: true}}', 1)
INSERT INTO `list_options` (`list_id`,`option_id`,`title`,`seq`,`is_default`,`option_value`,`mapping`,`notes`,`codes`,`toggle_setting_1`,`toggle_setting_2`,`activity`,`subtype`)VALUES ('page_validation','add_edit_event#theform_groups','/interface/main/calendar/add_edit_event.php?group=true',150,0,0,'','{form_group:{presence: true}}','',0,0,1,'')
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `notes`, `activity`) VALUES ('page_validation', 'common#new-encounter-form', '/interface/forms/newGroupEncounter/common.php', 160, '{pc_catid:{exclusion: ["_blank"]}}', 1)
Skipping section #IfNotTable therapy_groups
Skipping section #IfNotTable therapy_groups_participants
Skipping section #IfNotTable therapy_groups_participant_attendance
Skipping section #IfNotTable therapy_groups_counselors
ALTER TABLE openemr_postcalendar_events ADD pc_gid int(11) DEFAULT 0
INSERT INTO list_options (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`) VALUES ('lists', 'groupstat', 'Group Statuses', '13', '0', '0')
INSERT INTO list_options (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `notes`) VALUES ('groupstat', '-', '- None', '10', '0', '0', 'FEFDCF|0')
INSERT INTO list_options (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `notes`) VALUES ('groupstat', '=', '= Took Place', '20', '0', '0', 'FF2414|0')
INSERT INTO list_options (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `notes`) VALUES ('groupstat', '>', '> Did Not Take Place', '30', '0', '0', 'BFBFBF|0')
INSERT INTO list_options (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `notes`) VALUES ('groupstat', '<', '< Not Reported', '40', '0', '0', 'FEFDCF|0')
INSERT INTO openemr_postcalendar_categories (`pc_catname`, `pc_catcolor`, `pc_recurrspec`, `pc_duration` ,`pc_cattype` , `pc_active` , `pc_seq`)VALUES ('Group Therapy' , '#BFBFBF' , 'a:5:{s:17:"event_repeat_freq";s:1:"0";s:22:"event_repeat_freq_type";s:1:"0";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";}', '3600', '3', '1', '90')
Skipping section #IfNotTable form_groups_encounter
ALTER TABLE `forms` ADD `therapy_group_id` INT(11) DEFAULT NULL
ALTER TABLE `registry` ADD `patient_encounter` TINYINT NOT NULL DEFAULT '1'
ALTER TABLE `registry` ADD `therapy_group_encounter` TINYINT NOT NULL DEFAULT '0'
INSERT INTO list_options (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`) VALUES ('lists', 'attendstat', 'Group Attendance Statuses', '15', '0', '0')
INSERT INTO list_options (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `notes`, `toggle_setting_1`) VALUES ('attendstat', '-', '- Not Reported', '10', '0', '0', 'FEFDCF|0', '0')
INSERT INTO list_options (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `notes`, `toggle_setting_1`) VALUES ('attendstat', '@', '@ Attended', '20', '0', '0', 'FF2414|0', '1')
INSERT INTO list_options (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `notes`, `toggle_setting_1`) VALUES ('attendstat', '?', '? Did Not Attend', '30', '0', '0', 'BFBFBF|0', '1')
INSERT INTO list_options (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `notes`, `toggle_setting_1`) VALUES ('attendstat', '~', '~ Late Arrival', '40', '0', '0', 'BFBFBF|0', '1')
INSERT INTO list_options (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `notes`, `toggle_setting_1`) VALUES ('attendstat', 'x', 'x Cancelled', '50', '0', '0', 'FEFDCF|0', '0')
INSERT INTO registry (name, state, directory, sql_run, unpackaged, date, priority, category, nickname, patient_encounter, therapy_group_encounter) VALUES ('Group Attendance Form', 1, 'group_attendance', 1, 1, '2015-10-15 00:00:00', 0, 'Clinical', '',0,1)
INSERT INTO registry (name, state, directory, sql_run, unpackaged, date, priority, category, nickname, patient_encounter, therapy_group_encounter) VALUES ('New Group Encounter Form', 1, 'newGroupEncounter', 1, 1, '2015-10-15 00:00:00', 0, 'Clinical', '',0,1)
Skipping section #IfTable form_therapy_groups_attendance
Skipping section #IfNotTable form_group_attendance
INSERT INTO list_options (`list_id`, `option_id`, `title`) VALUES ('lists', 'files_white_list', 'Files type white list')
Skipping section #IfNotTable onsite_documents
Skipping section #IfNotTable onsite_mail
Skipping section #IfNotTable onsite_messages
Skipping section #IfNotTable onsite_online
Skipping section #IfNotTable onsite_portal_activity
Skipping section #IfNotTable onsite_signatures
INSERT INTO categories select (select MAX(id) from categories) + 1, 'Onsite Portal', '', 1, rght, rght + 5 from categories where name = 'Categories'
INSERT INTO categories select (select MAX(id) from categories) + 1, 'Patient', '', (select id from categories where name = 'Onsite Portal'), rght + 1, rght + 2 from categories where name = 'Categories'
INSERT INTO categories select (select MAX(id) from categories) + 1, 'Reviewed', '', (select id from categories where name = 'Onsite Portal'), rght + 3, rght + 4 from categories where name = 'Categories'
UPDATE categories SET rght = rght + 6 WHERE name = 'Categories'
UPDATE categories_seq SET id = (select MAX(id) from categories)
INSERT INTO list_options ( `list_id`, `option_id`, `title`, `seq`, `is_default`, `notes` ) VALUES ('apptstat','^','^ Pending',70,0,'FEFDCF|0')
ALTER TABLE `registry` ADD `aco_spec` varchar(63) NOT NULL default 'encounters|notes'
UPDATE `registry` SET `aco_spec` = 'patients|appt' WHERE directory = 'newpatient'
UPDATE `registry` SET `aco_spec` = 'patients|appt' WHERE directory = 'newGroupEncounter'
UPDATE `registry` SET `aco_spec` = 'encounters|coding' WHERE directory = 'fee_sheet'
UPDATE `registry` SET `aco_spec` = 'encounters|coding' WHERE directory = 'misc_billing_options'
UPDATE `registry` SET `aco_spec` = 'patients|lab' WHERE directory = 'procedure_order'
ALTER TABLE `lbf_data` CHANGE `field_value` `field_value` longtext
ALTER TABLE `issue_types` ADD `aco_spec` varchar(63) NOT NULL default 'patients|med'
ALTER TABLE `categories` ADD `aco_spec` varchar(63) NOT NULL default 'patients|docs'
Skipping section #IfNotColumnType onsite_mail owner varchar(128)
ALTER TABLE `openemr_postcalendar_events` CHANGE `pc_facility` `pc_facility` int(11) NOT NULL DEFAULT '0' COMMENT 'facility id for this event'
ALTER TABLE `form_misc_billing_options` ADD `onset_date` date default NULL
UPDATE `list_options` SET `option_id` = 'DK', `title` = 'Ordering Provider' WHERE `list_id` = 'provider_qualifier_code' AND `option_id` = 'dk'
UPDATE `list_options` SET `option_id` = 'DN', `title` = 'Referring Provider', `is_default` = '1' WHERE `list_id` = 'provider_qualifier_code' AND `option_id` = 'dn'
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`) VALUES ('provider_qualifier_code', 'DQ', 'Supervising Provider', '30', '0')
ALTER TABLE `users` ADD `main_menu_role` VARCHAR(50) NOT NULL DEFAULT 'standard'
ALTER TABLE `openemr_postcalendar_categories` ADD COLUMN `aco_spec` VARCHAR(63) NOT NULL DEFAULT 'encounters|notes'
INSERT INTO list_options (list_id,option_id,title) VALUES ('lists','apps','Apps')
INSERT INTO list_options (list_id,option_id,title,seq,is_default,activity) VALUES ('apps','*OpenEMR','main/main_screen.php',10,1,0)
INSERT INTO list_options (list_id,option_id,title,seq,is_default,activity) VALUES ('apps','Calendar','main/calendar/index.php',20,0,0)
ALTER TABLE `list_options` CHANGE `list_id` `list_id` VARCHAR(100) NOT NULL DEFAULT ''
ALTER TABLE `list_options` CHANGE `option_id` `option_id` VARCHAR(100) NOT NULL DEFAULT ''
ALTER TABLE `layout_options` CHANGE `list_id` `list_id` VARCHAR(100) NOT NULL DEFAULT ''
ALTER TABLE `layout_options` CHANGE `list_backup_id` `list_backup_id` VARCHAR(100) NOT NULL DEFAULT ''
Skipping section #IfNotTable patient_birthday_alert
INSERT INTO `supported_external_dataloads` (`load_type`, `load_source`, `load_release_date`, `load_filename`, `load_checksum`) VALUES('ICD10', 'CMS', '2017-10-01', '2018-ICD-10-PCS-Order-File.zip', '264b342310236f2b3927062d2c72cfe3')
INSERT INTO `supported_external_dataloads` (`load_type`, `load_source`, `load_release_date`, `load_filename`, `load_checksum`) VALUES('ICD10', 'CMS', '2017-10-01', '2018-ICD-10-CM-General-Equivalence-Mappings.zip', '787a025fdcf6e1da1a85be779004f670')
UPDATE `supported_external_dataloads` SET `load_filename`='2018-ICD-10-Code-Descriptions.zip' WHERE `load_filename`='2018-ICD-10-Code-Dedcriptions.zip' AND `load_release_date`='2017-10-01'
INSERT INTO `supported_external_dataloads` (`load_type`, `load_source`, `load_release_date`, `load_filename`, `load_checksum`) VALUES('ICD10', 'CMS', '2017-10-01', '2018-ICD-10-Code-Descriptions.zip', '6f9c77440132e30f565222ca9bb6599c')
INSERT INTO `supported_external_dataloads` (`load_type`, `load_source`, `load_release_date`, `load_filename`, `load_checksum`) VALUES('ICD10', 'CMS', '2017-10-01', '2018-ICD-10-PCS-General-Equivalence-Mappings.zip', 'bb73c80e272da28712887d7979b1cebf')
ALTER TABLE `x12_partners` DROP COLUMN `x12_version`
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `notes`, `activity`) VALUES('page_validation', 'add_edit_event#theform_prov', '/interface/main/calendar/add_edit_event.php?prov=true', 170, '{}', 1)
ALTER TABLE `claims` ADD COLUMN `submitted_claim` TEXT COMMENT 'This claims form claim data'
ALTER TABLE `billing` ADD COLUMN `revenue_code` varchar(6) NOT NULL DEFAULT "" COMMENT 'Item revenue code'
ALTER TABLE `codes` ADD COLUMN `revenue_code` varchar(6) NOT NULL DEFAULT "" COMMENT 'Item revenue code'
ALTER TABLE `users` ADD `weno_prov_id` VARCHAR(15) DEFAULT NULL
ALTER TABLE `prescriptions` ADD `ntx` INT(2) DEFAULT NULL
ALTER TABLE `prescriptions` ADD `rtx` INT(2) DEFAULT NULL
ALTER TABLE `prescriptions` ADD `txDate` DATE NOT NULL
ALTER TABLE `pharmacies` ADD `ncpdp` INT(12) DEFAULT NULL
ALTER TABLE `pharmacies` ADD `npi` INT(12) DEFAULT NULL
INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','PR','Puerto Rico',39,0)
Skipping section #IfNotTable erx_drug_paid
Skipping section #IfNotTable erx_rx_log
Skipping section #IfNotTable erx_narcotics
UPDATE `globals` SET `gl_value`='style_red.css' WHERE `gl_name`='css_header' AND `gl_value`='style_flat_red.css'
UPDATE `globals` SET `gl_value`='style_manila.css' WHERE `gl_name`='css_header' AND `gl_value`='style_tan.css'
UPDATE `globals` SET `gl_value`='style_light.css' WHERE `gl_name`='css_header' AND (`gl_value`='style_babyblu.css' OR `gl_value`='style_metal.css' OR `gl_value`='style_oemr.css' OR `gl_value`='style_purple.css' OR `gl_value`='style_radiant.css' OR `gl_value`='style_sky_blue.css')
UPDATE `user_settings` SET `setting_value`='style_red.css' WHERE `setting_label`='global:css_header' AND `setting_value`='style_flat_red.css'
UPDATE `user_settings` SET `setting_value`='style_manila.css' WHERE `setting_label`='global:css_header' AND `setting_value`='style_tan.css'
UPDATE `user_settings` SET `setting_value`='style_light.css' WHERE `setting_label`='global:css_header' AND (`setting_value`='style_babyblu.css' OR `setting_value`='style_metal.css' OR `setting_value`='style_oemr.css' OR `setting_value`='style_purple.css' OR `setting_value`='style_radiant.css' OR `setting_value`='style_sky_blue.css')
ALTER TABLE `facility` CHANGE `country_code` `country_code` varchar(30) NOT NULL default ''
ALTER TABLE `layout_options` CHANGE `group_name` `group_name` varchar(255) NOT NULL default ''
ALTER TABLE `forms` ADD COLUMN `issue_id` bigint(20) NOT NULL default 0 COMMENT 'references lists.id to identify a case'
ALTER TABLE `forms` ADD COLUMN `provider_id` bigint(20) NOT NULL default 0 COMMENT 'references users.id to identify a provider'
Skipping section #IfNotTable layout_group_properties
Skipping section #ConvertLayoutProperties
ALTER TABLE `openemr_postcalendar_categories` ADD `pc_constant_id` VARCHAR (255) default NULL
UPDATE `openemr_postcalendar_categories` SET pc_constant_id = LOWER(REPLACE (pc_catname,' ', '_'))
ALTER TABLE openemr_postcalendar_categories ADD UNIQUE (`pc_constant_id`)
ALTER TABLE facility ADD facility_taxonomy VARCHAR(15) DEFAULT NULL
Skipping section #IfNotTable medex_icons
Skipping section #IfNotTable medex_outgoing
Skipping section #IfNotTable medex_prefs
Skipping section #IfNotTable medex_recalls
INSERT INTO `background_services` (`name`, `title`, `active`, `running`, `next_run`, `execute_interval`, `function`, `require_once`, `sort_order`) VALUES('MedEx', 'MedEx Messaging Service', 0, 0, '2017-05-09 17:39:10', 0, 'start_MedEx', '/library/MedEx/MedEx_background.php', 100)
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`, `activity`, `subtype`) VALUES('apptstat', 'AVM', 'AVM Confirmed', 110, 0, 0, '', 'F0FFE8|0', '', 0, 0, 1, '')
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`, `activity`, `subtype`) VALUES('apptstat', 'CALL', 'Callback requested', 130, 0, 0, '', 'FFDBE2|5', '', 0, 0, 1, '')
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`, `activity`, `subtype`) VALUES('apptstat', 'SMS', 'SMS Confirmed', 90, 0, 0, '', 'F0FFE8|0', '', 0, 0, 1, '')
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`, `activity`, `subtype`) VALUES('apptstat', 'EMAIL', 'EMAIL Confirmed', 20, 0, 0, '', 'FFEBE3|0', '', 0, 0, 1, '')
ALTER TABLE `log_comment_encrypt` ADD `version` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0 for mycrypt and 1 for openssl'
ALTER TABLE form_misc_billing_options CHANGE `icn_resubmission_number` `icn_resubmission_number` VARCHAR(35) DEFAULT NULL
ALTER TABLE `users` ADD `patient_menu_role` VARCHAR(50) NOT NULL DEFAULT 'standard'
Updating global configuration defaults...
Updating Access Controls...
UPGRADING ACCESS CONTROLS TO VERSION 4:
Checking to ensure all the proper ACL(access control list) are present:
'Administrators' group 'write' ACL is present.
'Physicians' group 'write' ACL is present.
'Clinicians' group 'write' ACL is present.
'Clinicians' group 'addonly' ACL is present.
'Front Office' group 'write' ACL is present.
'Accounting' group 'write' ACL is present.

Adding new objects
The 'Patient Reminders (write,addonly optional)' object in the 'Patients' section has been successfully added.
The 'Clinical Reminders/Alerts (write,addonly optional)' object in the 'Patients' section has been successfully added.
The 'Disclosures (write,addonly optional)' object in the 'Patients' section has been successfully added.
The 'Prescriptions (write,addonly optional)' object in the 'Patients' section has been successfully added.
The 'Amendments (write,addonly optional)' object in the 'Patients' section has been successfully added.
The 'Lab Results (write,addonly optional)' object in the 'Patients' section has been successfully added.

Updating the ACLs(Access Control Lists)
Successfully placed the 'Patient Reminders (write,addonly optional)' object of the 'Patients' section into the 'Physicians' group 'write' ACL.
Successfully placed the 'Clinical Reminders/Alerts (write,addonly optional)' object of the 'Patients' section into the 'Physicians' group 'write' ACL.
Successfully placed the 'Disclosures (write,addonly optional)' object of the 'Patients' section into the 'Physicians' group 'write' ACL.
Successfully placed the 'Prescriptions (write,addonly optional)' object of the 'Patients' section into the 'Physicians' group 'write' ACL.
Successfully placed the 'Amendments (write,addonly optional)' object of the 'Patients' section into the 'Physicians' group 'write' ACL.
Successfully placed the 'Lab Results (write,addonly optional)' object of the 'Patients' section into the 'Physicians' group 'write' ACL.
UPGRADING ACCESS CONTROLS TO VERSION 5:
Checking to ensure all the proper ACL(access control list) are present:
'Administrators' group 'write' ACL is present.

Adding new object sections
The 'Groups' object section has been successfully added.

Adding new objects
The 'Multipledb' object in the 'Administration' section has been successfully added.
The 'View/Add/Update groups' object in the 'Groups' section has been successfully added.
The 'View/Create/Update groups appointment in calendar' object in the 'Groups' section has been successfully added.
The 'Group encounter log' object in the 'Groups' section has been successfully added.
The 'Group detailed log of appointment in patient record' object in the 'Groups' section has been successfully added.
The 'Send message from the permanent group therapist to the personal therapist' object in the 'Groups' section has been successfully added.

Upgrading objects

Adding ACLs(Access Control Lists) and groups

Updating the ACLs(Access Control Lists)
Successfully placed the 'View/Add/Update groups' object of the 'Groups' section into the 'Administrators' group 'write' ACL.
Successfully placed the 'View/Create/Update groups appointment in calendar' object of the 'Groups' section into the 'Administrators' group 'write' ACL.
Successfully placed the 'Group encounter log' object of the 'Groups' section into the 'Administrators' group 'write' ACL.
Successfully placed the 'Group detailed log of appointment in patient record' object of the 'Groups' section into the 'Administrators' group 'write' ACL.
Successfully placed the 'Send message from the permanent group therapist to the personal therapist' object of the 'Groups' section into the 'Administrators' group 'write' ACL.
Successfully placed the 'Multipledb' object of the 'Administration' section into the 'Administrators' group 'write' ACL.
UPGRADING ACCESS CONTROLS TO VERSION 6:
Checking to ensure all the proper ACL(access control list) are present:
'Administrators' group 'write' ACL is present.
'Physicians' group 'write' ACL is present.
'Clinicians' group 'addonly' ACL is present.
'Clinicians' group 'write' ACL is present.
'Front Office' group 'view' ACL is present.
'Front Office' group 'write' ACL is present.
'Accounting' group 'view' ACL is present.
'Emergency Login' group 'write' ACL is present.

Adding new object sections
The 'Menu' object in the 'Administration' section has been successfully added.

Adding new objects

Upgrading objects

Adding ACLs(Access Control Lists) and groups

Updating the ACLs(Access Control Lists)
Successfully placed the 'Menu' object of the 'Administration' section into the 'Administrators' group 'write' ACL.
Successfully placed the 'Authorize - my encounters' object of the 'Encounters' section into the 'Administrators' group 'write' ACL.
Successfully placed the 'Coding - my encounters (write,wsome optional)' object of the 'Encounters' section into the 'Administrators' group 'write' ACL.
Successfully placed the 'Notes - my encounters (write,addonly optional)' object of the 'Encounters' section into the 'Administrators' group 'write' ACL.
Successfully placed the 'Less-private information (write,addonly optional)' object of the 'Encounters' section into the 'Administrators' group 'write' ACL.
Successfully placed the 'Sign Lab Results (write,addonly optional)' object of the 'Patients' section into the 'Administrators' group 'write' ACL.
Successfully placed the 'Patient Reminders (write,addonly optional)' object of the 'Patients' section into the 'Administrators' group 'write' ACL.
Successfully placed the 'Clinical Reminders/Alerts (write,addonly optional)' object of the 'Patients' section into the 'Administrators' group 'write' ACL.
Successfully placed the 'Disclosures (write,addonly optional)' object of the 'Patients' section into the 'Administrators' group 'write' ACL.
Successfully placed the 'Prescriptions (write,addonly optional)' object of the 'Patients' section into the 'Administrators' group 'write' ACL.
Successfully placed the 'Amendments (write,addonly optional)' object of the 'Patients' section into the 'Administrators' group 'write' ACL.
Successfully placed the 'Lab Results (write,addonly optional)' object of the 'Patients' section into the 'Administrators' group 'write' ACL.
Successfully placed the 'Authorize - my encounters' object of the 'Encounters' section into the 'Physicians' group 'write' ACL.
Successfully placed the 'Coding - my encounters (write,wsome optional)' object of the 'Encounters' section into the 'Physicians' group 'write' ACL.
Successfully placed the 'Notes - my encounters (write,addonly optional)' object of the 'Encounters' section into the 'Physicians' group 'write' ACL.
Successfully placed the 'Less-private information (write,addonly optional)' object of the 'Encounters' section into the 'Physicians' group 'write' ACL.
Successfully placed the 'View/Create/Update groups appointment in calendar' object of the 'Groups' section into the 'Physicians' group 'write' ACL.
Successfully placed the 'Group encounter log' object of the 'Groups' section into the 'Physicians' group 'write' ACL.
Successfully placed the 'Transactions (write optional)' object of the 'Patients' section into the 'Clinicians' group 'addonly' ACL.
Successfully placed the 'Patient Reminders (write,addonly optional)' object of the 'Patients' section into the 'Clinicians' group 'addonly' ACL.
Successfully placed the 'Clinical Reminders/Alerts (write,addonly optional)' object of the 'Patients' section into the 'Clinicians' group 'addonly' ACL.
Successfully placed the 'Disclosures (write,addonly optional)' object of the 'Patients' section into the 'Clinicians' group 'addonly' ACL.
Successfully placed the 'Prescriptions (write,addonly optional)' object of the 'Patients' section into the 'Clinicians' group 'addonly' ACL.
Successfully placed the 'Amendments (write,addonly optional)' object of the 'Patients' section into the 'Clinicians' group 'addonly' ACL.
Successfully placed the 'Lab Results (write,addonly optional)' object of the 'Patients' section into the 'Clinicians' group 'addonly' ACL.
Successfully placed the 'View/Create/Update groups appointment in calendar' object of the 'Groups' section into the 'Clinicians' group 'write' ACL.
Successfully placed the 'Group encounter log' object of the 'Groups' section into the 'Clinicians' group 'write' ACL.
Successfully placed the 'Clinical Reminders/Alerts (write,addonly optional)' object of the 'Patients' section into the 'Front Office' group 'view' ACL.
Successfully placed the 'View/Create/Update groups appointment in calendar' object of the 'Groups' section into the 'Front Office' group 'write' ACL.
Successfully placed the 'Clinical Reminders/Alerts (write,addonly optional)' object of the 'Patients' section into the 'Accounting' group 'view' ACL.
Successfully placed the 'Multipledb' object of the 'Administration' section into the 'Emergency Login' group 'write' ACL.
Successfully placed the 'Menu' object of the 'Administration' section into the 'Emergency Login' group 'write' ACL.
Successfully placed the 'Authorize - my encounters' object of the 'Encounters' section into the 'Emergency Login' group 'write' ACL.
Successfully placed the 'Coding - my encounters (write,wsome optional)' object of the 'Encounters' section into the 'Emergency Login' group 'write' ACL.
Successfully placed the 'Notes - my encounters (write,addonly optional)' object of the 'Encounters' section into the 'Emergency Login' group 'write' ACL.
Successfully placed the 'Less-private information (write,addonly optional)' object of the 'Encounters' section into the 'Emergency Login' group 'write' ACL.
Successfully placed the 'Sign Lab Results (write,addonly optional)' object of the 'Patients' section into the 'Emergency Login' group 'write' ACL.
Successfully placed the 'Patient Reminders (write,addonly optional)' object of the 'Patients' section into the 'Emergency Login' group 'write' ACL.
Successfully placed the 'Clinical Reminders/Alerts (write,addonly optional)' object of the 'Patients' section into the 'Emergency Login' group 'write' ACL.
Successfully placed the 'Disclosures (write,addonly optional)' object of the 'Patients' section into the 'Emergency Login' group 'write' ACL.
Successfully placed the 'Prescriptions (write,addonly optional)' object of the 'Patients' section into the 'Emergency Login' group 'write' ACL.
Successfully placed the 'Amendments (write,addonly optional)' object of the 'Patients' section into the 'Emergency Login' group 'write' ACL.
Successfully placed the 'Lab Results (write,addonly optional)' object of the 'Patients' section into the 'Emergency Login' group 'write' ACL.
Successfully placed the 'View/Add/Update groups' object of the 'Groups' section into the 'Emergency Login' group 'write' ACL.
Successfully placed the 'View/Create/Update groups appointment in calendar' object of the 'Groups' section into the 'Emergency Login' group 'write' ACL.
Successfully placed the 'Group encounter log' object of the 'Groups' section into the 'Emergency Login' group 'write' ACL.
Successfully placed the 'Group detailed log of appointment in patient record' object of the 'Groups' section into the 'Emergency Login' group 'write' ACL.
Successfully placed the 'Send message from the permanent group therapist to the personal therapist' object of the 'Groups' section into the 'Emergency Login' group 'write' ACL.
UPGRADING ACCESS CONTROLS TO VERSION 7:
Checking to ensure all the proper ACL(access control list) are present:
'Administrators' group 'write' ACL is present.
'Emergency Login' group 'write' ACL is present.

Adding new object sections
The 'Manage modules' object in the 'Administration' section has been successfully added.

Adding new objects

Upgrading objects

Adding ACLs(Access Control Lists) and groups
Successfully placed the 'Manage modules' object of the 'Administration' section into the 'Administrators' group 'write' ACL.
Successfully placed the 'Manage modules' object of the 'Administration' section into the 'Emergency Login' group 'write' ACL.

Updating the ACLs(Access Control Lists)
UPGRADING ACCESS CONTROLS TO VERSION 8:
Checking to ensure all the proper ACL(access control list) are present:
'Administrators' group 'write' ACL is present.
'Emergency Login' group 'write' ACL is present.

Adding new object sections
The 'Documents Delete' object in the 'Patients' section has been successfully added.

Adding new objects

Upgrading objects

Adding ACLs(Access Control Lists) and groups
Successfully placed the 'Documents Delete' object of the 'Patients' section into the 'Administrators' group 'write' ACL.
Successfully placed the 'Documents Delete' object of the 'Patients' section into the 'Emergency Login' group 'write' ACL.

Updating the ACLs(Access Control Lists)
DONE upgrading access controls
Updating version indicators...

Database and Access Control upgrade finished.

(Mouse55) #7

I manually edited the layout_options table. Log in to mysql and while using the openemr database type the following:

alter table layout_options change group_name group_id varchar(31) not null default ‘’

This appeared to solve the problems but, then again, it’s not clear if I’ve just introduced other problems. I don’t think so, but …


(Craig Tucker) #8

Thanks Mouse55, apparently you noticed the same glitch. So the programmatic solution is to edit /openemr/sql/5_0_0-to-5_0_1_upgrade.sql

I am moving this line outside of the #IfNotTable layout_group_properties statement to after #EndIf:

ALTER TABLE layout_options ADD COLUMN group_id VARCHAR(31) NOT NULL default '' AFTER group_name;

With this all works well on the upgrade.

So, this needs to be changed in the code.


(Stephen Waite) #9

Hi, it looks like this comment
Multiple improvements from IPPF related to layouts. (#1081) · openemr/openemr@db79047 · GitHub
might be confusing the sql_upgrade mechanism?
@sunsetsystems do you think so?

edit: actually if the table was introduced in 5.0.0 it’s not going to execute this section


(Stephen Waite) #10

hi @Craig_Tucker , if you move that outside of the if it woun’t drop the column group_name as was intended or execute the other deletes that are listed there which might be a prob down the road.


(Stephen Waite) #11

think this might work group_id fix 5.0.1 upgrade by stephenwaite · Pull Request #1596 · openemr/openemr · GitHub


(Craig Tucker) #12

That looks good. Thanks.


(Rod Roark) #13

In your upgrade log that you posted I see:

So it appears your layout_group_properties table already exists. That should not be in 5.0.0. Any idea why it’s there?


(Craig Tucker) #14

Yes I see the tables in 5.0.0 in my live system. I have been current with all patches. Perhaps there was a database modification in one of the patches? However the tables are there.


(Rod Roark) #15

That’s odd. I searched the 5.0.0 source for “layout_group_properties” and as expected it’s not there anywhere. It is, of course, in 5.0.1.


(Craig Tucker) #16

I am very sorry. Rod, I appreciate your incredulity. I see what happened. My first attempt to install 5.0.1 on my backup server failed. But the database structure was modified. I restored the old data from my live server to my backup server. So the data was restored but the new structure remained. So, I thought I was looking at a restored 5.0.0 database, in fact, it was just the old data in the new structure that said it was 5.0.0. Sorry for wasting everyone’s time on this. Nevertheless, it is working now.


"Unknown column" error after 5.0.0 to 5.0.1 dual upgrade
(Rod Roark) #17

No problem, I’m glad you figured it out!


#18

Hi,

I am using OpenEMR V5.0.0 with an old XAMPP Control Panel v3.2.1. When I’ve upgraded to OpenEMR V5.0.1, and ran sql_upgrade.php, I’ve received a message “PHP version needs to be at least 5.6.0.”

Then I tried the Dual Upgrade (https://www.open-emr.org/wiki/index.php/Dual_Upgrade_of_OpenEMR_and_XAMPP_in_Windows). Everything went smoothly until I started OpenEMR and found the exact error posted here.

Does anyone have any suggestion what I can try next? I’m afraid to modify the 5_0_0-to-5_0_1_upgrade.sql because of potential problems down the road like someone has suggested above.

Thank you.


(Stephen Waite) #19

hi @2017, have you tried re-running the sql_upgrade.php?

i think when it aborted the first time it left the database in such a way that sql_upgrade won’t fix this error so you should try restoring from your most recent 5.0.0 backup file which would replace the current openemr database and run sql_upgrade


#20

Thank you for your help.

I think the problem with my OpenEMR was that my XAMPP version was too old. Therefore there were many reasons that did not allow the upgrade to go smoothly.

I’ve just solved the problem and my OpenEMR is running with the current 5.0.1.

Here is what I’ve done:

  1. I wanted to upgrade XAMPP to have the most recent version by doing a dual upgrade using the OpenEMR package version 5.0.0 (which is the same version that I had. This was the key to go forward). This was done without updating the sql database since OpenEMR were the same version.

  2. Then I did an upgrade of the current OpenEMR 5.0.1

These steps made my OpenEMR up to date now. I am testing all the functions to see if anything still not functioning correctly. So far I don’t see any glitch yet! I’ll keep my fingers cross.

Hope this will help someone out there with similar upgrade problem!