Upgrading OpenEMR

ideaman911 wrote on Sunday, May 31, 2009:

Dr Bowen;

Since you have the external GACL just as I did, and were upgrading both MySQL version as well as OpenEMR version, did you checkout my upgrade instructions?  They show how to upgrade each after doing a basic 3.0.1 New Install.  I do not believe there would be any real difference except the number of generations of upgrade to your OpenEMR data, nor that it would be different in Linux vs Windows, except for the Xampp stuff.

My process, in short, was to create a new install using your Windows loader.  You MUST login as admin - pass to that, then logout to set the gacl "key" for that before you try to roll your prior data in.

You then use the sql-upgrade and the MySQL version upgrade, then the gacl preface tool and move those to the …data/openemr/ data table location, along with copies of your real tables in the latest format.

That should allow you then to have all your prior authorities.  If you want to rebuild your users and authorities, you would simply leave out the GACL move, and create them new once you had access to the data.

Let me know how you make out.  Thanks again for YOUR help.

Joe Holzer    Idea Man
http://www.holzerent.com

drbowen wrote on Sunday, May 31, 2009:

/var/log/apache2/error_log:

[Sun May 31 16:51:47 2009] [error] [client 192.168.1.101] PHP Warning:  mysql_pconnect() [<a href=‘function.mysql-pconnect’>function.mysql-pconnect</a>]: Link to server lost, unable to reconnect in /var/www/localhost/htdocs/openemr/library/adodb/drivers/adodb-mysql.inc.php on line 335, referer: http://leia/openemr/interface/main/left_nav.php

[Sun May 31 16:51:47 2009] [error] [client 192.168.1.101] PHP Warning:  mysql_error(): supplied argument is not a valid MySQL-Link resource in /var/www/localhost/htdocs/openemr/library/sql.inc on line 20, referer: http://leia/openemr/interface/main/left_nav.php

tail /var/log/mysql/mysqld.err

empty

tail /var/log/php.err

empty

Sam Bowen, MD

bradymiller wrote on Sunday, May 31, 2009:

hey,

These things in your log make me think your trying to install php-gacl into a UTF-8 database (UTF-8 takes up 4 times as much space and will cause errors if you try to install some php-gacl tables into UTF-8 secondary to the large key sizes):
1071: Specified key was too long; max key length is 1000 bytes

Not sure why you have such an old openemr version using a UTF-8 database (perhaps you created a openemr UTF-8 database when you originally created it???).

Rod’s cleaned up the php-gacl database to work with UTF-8 (just shortened the pertinent fields). Substitute this file for your current file at openemr/gacl/schema.xml and do the upgrade again. Then should then work fine when your run openemr/gacl/setup.php :
http://openemr.cvs.sourceforge.net/viewvc/openemr/openemr/gacl/schema.xml?revision=1.2

-brady

drbowen wrote on Sunday, May 31, 2009:

Dear Joe,

The external phpGACL that I was using was a very early version and then I modified it to match our practice style.  So my prior version of phpGACL would be difficult to fix and preclude me from having a more "standard" version.  Way up at the top of this thread Brady commented that it would be easier to drop the external phpGACL and re-install the internal version from scratch.

I have already executed the sql_upgrade.php on the openemr-2.8.2 database and upgraded it to openemr-3.0.1.

Using the newly installed web page openemr-3.0.1, trying to log in using admin:pass the login fails.  All logins fail.  This appears to be primarily because I don’t have the gacl installed.  The problem is now the gacl won’t install completely and crashes partway through the gacl install.

Sam Bowen, MD

drbowen wrote on Sunday, May 31, 2009:

These are the current database tables:

Execute openemr/gacl/setup.php
05-31-2009 18:00
database openemr-2.8.2 → openemr-3.0.1
after openemr/setup.php
and openemr-3.0.1 web page

gacl_acl.MYD

gacl_acl_sections.MYD

gacl_aco.MYD

gacl_aco_sections.MYD

gacl_aco_sections_seq.MYD

gacl_aro.MYD

gacl_aro_groups.MYD

gacl_aro_groups_map.MYD

gacl_aro_sections.MYD

gacl_axo.MYD

gacl_axo_groups.MYD

gacl_axo_groups_map.MYD

gacl_axo_sections.MYD

gacl_groups_aro_map.MYD

gacl_groups_axo_map.MYD

gacl_phpgacl.MYD

drbowen wrote on Sunday, May 31, 2009:

I found this "bug report":

http://bugs.mysql.com/bug.php?id=6604

This appears to associated with mysql default character set UTF-8 as you have suggested above.

