Cannot save vitals form

rayaz wrote on Wednesday, September 02, 2009:

Hi,

Am using 3.1.0 on Ubuntu 9.04. I have recently upgraded from version 3.0.1. When using the vitals form with the growth charts I am unable to save enteries. This is the error that I  get:
ERROR: query failed: SHOW COLUMNS FROM form_vitals
Error: Table ‘openemr.form_vitals’ doesn’t exist  
When I look at the form in administration the form is registered, enabled and DB installed. However I cannot find the database in MySQL.
Any help ? This new vitals chart is  an answer to my prayers with both units metric and US…

bradymiller wrote on Wednesday, September 02, 2009:

hey,

Although a lot of changes happened to the source code regarding this form, there were no changes to the database in the upgrade. This means it was very unlikely anything in the upgrade process that removed this table.

Did you ever use this form before? If so, what happens when you try to view the old note?

Do you see this table in OpenEMR in Administration->Database (phpmyadmin) ?

If you can, check out the mysql dump file before your upgrade to see if this table was there.

Also can try the mysqlcheck command to check for corrupt table.

But if you can’t see it at all in mysql, I kind of wonder if the following happened:
1) That table became corrupt
2) You performed a backup, and since corrupt, maybe table wasn’t backed up
3) Then you performed a restore and lost the table.

If this is this case, I’d suggest comparing your tables with the 3.1.x cvs demo to make sure no others missing (compare the administration->database screens).

If missing this table is an isolated event, then there is a quick way to copy/paste the part of sql/database.sql that imports only this table into administration->database (phpmyadmin). Let me know if get that far and can post quick set of instructions.

-brady

rayaz wrote on Wednesday, September 02, 2009:

Thanks for the quick reply.

I use the vitals Metric form so had disabled this form in my previous version of openemr. Now that the growth charts are in I wanted to check them out and came up on this obstacle.

I cannot see this form in Administration - >Database .

Looks like an isolate event so would appreciate a quick set of instructions :slight_smile:

Regards

Rayaz

blankev wrote on Wednesday, September 02, 2009:

The quick answer is: "There are NO Growth Charts in Vitals-Metric".

You have to switch to Vitals as delivered with the install version 3.0.1 and 3.1.1 and 3.1.0.

It has multiple options that needs some configuration in one of the many *.php configuration files. I suppose it is the globals.php. But Brady might have the correct answer.

CONCLUDING: Vitals (metric) are out
Now included together with the growth charts in Vitals (English version)

Through phpMyAdmin it should be possible to put the gathered information from Vitals metric into Vitals table.

Pimm

bradymiller wrote on Thursday, September 03, 2009:

hey,

To get the table back (note if for some reason the table actually exist, you will delete and all data contained in it, so as i always preach, back up first).

I’m gonna be a bite lazy here. Follow the screenshots in the below manual in the ‘Upgrade Language Translation Tables’ section with the exception discussed below:
http://bradymd.com/appliance/update4/

However, instead of downloading the translation table, download this files and use it instead:
http://www.sparmy.com/vitalsForm.sql

-brady

rayaz wrote on Thursday, September 03, 2009:

Thanks again Brady. Worked like a charm.

rayaz wrote on Thursday, September 03, 2009:

Now how do I transfer all the vitals I saved in the vitals metric form?

bradymiller wrote on Thursday, September 03, 2009:

hey,

This is a hard one, and will likely require the skill of a pro. Probably the simplest way to go about it would be the following:
1) Don’t make any notes with the new vitals until you transfer the olds. Then do not need to worry about re-mapping all the ‘form_id’ entries in the ‘forms’ table or the ‘id’ entries in the ‘form_vitals’ table.
3) When copy all the data from the metric table to the new  forms_vitals table via mysql, need to convert the pertinent vitals to standard us units (the database stores the units as US units, and the source then converts this to metric if user wants).
4)Then need to change the data found in ‘forms’ table columns ‘form_name’ (to ‘Vitals’) and ‘formdir’(to ‘vitals’) so will be consistent with the forms_vitals table.

As you can see, not easy, but a pro should be able to script this rather quickly. By not creating any of the new vital forms until this is done will greatly simplify things.

-brady