Added groups in demographics - now getting er

fkasmani wrote on Monday, February 04, 2013:

So I added some 2 new groups under the Demographics layout and now when I add or modify and patient records, it just ends with the following errors:

When adding a new patient:

ERROR: insert failed: INSERT INTO patient_data SET pid = '2', date = NOW(), `title` = 'Mr.', `fname` = 'New', `mname` = '', `lname` = 'Patient', `pubpid` = '2', `DOB` = '1992-04-10', `sex` = 'Male', `ss` = '', `drivers_license` = '', `status` = '', `genericname1` = '', `genericval1` = '', `genericname2` = '', `genericval2` = '', `street` = '', `city` = '', `state` = '', `postal_code` = '', `country_code` = '', `mothersname` = '', `guardiansname` = '', `contact_relationship` = '', `phone_contact` = '', `phone_home` = '', `phone_biz` = '', `phone_cell` = '', `email` = '', `providerID` = '', `ref_providerID` = '', `pharmacy_id` = '0', `hipaa_notice` = '', `hipaa_voice` = '', `hipaa_message` = '', `hipaa_mail` = '', `hipaa_allowsms` = '', `hipaa_allowemail` = '', `allow_imm_reg_use` = '', `allow_imm_info_share` = '', `allow_health_info_ex` = '', `allow_patient_portal` = '', `occupation` = '', `language` = '', `ethnicity` = '', `race` = '', `financial_review` = '', `family_size` = '', `monthly_income` = '', `homeless` = '', `interpretter` = '', `migrantseasonal` = '', `referral_source` = '', `vfc` = '', `deceased_date` = '', `deceased_reason` = '', `vision` = '', `visionvnre` = '', `visionvnle` = '', `visionvnbino` = '', `visionnrvn` = '', `visionnrvnle` = '', `visionnrvnbino` = '', `visionphvnre` = '', `visionphvnle` = '', `visionphvnbino` = '', `visionipdre` = '', `visionipdle` = '', `visionipdbino` = '', `prepldrxgap` = '', `oldrx` = '', `oldrxre` = '', `oldrxrevn` = '', `oldrxresph` = '', `oldrxrecyl` = '', `oldrxreaxis` = '', `oldrxreadd` = '', `oldrxrenvn` = '', `oldrxle` = '', `oldrxlevn` = '', `oldrxlesph` = '', `oldrxlecyl` = '', `oldrxleaxis` = '', `oldrxleadd` = '', `oldrxlenvn` = '', `prelensgap` = '', `lens` = '', `frame` = '', `from` = '', `preautoregap` = '', `autore` = '', `autoresph` = '', `autorecyl` = '', `autoreaxis` = '', `autoreadd` = '', `autole` = '', `autolesph` = '', `autolecyl` = '', `autoleaxis` = '', `autoleadd` = '', `prerightgap` = '', `right` = '', `rightdist` = '', `rightdistvn` = '', `rightdistsph` = '', `rightdistcyl` = '', `rightdistaxis` = '', `rightdistprism` = '', `rightdistdir` = '', `rightadd` = '', `rightnear` = '', `rightnearvn` = '', `rightnearsph` = '', `rightnearcyl` = '', `rightnearaxis` = '', `preleftgap` = '', `left` = '', `leftdist` = '', `leftdistvn` = '', `leftdistsph` = '', `leftdistcyl` = '', `leftdistaxis` = '', `leftdistprism` = '', `leftdistdir` = '', `leftadd` = '', `leftnear` = '', `leftnearvn` = '', `leftnearsph` = '', `leftnearcyl` = '', `leftnearaxis` = '', `note` = '', `lensmaterial` = '', `type` = '', `suggested` = '', `followup` = '', `frame2` = '', `optometr` = '', `salesman` = '', `preheadinggap` = '', `headingright` = '', `headingleft` = '', `vnright` = '', `clvngap` = '', `vnleft` = '', `clsphright` = '', `clsphgap` = '', `clsphleft` = '', `clcylright` = '', `clcylgap` = '', `clcylleft` = '', `claxisright` = '', `claxisgap` = '', `claxisleft` = '', `cltyperight` = '', `cltypegap` = '', `cltypeleft` = '', `clbrandright` = '1', `clbrandgap` = '', `clbrandleft` = '1', `clcolorright` = '', `clcolorgap` = '', `clcolorleft` = '', `cldiaright` = '', `cldiagap` = '', `cldialeft` = '', `cldisposright` = '', `cldisposgap` = '', `cldisposleft` = '', `clozright` = '', `clozgap` = '', `clozleft` = '', `cldkright` = '', `cldkgap` = '', `cldkleft` = '', `clwaterright` = '', `clwatergap` = '', `clwaterleft` = '', `clbcright` = '', `clbcgap` = '', `clbcleft` = '', `clhzright` = '', `clhzgap` = '', `clhzleft` = '', `clvtright` = '', `clvtgap` = '', `clvtleft` = '', `clnotes1` = '', `clfollowup1` = ''
Error: Unknown column 'right' in 'field list'