Why am I running UTF-8?  I set this up every time I do a new Gentoo install.  It always asks what you want to run as the default character set.  I thought I would need UTF-8 for all the translation effort we have been doing.  I have been running UTF-8 for more years than I can guess at right now.

[quote]
Rod’s cleaned up the php-gacl database to work with UTF-8 (just shortened the pertinent fields). Substitute this file for your current file at openemr/gacl/schema.xml and do the upgrade again. Then should then work fine when your run openemr/gacl/setup.php :
http://openemr.cvs.sourceforge.net/viewvc/openemr/openemr/gacl/schema.xml?revision=1.2
[/quote]

I will give it a try and report back.

Sam Bowen, MD

drbowen wrote on Sunday, May 31, 2009:

Success! First Step of Access Control Installation Successful!!!

Whoo! Whoo!

I’ll keep on plugging and let you know.

Thanks, Brady.

Sam

drbowen wrote on Sunday, May 31, 2009:

OpenEMR ACL Setup
All done configuring and installing access controls (php-GACL)!

This is from the first admin: pass login:

[output]
ERROR: query failed: select id, password, authorized, see_auth, cal_ui, active from users where username = ‘admin’

Error: Unknown column ‘cal_ui’ in ‘field list’
[/output]

Sam Bowen, MD

drbowen wrote on Sunday, May 31, 2009:

I added the following SQL statement:

ALTER TABLE `users`
  ADD COLUMN `cal_ui` tinyint(4) NOT NULL DEFAULT 1 COMMENT ‘Specifies calendar display style’;

After this I can log in as admin.

Just checking around:

ERROR: query failed: SELECT * FROM layout_options WHERE form_id = ‘DEM’ ORDER BY group_name, seq

Error: Table ‘openemr.layout_options’ doesn’t exist

Can I run the openemr/sql-upgrade.php  again?

I am wondering if i had some of the SQL statements fail in the earlier steps?  (sql_upgrade.php)  It ended with no errors and inserted "733" statements?

Or should i just keep plugging fixing the tables/statements one at a time?

Sam Bowen, MD

bradymiller wrote on Monday, June 01, 2009:

geez,
Friggin painful for you. Considering your missing tables and columns, must be problems during the sql upgrade script. Just wondering, why is it looking for table “openemr.layout_options”? Shouldn’t it just be “layout_options”. I’d make sure your not looking for tables with openemr prefix. (I could be wrong here, maybe that’s just the way your output is, ie databaseName.Table).

If it’s not a prefix issues I’d wait for Rod’s input, he’s much better with the mysql stuff, especially in regards to upgrading pitfalls from previous versions (especially the dev versions).
-brady

drbowen wrote on Monday, June 01, 2009:

openemr. layout_options  is just the formal schema name of "layout_options".  It is just looking for "layout_options".

I’ve already found the “layout_options” statements and inserted them from the mysql client.  So that part is fixed.  I am looking through the rest of the fields trying to find missing tables.  I think the “list” options box / table is empty.

Using the tree view: http://leia/openemr/interface/main/left_nav.php  There is a "lists" drop down box but this seems to be empty?  Do you know what populates this drop down box?

Sam Bowen, MD

sunsetsystems wrote on Monday, June 01, 2009:

Sam, it looks like sql/2_8_3-to-2_9_0_upgrade.sql was either not run, or failed, when you ran sql_upgrade.php.  You should go through that script, comparing with your database, to see what part of it, if any, was done.  There’s a lot of stuff in there and it would be very painful to find it all by trial and error.

Rod
www.sunsetsystems.com

drbowen wrote on Tuesday, June 02, 2009:

I think I need to go back to trying to upgrade one version at a time.  It is more cumbersome but also easier to debug.

Would it help you guys if a I keep a log of what is missing?

Sam Bowen, MD

bradymiller wrote on Tuesday, June 02, 2009:

hey,
What I’d like to see is the output you get during the sql-upgrade.php script. I haven’t heard any problems as severe as yours where it seems that a huge chunk of it simply didn’t work. Is there a way you could do this again and paste the output here. This script should of worked (famous last words), and you should be floating in 3.0 as we speak…
-brady

drbowen wrote on Monday, June 22, 2009:

I finally got the upgrade to OpenEMR 3.0.1 successfully completed.

There are issues with the appearance of the GUI interface on Windows and I am still trying to adjust the permissions for the users.

Here are the SQL statements that got left out in the previous upgrade.php script:

#This is what is missing from 2.8.2 – 2.8.3

