Belated upgrade v3.2 to 4.1 failing

dennis-in-pdx wrote on Friday, December 21, 2012:

I’m new to OpenEMR and unsure if this is the proper forum for this question.  A clinic here in Portland is just now attempting to upgrade from v3.2.0 to 4.1.1, but there have been upgrade failures that their regular IT contractor can’t figure out, so they’ve asked this old Web developer to investigate. 

The failures occur when in the stage of upgrading the database from v3.2 to v4.0.  The messages indicate missing fields in the patient_data table.  I did a comparison of the clinic’s actual DB structure vs. the …/sql/database.sql file, and have found the clinic is missing about 15 fields from the patient_data table, related to the patient’s ethnicity, family condition and financial condition, and to HIPAA information.  All other tables seem to be complete.  The IT contractor says that he did a regular download and installation from your Web site, implying that these patient fields were omitted “out of the box”.  The software environment is Win-XP with XAMMP. 

My questions: (1) Have you ever offered a version of OpenEMR with patient vitals and HIPAA fields omitted?  (2) If -1- is yes, do you have a patch that would add these fields in?  (3) If -2- is no, and we had to manually add these fields in, do they have to appear in the same order as shown in the database.sql file?

Thanks,

Dennis in Portland, OR

capminds wrote on Friday, December 21, 2012:

Dennis,
              Welcome to OpenEMR community,

Did u try the upgrading process using this steps

http://www.open-emr.org/wiki/index.php/Windows_Upgrade_3.2.0_to_4.0.0

FYI :- Patient data can be configured  at UI level,So it’s based on clinical customization,please have a look at Administration => Layouts => Demographics

I suggest you to add the fields manually,Please let us know for any  openemr help

Thanks,
Naina
emr@capminds.com
www.capminds.com

yehster wrote on Friday, December 21, 2012:

(1) Have you ever offered a version of OpenEMR with patient vitals and HIPAA fields omitted?
I am pretty sure the answer is no.  I suspect what happened is at some point someone used the layout editor and deleted  columns instead of the preferred technique, flagging them as “unused.”  This would have happened from:
Administration => Layouts => Demographics
(3) No they don’t need to appear in the same order. But I think more to the point the question you really need answered is how best to recreate the columns.
I think there are three decent ways to do this.
A. manually create and execute ALTER TABLE for each missing column  (probably the technique you are thinking).
B. Use the layout editor to recreate the missing columns.  For reference, you can use the list of entries in https://raw.github.com/openemr/openemr/rel-320/sql/database.sql that look like this:

INSERT INTO `layout_options` VALUES ('DEM', 'hipaa_notice', '3Choices', 'HIPAA Notice Received', 3, 1, 1, 0, 0, 'yesno', 1, 1, '', '', 'Did you receive a copy of the HIPAA Notice?'

C. You can export the data in the table to a CSV, or other format.  Then drop the existing table, use the “official” create table statement.  Then re-import the data.

You might actually need the missing entries from the layout_options table, but I’m not sure. 

Anyway, if you get stuck and need additional hired help, contact me offline
-Kevin Yeh
kevin.y@integralemr.com

P.S. The fact that the layout editor can delete columns without at least a firm warning about the dire consequences is a known and long standing issue. 

sunsetsystems wrote on Friday, December 21, 2012:

I expect Kevin is right, that the layout editor was used to delete those columns.  The Database tool (phpmyadmin) would probably be the easiest way to put them back.

For future reference, the Help forum is the best place for questions like this.  Most developers subscribe to all of the forums.

Rod
www.sunsetsystems.com

dennis-in-pdx wrote on Monday, December 24, 2012:

Thanks, everyone for replying so quickly.  We will first try the suggestion -B- from Kevin to use the layout editor.  Even if it’s not the most efficient method, we still want to gain some familiarity with that feature so we can instruct the regular staff at the clinic how to use it properly. 

Dennis