Need to find a way to import patient data

(Nehal Dave) #1

I have patient user data which includes personal info, clinical info (visits, encounters, notes), vitals from smart devices (Blood pressure, Activities, Pulse Oximeter reading, Weight readings)

I am trying to figure out how to import all this info (if not in one import, i am fine with multiple ones)

Any help, direction will be greatly appreciated!

OpenEMR Version
I’m using OpenEMR AWS Cloud version 5.0.1

(Stephen Waite) #2

hi @NDave, what type of formatting can you obtain for this data? like CSV, FHIR?

(Nehal Dave) #3

@stephenwaite I have data in my own local DB so i can easily generate it in CSV format.
I can build any format that works for OpenEMR.

(Stephen Waite) #4

hi @NDave, .csv will be easiest to start with patient_data table, the wiki has some articles detailing this


I have the AWS Standard version running and I installed a phpmyadmin docker install ( to easily access the SQL tables.

I created 3 fake patient accounts and entered info into as many fields as I could (it doesn’t have to be all the fields, they’ll still get exported, it just gets confusing lining up the data to the correct field if you leave too many blank). Then I accessed patient_info via phpmyadmin and exported the table as a CSV file.

I probably used some extra steps here but regardless: I converted the CSV file to an Excel file and separated the semicolon delimited info into separate fields.

I then added my existing patient info to it so each data type matched each OER data column in the same order those fields were exported. Obviously a lot of them were left blank and had no info but it was pretty easy to figure out the rest.

Then I pasted it all into an openoffice calc spreadsheet and removed any formatting (sometimes formatting elements get attached to during the downloading and/or when adding existing patient info to the Excel spreadsheet that can foul up the import attempt). I also made sure to delete the 3 fake patients from the import file, or else the import would fail due to duplicate entries.

I imported the file and that was it - for demographic type information, anyway. Clinical data is as I understand it a different beast entirely, of which I have no real experience,

I ended up modifying the patient info fields fairly extensively (not deleting, but deactivating fields I didn’t need and adding a few, like a separate field for driver’s license issuing state etc.) so in hindsight it would have been a bit easier to do that first, then create the 3 fake patients, then export that csv file to add existing patient data to.

Hope this helps!

EDIT: the table is named patient_data not patient_info

(Nehal Dave) #6

@hcrossen, Thanks for detailed steps of your process.
It is very insightful & helps me to figure the way forward.
I figured we would have to insert it directly in db & hence i figured a way to connect to docker mysql before asking this question. So i have access to db directly.

I would rather load the data directly in DB than to to use phpmyadmin as it exposes the db on web. So now that i know Patient info is stored in PATIENT_INFO table i will work on that. I really liked your idea of making a test patient account with all the fields to get the sample data.

I would like to know how do we deactivate/add fields & cross reference of UI screens to DB tables. Do you know where i can find this info?

Thanks once again, Cheers!!


Yeah I actually removed the phpmyadmin install after getting everything situated. I felt had to use it because I am no expert in this type of thing and it seemed the best option.

Go to Administration -> Layouts then in the Edit Layout drop-down, select Demographics. You will get a list of all the patient info fields where you can customize them to a pretty impressive degree. You can also add new ones wherever you want. The devs have advised against deleting existing fields because it might cause problems with patch updates, but simply setting the ones you don’t want to Unused in the UOR column should be enough.

I am fairly certain the order of the fields is the order they will export/import and the data field’s name will be what is listed under the ID column, so that should give you the info you need.

Glad to help! It took me far longer than I care to admit to get my install up, running, and configured lol

(Asher Densmore-Lynn) #8

Sure, but you learned a lot – the next time you set up Standard, or the next time you interact with the Standard stack recovery process, you’ll have a nicer time of it.


Ohh and sorry the table you’ll be looking for is patient_data not patient_info, apologies.

(Nehal Dave) #10

@hcrossen, yes i figured its patient_data. Thanks!
On the other note, how do i go about customizing the UI. I need to have our logo on login page & if possible on the top frame of the logged in portal.


(CG) #11

You will find options under Administration -> Globals -> Appearance, down toward the bottom of the lists, for “Show Title on Login”, “Show Extra Logo on Login”, etc.
After enabling the logos, you may need to change out the images in …/openemr/sites/default/images, more specifically “login_logo.gif”, is probably the 1st one you’ll be concerned with.
Adding a logo to the top frame will require making code modifications, I don’t believe there’s an existing allowance for it.

(sani) #12

Using phpMyAdmin, How to import a set of user records from the sql files found in
/openemr/sql? Can you please tell me the steps?