Physical exam template

xiaoanri wrote on Friday, April 11, 2008:

I have recently installed the open emr on an windows xp professional version, there are only a few templates and there is no template for physical exam.  I thought there are more templates including one for physical, but do not knwo how to get it onto the interface. Please comment and any help is greatly appreciated!

Hui

drbowen wrote on Friday, April 11, 2008:

There is a physical exam template under:

administration

then

forms

At the bottom of the page there are a number of very useful forms that can be activated by register → install database → activate.

One of these forms is a physical templates.

I also have some templates that I cut and paste into the "form dictation". I would be glad to share these with you.

Sam Bowen, MD

xiaoanri wrote on Sunday, April 13, 2008:

Many thanks to Dr. Bowen, I was able to activate all the forms.  I would really appreciate if you could share your own templates.  Also, since I am using this in a pain clinic, if I want to add/modify some info on the physical exam, where is the source/code file, and do i need to modify one file only or multiple file?

markleeds wrote on Monday, April 14, 2008:

Have you tried formscript.pl?  It is a command line tool for creating new forms.  Go to the following directory:

/openemr/contrib/forms/formmaker

and type either:

./formscript.pl

or

perl formscript.pl

It will give you the basic documentation.  You can use this tool to create forms.  Then just move the form directory to /openemr/interface/forms and register as usual.

voipbound wrote on Monday, August 18, 2008:

I am new at this too.  I am looking to create forms and would like to share them with the community. Would people be interested in posting their forms up and share their work also?

rabbai wrote on Saturday, January 17, 2009:

Thanks mjl, Thanks for your post. I am trying to get a form for a mental health practice and they need certain forms for their patient evaluation. Can the formbuilder script serve this purpose??? I am very interested in finding out so I can go ahead and make it ready for them. Thanks

markleeds wrote on Sunday, January 18, 2009:

Obinna Amalu:

It’s pretty easy.  The script can be found at the following location:

/openemr/contrib/forms/formmaker/formscript.pl

Go to that directory and create/edit a file named psych.txt.  This will be your template file.  Put the following contents in it:

psychiatry
Axis I::textarea
Axis II::textarea
Axis III::textarea
Axis IV::textarea
Axis V::textarea

That’s it.  Just those six lines above.  The first line is your form name.  The rest defines your form fields.  This is far from utilizing the capabilities of program, but is just to show you how simple it is to throw together a quick form.  Now run the script:

perl formscript.pl psych.txt

You should now have a directory in the path named ‘psychiatry’.  Move this to the forms directory:

mv psychiatry /var/www/openemr/interface/forms/

Of course, your path may vary on your system.  Now you just have to go to the administration section of OpenEMR to register and enable your new form.

If you would like to learn more about how formscript.pl works, run it without an argument like this:

perl formscript.pl

The documentation will display in your terminal.  Do not read the documentation in the /contrib/forms/formmaker/ directory.  It is out of date.  The program generates the most current documentation.

The great thing about making a form this way is that it generates all of the individual files for you without you having to edit an existing form and go through each file and change the form name and field names.  That way is much more likely to lead to bugs.  Try the above example and see how it works for you.

-Mark

rabbai wrote on Sunday, January 18, 2009:

Thanks Mjl,

I really appreciate your assistance as I almost lost a project due to this. One more thing the places you wrote Axis I and other can that be named something else?? Just want to be sure as even though i have been using Linux for a while i havent used Open EMR so i really dont know how much it can do. Thanks once again.

rabbai wrote on Sunday, January 18, 2009:

I also tried running the script now and it gave me an error about CGI something on line 6 of the formscript.pl. Can you please assist me with a work around on that issue??? Thanks

markleeds wrote on Sunday, January 18, 2009:

Obinna Amalu:

Line 6 is:

use CGI qw(:standard);

CGI.pm has been a core module since Perl 5.004.  This means it is included
with the distribution, so when you install Perl, it should be there.  Perl is already installed on many Linux/Unix systems and should be well beyond version 5.004.  If you installed Linux yourself, maybe you don’t have Perl installed and you will have to install it.

To see if you have Perl and what version you have, type this:

perl -v

On my system, it is 5.8.8.

To answer your question about field names, I used Axis I-V in my example just because you mentioned developing a form for a mental health practice.  You can use any field names you wish.  They cannot be reserved sql words.  The program should catch this if you try to use them.

If your job depends on developing OpenEMR forms and you have never successfully created one, you may want to seek professional help.  There are administrators of this project who can help you.  It is possible to develop forms with capabilities beyond what formscript.pl can provide as well.  I would recommend contacting Rod at http://sunsetsystems.com.

The program formscript.pl has been in development since 2004.  It is written in Perl because that is the best language that I knew for solving this sort of problem.  I have made it a point to avoid using any non-core modules so users do not have to install anything from cpan.  I have been asked to rewrite it in PHP.  This is definitely possible, but it will be time consuming.  I have avoided doing this because many people over the years have announced their own projects for generating forms using web-based GUI.  I have continued to add features but I assume a better way will be introduced by someone at some point.

rabbai wrote on Sunday, January 18, 2009:

Thanks for the correction. Well i guess its due to the fact that I am running it on a virtual machine with the virtual appliance i obtained from oemr.org. or does that have anything to do with it???

markleeds wrote on Sunday, January 18, 2009:

