Upgrade

ayoliberty wrote on Wednesday, March 25, 2015:

I just did an upgrade from 4.1.2 to 4.2.0 and I am having issues with Prescriptions, immunizations and clinical reminder.

  1. Prescriptions: this is not showing on the page at all
  2. immunizations: showing the following error code;

ERROR: query failed: select i1.id as id, i1.immunization_id as immunization_id, i1.cvx_code as cvx_code, c.code_text_short as cvx_text, if (i1.administered_date, concat(i1.administered_date,’ - '), substring(i1.note,1,20)) as immunization_data from immunizations i1 left join code_types ct on ct.ct_key = ‘CVX’ left join codes c on c.code_type = ct.ct_id AND i1.cvx_code = c.code where i1.patient_id = ? and i1.added_erroneously = 0 order by i1.administered_date desc

Error: Unknown column ‘i1.added_erroneously’ in ‘where clause’

C:\xampp\htdocs\openemr\interface\patient_file\summary\stats.php at 291:sqlStatement

  1. Clinical Reminder: Showing the following error;

ERROR: query failed: SELECT cvx_code FROM immunizations WHERE cvx_code=? AND patient_id=? AND added_erroneously = ‘0’ AND ((MONTH(‘2015-04-08 00:35:25’) < 9 AND administered_date >= ‘2014-09-01’ ) OR (MONTH(‘2015-04-08 00:35:25’) >= 9 AND administered_date >= ‘2015-09-01’ ))AND administered_date <= ‘2015-04-08 00:35:25’

Error: Unknown column ‘added_erroneously’ in ‘where clause’

C:\xampp\htdocs\openemr\library\sql.inc at 266:sqlStatementNoLog
C:\xampp\htdocs\openemr\library\clinical_rules.php at 1620:sqlStatementCdrEngine(SELECT cvx_code FROM immunizations WHERE cvx_code=? AND patient_id=? AND added_erroneously = ‘0’ AND ((MONTH(‘2015-04-08 00:35:25’) < 9 AND administered_date >= ‘2014-09-01’ ) OR (MONTH(‘2015-04-08 00:35:25’) >= 9 AND administered_date >= ‘2015-09-01’ ))AND administered_date <= ‘2015-04-08 00:35:25’ ,Array)
C:\xampp\htdocs\openemr\library\clinical_rules.php at 1435:exist_database_item(93,immunizations,cvx_code,eq,15,ge,1,flu_season,1,2015-04-08 00:35:25)
C:\xampp\htdocs\openemr\library\clinical_rules.php at 991:database_check(93,Array,Array,2015-04-08 00:35:25)
C:\xampp\htdocs\openemr\library\clinical_rules.php at 585:test_targets(93,rule_influenza_ge_50,2015-04-08 00:35:25)
C:\xampp\htdocs\openemr\library\clinical_rules.php at 56:test_rules_clinic(,passive_alert,2015-03-25 00:35:25,reminders-due,93,default)
C:\xampp\htdocs\openemr\interface\patient_file\summary\clinical_reminders_fragment.php at 30:clinical_summary_widget(93,reminders-due)

Please I need your help to solve this problems.

Thanks.

fsgl wrote on Wednesday, March 25, 2015:

Which OS?

What did you install initially?

Post fatal errors from xampp\php\logs\php_error_log & xampp\mysql\data\mysql.error.

yehster wrote on Wednesday, March 25, 2015:

The missing column is created when upgrading from 4.1.1 to 4.1.2

ayoliberty wrote on Wednesday, March 25, 2015:

Please find attached screenshot of the error

ayoliberty wrote on Wednesday, March 25, 2015:

Please find attached screenshot of the error

fsgl wrote on Wednesday, March 25, 2015:

Cannot tell from screenshot the OS nor which download you’d installed initially.

It makes a difference if download was a package or if you installed XAMPP separately from OpenEMR.

If OS is Windows, use paths from above & post fatal errors.

ayoliberty wrote on Wednesday, March 25, 2015:

the link as been helpful.

Thanks.

fsgl wrote on Thursday, March 26, 2015:

Assuming that you had installed the XAMPP-OpenEMR Package for Windows, do this.

ayoliberty wrote on Friday, March 27, 2015:

Thank you for your response always.

I been able to rectify the problem but what am facing now is the issue of date; openemr is back dating and giving wrong age.

please attached as reference

ayoliberty wrote on Friday, March 27, 2015:

Thank you for your response always.

I been able to rectify the problem but what am facing now is the issue of date; openemr is back dating and giving wrong age.

please attached as reference.

Thanks.

blankev wrote on Friday, March 27, 2015:

Interesting. Date of Computer is OK. Date of past encounter can not be evaluated, but the age of the patient is incorrect. No idea why this happens. Evaluate in a Demo version. If it can not be duplicated in a Demo version, my suggestion would be e new install or an install with parts of Github that calculates age etc.

fsgl wrote on Friday, March 27, 2015:

Regarding the incorrect patient age in years, try the following despite the fact that I don’t think it’s the solution. Go to Administration/Globals/Locale & check settings as depicted in attachment 1.

I assume that the date for Past Encounters & Document is incorrect. What is puzzling is the fact that there are no other details beside the wrong dates. If you go to that encounter & correct the date, does it help? See attachment 2.

Is the popup calendar correct as depicted in attachment 3?

fsgl wrote on Friday, March 27, 2015:

Try resetting date as explained here. The commands are the same for Windows.

Open Command Prompt & run for March 27, 2015:

<?php $date = new DateTime(); $date->setDate(2015, 03, 27); echo $date->format('Y-m-d') . "\n"; ?>

Set timezone if not done so already.