Contributed GYM Forms, some of the table.sql files include inserts into list_options...
[openemr.git] / contrib / forms / gyn_ros / view.php
blobea827881c14d13f8ac48ce79006182bd312f58bd
1 <?php
2 /*
3 * The page shown when the user requests to see this form. Allows the user to edit form contents, and save. has a button for printing the saved form contents.
4 */
6 /* for $GLOBALS[], ?? */
7 require_once('../../globals.php');
8 /* for acl_check(), ?? */
9 require_once($GLOBALS['srcdir'].'/api.inc');
10 /* for generate_form_field, ?? */
11 require_once($GLOBALS['srcdir'].'/options.inc.php');
12 /* note that we cannot include options_listadd.inc here, as it generates code before the <html> tag */
14 /** CHANGE THIS - name of the database table associated with this form **/
15 $table_name = 'form_gyn_ros';
17 /** CHANGE THIS name to the name of your form. **/
18 $form_name = 'Gyn Review of Systems';
20 /** CHANGE THIS to match the folder you created for this form. **/
21 $form_folder = 'gyn_ros';
23 /* Check the access control lists to ensure permissions to this page */
24 $thisauth = acl_check('patients', 'med');
25 if (!$thisauth) {
26 die($form_name.': Access Denied.');
28 /* perform a squad check for pages touching patients, if we're in 'athletic team' mode */
29 if ($GLOBALS['athletic_team']!='false') {
30 $tmp = getPatientData($pid, 'squad');
31 if ($tmp['squad'] && ! acl_check('squads', $tmp['squad']))
32 $thisauth = 0;
35 if ($thisauth != 'write' && $thisauth != 'addonly')
36 die($form_name.': Adding is not authorized.');
37 /* Use the formFetch function from api.inc to load the saved record */
38 $xyzzy = formFetch($table_name, $_GET['id']);
40 /* in order to use the layout engine's draw functions, we need a fake table of layout data. */
41 $manual_layouts = array(
42 'cardio_reviewed' =>
43 array( 'field_id' => 'cardio_reviewed',
44 'data_type' => '21',
45 'fld_length' => '0',
46 'description' => 'If CHECKED you must include a note',
47 'list_id' => 'yesno' ),
48 'cardio_note' =>
49 array( 'field_id' => 'cardio_note',
50 'data_type' => '3',
51 'fld_length' => '160',
52 'max_length' => '3',
53 'description' => 'Described the results of the review',
54 'list_id' => '' ),
55 'gastro_reviewed' =>
56 array( 'field_id' => 'gastro_reviewed',
57 'data_type' => '21',
58 'fld_length' => '0',
59 'description' => 'If CHECKED you must include a note',
60 'list_id' => 'yesno' ),
61 'gastro_note' =>
62 array( 'field_id' => 'gastro_note',
63 'data_type' => '3',
64 'fld_length' => '160',
65 'max_length' => '3',
66 'description' => 'Describe the results of the review',
67 'list_id' => '' ),
68 'Urinary_reviewed' =>
69 array( 'field_id' => 'Urinary_reviewed',
70 'data_type' => '21',
71 'fld_length' => '0',
72 'description' => 'If CHECKED you must include a note',
73 'list_id' => 'yesno' ),
74 'Urinary_note' =>
75 array( 'field_id' => 'Urinary_note',
76 'data_type' => '3',
77 'fld_length' => '160',
78 'max_length' => '3',
79 'description' => 'Describe the results of the review',
80 'list_id' => '' ),
81 'cns_reviewed' =>
82 array( 'field_id' => 'cns_reviewed',
83 'data_type' => '21',
84 'fld_length' => '0',
85 'description' => 'If CHECKED you must include a note',
86 'list_id' => 'yesno' ),
87 'cns_note' =>
88 array( 'field_id' => 'cns_note',
89 'data_type' => '3',
90 'fld_length' => '160',
91 'max_length' => '3',
92 'description' => 'Describe the results of the review',
93 'list_id' => '' ),
94 'other_reviewed' =>
95 array( 'field_id' => 'other_reviewed',
96 'data_type' => '21',
97 'fld_length' => '0',
98 'description' => 'If CHECKED you must include a note',
99 'list_id' => 'yesno' ),
100 'other_note' =>
101 array( 'field_id' => 'other_note',
102 'data_type' => '3',
103 'fld_length' => '160',
104 'max_length' => '3',
105 'description' => 'Describe system reviewed and the results of the review',
106 'list_id' => '' ),
107 'complications_reviewed' =>
108 array( 'field_id' => 'complications_reviewed',
109 'data_type' => '21',
110 'fld_length' => '0',
111 'description' => 'If CHECKED you must include a note',
112 'list_id' => 'yesno' ),
113 'complications_note' =>
114 array( 'field_id' => 'complications_note',
115 'data_type' => '3',
116 'fld_length' => '160',
117 'max_length' => '3',
118 'description' => 'Describe the complication',
119 'list_id' => '' ),
120 'lmpdate' =>
121 array( 'field_id' => 'lmpdate',
122 'data_type' => '4',
123 'fld_length' => '0',
124 'description' => 'When was the the first day of your last menstrual period?',
125 'list_id' => '' ),
126 'cycle_int' =>
127 array( 'field_id' => 'cycle_int',
128 'data_type' => '1',
129 'fld_length' => '0',
130 'description' => 'What is the Interval of your Flow?',
131 'list_id' => 'menses_cycle' ),
132 'cycle_int_note' =>
133 array( 'field_id' => 'cycle_int_note',
134 'data_type' => '3',
135 'fld_length' => '100',
136 'max_length' => '1',
137 'description' => 'Enter any addtional interval information',
138 'list_id' => '' ),
139 'flowfhcount' =>
140 array( 'field_id' => 'flowfhcount',
141 'data_type' => '2',
142 'fld_length' => '10',
143 'max_length' => '2',
144 'description' => 'How many tampons/pads per day',
145 'list_id' => '' ),
146 'flowhrs' =>
147 array( 'field_id' => 'flowhrs',
148 'data_type' => '2',
149 'fld_length' => '10',
150 'max_length' => '2',
151 'description' => 'How many between tampons/pads changes',
152 'list_id' => '' ),
153 'pmb' =>
154 array( 'field_id' => 'pmb',
155 'data_type' => '21',
156 'fld_length' => '0',
157 'description' => '',
158 'list_id' => 'yesno' ),
159 'vag_discharge' =>
160 array( 'field_id' => 'vag_discharge',
161 'data_type' => '21',
162 'fld_length' => '0',
163 'description' => 'If CHECKED you must include a note',
164 'list_id' => 'yesno' ),
165 'vag_discharge_note' =>
166 array( 'field_id' => 'vag_discharge_note',
167 'data_type' => '3',
168 'fld_length' => '160',
169 'max_length' => '3',
170 'description' => 'Describe the color and amount',
171 'list_id' => '' ),
172 'vag_itching' =>
173 array( 'field_id' => 'vag_itching',
174 'data_type' => '21',
175 'fld_length' => '0',
176 'description' => '',
177 'list_id' => 'yesno' ),
178 'vag_itching_note' =>
179 array( 'field_id' => 'vag_itching_note',
180 'data_type' => '3',
181 'fld_length' => '160',
182 'max_length' => '3',
183 'description' => 'Describe',
184 'list_id' => '' ),
185 'vag_odor' =>
186 array( 'field_id' => 'vag_odor',
187 'data_type' => '21',
188 'fld_length' => '0',
189 'description' => '',
190 'list_id' => 'yesno' ),
191 'vag_odor_note' =>
192 array( 'field_id' => 'vag_odor_note',
193 'data_type' => '3',
194 'fld_length' => '160',
195 'max_length' => '3',
196 'description' => 'Describe',
197 'list_id' => '' ),
198 'vag_irratation' =>
199 array( 'field_id' => 'vag_irratation',
200 'data_type' => '21',
201 'fld_length' => '0',
202 'description' => '',
203 'list_id' => 'yesno' ),
204 'vag_irratation_note' =>
205 array( 'field_id' => 'vag_irratation_note',
206 'data_type' => '3',
207 'fld_length' => '160',
208 'max_length' => '3',
209 'description' => 'Describe',
210 'list_id' => '' ),
211 'vag_spotting' =>
212 array( 'field_id' => 'vag_spotting',
213 'data_type' => '21',
214 'fld_length' => '0',
215 'description' => '',
216 'list_id' => 'yesno' ),
217 'vag_spotting_note' =>
218 array( 'field_id' => 'vag_spotting_note',
219 'data_type' => '3',
220 'fld_length' => '160',
221 'max_length' => '3',
222 'description' => 'Describe',
223 'list_id' => '' ),
224 'priortreatment' =>
225 array( 'field_id' => 'priortreatment',
226 'data_type' => '21',
227 'fld_length' => '0',
228 'description' => 'Have you tried to treat the symptoms prior to this visit',
229 'list_id' => 'yesno' ),
230 'priortreatment_note' =>
231 array( 'field_id' => 'priortreatment_note',
232 'data_type' => '3',
233 'fld_length' => '160',
234 'max_length' => '3',
235 'description' => 'Describe',
236 'list_id' => '' ),
237 'pain_menses' =>
238 array( 'field_id' => 'pain_menses',
239 'data_type' => '1',
240 'fld_length' => '0',
241 'description' => 'Pain with or between menses?',
242 'list_id' => 'menses_pain' ),
243 'pain_level' =>
244 array( 'field_id' => 'pain_level',
245 'data_type' => '2',
246 'fld_length' => '10',
247 'max_length' => '2',
248 'description' => 'Level of pain 1-10',
249 'list_id' => '' ),
250 'pain_location' =>
251 array( 'field_id' => 'pain_location',
252 'data_type' => '1',
253 'fld_length' => '0',
254 'description' => 'Select Quadrant',
255 'list_id' => 'menses_pain_location' ),
256 'pain_lenth' =>
257 array( 'field_id' => 'pain_lenth',
258 'data_type' => '2',
259 'fld_length' => '10',
260 'max_length' => '30',
261 'description' => 'Enter Months, Years etc',
262 'list_id' => '' ),
263 'pain_drug_resp' =>
264 array( 'field_id' => 'pain_drug_resp',
265 'data_type' => '2',
266 'fld_length' => '10',
267 'max_length' => '30',
268 'description' => 'Is the pain responsive to OTC drugs? Which?',
269 'list_id' => '' ),
270 'pain_intercourse' =>
271 array( 'field_id' => 'pain_intercourse',
272 'data_type' => '21',
273 'fld_length' => '0',
274 'description' => '',
275 'list_id' => 'yesno' ),
276 'pain_intercourse_time' =>
277 array( 'field_id' => 'pain_intercourse_time',
278 'data_type' => '3',
279 'fld_length' => '120',
280 'max_length' => '1',
281 'description' => 'How Long, etc?',
282 'list_id' => '' )
284 $submiturl = $GLOBALS['rootdir'].'/forms/'.$form_folder.'/save.php?mode=update&amp;return=encounter&amp;id='.$_GET['id'];
285 if ($_GET['mode']) {
286 if ($_GET['mode']=='noencounter') {
287 $submiturl = $GLOBALS['rootdir'].'/forms/'.$form_folder.'/save.php?mode=new&amp;return=show&amp;id='.$_GET['id'];
288 $returnurl = 'show.php';
291 else
293 $returnurl = $GLOBALS['concurrent_layout'] ? 'encounter_top.php' : 'patient_encounter.php';
296 /* remove the time-of-day from all date fields */
297 if ($xyzzy['lmpdate'] != '') {
298 $dateparts = split(' ', $xyzzy['lmpdate']);
299 $xyzzy['lmpdate'] = $dateparts[0];
302 /* define check field functions. used for translating from fields to html viewable strings */
304 function chkdata_Date(&$record, $var) {
305 return htmlspecialchars($record{"$var"},ENT_QUOTES);
308 function chkdata_Txt(&$record, $var) {
309 return htmlspecialchars($record{"$var"},ENT_QUOTES);
312 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
313 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
314 <head>
316 <!-- declare this document as being encoded in UTF-8 -->
317 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" ></meta>
319 <!-- supporting javascript code -->
320 <!-- for dialog -->
321 <script type="text/javascript" src="<?php echo $GLOBALS['webroot']; ?>/library/dialog.js"></script>
322 <!-- For jquery, required by the save, discard, and print buttons. -->
323 <script type="text/javascript" src="<?php echo $GLOBALS['webroot']; ?>/library/js/jquery.js"></script>
324 <script type="text/javascript" src="<?php echo $GLOBALS['webroot']; ?>/library/textformat.js"></script>
326 <!-- Global Stylesheet -->
327 <link rel="stylesheet" href="<?php echo $css_header; ?>" type="text/css"/>
328 <!-- Form Specific Stylesheet. -->
329 <link rel="stylesheet" href="../../forms/<?php echo $form_folder; ?>/style.css" type="text/css"/>
331 <!-- supporting code for the pop up calendar(date picker) -->
332 <style type="text/css">@import url(<?php echo $GLOBALS['webroot']; ?>/library/dynarch_calendar.css);</style>
333 <script type="text/javascript" src="<?php echo $GLOBALS['webroot']; ?>/library/dynarch_calendar.js"></script>
334 <?php include_once("{$GLOBALS['srcdir']}/dynarch_calendar_en.inc.php"); ?>
335 <script type="text/javascript" src="<?php echo $GLOBALS['webroot']; ?>/library/dynarch_calendar_setup.js"></script>
338 <script type="text/javascript">
339 // this line is to assist the calendar text boxes
340 var mypcc = '<?php echo $GLOBALS['phone_country_code']; ?>';
342 <!-- support code for collapsing sections -->
343 function divclick(cb, divid) {
344 var divstyle = document.getElementById(divid).style;
345 if (cb.checked) {
346 divstyle.display = 'block';
347 } else {
348 divstyle.display = 'none';
350 return true;
353 <!-- FIXME: this needs to detect access method, and construct a URL appropriately! -->
354 function PrintForm() {
355 newwin = window.open("<?php echo $rootdir.'/forms/'.$form_folder.'/print.php?id='.$_GET['id']; ?>","print_<?php echo $form_name; ?>");
358 </script>
359 <title><?php echo htmlspecialchars('View '.$form_name); ?></title>
361 </head>
362 <body class="body_top">
364 <div id="title">
365 <a href="<?php echo $returnurl; ?>" onclick="top.restoreSession()">
366 <span class="title"><?php htmlspecialchars(xl($form_name,'e')); ?></span>
367 <span class="back">(<?php xl('Back','e'); ?>)</span>
368 </a>
369 </div>
371 <form method="post" action="<?php echo $submiturl; ?>" id="<?php echo $form_folder; ?>">
373 <!-- Save/Cancel buttons -->
374 <div id="top_buttons" class="top_buttons">
375 <fieldset class="top_buttons">
376 <input type="button" class="save" value="<?php xl('Save Changes','e'); ?>" />
377 <input type="button" class="dontsave" value="<?php xl('Don\'t Save Changes','e'); ?>" />
378 <input type="button" class="print" value="<?php xl('Print','e'); ?>" />
379 </fieldset>
380 </div><!-- end top_buttons -->
382 <!-- container for the main body of the form -->
383 <div id="form_container">
384 <fieldset>
386 <!-- display the form's manual based fields -->
387 <table border='0' cellpadding='0' width='100%'>
388 <tr><td class='sectionlabel'><input type='checkbox' id='form_cb_m_1' value='1' onclick='return divclick(this,"cardio")' checked="checked" />Cardio - Respiratory System</td></tr><tr><td><div id="cardio" class='section'><table>
389 <!-- called consumeRows 015--> <!-- just calling --><!-- called consumeRows 225--> <!-- generating not($fields[$checked+1]) and calling last --><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Reviewed','e').':'; ?></td><td class='text data' colspan='1'><?php echo generate_form_field($manual_layouts['cardio_reviewed'], $xyzzy['cardio_reviewed']); ?></td><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Note','e').':'; ?></td><td class='text data' colspan='1'><?php echo generate_form_field($manual_layouts['cardio_note'], $xyzzy['cardio_note']); ?></td><!-- called consumeRows 425--> <!-- Exiting not($fields) and generating 1 empty fields --><td class='emptycell' colspan='1'></td></tr>
390 </table></div>
391 </td></tr> <!-- end section cardio -->
392 <tr><td class='sectionlabel'><input type='checkbox' id='form_cb_m_2' value='1' onclick='return divclick(this,"gastro")' checked="checked" />Gastro - Intestinal System</td></tr><tr><td><div id="gastro" class='section'><table>
393 <!-- called consumeRows 015--> <!-- just calling --><!-- called consumeRows 225--> <!-- generating not($fields[$checked+1]) and calling last --><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Reviewed','e').':'; ?></td><td class='text data' colspan='1'><?php echo generate_form_field($manual_layouts['gastro_reviewed'], $xyzzy['gastro_reviewed']); ?></td><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Note','e').':'; ?></td><td class='text data' colspan='1'><?php echo generate_form_field($manual_layouts['gastro_note'], $xyzzy['gastro_note']); ?></td><!-- called consumeRows 425--> <!-- Exiting not($fields) and generating 1 empty fields --><td class='emptycell' colspan='1'></td></tr>
394 </table></div>
395 </td></tr> <!-- end section gastro -->
396 <tr><td class='sectionlabel'><input type='checkbox' id='form_cb_m_3' value='1' onclick='return divclick(this,"urinary")' checked="checked" />Urinary System</td></tr><tr><td><div id="urinary" class='section'><table>
397 <!-- called consumeRows 015--> <!-- just calling --><!-- called consumeRows 225--> <!-- generating not($fields[$checked+1]) and calling last --><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Reviewed','e').':'; ?></td><td class='text data' colspan='1'><?php echo generate_form_field($manual_layouts['Urinary_reviewed'], $xyzzy['Urinary_reviewed']); ?></td><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Note','e').':'; ?></td><td class='text data' colspan='1'><?php echo generate_form_field($manual_layouts['Urinary_note'], $xyzzy['Urinary_note']); ?></td><!-- called consumeRows 425--> <!-- Exiting not($fields) and generating 1 empty fields --><td class='emptycell' colspan='1'></td></tr>
398 </table></div>
399 </td></tr> <!-- end section urinary -->
400 <tr><td class='sectionlabel'><input type='checkbox' id='form_cb_m_4' value='1' onclick='return divclick(this,"cns")' checked="checked" />Central Nervous System</td></tr><tr><td><div id="cns" class='section'><table>
401 <!-- called consumeRows 015--> <!-- just calling --><!-- called consumeRows 225--> <!-- generating not($fields[$checked+1]) and calling last --><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Reviewed','e').':'; ?></td><td class='text data' colspan='1'><?php echo generate_form_field($manual_layouts['cns_reviewed'], $xyzzy['cns_reviewed']); ?></td><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Note','e').':'; ?></td><td class='text data' colspan='1'><?php echo generate_form_field($manual_layouts['cns_note'], $xyzzy['cns_note']); ?></td><!-- called consumeRows 425--> <!-- Exiting not($fields) and generating 1 empty fields --><td class='emptycell' colspan='1'></td></tr>
402 </table></div>
403 </td></tr> <!-- end section cns -->
404 <tr><td class='sectionlabel'><input type='checkbox' id='form_cb_m_5' value='1' onclick='return divclick(this,"othersys")' checked="checked" />Other Systems</td></tr><tr><td><div id="othersys" class='section'><table>
405 <!-- called consumeRows 015--> <!-- just calling --><!-- called consumeRows 225--> <!-- generating not($fields[$checked+1]) and calling last --><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Reviewed','e').':'; ?></td><td class='text data' colspan='1'><?php echo generate_form_field($manual_layouts['other_reviewed'], $xyzzy['other_reviewed']); ?></td><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Note','e').':'; ?></td><td class='text data' colspan='1'><?php echo generate_form_field($manual_layouts['other_note'], $xyzzy['other_note']); ?></td><!-- called consumeRows 425--> <!-- Exiting not($fields) and generating 1 empty fields --><td class='emptycell' colspan='1'></td></tr>
406 </table></div>
407 </td></tr> <!-- end section othersys -->
408 <tr><td class='sectionlabel'><input type='checkbox' id='form_cb_m_6' value='1' onclick='return divclick(this,"complications")' checked="checked" />Complications</td></tr><tr><td><div id="complications" class='section'><table>
409 <!-- called consumeRows 015--> <!-- just calling --><!-- called consumeRows 225--> <!-- generating not($fields[$checked+1]) and calling last --><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Reviewed','e').':'; ?></td><td class='text data' colspan='1'><?php echo generate_form_field($manual_layouts['complications_reviewed'], $xyzzy['complications_reviewed']); ?></td><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Note','e').':'; ?></td><td class='text data' colspan='1'><?php echo generate_form_field($manual_layouts['complications_note'], $xyzzy['complications_note']); ?></td><!-- called consumeRows 425--> <!-- Exiting not($fields) and generating 1 empty fields --><td class='emptycell' colspan='1'></td></tr>
410 </table></div>
411 </td></tr> <!-- end section complications -->
412 <tr><td class='sectionlabel'><input type='checkbox' id='form_cb_m_7' value='1' onclick='return divclick(this,"menstrual")' checked="checked" />Menstrual History</td></tr><tr><td><div id="menstrual" class='section'><table>
413 <!-- called consumeRows 015--> <!-- generating 5 cells and calling --><td>
414 <span class="fieldlabel"><?php xl('LMP Start Date','e'); ?> (yyyy-mm-dd): </span>
415 </td><td>
416 <input type='text' size='10' name='lmpdate' id='lmpdate' title='When was the the first day of your last menstrual period?'
417 value="<?php $result=chkdata_Date($xyzzy,'lmpdate'); echo $result; ?>"
418 onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)' />
419 <img src='../../pic/show_calendar.gif' width='24' height='22'
420 id='img_lmpdate' alt='[?]' style='cursor:pointer'
421 title="<?php xl('Click here to choose a date','e'); ?>" />
422 <script type="text/javascript">
423 Calendar.setup({inputField:'lmpdate', ifFormat:'%Y-%m-%d', button:'img_lmpdate'});
424 </script>
425 </td>
426 <!-- generating empties --><td class='emptycell' colspan='1'></td></tr>
427 <!-- called consumeRows 015--> <!-- just calling --><!-- called consumeRows 225--> <!-- generating 5 cells and calling --><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Cycle Interval','e').':'; ?></td><td class='text data' colspan='1'><?php echo generate_form_field($manual_layouts['cycle_int'], $xyzzy['cycle_int']); ?></td><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Note','e').':'; ?></td><td class='text data' colspan='2'><?php echo generate_form_field($manual_layouts['cycle_int_note'], $xyzzy['cycle_int_note']); ?></td><!-- generating empties --><td class='emptycell' colspan='1'></td></tr>
428 <!-- called consumeRows 015--> <!-- just calling --><!-- called consumeRows 225--> <!-- generating 5 cells and calling --><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Flow - FH count','e').':'; ?></td><td class='text data' colspan='1'><?php echo generate_form_field($manual_layouts['flowfhcount'], $xyzzy['flowfhcount']); ?></td><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Flow - Hrs between changes','e').':'; ?></td><td class='text data' colspan='2'><?php echo generate_form_field($manual_layouts['flowhrs'], $xyzzy['flowhrs']); ?></td><!-- generating empties --><td class='emptycell' colspan='1'></td></tr>
429 <!-- called consumeRows 015--> <!-- generating not($fields[$checked+1]) and calling last --><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Post Menapausal Bleeding','e').':'; ?></td><td class='text data' colspan='1'><?php echo generate_form_field($manual_layouts['pmb'], $xyzzy['pmb']); ?></td><!-- called consumeRows 215--> <!-- Exiting not($fields) and generating 3 empty fields --><td class='emptycell' colspan='1'></td></tr>
430 </table></div>
431 </td></tr> <!-- end section menstrual -->
432 <tr><td class='sectionlabel'><input type='checkbox' id='form_cb_m_8' value='1' onclick='return divclick(this,"infection")' checked="checked" />Vaginal Infection</td></tr><tr><td><div id="infection" class='section'><table>
433 <!-- called consumeRows 015--> <!-- just calling --><!-- called consumeRows 225--> <!-- generating 5 cells and calling --><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Discharge','e').':'; ?></td><td class='text data' colspan='1'><?php echo generate_form_field($manual_layouts['vag_discharge'], $xyzzy['vag_discharge']); ?></td><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Note','e').':'; ?></td><td class='text data' colspan='2'><?php echo generate_form_field($manual_layouts['vag_discharge_note'], $xyzzy['vag_discharge_note']); ?></td><!-- generating empties --><td class='emptycell' colspan='1'></td></tr>
434 <!-- called consumeRows 015--> <!-- just calling --><!-- called consumeRows 225--> <!-- generating 5 cells and calling --><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Itching','e').':'; ?></td><td class='text data' colspan='1'><?php echo generate_form_field($manual_layouts['vag_itching'], $xyzzy['vag_itching']); ?></td><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Note','e').':'; ?></td><td class='text data' colspan='2'><?php echo generate_form_field($manual_layouts['vag_itching_note'], $xyzzy['vag_itching_note']); ?></td><!-- generating empties --><td class='emptycell' colspan='1'></td></tr>
435 <!-- called consumeRows 015--> <!-- just calling --><!-- called consumeRows 225--> <!-- generating 5 cells and calling --><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Odor','e').':'; ?></td><td class='text data' colspan='1'><?php echo generate_form_field($manual_layouts['vag_odor'], $xyzzy['vag_odor']); ?></td><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Note','e').':'; ?></td><td class='text data' colspan='2'><?php echo generate_form_field($manual_layouts['vag_odor_note'], $xyzzy['vag_odor_note']); ?></td><!-- generating empties --><td class='emptycell' colspan='1'></td></tr>
436 <!-- called consumeRows 015--> <!-- just calling --><!-- called consumeRows 225--> <!-- generating 5 cells and calling --><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Irritation','e').':'; ?></td><td class='text data' colspan='1'><?php echo generate_form_field($manual_layouts['vag_irratation'], $xyzzy['vag_irratation']); ?></td><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Note','e').':'; ?></td><td class='text data' colspan='2'><?php echo generate_form_field($manual_layouts['vag_irratation_note'], $xyzzy['vag_irratation_note']); ?></td><!-- generating empties --><td class='emptycell' colspan='1'></td></tr>
437 <!-- called consumeRows 015--> <!-- just calling --><!-- called consumeRows 225--> <!-- generating 5 cells and calling --><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Spotting','e').':'; ?></td><td class='text data' colspan='1'><?php echo generate_form_field($manual_layouts['vag_spotting'], $xyzzy['vag_spotting']); ?></td><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Note','e').':'; ?></td><td class='text data' colspan='2'><?php echo generate_form_field($manual_layouts['vag_spotting_note'], $xyzzy['vag_spotting_note']); ?></td><!-- generating empties --><td class='emptycell' colspan='1'></td></tr>
438 <!-- called consumeRows 015--> <!-- just calling --><!-- called consumeRows 225--> <!-- generating not($fields[$checked+1]) and calling last --><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Prior Treatment','e').':'; ?></td><td class='text data' colspan='1'><?php echo generate_form_field($manual_layouts['priortreatment'], $xyzzy['priortreatment']); ?></td><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Note','e').':'; ?></td><td class='text data' colspan='2'><?php echo generate_form_field($manual_layouts['priortreatment_note'], $xyzzy['priortreatment_note']); ?></td><!-- called consumeRows 525--> <!-- Exiting not($fields) and generating 0 empty fields --></tr>
439 </table></div>
440 </td></tr> <!-- end section infection -->
441 <tr><td class='sectionlabel'><input type='checkbox' id='form_cb_m_9' value='1' onclick='return divclick(this,"pelvic pain")' checked="checked" />Pelvic Pain</td></tr><tr><td><div id="pelvic pain" class='section'><table>
442 <!-- called consumeRows 015--> <!-- generating 5 cells and calling --><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Menses Pain','e').':'; ?></td><td class='text data' colspan='4'><?php echo generate_form_field($manual_layouts['pain_menses'], $xyzzy['pain_menses']); ?></td><!-- generating empties --><td class='emptycell' colspan='1'></td></tr>
443 <!-- called consumeRows 015--> <!-- just calling --><!-- called consumeRows 325--> <!-- generating 5 cells and calling --><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Pain Level','e').':'; ?></td><td class='text data' colspan='2'><?php echo generate_form_field($manual_layouts['pain_level'], $xyzzy['pain_level']); ?></td><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Pain Location','e').':'; ?></td><td class='text data' colspan='1'><?php echo generate_form_field($manual_layouts['pain_location'], $xyzzy['pain_location']); ?></td><!-- generating empties --><td class='emptycell' colspan='1'></td></tr>
444 <!-- called consumeRows 015--> <!-- just calling --><!-- called consumeRows 325--> <!-- generating 7 cells and calling --><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Pain Length of Time','e').':'; ?></td><td class='text data' colspan='2'><?php echo generate_form_field($manual_layouts['pain_lenth'], $xyzzy['pain_lenth']); ?></td><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Pain OTC/NSAIDS Response','e').':'; ?></td><td class='text data' colspan='3'><?php echo generate_form_field($manual_layouts['pain_drug_resp'], $xyzzy['pain_drug_resp']); ?></td><!-- generating empties --><td class='emptycell' colspan='1'></td></tr>
445 <!-- called consumeRows 015--> <!-- just calling --><!-- called consumeRows 325--> <!-- generating not($fields[$checked+1]) and calling last --><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('Pain with Intercourse','e').':'; ?></td><td class='text data' colspan='2'><?php echo generate_form_field($manual_layouts['pain_intercourse'], $xyzzy['pain_intercourse']); ?></td><td class='fieldlabel' colspan='1'><?php echo xl_layout_label('How Long','e').':'; ?></td><td class='text data' colspan='2'><?php echo generate_form_field($manual_layouts['pain_intercourse_time'], $xyzzy['pain_intercourse_time']); ?></td><!-- called consumeRows 625--> <!-- Exiting not($fields) and generating -1 empty fields --></tr>
446 </table></div>
447 </td></tr> <!-- end section pelvic pain -->
448 </table>
450 </fieldset>
451 </div> <!-- end form_container -->
453 <!-- Save/Cancel buttons -->
454 <div id="bottom_buttons" class="button_bar">
455 <fieldset>
456 <input type="button" class="save" value="<?php xl('Save Changes','e'); ?>" />
457 <input type="button" class="dontsave" value="<?php xl('Don\'t Save Changes','e'); ?>" />
458 </fieldset>
459 </div><!-- end bottom_buttons -->
460 </form>
461 <script type="text/javascript">
462 // jQuery stuff to make the page a little easier to use
464 $(document).ready(function(){
465 $(".save").click(function() { top.restoreSession(); document.forms["<?php echo $form_folder; ?>"].submit(); });
466 $(".dontsave").click(function() { location.href='<?php echo $returnurl; ?>'; });
468 </script>
469 </body>
470 </html>