ALTER TABLE form_vitals
  MODIFY `weight` FLOAT(5,2) default 0,
  MODIFY `height` FLOAT(5,2) default 0,
  MODIFY `BMI`    FLOAT(4,1) default 0;

CREATE TABLE IF NOT EXISTS `form_misc_billing_options` (
  id                          bigint(20)   NOT NULL auto_increment,
  date                        datetime     default NULL,
  pid                         bigint(20)   default NULL,
  user                        varchar(255) default NULL,
  groupname                   varchar(255) default NULL,
  authorized                  tinyint(4)   default NULL,
  activity                    tinyint(4)   default NULL,
  employment_related          tinyint(1)   default NULL,
  auto_accident               tinyint(1)   default NULL,
  accident_state              varchar(2)   default NULL,
  other_accident              tinyint(1)   default NULL,
  outside_lab                 tinyint(1)   default NULL,
  lab_amount                  decimal(5,2) default NULL,
  is_unable_to_work           tinyint(1)   default NULL,
  off_work_from               date         default NULL,
  off_work_to                 date         default NULL,
  is_hospitalized             tinyint(1)   default NULL,
  hospitalization_date_from   date         default NULL,
  hospitalization_date_to     date         default NULL,
  medicaid_resubmission_code  varchar(10)  default NULL,
  medicaid_original_reference varchar(15)  default NULL,
  prior_auth_number           varchar(20)  default NULL,
  comments                    varchar(255) default NULL,
  PRIMARY KEY (id)
) TYPE=MyISAM;

INSERT IGNORE INTO claims (
  patient_id, encounter_id, bill_time, payer_id,
  status, payer_type,
  bill_process, process_time, process_file, target,
  x12_partner_id )
  SELECT DISTINCT
  b.pid, b.encounter, b.bill_date, b.payer_id,
  b.billed * 2 + 1, FIND_IN_SET(i.type, ‘primary,secondary,tertiary’),
  b.bill_process, b.process_date, b.process_file, b.target,
  b.x12_partner_id
  FROM billing AS b
  LEFT OUTER JOIN insurance_data AS i ON i.pid = b.pid AND i.provider = b.payer_id
  WHERE b.activity > 0 AND b.encounter > 0 AND b.code_type != ‘ICD9’ AND b.payer_id > 0;

UPDATE form_encounter, facility
  SET form_encounter.facility_id = facility.id WHERE
  facility.name = form_encounter.facility;
UPDATE users, facility
  SET users.facility_id = facility.id WHERE
  facility.name = users.facility;

# This is what is missing from 2.8.3 → 2.9.0

INSERT INTO prices ( pr_id, pr_level, pr_price )
  SELECT codes.id, ‘standard’, codes.fee FROM codes
  WHERE codes.fee IS NOT NULL AND codes.fee > 0;

UPDATE drug_sales
  SET billed = 1 WHERE encounter > 0;

CREATE TABLE fee_sheet_options (
  fs_category varchar(63)  NOT NULL DEFAULT ‘’ COMMENT ‘Descriptive category name’,
  fs_option   varchar(63)  NOT NULL DEFAULT ‘’ COMMENT ‘Descriptive option name’,
  fs_codes    varchar(255) NOT NULL DEFAULT ‘’ COMMENT ‘multiple instances of type:id:selector;’
) TYPE=MyISAM;
INSERT INTO fee_sheet_options VALUES (‘1New Patient’,‘1Brief’  ,‘CPT4|99201|’);
INSERT INTO fee_sheet_options VALUES (‘1New Patient’,‘2Limited’,‘CPT4|99202|’);
INSERT INTO fee_sheet_options VALUES (‘1New Patient’,‘3Detailed’,‘CPT4|99203|’);
INSERT INTO fee_sheet_options VALUES (‘1New Patient’,‘4Extended’,‘CPT4|99204|’);
INSERT INTO fee_sheet_options VALUES (‘1New Patient’,‘5Comprehensive’,‘CPT4|99205|’);
INSERT INTO fee_sheet_options VALUES (‘2Established Patient’,‘1Brief’  ,‘CPT4|99211|’);
INSERT INTO fee_sheet_options VALUES (‘2Established Patient’,‘2Limited’,‘CPT4|99212|’);
INSERT INTO fee_sheet_options VALUES (‘2Established Patient’,‘3Detailed’,‘CPT4|99213|’);
INSERT INTO fee_sheet_options VALUES (‘2Established Patient’,‘4Extended’,‘CPT4|99214|’);
INSERT INTO fee_sheet_options VALUES (‘2Established Patient’,‘5Comprehensive’,‘CPT4|99215|’);

ALTER TABLE billing
  MODIFY `justify` varchar(255) NOT NULL DEFAULT ‘’;

