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

Cant install forms DB

Situation

Trying to install CAMOS DB in forms and i get this error, also happens in other DB as well.

Query Error
ERROR: query failed: INSERT INTO form_CAMOS_category VALUES (1,NULL,NULL,NULL,NULL,NULL,NULL,‘prescriptions’)

Error: Duplicate entry ‘1’ for key ‘PRIMARY’

D:\xampp\htdocs\openemr\library\registry.inc at 92:sqlStatement
D:\xampp\htdocs\openemr\interface\forms_admin\forms_admin.php at 33:installSQL(D:/xampp/htdocs/openemr/library/…/interface/forms/CAMOS)

OpenEMR Version
I’m using OpenEMR version

Browser:
I’m using:

Operating System
I’m using: Windows 10, fresh install

Logs
Did you check the logs? Was there anything pertinent in them? Paste them here (surround with three backticks (```) for readability

@mohamed,

Data for the Primary key is duplicate therefore its giving the error please check data for primary key.

Thanks,
Nilesh

1 Like

@Nilesh_Hake,

And how may i ask to check primary key. New to openemr.

Just upgraded to 6.0. Still can’t resolve this error, hope anyone can help.

Hi @mohamed
Looks like the form has been install in the past at some point.

You need to check your database for tables with name starting with form_CAMOS…
There are four I believe. If they exist then you can drop them and then run form install again to get it registered.

I worry they may be populated with prior history so ensure this feature has not been used but lost in the past. Check with all your providers before any deletes.

note: or you may just truncate all the form_CAMOS_category… tables and install form. this is a better route to take imo

Hi @sjpadgett
Thanks for your reply

I entered phpmyadmin and searched openemr structure for camos, and then dropped the four tables in the operation option. Then used Administration>Forms to install the database again. Still no luck.

Query Error
ERROR: query failed: INSERT INTO form_CAMOS_category VALUES (1,NULL,NULL,NULL,NULL,NULL,NULL,‘prescriptions’)

Error: Duplicate entry ‘1’ for key ‘PRIMARY’

D:\xampp\htdocs\openemr\library\registry.inc at 96:sqlStatement
D:\xampp\htdocs\openemr\interface\forms_admin\forms_admin.php at 34:installSQL(D:/xampp/htdocs/openemr/library/…/interface/forms/CAMOS)

Still cant install CAMOS, any help would be appreciated