Coping LBV forms

hamdpa wrote on Monday, November 09, 2015:

Hello to all,
Is there an easy way to copy an LBV form to the same instance of OpenEMR?
I would like copy a large section of one form to another. If its easier to copy the entire form and delete a section, that would still be easier than manually copying line by line.

Thank you,

Henry

teryhill wrote on Monday, November 09, 2015:

What I do is export them as a csv file , then change the numbering and name then import the new ones.

Lay out info

“LBFCL_Exam”,“amsler”,“3CL Exam”,“Amsler Grid”,“140”,“34”,“1”,“0”,“0”,“Objective”,“1”,“6”,“0”,“F”,
“LBFPost_Op”,“amsler”,“3Post Op”,“Amsler Grid”,“140”,“34”,“1”,“0”,“0”,“Objective”,“1”,“6”,“0”,“F”,
“LBFPath”,“amsler”,“3Path”,“Amsler Grid”,“140”,“34”,“1”,“0”,“0”,“Objective”,“1”,“6”,“0”,“F”,

List info

“lbfnames”,“LBFCL_Exam”,“CL Exam”,“1”,“0”,“0”,“0”,“0”,
“lbfnames”,“LBFPost_Op”,“Post Op”,“2”,“0”,“0”,“0”,“0”,
“lbfnames”,“LBFPath”,“Path”,“3”,“0”,“0”,“0”,“0”,

Hope this helps

Terry

hamdpa wrote on Tuesday, November 10, 2015:

Hi Terry,
I’m running OpenEMR 4.2.0-4 on vmware appliance, Ubuntu 14.04 LTS guest /Windows 8.1 pro host. Could you be more detailed in how to do this. Do you export via administration/backup or administration/other/database and how do import?
Don’t really understand what you have listed above.

Thank you,
Henry

teryhill wrote on Tuesday, November 10, 2015:

export with administration/other/database and import with administration/other/database.
If you export layout file you will need to remove everything from the CSV file that you exported except the form you are wanting to copy. then rename the form name and import the CSV file with ONLY the new form in it. Export the list options and find the entry in lbfnames for the layout rename it and increment the form number then iimport ONLY the changed LINE into the list options. MAKE A BACKUP BEFORE YOU BEGIN.

hamdpa wrote on Tuesday, November 10, 2015:

Hi Terry
Just for my understanding, what is the difference between the file using the database vs administrative/globals/features then check configuration export/import save then administration/backup/export configuration then checking Tables-Document Categories / Lists -Layout-Based Visit Forms / Layouts - pick the form you want?
Thank you,
Henry

teryhill wrote on Tuesday, November 10, 2015:

You can use administration/backup/export the choice is yours. It gives a SQL output. it is easier for me to work with a CSV file. Just a matter of what is easiest for the user.

hamdpa wrote on Tuesday, November 10, 2015:

Ok
Thank you again

Henry

sunsetsystems wrote on Tuesday, November 10, 2015:

What I do is Administration -> Backup -> Export Configuration and then use a text editor to scan/replace the form ID and/or make other desired changes. Then import it back again. And of course have a backup handy in case of mistakes.

Rod
http://www.sunsetsystems.com/

hamdpa wrote on Tuesday, November 10, 2015:

Hi Terry,
Went to administrative/other/database and under openemr scrolled to layout options then click export / click quick, click format scroll to CSV, click GO and save file. This opens with Excel or notepad, but doesnt look like your example above. What am I doing wrong?

Thank you,
Henry

teryhill wrote on Tuesday, November 10, 2015:

I use notepad++ for Windows so it looks like what you see.

Terry

Sent from my iPhone

On Nov 10, 2015, at 1:39 PM, Henry Alvarez hamdpa@users.sf.net wrote:

Hi Terry,
Went to administrative/other/database and under openemr scrolled to layout options then click export / click quick, click format scroll to CSV, click GO and save file. This opens with Excel or notepad, but doesnt look like your example above. What am I doing wrong?