ALTER TABLE prescriptions
  MODIFY `quantity` varchar(31) default ‘’;

ALTER TABLE codes
  MODIFY `superbill` varchar(31) default ‘’;

UPDATE history_data SET exams = CONCAT(exams, ‘|brs:1:’, last_breast_exam              ) WHERE SUBSTRING(last_exam_results, 1, 1) = ‘1’;
UPDATE history_data SET exams = CONCAT(exams, ‘|brs:2:’, last_breast_exam              ) WHERE SUBSTRING(last_exam_results, 1, 1) = ‘2’;
UPDATE history_data SET exams = CONCAT(exams, ‘|mam:1:’, last_mammogram                ) WHERE SUBSTRING(last_exam_results, 2, 1) = ‘1’;
UPDATE history_data SET exams = CONCAT(exams, ‘|mam:2:’, last_mammogram                ) WHERE SUBSTRING(last_exam_results, 2, 1) = ‘2’;
UPDATE history_data SET exams = CONCAT(exams, ‘|gyn:1:’, last_gynocological_exam       ) WHERE SUBSTRING(last_exam_results, 3, 1) = ‘1’;
UPDATE history_data SET exams = CONCAT(exams, ‘|gyn:2:’, last_gynocological_exam       ) WHERE SUBSTRING(last_exam_results, 3, 1) = ‘2’;
UPDATE history_data SET exams = CONCAT(exams, ‘|rec:1:’, last_rectal_exam              ) WHERE SUBSTRING(last_exam_results, 4, 1) = ‘1’;
UPDATE history_data SET exams = CONCAT(exams, ‘|rec:2:’, last_rectal_exam              ) WHERE SUBSTRING(last_exam_results, 4, 1) = ‘2’;
UPDATE history_data SET exams = CONCAT(exams, ‘|pro:1:’, last_prostate_exam            ) WHERE SUBSTRING(last_exam_results, 5, 1) = ‘1’;
UPDATE history_data SET exams = CONCAT(exams, ‘|pro:2:’, last_prostate_exam            ) WHERE SUBSTRING(last_exam_results, 5, 1) = ‘2’;
UPDATE history_data SET exams = CONCAT(exams, ‘|phy:1:’, last_physical_exam            ) WHERE SUBSTRING(last_exam_results, 6, 1) = ‘1’;
UPDATE history_data SET exams = CONCAT(exams, ‘|phy:2:’, last_physical_exam            ) WHERE SUBSTRING(last_exam_results, 6, 1) = ‘2’;
UPDATE history_data SET exams = CONCAT(exams, ‘|sic:1:’, last_sigmoidoscopy_colonoscopy) WHERE SUBSTRING(last_exam_results, 7, 1) = ‘1’;
UPDATE history_data SET exams = CONCAT(exams, ‘|sic:2:’, last_sigmoidoscopy_colonoscopy) WHERE SUBSTRING(last_exam_results, 7, 1) = ‘2’;
UPDATE history_data SET exams = CONCAT(exams, ‘|ecg:1:’, last_ecg                      ) WHERE SUBSTRING(last_exam_results, 8, 1) = ‘1’;
UPDATE history_data SET exams = CONCAT(exams, ‘|ecg:2:’, last_ecg                      ) WHERE SUBSTRING(last_exam_results, 8, 1) = ‘2’;
UPDATE history_data SET exams = CONCAT(exams, ‘|cec:1:’, last_cardiac_echo             ) WHERE SUBSTRING(last_exam_results, 9, 1) = ‘1’;
UPDATE history_data SET exams = CONCAT(exams, ‘|cec:2:’, last_cardiac_echo             ) WHERE SUBSTRING(last_exam_results, 9, 1) = ‘2’;
UPDATE history_data SET exams = CONCAT(exams, ‘|ret:1:’, last_retinal                  ) WHERE SUBSTRING(last_exam_results,10, 1) = ‘1’;
UPDATE history_data SET exams = CONCAT(exams, ‘|ret:2:’, last_retinal                  ) WHERE SUBSTRING(last_exam_results,10, 1) = ‘2’;
UPDATE history_data SET exams = CONCAT(exams, ‘|flu:1:’, last_fluvax                   ) WHERE SUBSTRING(last_exam_results,11, 1) = ‘1’;
UPDATE history_data SET exams = CONCAT(exams, ‘|flu:2:’, last_fluvax                   ) WHERE SUBSTRING(last_exam_results,11, 1) = ‘2’;
UPDATE history_data SET exams = CONCAT(exams, ‘|pne:1:’, last_pneuvax                  ) WHERE SUBSTRING(last_exam_results,12, 1) = ‘1’;
UPDATE history_data SET exams = CONCAT(exams, ‘|pne:2:’, last_pneuvax                  ) WHERE SUBSTRING(last_exam_results,12, 1) = ‘2’;
UPDATE history_data SET exams = CONCAT(exams, ‘|ldl:1:’, last_ldl                      ) WHERE SUBSTRING(last_exam_results,13, 1) = ‘1’;
UPDATE history_data SET exams = CONCAT(exams, ‘|ldl:2:’, last_ldl                      ) WHERE SUBSTRING(last_exam_results,13, 1) = ‘2’;
UPDATE history_data SET exams = CONCAT(exams, ‘|hem:1:’, last_hemoglobin               ) WHERE SUBSTRING(last_exam_results,14, 1) = ‘1’;
UPDATE history_data SET exams = CONCAT(exams, ‘|hem:2:’, last_hemoglobin               ) WHERE SUBSTRING(last_exam_results,14, 1) = ‘2’;
UPDATE history_data SET exams = CONCAT(exams, ‘|psa:1:’, last_psa                      ) WHERE SUBSTRING(last_exam_results,15, 1) = ‘1’;
UPDATE history_data SET exams = CONCAT(exams, ‘|psa:2:’, last_psa                      ) WHERE SUBSTRING(last_exam_results,15, 1) = ‘2’;