When modifying a patient record:

ERROR: query failed: UPDATE patient_data SET date = NOW(), `id` = '1', `title` = '', `fname` = 'Test', `mname` = '', `lname` = 'Patient', `pubpid` = '1', `DOB` = '1990-09-18', `sex` = 'Female', `ss` = '', `drivers_license` = '', `status` = '', `genericname1` = '', `genericval1` = '', `genericname2` = '', `genericval2` = '', `street` = '', `city` = 'Mombasa', `state` = '', `postal_code` = '', `country_code` = '', `mothersname` = '', `guardiansname` = '', `contact_relationship` = '', `phone_contact` = '', `phone_home` = '', `phone_biz` = '', `phone_cell` = '', `email` = '', `providerID` = '', `ref_providerID` = '', `pharmacy_id` = '0', `hipaa_notice` = '', `hipaa_voice` = '', `hipaa_message` = '', `hipaa_mail` = '', `hipaa_allowsms` = '', `hipaa_allowemail` = '', `allow_imm_reg_use` = '', `allow_imm_info_share` = '', `allow_health_info_ex` = '', `allow_patient_portal` = '', `occupation` = '', `language` = '', `ethnicity` = '', `race` = '', `financial_review` = '0000-00-00 00:00:00', `family_size` = '', `monthly_income` = '', `homeless` = '', `interpretter` = '', `migrantseasonal` = '', `referral_source` = '', `vfc` = '', `deceased_date` = '0000-00-00 00:00:00', `deceased_reason` = '', `vision` = '', `visionvnre` = '', `visionvnle` = '', `visionvnbino` = '', `visionnrvn` = '', `visionnrvnle` = '', `visionnrvnbino` = '', `visionphvnre` = '', `visionphvnle` = '', `visionphvnbino` = '', `visionipdre` = '', `visionipdle` = '', `visionipdbino` = '', `prepldrxgap` = '', `oldrx` = '', `oldrxre` = '', `oldrxrevn` = '', `oldrxresph` = '', `oldrxrecyl` = '', `oldrxreaxis` = '', `oldrxreadd` = '', `oldrxrenvn` = '', `oldrxle` = '', `oldrxlevn` = '', `oldrxlesph` = '', `oldrxlecyl` = '', `oldrxleaxis` = '', `oldrxleadd` = '', `oldrxlenvn` = '', `prelensgap` = '', `lens` = '', `frame` = '', `from` = '', `preautoregap` = '', `autore` = '', `autoresph` = '', `autorecyl` = '', `autoreaxis` = '', `autoreadd` = '', `autole` = '', `autolesph` = '', `autolecyl` = '', `autoleaxis` = '', `autoleadd` = '', `prerightgap` = '', `right` = '', `rightdist` = '', `rightdistvn` = '', `rightdistsph` = '', `rightdistcyl` = '', `rightdistaxis` = '', `rightdistprism` = '', `rightdistdir` = '', `rightadd` = '', `rightnear` = '', `rightnearvn` = '', `rightnearsph` = '', `rightnearcyl` = '', `rightnearaxis` = '', `preleftgap` = '', `left` = '', `leftdist` = '', `leftdistvn` = '', `leftdistsph` = '', `leftdistcyl` = '', `leftdistaxis` = '', `leftdistprism` = '', `leftdistdir` = '', `leftadd` = '', `leftnear` = '', `leftnearvn` = '', `leftnearsph` = '', `leftnearcyl` = '', `leftnearaxis` = '', `note` = '', `lensmaterial` = '', `type` = '', `suggested` = '', `followup` = '', `frame2` = '', `optometr` = '', `salesman` = '', `preheadinggap` = '', `headingright` = '', `headingleft` = '', `vnright` = '', `clvngap` = '', `vnleft` = '', `clsphright` = '', `clsphgap` = '', `clsphleft` = '', `clcylright` = '', `clcylgap` = '', `clcylleft` = '', `claxisright` = '', `claxisgap` = '', `claxisleft` = '', `cltyperight` = '', `cltypegap` = '', `cltypeleft` = '', `clbrandright` = '1', `clbrandgap` = '', `clbrandleft` = '1', `clcolorright` = '', `clcolorgap` = '', `clcolorleft` = '', `cldiaright` = '', `cldiagap` = '', `cldialeft` = '', `cldisposright` = '', `cldisposgap` = '', `cldisposleft` = '', `clozright` = '', `clozgap` = '', `clozleft` = '', `cldkright` = '', `cldkgap` = '', `cldkleft` = '', `clwaterright` = '', `clwatergap` = '', `clwaterleft` = '', `clbcright` = '', `clbcgap` = '', `clbcleft` = '', `clhzright` = '', `clhzgap` = '', `clhzleft` = '', `clvtright` = '', `clvtgap` = '', `clvtleft` = '', `clnotes1` = '', `clfollowup1` = '' WHERE id = '1'

Would really appreciate some help on this, pls.

Regards.

arnabnaha wrote on Monday, February 04, 2013:

You need to run the sql_upgrade.php script on your server…otherwise these errors will be shown…

Run this: http://your_domain_name/openemr/sql_upgrade.php

fkasmani wrote on Monday, February 04, 2013:

Thanks, Arnabnaha.

I did so, but am ending up with an “internal server error”.

I’ve tried re-booting the OpenEMR server (which is giving this error), clearing the cache of my browser, tried from different browsers, tried different PC’s (both Windows & Linux) but no luck.

arnabnaha wrote on Monday, February 04, 2013:

Try using localhost…
http://localhost/openemr/sql_upgrade.php

I think you have some problem with your internet connection. It cannot connect to your mysql server

fkasmani wrote on Monday, February 04, 2013:

I wonder if it’s really an internet connection problem - I can log into the OpenEMR from any PC on the network and nowhere do I get a 500 error.

Another issue is, the OpenEMR server I’m referring to has no GUI - it’s a totally headless server and I just have Ubuntu command line access on it. (maybe I can use an SSH-based HTTP tunnel into it).

BTW, if sql_upgrade.php runs successfully, will it display some success message or something?

arnabnaha wrote on Monday, February 04, 2013:

yes it will display a success message…you can visit my demo

http://nahahealthclinic.dyndns.org/openemrtest

You can play with it…add demographics field and run the sql upgrade script by going to:
http://nahahealthclinic.dyndns.org/openemrtest/sql_upgrade.php

arnabnaha wrote on Monday, February 04, 2013:

sorry, forgot to tell the username and password…
Username: admin
password : pass

fkasmani wrote on Monday, February 04, 2013:

Thanks, Arnabnaha.

I logged into your demo and added a new group with one field and did not do the sql_upgrade.php
I then added a new patient and it did not give any errors as I’m getting when adding/modifying patients.

It’s got me really concerned now.

blankev wrote on Monday, February 04, 2013:

Now is there a question of the past:

Is it possible to give Layout Based Visit forms a name as for example Clinical or Miscellaneous or Administrative?

Tnx for any answer in advance……… So just the opposite of what happend with the entry screen of Arnabnaha. Make less tabs and no more tabs……

fkasmani wrote on Monday, February 04, 2013:

OK, I’ve just made an observation
I have this installation which I’ve been referring to above and sql_upgrade.php is giving a 500 server error.

Besides this, I’ve also got two other installations:
1. An XAMPP (preconfigured Windows based - “installation as-a-service”) installation of OpenEMR on which sql_upgade.php is working fine.
2. Another Ubuntu based installation on 5.175.145.251/openemr/sql_upgrade.php which is giving a similar 500 server error.

Am I going wrong somewhere during the installation of OpenEMR on my Ubuntu installs?

tmccormi wrote on Monday, February 04, 2013:

You have added a new field name (or renamed an existing field) in the LAYOUT table.
— > Error: Unknown column ‘right’ in ‘field list’

There is not field/column named “right” in the patient_data table.  

I recommend restoring from backup and trying it again more carefully.   I do not recommend renaming or deleting existing fields in the layouts, it’s very tricky.

-Tony

fkasmani wrote on Monday, February 04, 2013:

Thanks, Tony.

“right” is a new field I’ve added to the demographics layout. (I’ve been very careful not to rename any fields that come as part of the original OpenEMR)

In true sense, I’ve added 2 groups: “Prescription” and “Contact Lens” to the Demographics layout. Each of these new groups has plenty of fields and “Right” is a field I have introduced under the “Prescription” group.

Just a thought: Does the order of Field Numbers HAVE TO be 1 2 3…. or can there be gaps in their sequence? I’ve set them as 5 10 15 20……

And again my question as in 10 above, Am I going wrong somewhere during the installation of OpenEMR on my Ubuntu installs?

Regards.