Passing on Variables in custom forms?

Hi guys I am working on a few forms for openemr that are pretty common forms in workmans comp offices. Everything works great now but it requires double filling the form. So when we fill out the bottom form and hit submit it creates a pdf file and allows us to attach it into the documents area of the patient file.

What I would like though is to call the variables into the fields so all the workers in the office or doctors need to do is simply open the form prepopulated and simply print.

I think I need to include /patient.inc
How though to do Call the variable fname or lname patient for example in this form. I have uploaded a photo of the form. Basically want first name last name address to auto fill.

Thank you for any help you provide and once its complete I would be open to committing future forms.

Hi @Curtis_Smith ,

Uploads are aren’t working on this forum, but they will be soon. To see how this is done, check out these lines of code:

-brady
OpenEMR

ok, the actual highlighting of the github code is really cool! I had no idea this forum would do that.