DELETE FROM layout_options WHERE form_id = ‘HIS’ AND group_name = ‘1General’;

INSERT INTO layout_options VALUES (‘HIS’,‘usertext11’,‘1General’,‘Risk Factors’,1,21,1,0,0,‘riskfactors’,1,1,’’,’’ ,‘Risk Factors’);
INSERT INTO layout_options VALUES (‘HIS’,‘exams’     ,‘1General’,‘Exams/Tests’ ,2,23,1,0,0,‘exams’      ,1,1,’’,’’ ,‘Exam and test results’);

DELETE FROM layout_options WHERE form_id = ‘HIS’ AND group_name = ‘2Family History’;

INSERT INTO layout_options VALUES (‘HIS’,‘history_father’   ,‘2Family History’,‘Father’   ,1, 2,1,20,255,’’,1,1,’’,’’ ,’’);
INSERT INTO layout_options VALUES (‘HIS’,‘history_mother’   ,‘2Family History’,‘Mother’   ,2, 2,1,20,255,’’,1,1,’’,’’ ,’’);
INSERT INTO layout_options VALUES (‘HIS’,‘history_siblings’ ,‘2Family History’,‘Siblings’ ,3, 2,1,20,255,’’,1,1,’’,’’ ,’’);
INSERT INTO layout_options VALUES (‘HIS’,‘history_spouse’   ,‘2Family History’,‘Spouse’   ,4, 2,1,20,255,’’,1,1,’’,’’ ,’’);
INSERT INTO layout_options VALUES (‘HIS’,‘history_offspring’,‘2Family History’,‘Offspring’,5, 2,1,20,255,’’,1,3,’’,’’ ,’’);

DELETE FROM layout_options WHERE form_id = ‘HIS’ AND group_name = ‘3Relatives’;
INSERT INTO layout_options VALUES (‘HIS’,‘relatives_cancer’             ,‘3Relatives’,‘Cancer’             ,1, 2,1,20,255,’’,1,1,’’,’’ ,’’);
INSERT INTO layout_options VALUES (‘HIS’,‘relatives_tuberculosis’       ,‘3Relatives’,‘Tuberculosis’       ,2, 2,1,20,255,’’,1,1,’’,’’ ,’’);
INSERT INTO layout_options VALUES (‘HIS’,‘relatives_diabetes’           ,‘3Relatives’,‘Diabetes’           ,3, 2,1,20,255,’’,1,1,’’,’’ ,’’);
INSERT INTO layout_options VALUES (‘HIS’,‘relatives_high_blood_pressure’,‘3Relatives’,‘High Blood Pressure’,4, 2,1,20,255,’’,1,1,’’,’’ ,’’);
INSERT INTO layout_options VALUES (‘HIS’,‘relatives_heart_problems’     ,‘3Relatives’,‘Heart Problems’     ,5, 2,1,20,255,’’,1,1,’’,’’ ,’’);
INSERT INTO layout_options VALUES (‘HIS’,‘relatives_stroke’             ,‘3Relatives’,‘Stroke’             ,6, 2,1,20,255,’’,1,1,’’,’’ ,’’);
INSERT INTO layout_options VALUES (‘HIS’,‘relatives_epilepsy’           ,‘3Relatives’,‘Epilepsy’           ,7, 2,1,20,255,’’,1,1,’’,’’ ,’’);
INSERT INTO layout_options VALUES (‘HIS’,‘relatives_mental_illness’     ,‘3Relatives’,‘Mental Illness’     ,8, 2,1,20,255,’’,1,1,’’,’’ ,’’);
INSERT INTO layout_options VALUES (‘HIS’,‘relatives_suicide’            ,‘3Relatives’,‘Suicide’            ,9, 2,1,20,255,’’,1,3,’’,’’ ,’’);

