How to Copy Layout Based Visit Form fields

Hello everyone in this great community.
I have created a couple of of Layout Based Visit Forms for my practice. I would like to copy a custom field I created from one custom LBF to another.
I noticed that OpenEMR 7 has this feature when creating LBF but I am running OpenEMR 5.0.2 on a local Windows server (Windows 11 OS) with XAMPP v3.2.2 and the phpMyAdmin is v4.5.1 .

I would appreciate if someone showed me how to copy fields between custom LBF.
I can find my way around basic functions of phpMyAdmin.
Thanks a lot.

You can export LBV-based forms from one OpenEMR db and import into another, e.g. for a form named “PHQ-9”:

Export from layout_options where form_id = LBFPHQ-9

Export from layout_group_properties where grp_form_id = LBFPHQ-9

For each list you may have created for use with forms (optional):
Export from list_options where list_id = the-name-of-your-list

2 Likes

That’s great, thanks a lot for your help. Been trying to accomplish this for a while.
Incidentally I am looking to import PHQ9 form into my db. I saw an earlier thread where you discussed about this specific form. Will follow up on that.

But what I was trying to do was to create a LBF with about 60 fields or more , actually its more of the same 6 fields reoccurring 10 times (e.g. Date in, Date out, route , comment, outcome; repeated 10 times on the same LBF).

So I figured would create the first 6 fields, copy them to another LBF and add serial numbers to the field ID and Field Labels to make them unique on the 2nd LBF before copying them back to the first LBF as another set of fields.

So I would end up having Date in 1, Date in 2 and up to date Date in 10. Same thing with all the other fields.

I don’t know to code so basically I am trying to save time if possible. Any Ideas?

Look into our questionnaire feature on forum. Many forms are already done and scoring is easier than LBF.

Alright @sjpadgett , will that. Must admit I haven’t used the questionnaire feature before. It is interesting from what I gather
Thanks for the tip.

Yeah, stay away from LBV-based forms if at all possible given there are better ways. We originally wrote our PHQ-9 using LBV, then replaced it with Mark Sarnov’s API-based PHQ-9 (itself based off our API-based GAD-7. And now as Jerry says there are questionnaires.

1 Like

Guess I will have to. Thanks for your help.

Do you know how I can get Mark Sarnov’s API-based PHQ-9 ?

And I think Jerry demonstrated a questionaires-based form recently that was either PHQ-9 or GAD-7…

1 Like

Yeah, I believe I came across something like that sometime ago but didn’t pay much attention. Will definitely look at it again. Much appreciated.