Do you use or administer OpenEMR? Take the General Satisfaction Survey to help improve the product

OpenEMR 5.0.2 Patch

I am running XAMPP as localhost on my machine, and the control panel for mysql is supposed to be running.

I have looked for a sqlconfig.php file within the xampp folder to no avail.

it will be in openemr/sites/default/sqlconfig.php

Found it, but it is called sqlconf.php

In the mean time I did a new install and everything is working now. Thank you for your help.

My mistake, it is sqlconf.php. I verbally call it the sql config file. Sorry if I confused you.

For other people who are reading this thread, the sites/default/sqlconf.php file is where the database creds are stored. Make sure that the username, password, and database name match the values you chose when you first set up OpenEMR.

Here is a screenshot of the file:

Chances are the host and port variables will be the same on most systems. The password will most definitely be different because the password displayed (openemr) does not meet security standards.

If openemr is your password, you should change it.

Hi,

The 2nd patch for OpenEMR 5.0.2 has been released:
https://www.open-emr.org/wiki/index.php/OpenEMR_Patches

The patch includes security fixes and a bunch of improvements and fixes :
*Critical security fix - reported by Dennis Brinkrolf (RIPS Technologies), fixed by Jerry Padgett and Brady Miller
*Security fixes - reported by Dennis Brinkrolf (RIPS Technologies), Daniel Pflieger, and Visolve, fixed by Jerry Padgett and Brady Miller
*COVID19 ICD10 codes added - by Stephen Waite
*Patient portal security improvements, updates and fixes - by Jerry Padgett
*API security improvements and updates - by Brady Miller and Stephen Waite
*Payment improvements - by Jerry Padgett
*MySQL 8 fix, part 1 - reported by Sanjeev Kumar, fixed by Brady Miller
*MySQL 8 fix, part 2 - reported by Tman, fixed by Amit Meena
*Calendar styling improvements - by Jerry Padgett
*Patient Portal styling improvements - by Jerry Padgett and Tyler Wrenn
*Referral form improvements - by Stephen Waite and Visolve
*Added diagnosis history finder for procedure order form - by Jerry Padgett
*Newcrop Rx improvements - by Ken Chapple
*Rx improvements - by Sherwin Gaddis
*MedEx fixes - by ophthal
*PDF fix - reported by Tyler Wrenn, fixed by Jerry Padgett
*Merge patient fix - reported by APerez, fixed by Brady Miller
*Date of birth autocomplete fix - reported by Philip Herrick, fixed by Stephen Waite
*ICD10 import fix - reported and fixed by Stephen Waite
*Fees checkout fix - reported by Evgenios, fixed by Stephen Waite
*Calendar fix - reported by and fixed by Stephen Waite
*Billing fix - reported by and fixed by Stephen Waite
*Billing statement fixes - reported by Stephen Waite, fixed by Jerry Padgett
*Billing fix in billing/service facility - reported by and fixed by Daniel Pflieger
*Messaging fix - reported by syedyawar and fixed by Visolve and Stephen Waite
*Modules fix - reported by and fixed by Jerry Padgett
*Zip code fix - reported by and fixed by Stephen Waite
*Transaction date fix - reported by and fixed by Sherwin Gaddis
*Fix functional and cognitive status form - reported by Pete Boyd and fixed by Stephen Waite
*Fix pharmacy import - reported by and fixed by Robert Hausam

-brady

2 Likes

Yet again @brady.miller, thanks for producing this recent patch. I know it to be a tedious and time consuming task which i’m sure the community appreciates as I do!

For others, a note concerning payment improvements. I added the ability to take manual credit card payments from our billing Front Payments. This was extended from the Patient Portal online payment feature using the same gateway to Authorize.net or Stripe which is setup in Globals->Connector.
Also note that only payment amount and authorization codes are maintained onsite and not credit card numbers or pins.

1 Like

This kind of important announcement warrants its own thread so that it is more visible to people, e.g. “OpenEMR 5.0.2.2 released”. This post could easily be missed by people who might think “Oh I read that thread when it was first posted, I expect people are just commenting on an old thread”.

sure thing @PeteBoyd, if you registered your instance you will also receive an email regarding the nice work by @brady.miller on this.

1 Like

hi @PeteBoyd, Good point. Just created it’s own thread in News section. Here’s our announcement strategy for patches (see bottom of the wiki page):
https://www.open-emr.org/wiki/index.php/Steps_for_a_patch_release

3 Likes

Had to make changes to the patch.sql file due to the error, hopefully the changes we made look right, they seemed to work at least. This is with mariadb server.

Just posting in case this helps someone else with the same error message.

Error message:

UPDATE icd10_dx_order_code
SET revision = (SELECT MAX(revision) from icd10_dx_order_code) WHERE dx_code = ‘U071’;
You can’t specify target table ‘icd10_dx_order_code’ for update in FROM clause

Made changes to multiple lines but from line 304 now reads