DELETE FROM layout_options WHERE form_id = ‘HIS’ AND group_name = ‘4Lifestyle’;
INSERT INTO layout_options VALUES (‘HIS’,‘coffee’              ,‘4Lifestyle’,‘Coffee’              ,1, 2,1,20,255,’’,1,1,’’,’’ ,‘Caffeine consumption’);
INSERT INTO layout_options VALUES (‘HIS’,‘tobacco’             ,‘4Lifestyle’,‘Tobacco’             ,2, 2,1,20,255,’’,1,1,’’,’’ ,‘Tobacco use’);
INSERT INTO layout_options VALUES (‘HIS’,‘alcohol’             ,‘4Lifestyle’,‘Alcohol’             ,3, 2,1,20,255,’’,1,1,’’,’’ ,‘Alcohol consumption’);
INSERT INTO layout_options VALUES (‘HIS’,‘sleep_patterns’      ,‘4Lifestyle’,‘Sleep Patterns’      ,4, 2,1,20,255,’’,1,1,’’,’’ ,‘Sleep patterns’);
INSERT INTO layout_options VALUES (‘HIS’,‘exercise_patterns’   ,‘4Lifestyle’,‘Exercise Patterns’   ,5, 2,1,20,255,’’,1,1,’’,’’ ,‘Exercise patterns’);
INSERT INTO layout_options VALUES (‘HIS’,‘seatbelt_use’        ,‘4Lifestyle’,‘Seatbelt Use’        ,6, 2,1,20,255,’’,1,1,’’,’’ ,‘Seatbelt use’);
INSERT INTO layout_options VALUES (‘HIS’,‘counseling’          ,‘4Lifestyle’,‘Counseling’          ,7, 2,1,20,255,’’,1,1,’’,’’ ,‘Counseling activities’);
INSERT INTO layout_options VALUES (‘HIS’,‘hazardous_activities’,‘4Lifestyle’,‘Hazardous Activities’,8, 2,1,20,255,’’,1,1,’’,’’ ,‘Hazardous activities’);

DELETE FROM layout_options WHERE form_id = ‘HIS’ AND group_name = ‘5Other’;
INSERT INTO layout_options VALUES (‘HIS’,‘name_1’            ,‘5Other’,‘Name/Value’        ,1, 2,1,10,255,’’,1,1,’’,’’ ,‘Name 1’ );
INSERT INTO layout_options VALUES (‘HIS’,‘value_1’           ,‘5Other’,’’                  ,2, 2,1,10,255,’’,0,0,’’,’’ ,‘Value 1’);
INSERT INTO layout_options VALUES (‘HIS’,‘name_2’            ,‘5Other’,‘Name/Value’        ,3, 2,1,10,255,’’,1,1,’’,’’ ,‘Name 2’ );
INSERT INTO layout_options VALUES (‘HIS’,‘value_2’           ,‘5Other’,’’                  ,4, 2,1,10,255,’’,0,0,’’,’’ ,‘Value 2’);
INSERT INTO layout_options VALUES (‘HIS’,‘additional_history’,‘5Other’,‘Additional History’,5, 3,1,30,  3,’’,1,3,’’ ,’’ ,‘Additional history notes’);

