How to export & import LBV Forms

suavelogica wrote on Friday, April 05, 2013:

Hi Everyone! I am making some great progress setting up my first medical office with Open EMR. My customer has given me his visit forms & I recreated them all using the LBV Form creation tool, it works pretty reliably.

Now that I am done creating these forms on my LAN OpenEMR server, I am trying to figure out how I can export them to take to his office for installing on his server. The version we are using is 4.1.1 on Windows 2003 Server using the XAMPP controller.

Thanks for any help you may have on this subject, since all I could find was how to do a full backup of the system and not the individual forms. Also, I have 10 custom lists that I created to use in the forms.

Best regards,
Mike Barker
MedLogic IT
Buenos Aires, Argentina

sunsetsystems wrote on Friday, April 05, 2013:

In Administration -> Globals -> Features make sure "Configuration Export/Import " is enabled.  Then you can go to Administration -> Backup -> Export Configuration and export just layouts and lists.  You’ll then need to edit the output to include only the layouts and lists that you want to transfer.  Also be sure to get rid of the DROP TABLE and CREATE TABLE statements.

To load into the target installation go to Administration -> Globals -> Import Configuration and upload the file.  If it doesn’t work you may have to run mysql at the command line to see what the problem is.

Not perfect, but should save you a lot of time.


blankev wrote on Friday, April 05, 2013:

My advise would be (a general practitioner with some unreliable information):

Make a fresh install of XAMPP and OpenEMR, do the latest patches or at least all the patches you did on your local machine on the Dr.-New- Machine.
Follow instructions Rod made.**

Also worth the effort might be: Go to your local Administration => Other => Database:
backup in MySQL go through Export Database

Go to the Dr. OpenEMR-Machine and install the backup.

For this you need to know what the backup mechanism is.

Or you can export table after table in Administration => Other => Database (most secure option, but also time consuming. Export table local machine and import table in the Dr. OpenEMR-Machine.

This second option gives you more step by step solutions since the User and Passwords might give rise to problems for installing on another machine.

The table of Users in OpenEMR is very essential for maintenance and might be different in both machines. If the Admin Pass login is deleted and there are no other Users with administration rights you are in trouble.

Or got to Administration MySQL-database and import the important tables for the Dr.New-machine

Last advise: make backups and make sure these backups can be restored.

Good luck, you might not need it, but better advise might come soon from more experienced advisors.

kodusote wrote on Friday, April 05, 2013:

Hello Mike,

You don’t want to give the image of a “fumbling” expert to your Dr. Client.  Would suggest you find a Window machine (not necessarily a server) install XAMPP and OpenEMR and try all the suggestions until you get it right before going on the install on your Dr.'s machine as an expert.  If Rod’s suggestions don’t work the try Pimm’s option of exporting the important tables in the mysql database one by one from your machine and importing them to the 'test" site.  It is important to note that you do NOT DROP the table on the “test” machine database but TRUNCATE (empty) and then import the backup from your machine.  If you DROP the table and import another table entirely, the link to OpenEMR would be lost.

Best of luck.


blankev wrote on Friday, April 05, 2013:

Importing tables has also an option of SKIP duplicates, or SKIP rows. Be sure to use this in the USER table or even more secure, just ask somebody to type them in again, usually this is the table with least rows filled. Loosing administration right means a new fresh install, unless you find a MySQL guru who can input a User ans PW via login MySQL.

blankev wrote on Friday, April 05, 2013:

BTW if you have problems be sure to make a note so this can be included in the WIKI Page for others with the sam problem.

suavelogica wrote on Monday, April 08, 2013:

Hi Rod, Thanks for the speedy reply. When I go to export the configuration of the lists, layouts & the translations, I get the following message with no output created in the TEMP folder:

Creating export file…
“C:/xampp/mysql/bin\mysqldump -u “openemr” -p"escargot” --opt --quote-names “openemr” list_options layout_options lang_languages lang_constants lang_definitions | C:/xampp/perl/bin\perl -pe ‘s/ DEFAULT CHARSET=utf8//i; s/ collate[ =][^ ;,]*//i;’ > C:\windows\TEMP/openemr_config.sql;" returned 255:

Any ideas what might be going on?


suavelogica wrote on Monday, April 08, 2013:

Thanks for the great advice, Pieter! It looks like I may have to go the route of exporting the individual tables. For my purposes would they be:


? Or are there other tables I need to include to make it all work?

1 Like

suavelogica wrote on Monday, April 08, 2013:

Hi Kayode!

Thanks for the suggestions, I am practicing the procedure to have it down before I show up to install the forms. This install could lead to many referrals here in Buenos Aires & Columbia and possibly an integration with an HTML5 Canvas drawing module added to a custom form, we’ll see…

sunsetsystems wrote on Monday, April 08, 2013:

Hi Mike, it’s handy that the error message gave you the whole command line that failed. Suggest you try to run it at a command prompt and see what error is produced. Perhaps a wrong path or missing mysqldump or perl binary.


suavelogica wrote on Monday, April 08, 2013:

Thanks Rod.

This part works fine and dumps the data to the screen:

mysqldump -u “openemr” -p"escargot" --opt --quote-names “openemr” list_options layout_options lang_languages lang_constants lang_definitions

The command stops working when I get to the part that directs the SQL dump to the perl parser- | C:/xampp/perl/bin\perl -pe ‘s/ DEFAULT CHARSET=utf8//i; s/ collate[ =][^ ;,]*//i;’ > C:\windows\TEMP/openemr_config.sql;

Any ideas why that is not working? Perl.exe resides in the appropriate directory…

suavelogica wrote on Monday, April 08, 2013:


OK, I exported all the tables I mentioned above from the server I created them on, emptied the tables on a test installation of OpenEMR and imported each table. I then logged out of OpenEMR and logged back in and the forms are there!

Now I am going through each form and testing them out. I found a few errors I made when setting up the forms, but fortunately, the LBF forms are easy to tweak.

I also discovered the merging function for the language definitions I am modifying so those appear to be working correctly too.

Thanks for all the help, gentlemen!

You also need: