2 *************************************
3 * Form Generating Script 1.1 *
4 *************************************
6 This is a complete rewrite of an earlier Perl script I wrote to generate
7 forms for OpenEMR. It is now all self contained within a single .pl file.
8 To run at the shell command line, type:
10 Perl formscript.pl [filename]
12 ./formscript.pl [filename]
14 where filename is a text file with data relating to your form. If you run
15 without a filename argument, a sample data file will be created in the same
16 directory named 'sample.txt' that you can use to see how to create your own.
18 Basically you enter one database field item per line like this:
20 Social History::popup_menu::smoker::non-smoker
24 Social History::radio_group::smoker::non-smoker
27 where the first item is the field name. spaces within the name will convert to '_'
28 for the sql database field name. If you use a SQL reserved word, the form generation
29 will fail and this program will notify you of the word(s) you used.
31 The '::' is the standard delimiter that I use between items. The second item on the line
32 is the form widget type. You can choose from:
41 scrolling_list_multiples
43 Putting a '+' at the beginning of the field name will let the form know that you want to
44 report negatives. This means the following:
46 +cardiac_review::checkbox_group::chest pain::shortness of breath::palpitations
48 creates a group of checkboxes where if the user chooses the first two boxes, the database will
49 have the following line entered:
51 chest pain, shortness of breath. Negative for palpitations.
53 The remaining items after the fieldname and the widget type are the names for
54 checkboxes or radio buttons or default text
55 for a textfield or text area. You can also start a line with a '#' as the first character and this
56 will be an ignored comment line. If you put html tags on their own lines, they will be integrated
57 into the form. It will be most helpful to look at 'sample.txt' to see how this works.
59 This is 1.1 and is tested to the extent of installing the form and entering data within an encounter.
60 Please send feedback to mail@doc99.com. I will definitely
61 be fixing and improving it.