DELETE FROM list_options WHERE list_id = ‘riskfactors’;
INSERT INTO list_options VALUES (‘riskfactors’,‘vv’ ,‘Varicose Veins’                      , 1,0,0);
INSERT INTO list_options VALUES (‘riskfactors’,‘ht’ ,‘Hypertension’                        , 2,0,0);
INSERT INTO list_options VALUES (‘riskfactors’,‘db’ ,‘Diabetes’                            , 3,0,0);
INSERT INTO list_options VALUES (‘riskfactors’,‘sc’ ,‘Sickle Cell’                         , 4,0,0);
INSERT INTO list_options VALUES (‘riskfactors’,‘fib’,‘Fibroids’                            , 5,0,0);
INSERT INTO list_options VALUES (‘riskfactors’,‘pid’,‘PID (Pelvic Inflammatory Disease)’   , 6,0,0);
INSERT INTO list_options VALUES (‘riskfactors’,‘mig’,‘Severe Migraine’                     , 7,0,0);
INSERT INTO list_options VALUES (‘riskfactors’,‘hd’ ,‘Heart Disease’                       , 8,0,0);
INSERT INTO list_options VALUES (‘riskfactors’,‘str’,‘Thrombosis/Stroke’                   , 9,0,0);
INSERT INTO list_options VALUES (‘riskfactors’,‘hep’,‘Hepatitis’                           ,10,0,0);
INSERT INTO list_options VALUES (‘riskfactors’,‘gb’ ,‘Gall Bladder Condition’              ,11,0,0);
INSERT INTO list_options VALUES (‘riskfactors’,‘br’ ,‘Breast Disease’                      ,12,0,0);
INSERT INTO list_options VALUES (‘riskfactors’,‘dpr’,‘Depression’                          ,13,0,0);
INSERT INTO list_options VALUES (‘riskfactors’,‘all’,‘Allergies’                           ,14,0,0);
INSERT INTO list_options VALUES (‘riskfactors’,‘inf’,‘Infertility’                         ,15,0,0);
INSERT INTO list_options VALUES (‘riskfactors’,‘ast’,‘Asthma’                              ,16,0,0);
INSERT INTO list_options VALUES (‘riskfactors’,‘ep’ ,‘Epilepsy’                            ,17,0,0);
INSERT INTO list_options VALUES (‘riskfactors’,‘cl’ ,‘Contact Lenses’                      ,18,0,0);
INSERT INTO list_options VALUES (‘riskfactors’,‘coc’,‘Contraceptive Complication (specify)’,19,0,0);
INSERT INTO list_options VALUES (‘riskfactors’,‘oth’,‘Other (specify)’                     ,20,0,0);

DELETE FROM list_options WHERE list_id = ‘exams’;
INSERT INTO list_options VALUES (‘exams’ ,‘brs’,‘Breast Exam’          , 1,0,0);
INSERT INTO list_options VALUES (‘exams’ ,‘cec’,‘Cardiac Echo’         , 2,0,0);
INSERT INTO list_options VALUES (‘exams’ ,‘ecg’,‘ECG’                  , 3,0,0);
INSERT INTO list_options VALUES (‘exams’ ,‘gyn’,‘Gynecological Exam’   , 4,0,0);
INSERT INTO list_options VALUES (‘exams’ ,‘mam’,‘Mammogram’            , 5,0,0);
INSERT INTO list_options VALUES (‘exams’ ,‘phy’,‘Physical Exam’        , 6,0,0);
INSERT INTO list_options VALUES (‘exams’ ,‘pro’,‘Prostate Exam’        , 7,0,0);
INSERT INTO list_options VALUES (‘exams’ ,‘rec’,‘Rectal Exam’          , 8,0,0);
INSERT INTO list_options VALUES (‘exams’ ,‘sic’,‘Sigmoid/Colonoscopy’  , 9,0,0);
INSERT INTO list_options VALUES (‘exams’ ,‘ret’,‘Retinal Exam’         ,10,0,0);
INSERT INTO list_options VALUES (‘exams’ ,‘flu’,‘Flu Vaccination’      ,11,0,0);
INSERT INTO list_options VALUES (‘exams’ ,‘pne’,‘Pneumonia Vaccination’,12,0,0);
INSERT INTO list_options VALUES (‘exams’ ,‘ldl’,‘LDL’                  ,13,0,0);
INSERT INTO list_options VALUES (‘exams’ ,‘hem’,‘Hemoglobin’           ,14,0,0);
INSERT INTO list_options VALUES (‘exams’ ,‘psa’,‘PSA’                  ,15,0,0);

DELETE FROM list_options WHERE list_id = ‘lists’;
INSERT INTO list_options VALUES (‘lists’ ,‘boolean’    ,‘Boolean’            , 1,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘country’    ,‘Country’            , 2,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘feesheet’   ,‘Fee Sheet’          , 3,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘language’   ,‘Language’           , 4,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘marital’    ,‘Marital Status’     , 5,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘pricelevel’ ,‘Price Level’        , 6,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘ethrace’    ,‘Race/Ethnicity’     , 7,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘refsource’  ,‘Referral Source’    , 8,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘risklevel’  ,‘Risk Level’         , 9,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘superbill’  ,‘Service Category’   ,10,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘sex’        ,‘Sex’                ,11,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘taxrate’    ,‘Tax Rate’           ,13,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘titles’     ,‘Titles’             ,14,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘yesno’      ,‘Yes/No’             ,15,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘userlist1’  ,‘User Defined List 1’,16,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘userlist2’  ,‘User Defined List 2’,17,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘userlist3’  ,‘User Defined List 3’,18,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘userlist4’  ,‘User Defined List 4’,19,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘userlist5’  ,‘User Defined List 5’,20,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘userlist6’  ,‘User Defined List 6’,21,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘userlist7’  ,‘User Defined List 7’,22,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘riskfactors’,‘Risk Factors’       ,23,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘exams’      ,‘Exams/Tests’        ,24,0,0);

