Custom Encounter Forms

patstl wrote on Monday, January 30, 2006:

Can anyone help me create customer encounter forms for a podiatrist office. Or forms in general

– Patrick

patstl wrote on Monday, January 30, 2006:

customer = custom
sorry for the spelling

– Patrick

markleeds wrote on Monday, January 30, 2006:

Regarding the formscript.pl form creating tool:

I did test forms created at the time the script was written and they functioned properly.  I was suprised to find that a form created now does not work in the current cvs version of OpenEMR.  I can only guess that some change has broken compatability with older forms.  I wrote the script based on an older form from version 2.6 I think.  Now, the form comes up for data entry, but after submitting, it does not display at all and it does not insert into the database.  If anyone is wondering how I let such poor quality work get by, at the time I wrote it, it did work with the current version of OpenEMR.

Since I very much need the script for my own use now, I will try to fix it.  Sorry.

Suggestions regarding the current standards of form design are welcome.  Otherwise, recommendations to a good existing form to use as a model would be helpful.

Thanks!

Mark

ajperezcrespo wrote on Monday, January 30, 2006:

A new version of the forms script (1.1 I believe) is located under r/contrib/forms/formmaker.  Its about 9 months old.

drbowen wrote on Monday, January 30, 2006:

Mark,

Is it possibly to rewrite this in PHP?

If so it would make a great addition to the project.  Lots of people want to be able to add their own custom forms. Including this under form administration would help a lot.

For me the generated files will add data to the database but I can’t view them. (currently using 2.7.2)

Sam Bowen, MD

markleeds wrote on Monday, January 30, 2006:

I don’t expect finding the problem and fixing it will be a big deal.

As far as porting it to PHP, it would probably only make sense to do that if I was planning to implement a web interface and incorporate it into OpenEMR.  That would be ideal, but I don’t currently have plans to do this.

As it is, it is a simple command line tool which should work easily with any recent version of Perl without installing any additional modules.  Almost any system running OpenEMR likely came with Perl pre-installed.  If not, it is very easy to install.  Much easier than installing PHP.

It’s really intended to be a tool for the knowledgable form designer to save some time and effort.

I’ll let you know when it’s ready.  I’m going to have a more useful sample form included with it this time.

Mark

markleeds wrote on Tuesday, January 31, 2006:

Very strange.  I downloaded via CVS the current files and setup a test install of OpenEMR.  According to the login screen, it’s version 2.8.1.  I copied formscript.pl into the forms directory and started making a variety of forms with it.  I tested them in entering data, viewing it later from the encounter screen, and generating reports.  Everything worked without any problems.

I can’t wait to get to the office tomorrow and see what the difference is.

speaking of differences, if you run

diff new.php view.php

in fee_sheet, you get no output because the files are identical (as advertised).  On the other hand, run the same in a formscript.pl generated form and you get:

0a1
> <!-- view.php -->
10,11c11
< <form method=post action="<?echo $rootdir;?>/forms/a1_preop_physical/save.php?mode=new" name="a1_preop_physical">
< <hr>

> <form method=post action="<?echo $rootdir?>/forms/a1_preop_physical/save.php?mode=update&id=<?echo $_GET["id"];?>" name="my_form">
41a42
>

Well, at least a few simple things to check tomorrow…

markleeds wrote on Tuesday, January 31, 2006:

Disregard the above, I believe I have found the problem.  I did not consider escaping quotes.  If the layout file with the form data contains ’ or " it will mess everything up for obvious reasons.

I wonder if this is the problem others have had in trying it out.

I have typed the information from the review of systems check form and generated a new form from it and it is pretty good with the feature of reporting unchecked boxes as negatives (this is an optional feature).  Probably a useful feature for justifying higher level coding.

Very soon I will submit an improved version with cleaned up punctuation, properly escaped quotes, and better documentation.