I’m trying to import patient data into OpenEMR 4.1.1 but am encountering the error, “Invalid field count in CSV input on line 1.”
I’ll just go through the process I followed:
1. Made a few sample records in 4.1.0 and exported the patient_data into CSV.
2. Opened this CSV file in Excel, and brought in external records which I wanted to import and set them as per the layout from the imported CSV file.
3. Exported from Excel to CSV format
4. Went to OpenEMR 4.1.0 and imported the CSV into the patient_data using PHPmyadmin (at first it was giving me Invalid field count in CSV input on line 1 error but then as per some advise from the net, I changed the following:
Change the “Fields terminated by” from “;” to “,”
5. Worked perfectly!
Now when I try to use the same proceedure to import the same CSV file into OpenEMR 4.1.1 on an Ubuntu Linux machine, I just get the error, “Invalid field count in CSV input on line 1.”
Try to empty the table, DO NOT DELETE the table of import. Or look at the Key with indexes and be sure not to have double key index/numbers.
Or do the same as you did for XAMPP, make some sample clients export and import. Empty the table and import you client CSV file made with the same amount of fields and the same name for the fields.
Hope this settles your problem of importing CSV file for clients and more tables.
Remember to **NOT IMPORT the CSV table for Users **the same way, since YOUR login and your administrator are also deleted when you empty the user table. Delete that table and you are thrown out immediately and can´t recover!
Thanks Blankev.
I used the second method you suggested,
Or do the same as you did for XAMPP, make some sample clients export and import. Empty the table and import you client CSV file made with the same amount of fields and the same name for the fields.
Then imported like before and it worked like a dream.
Didn’t know that XAMPP could be so technically different from a Linux install.