INSERT INTO list_options VALUES (‘lists’ ,‘drug_form’    ,‘Drug Forms’    ,24,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘drug_units’   ,‘Drug Units’    ,25,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘drug_route’   ,‘Drug Routes’   ,26,0,0);
INSERT INTO list_options VALUES (‘lists’ ,‘drug_interval’,‘Drug Intervals’,27,0,0);

INSERT INTO list_options VALUES (‘lists’ ,‘state’,‘State’,12,0,0);
UPDATE layout_options SET data_type = 1, list_id = ‘state’ WHERE form_id = ‘DEM’ AND field_id = ‘state’;

ALTER TABLE billing
  MODIFY `fee` decimal(12,2) NOT NULL DEFAULT 0.00;
ALTER TABLE codes
  MODIFY `fee` decimal(12,2) NOT NULL DEFAULT 0.00;
ALTER TABLE drug_sales
  MODIFY `fee` decimal(12,2) NOT NULL DEFAULT 0.00;
ALTER TABLE payments
  MODIFY `amount1` decimal(12,2) NOT NULL DEFAULT 0.00,
  MODIFY `amount2` decimal(12,2) NOT NULL DEFAULT 0.00,
  MODIFY `posted1` decimal(12,2) NOT NULL DEFAULT 0.00,
  MODIFY `posted2` decimal(12,2) NOT NULL DEFAULT 0.00;

INSERT INTO layout_options VALUES (‘HIS’,‘userarea11’,‘5Other’,‘User Defined Area 11’,6,3,0,30,3,’’,1,3,’’,’’,‘User Defined’);
INSERT INTO layout_options VALUES (‘HIS’,‘userarea12’,‘5Other’,‘User Defined Area 12’,7,3,0,30,3,’’,1,3,’’,’’,‘User Defined’);

#These are the codes left out of 2.9.0 → 3.0.1

INSERT INTO list_options VALUES (‘lists’   ,‘chartloc’,‘Chart Storage Locations’,1,0,0);

update layout_options set group_name = concat(‘1’, substring(group_name, 2)) where group_name like ‘a%’;
update layout_options set group_name = concat(‘2’, substring(group_name, 2)) where group_name like ‘b%’;
update layout_options set group_name = concat(‘3’, substring(group_name, 2)) where group_name like ‘c%’;
update layout_options set group_name = concat(‘4’, substring(group_name, 2)) where group_name like ‘d%’;
update layout_options set group_name = concat(‘5’, substring(group_name, 2)) where group_name like ‘e%’;
update layout_options set group_name = concat(‘6’, substring(group_name, 2)) where group_name like ‘f%’;
update layout_options set group_name = concat(‘7’, substring(group_name, 2)) where group_name like ‘g%’;

drbowen wrote on Monday, June 22, 2009:

Some (but not all) of the Windows computers (versions 2000 and XP) are not showing any styles.  Everything is white with black text.  The users are running Firefox mostly version 3.0.7.

Apache/2.2.9 (Unix)
mod_ssl/2.2.9
OpenSSL/0.9.8g
PHP/5.2.8-pl1
Suhosin patch
MySQL 5.0.70-r1

I am currently using concurrent layout "0".

Any ideas on how to slap these Windows boxes around a little bit would be appreciated.

Sam Bowen, MD

drbowen wrote on Monday, June 22, 2009:

It takes bout 20 seconds for the login page to come up?

Sam Bowen, MD

drbowen wrote on Monday, June 22, 2009:

This poor formatting of CSS is also happening with some of the Unix-like computers.  Some are Linux and some are FreeBSD.

Typically the top two menu bars are not showing any color and are two narrow for the formatting?

Sam Bowen, MD

drbowen wrote on Monday, June 22, 2009:

The CSS issues seems to be going away as i get the permissions adjusted correctly and after the users clear their browser caches.

Sam Bowen, MD

bradymiller wrote on Tuesday, June 23, 2009:

hey,
Is it all working now?
-brady