Automated patient ID number

ijaraho wrote on Tuesday, August 27, 2013:

hi,
I made in my current database in site1 lot of configuration , so I don’t want to start new empty database in site2 from scratch.
So I import database of site1 to database in site2, then I deleted all patient (from openemr user interface) manually, but I want the database in site2 to start from number 1 not to continue of last number of the old database,
who I can it?
and if there is any thing else to delete?
Thank you.

blankev wrote on Tuesday, August 27, 2013:

If you did empty all patient data it would be sufficient to go into the Database and make all auto-increment fields start with 1 for the first patient. (This would be my first “guess”-step) If this does not give the result you want, there might be connected fields or a cache setting in your browser that needs to be reset.

jeyasithar wrote on Monday, September 16, 2013:

Hey Issam,

You could reset your table auto increment by running this query.

ALTER TABLE patient_data AUTO_INCREMENT = 1

jeyasithar wrote on Monday, September 16, 2013:

Let me know if you are not aware of databases and queries.