Thank you,
Henry


Coping LBV forms


Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/openemr/discussion/202504/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

fsgl wrote on Tuesday, November 10, 2015:

Hi Henry,

You’ve worked with .sql files before, therefore it may be easier to use them again.

I’m going on the assumption you want to append part of one Eye form from the Wiki, not new forms that you created yourself.

It would be easier if we know which part of the Wiki form you want to graft onto which other form. That way we can give you detailed, step-by-step, instructions how via phpMyAdmin.

Because you use Ubuntu, the .sql files will open in the default text editor.

If the text editor does not have line numbers on the left margin, it can be enabled from the Edit tab, Preferences, Options & choose “Show line numbers”.

Code changes are a lot simpler if each line of code has been numbered.

mdsupport wrote on Tuesday, November 10, 2015:

You could use the utility included in this post.

  1. Copy the file to a directory (e.g. custom)
  2. Log on to your installation
  3. Manually access utility (e.g. https:// /custom/imex_lbf.php)
  4. Select the form you wish to export
  5. Save the file to your local drive
  6. Select the same file to import
  7. Make changes to the copied form as needed

We use it to copy forms across databases. In your case you may have to play with the form names.

hamdpa wrote on Tuesday, November 10, 2015:

Lots to chew on here.

Thanks to all!

fsgl wrote on Wednesday, November 11, 2015:

What part of Form A do you wish to graft onto Form B?

While you’re mulling, I’ll work on the answer.

After details of the answer has been worked out, then it’s up to you to select the method of implementation that makes the most sense for your situation.

hamdpa wrote on Wednesday, November 11, 2015:

Hi fsgl,
I have made revisions/additions to your "comprehensive ophthalmic exam NT form, particularly with regard to the pre-exam screening/ refraction portion. I would like to use that form, but weed out certain parts or perhaps only rename it and just use what is necesaary for a simple IOP check or to rename it so that I know that it was a hospital consult and not in office exam when looking at the patients encounter Hx. I really like working with nation notes and find your form with my revisions very useful. Have not implemented EMR for office patients as I wanted to first get the practice managment part under our belt first. We are getting ready to start with the EMR part at the office and want to get the forms ready. Have been using the revised form for Hospital Consults for a while and it has worked out well.

Thank you,
Henry

fsgl wrote on Wednesday, November 11, 2015:

If the hospital consult form is exactly as you like it, the only adjustment would be to go to Lists/Layout-Based Visit Form & change the Title to your own preference. See 1.

Don’t change the ID, however, to avoid the disappearance of the form from the Layout Based drop down. See 2.

When you’re ready to have the NT form for use in the office, add 1 after the ID & keep old Title or change if you like. See 3.

Go into the nt eye form.sql file & add 1 to lines 53 to 117, save & import into layout_options in phpMyAdmin (you’ve done this before). See 4a.

hamdpa wrote on Wednesday, November 11, 2015:

Hi fsgl,
What if I just want to copy the form I have , but give it a different name?
Thank you,
Henry

hamdpa wrote on Wednesday, November 11, 2015:

I still want to keep the old one.

hamdpa wrote on Wednesday, November 11, 2015:

Hi MD Support,
Copied file to custom, but unable to execute program. From within the network the ip address is https://10.0.0.30/openemr/ to get to openemr login. Tried https:// 10.0.0.30/var/www/openemr/custom/imex_lbf.php and it doesn’t work. Could you clarify what I am doing wrong. I have SSL certificate that is used.

Thank you,
Henry

mdsupport wrote on Wednesday, November 11, 2015:

Apache provides access to your filesystem directory “/var/www/” as “http://10.0.0.30/”.
If you put file in /openemr/custom directory, you will access it as :
https://10.0.0.30/openemr/custom/imex_lbf.php

Since your source and destination systems will be same, you may need to manipulate form names or field names. You can use notepad “replace all” function to make changes in the downloaded file.

** Be safe : Try it first in a test system or set up a dummy form and make sure it gets copied as per your needs **