Upgrading to 6 error


FYI: when upgrading to version 6 from 5.0.2 I got this error:

CREATE UNIQUE INDEX pid ON patient_access_onsite (pid)
Query Error
ERROR: query failed: CREATE UNIQUE INDEX pid ON patient_access_onsite (pid)
Error: Duplicate entry ‘10038’ for key ‘pid’
/path/to/openemr/library/sql_upgrade_fx.php at 1158:sqlStatement
/path/to/openemr/sql_upgrade.php at 314:upgradeFromSqlFile(5_0_2-to-6_0_0_upgrade.sql)

I had to delete the duplicate row with the “portal_pwd_status” field = 0.

then the update worked.


1 Like

Here is another error:
changing the date of a document leads to a result of 0000-00-00 see the images:

after hitting the “update” button, this is what I get:


This only occurs when I am trying to update the date of an old document.
Actually, it is happening with today’s documents as well.
For example, I just uploaded a document. It received today’s date, then when I updated the diagnosis code for the document, the date reverted to 000-00-00

1 Like

@brady.miller Confirmed.

1 Like

Okay found problem. A little escaping issue "'2021-02-06'"
Thanks @gutiersa


Thanks so much.

Question, Would it be very hard to use metadata for document date?
For example, I work by myself and I am always behind on my filing. I would like the document date to be the date of document creation. Is that possible? That way I need not click on the document multiple times. If not possible no worries. I could also request this as a feature!