Import from a .csv

pfindan wrote on Monday, July 09, 2012:

Hello,
I am working on setting up OpenEMR in a hearing clinic. They use a program called NOAH for setting hearing aids, in this the program has a database of names, phone numbers, ect. The program will export this info to a .csv .  How would I go about importing this into OpenEMR. I have very little knowledge of SQL, so I cannot write a script as others have suggested. I am also not authorized for privacy reasons to enlist 3rd party support. I have added custom fields to the Demographics in OpenEMR if that matters.

Thanks in advance for any help you can provide.

juggernautsei wrote on Tuesday, July 10, 2012:

We can try help you through the import process.
Can you share what fields need to be imported?

These will be used to make corrisponding table columns.

Sherwin
openmedpractice.com

juggernautsei wrote on Tuesday, July 10, 2012:

Where can I find NOAH? Can we download a demo of the program, if so where?

Sherwin

juggernautsei wrote on Tuesday, July 10, 2012:

Sorry for all the messages, the simple solution is to open the CSV file in Excel and save it as a PDF and import it into the patient document folder. If your copy of Excel does not have the save as PDF pluggin, you can install it free from Microsoft.

Let me know if this is a viable solution.

Sherwin
openmedpractice.com

yehster wrote on Tuesday, July 10, 2012:

PDF import is certainly not what OP hopes to accomplish.  He doesn’t have excel spreadsheets he wants to associate with individual patients.  He has a list of patients in a .CSV and needs to create a patient record which corresponds to each row.

Learning SQL, or some other way to manipulate the database will be required.
http://dev.mysql.com/doc/refman/5.1/en/connector-odbc-examples-tools-with-access.html
If you are comfortable with MS Access using ODBC and attached tables might be an option.
Going through .PDF is certainly a red-herring.

yehster wrote on Tuesday, July 10, 2012:

I guess it might also be possible to use the patient portal SOAP interfaces to create the individual records too but learning SQL would probably be easier.

juggernautsei wrote on Tuesday, July 10, 2012:

I learned SQL from a little book called Teach Yourself SQL in 10 minutes ISBN 0-672-32128-9. It is still being sold on Amazon for $5 http://www.amazon.com/exec/obidos/ASIN/0672321289/dhdursoassoda-20. I use it till this day as a reference guide. It is short and to the point.

Sherwin

deschel wrote on Tuesday, July 10, 2012:

The easiest way to import the data is to use PHPMyAdmin.  PHPMyAdmin is built into OpenEMR (Select Administration->Other->Database.)  It has an import function.  However, the version built into OpenEMR is very old and only allows import of data formatted in SQL.  The newest version of PHPMyAdmin will import CSV data.

It is very easy to install the latest version of PHPMyAdmin on your server (keep it in a separate directory from OpenEMR.)  Just download it from their website and follow the directions to configure it.

It you are importing patient demographic info, you want to import into the table “patient_data”.  You can look at the field names using phpMyAdmin to match the headers in your csv file to the names of the table fields.  Also, make sure that you uncheck the option to suppress autoincrement.

Me and my programmer are currently working on adding a data import function to OpenEMR.  It should be finished in the next few weeks.  However, if you use phpMyAdmin, you may not need it.

Let us know what you do, and if it works.

David Eschelbacher MD

pfindan wrote on Tuesday, July 10, 2012:

Thanks for all your replies. You can find more about noah here: http://www.himsa.com/  . I would like to import First and Last name, DOB, phone #, and address. I have moved some of these from there origional position in the program, would this matter?

Thank You David, this seems to be what I need. I will try your instructions when I am in the office tomorow and see if it works.

Thank You all!!

pfindan wrote on Tuesday, July 10, 2012:

If I was following your instructions David, would I just have to open my .csv in excel and change the headings in the program to the headings that i see in patient_data in phpMyAdmin??? Then import?

Thanks!
Daniel

blankev wrote on Tuesday, July 10, 2012:

I think somewhere there is an explanation on Wiki ho to import with CSV files.

Best thing to do is make at least three new clients for the database and fill as many fields as possible.

Export this file in CSV.

Use this as an example for the fields and columns and make your own CSV just like the one created with phpMyAdmin.

Import this file. It can’t be more than a certain amount of bytes. But it works.

In worst case scenario you have to delete the table and import the csv file again.

NEVER EVER do this with the USURS table, because there is your registration for login.

Where is this “patient_data” file and how can I import to it? I’m using a cloud based OpenEMR application. TIA

patient_data is the name of the table in the database running in the docker container.