#IfRow2D icd10_dx_order_code dx_code U071 active 1
set @newMax := (SELECT MAX(revision) from icd10_dx_order_code);
UPDATE icd10_dx_order_code
SET revision = @newMax WHERE dx_code = ‘U071’;

#EndIf

#IfNotRow2D icd10_dx_order_code dx_code U072 active 1
INSERT INTO icd10_dx_order_code
(dx_code, formatted_dx_code, valid_for_coding, short_desc, long_desc, active, revision)
VALUES (‘U072’, ‘U07.2’, ‘1’, ‘COVID-19, virus not identified’, ‘COVID-19, virus not identified’, ‘1’, ‘1’);
#EndIf

#IfRow2D icd10_dx_order_code dx_code U072 active 1
set @newMax2 := (SELECT MAX(revision) from icd10_dx_order_code);
UPDATE icd10_dx_order_code
SET revision = @newMax2 WHERE dx_code = ‘U072’;
#EndIf

hi @madmax ,

Thanks for reporting this and a solution. What version MariaDB are you using (I didn’t see this issue on MariaDB 10.4)? Luckily, all this error results in is not getting the new covid codes (ie. it won’t break any of the other changes in the patch). Once get this sorted out and test this solution on all versions of mysql/mariadb, will fix the rel-502 branch and then get out a fixed patch.

thanks,
-brady

Hi,
Version is: 5.5.67

I got the same problem when updating Openemr. My database is using mysql.

Error message as below.

Query Error

ERROR: query failed: UPDATE icd10_dx_order_codeSET revision = (SELECT MAX(revision) from icd10_dx_order_code) WHERE dx_code = ‘U071’

Error: Table ‘icd10_dx_order_code’ is specified twice, both as a target for ‘UPDATE’ and as a separate source for data

I tried Mark solution but it seems like it did not work by making changes to patch.sql

Please follow up.

Thanks

Hi @jhunyan ,

What version of mysql are you using?
And what errors did you see when using @madmax 's solution?

thanks,
-brady

Hi @brady.miller,

Thanks for prompt reply. I checked my server and it is MarianDB, not mysql as I thought.

  • Server: Localhost via UNIX socket
  • Server type: MariaDB
  • Server version:10.2.31-MariaDB - MariaDB Server
  • Protocol version: 10

The error remains the same when I tried @madmax 's solution.

hi @jhunyan ,

Try it after replacing your sql/patch.sql file with the following:
https://raw.githubusercontent.com/openemr/openemr/dc1947df370cde40c49ced6e03884c47d8d6437f/sql/patch.sql

Let me know if this works. It looks like this is an issue in older mysql/mariadb versions. Luckily, it doesn’t impact anything else in the patch (the only thing this error stops is the importing of the covid icd10 codes).

thanks,
-brady

Hi @brady.miller,

I tried replacing the patch as you mentioned and it is working normally. Thank you very much.

The message of the update is as below.

OpenEMR 5.0.2 Database Patch 2

Applying Patch to site : default

Processing patch.sql …
Skipping section #IfNotRow2D list_options list_id apps option_id oeSignerRemote
Skipping section #IfNotColumnType form_eye_neuro ACT5CCDIST text
Skipping section #IfNotColumnType form_eye_neuro ACT1CCDIST text
Skipping section #IfNotColumnType form_eye_neuro ACT2CCDIST text
Skipping section #IfNotColumnType form_eye_neuro ACT3CCDIST text
Skipping section #IfNotColumnType form_eye_neuro ACT4CCDIST text
Skipping section #IfNotColumnType form_eye_neuro ACT6CCDIST text
Skipping section #IfNotColumnType form_eye_neuro ACT7CCDIST text
Skipping section #IfNotColumnType form_eye_neuro ACT8CCDIST text
Skipping section #IfNotColumnType form_eye_neuro ACT9CCDIST text
Skipping section #IfNotColumnType form_eye_neuro ACT10CCDIST text
Skipping section #IfNotColumnType form_eye_neuro ACT11CCDIST text
Skipping section #IfNotColumnType form_eye_neuro ACT1SCDIST text
Skipping section #IfNotColumnType form_eye_neuro ACT2SCDIST text
Skipping section #IfNotColumnType form_eye_neuro ACT3SCDIST text
Skipping section #IfNotColumnType form_eye_neuro ACT4SCDIST text
Skipping section #IfNotColumnType form_eye_neuro ACT5SCDIST text
Skipping section #IfNotColumnType form_eye_neuro ACT6SCDIST text
Skipping section #IfNotColumnType form_eye_neuro ACT7SCDIST text
Skipping section #IfNotColumnType form_eye_neuro ACT8SCDIST text
Skipping section #IfNotColumnType form_eye_neuro ACT9SCDIST text
Skipping section #IfNotColumnType form_eye_neuro ACT10SCDIST text
Skipping section #IfNotColumnType form_eye_neuro ACT11SCDIST text
Skipping section #IfNotColumnType form_eye_neuro ACT1SCNEAR text
Skipping section #IfNotColumnType form_eye_neuro ACT2SCNEAR text
Skipping section #IfNotColumnType form_eye_neuro ACT3SCNEAR text
Skipping section #IfNotColumnType form_eye_neuro ACT4SCNEAR text
Skipping section #IfNotColumnType form_eye_neuro ACT5CCNEAR text
Skipping section #IfNotColumnType form_eye_neuro ACT6CCNEAR text
Skipping section #IfNotColumnType form_eye_neuro ACT7CCNEAR text
Skipping section #IfNotColumnType form_eye_neuro ACT8CCNEAR text
Skipping section #IfNotColumnType form_eye_neuro ACT9CCNEAR text
Skipping section #IfNotColumnType form_eye_neuro ACT10CCNEAR text
Skipping section #IfNotColumnType form_eye_neuro ACT11CCNEAR text
Skipping section #IfNotColumnType form_eye_neuro ACT5SCNEAR text
Skipping section #IfNotColumnType form_eye_neuro ACT6SCNEAR text
Skipping section #IfNotColumnType form_eye_neuro ACT7SCNEAR text
Skipping section #IfNotColumnType form_eye_neuro ACT8SCNEAR text
Skipping section #IfNotColumnType form_eye_neuro ACT9SCNEAR text
Skipping section #IfNotColumnType form_eye_neuro ACT10SCNEAR text
Skipping section #IfNotColumnType form_eye_neuro ACT11SCNEAR text
Skipping section #IfNotColumnType form_eye_neuro ACT1CCNEAR text
Skipping section #IfNotColumnType form_eye_neuro ACT2CCNEAR text
Skipping section #IfNotColumnType form_eye_neuro ACT3CCNEAR text
Skipping section #IfNotColumnType form_eye_neuro ACT4CCNEAR text
Skipping section #IfNotColumnType form_eye_neuro ODNPA text
Skipping section #IfNotColumnType form_eye_neuro OSNPA text
Skipping section #IfNotColumnType form_eye_neuro VERTFUSAMPS text
Skipping section #IfNotColumnType form_eye_neuro DIVERGENCEAMPS text
Skipping section #IfNotColumnType form_eye_neuro ODCOLOR text
Skipping section #IfNotColumnType form_eye_neuro OSCOLOR text
Skipping section #IfNotColumnType form_eye_neuro ODCOINS text
Skipping section #IfNotColumnType form_eye_neuro OSCOINS text
Skipping section #IfNotRow4D supported_external_dataloads load_type ICD10 load_source CMS load_release_date 2019-10-01 load_filename 2020-ICD-10-CM-Codes.zip
Skipping section #IfNotRow4D supported_external_dataloads load_type ICD10 load_source CMS load_release_date 2019-10-01 load_filename 2020-ICD-10-PCS-Order.zip
Skipping section #IfMissingColumn patient_access_onsite portal_login_username
Skipping section #IfMissingColumn api_token token_auth_salt
Skipping section #IfMissingColumn api_token token_auth
Skipping section #IfNotIndex openemr_postcalendar_events index_pcid
Skipping section #IfNotIndex medex_recalls i_eventDate
Skipping section #IfNotIndex medex_outgoing i_msg_date
Skipping section #IfNotRow2D icd10_dx_order_code dx_code U071 active 1
set @newMax = (SELECT MAX(revision) from icd10_dx_order_code)
UPDATE icd10_dx_order_code SET revision = @newMax WHERE dx_code = ‘U071’
Skipping section #IfNotRow2D icd10_dx_order_code dx_code U072 active 1
set @newMax = (SELECT MAX(revision) from icd10_dx_order_code)
UPDATE icd10_dx_order_code SET revision = @newMax WHERE dx_code = ‘U072’

Updating global configuration defaults…

Updating version indicators…

Database Patch 2 finished.

OpenEMR Version = 5.0.2(2).

1 Like

Hi @madmax and @jhunyan ,
Thanks for your quick reports, fix, and testing. Because of that, I was able to replace the patch with a working script (the patch file that folks download will now contain this fix). Thanks!
-brady

1 Like

I received the following error when testing sql_patch.php:

"OpenEMR 5.0.2 Database Patch 2

Applying Patch to site : default
Processing patch.sql …
INSERT INTO list_options (list_id,option_id,title,seq,is_default,activity) VALUES (‘apps’,‘oeSignerRemote’,’./…/portal/sign/assets/signit.php’,30,0,0)
ALTER TABLE form_eye_neuro MODIFY ACT5CCDIST text
Query Error

ERROR: query failed: ALTER TABLE form_eye_neuro MODIFY ACT5CCDIST text

Error: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.

…/library/sql_upgrade_fx.php at 933:sqlStatement
…/sql_patch.php at 66:upgradeFromSqlFile(patch.sql) "

Debian 10
mariadb-server 10.3

Any help would be very gratefully received. Thanks