Good point.  I don’t know if the virtual machine comes with Perl and if it does, what version it comes with.  I assume that perl would be needed for freeb.

I currently don’t have a machine with the available resources to test the virtual machine.

rabbai wrote on Sunday, January 18, 2009:

Hello Mark,

Guess its a good thing i noted this point out. I noticed that since I run a 64-bit laptop and have the virtual machine on it, updates are not possible and on looking further i found out that the perl-CGI was not installed on the virtual appliance. I am now looking for a pentium box so i can do a proper installation and testing on my own. Thanks alot and if its ok please look into it a bit. U really assisted me greatly

rabbai wrote on Sunday, January 18, 2009:

Yeah i got it working finally after alot of struggle it came through. I went to perl website and searched for the module that was giving an error that is the CGI.pm and downloaded it and installed it manually now my forms are generating perfectly. Thanks alot.

xiaoanri wrote on Monday, January 19, 2009:

Hi, Mark, The formmaker is a great addition in making openemr more flexible to fit different situations.  I tried your sample.txt and it works well except for 2 things: 1) although all the data field is intact on the screen with check boxes, when the data is checked and sent, I notice the first data field is missing in the patient record, no matter what data field it is, textarea, textfield, checkbox, etc. (I tried different scenario)  2)  When I try to print a report, the datafield is printed in 3-4 columns, not the usual pattern you see in a H&P–one line from left to right, then the second line…  Is there any way to fix that?  Thank you, Hui

markleeds wrote on Monday, January 19, 2009:

hui zhu:

Which version are you using?  This problem was brought to my attention 4-5 months ago and I attempted to fix it.  Try the latest version which was updated 4 months ago to see if the problem goes away.  You can run the newer version of formscript.pl on your template file and still use the form as long as you don’t alter the template.  It can be easier if you just copy formscript.pl to your forms directory.

Try downloading revision 1.14 or greater from cvs:

http://openemr.cvs.sourceforge.net/viewvc/*checkout*/openemr/openemr/contrib/forms/formmaker/formscript.pl

The format for display and printing can be improved.  I will work on it.

xiaoanri wrote on Monday, January 19, 2009:

Mark, you are right, I copied your most recent version by following the short cut, the first datafield now shows up in the patient record.  For your info, the formmaker that has the bug was Form Generating Script 2.0 that came with OpenEMR 2.9.0.  The new file without the bug is also version 2.0, but you must have done the fix there.  Thank you!  Hui

markleeds wrote on Monday, January 19, 2009:

Hui:

Sorry about the confusion with the version #.  I have not kept up with changing it.  It seems best to rely on the cvs revision number.  The 2.0 in the current version came from Mike Brinson.  He submitted to me a revision of the program with extensive commenting and some bug fixes.  I think he suggested increasing the version from 1.0 to 2.0 at that point.  It’s best to check for the latest revision online at this site.

Obinna:

I am sorry that you had to go through the trouble with CGI.pm.  It might not be hard to write it out of the program so others in the same situation will not have this problem in the future.

rabbai wrote on Wednesday, January 21, 2009:

Hello Mark

Thanks for your assistance so far. Well I had an issue installing Open EMR 2.8.3 on Mandriva 2009. The installation went smoothly and after installtion of freeB and SSL, if I long on as admin, it give me the regular user grants, i cannot add user or do anything the admin can do which means i have a locked down system. Please assist me, I will upload d virtual machine for any one interested after I am done with it. Thanks.

omo66 wrote on Sunday, January 25, 2009:

Hi Mark,
I could not get 1.4 formmaker to work.
Fedora 9 Perl 5.x
here is the error:
[root@omo formmaker]# perl formscript.pl 2sample.text
Can’t open 2sample.text: No such file or directory at formscript.pl line 427.
Use of uninitialized value $form_name in scalar chomp at formscript.pl line 428.
Use of uninitialized value in transliteration (tr///) at formscript.pl line 430.
Use of uninitialized value $compare in hash element at formscript.pl line 431.
Use of uninitialized value $form_name in substitution (s///) at formscript.pl line 436.
Use of uninitialized value $form_name in substitution (s///) at formscript.pl line 437.
Use of uninitialized value $form_name in -e at formscript.pl line 438.
Use of uninitialized value $form_name in string at formscript.pl line 440.
Use of uninitialized value $form_name in concatenation (.) or string at formscript.pl line 440.[root@omo formmaker]# perl formscript.pl 2sample.text
Can’t open 2sample.text: No such file or directory at formscript.pl line 427.
Use of uninitialized value $form_name in scalar chomp at formscript.pl line 428.
Use of uninitialized value in transliteration (tr///) at formscript.pl line 430.
Use of uninitialized value $compare in hash element at formscript.pl line 431.
Use of uninitialized value $form_name in substitution (s///) at formscript.pl line 436.
Use of uninitialized value $form_name in substitution (s///) at formscript.pl line 437.
Use of uninitialized value $form_name in -e at formscript.pl line 438.
Use of uninitialized value $form_name in string at formscript.pl line 440.
Use of uninitialized value $form_name in concatenation (.) or string at formscript.pl line 440.
Could not create directory : No such file or directory at formscript.pl line 440.

Could not create directory : No such file or directory at formscript.pl line 440.

What is missing ?
Thank you again.