I loaded 247 records from a text file into tables "forms", "form_encounter", and "form_soap". I verified that the data was loaded properly and tested it by viewing them via clicking on the "Encounter" button for corresponding patient and clicking through the documents. However, I ran into a problem when entering a new encounter via the "New Encounter" form. The auto increment is working correctly on the "ID" field (form_encounter.id), however it does not seem to be working correctly on the field form_encounter.encounter and forms.encounter
Here is sample output from the table "form_encounter" where I added my new entry via the "New Encounter" form.
So after I import my data, should I set it to the number of my last encounter + 1 ( in my case 248 ), since I am importing 247 records?
Are there other critical values that I need to keep an eye out for?
The only data that I am importing is patient demographics and the recent encounters. From there all new records will be created via the OpenEMR interface.
I think what you want to do is get your *first* encounter number as sequences.id + 1, and then when done set sequences.id to your last encounter number.
I believe the sequences table is shared for some other IDs also (which is dumb, oh well)… that might be something to watch out for, but perhaps doesn’t matter for what you are doing.
Thanks Rod. I was a little concerned about that “sequences” table. I just hope that it doesn’t cause an issue going forward. So far this was the only instance I came across.