3 * The page shown when the user requests to print this form. This page automatically prints itsself, and closes its parent browser window.
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');
13 /** CHANGE THIS - name of the database table associated with this form **/
14 $table_name = 'form_pelvic_soap';
16 /** CHANGE THIS name to the name of your form. **/
19 /** CHANGE THIS to match the folder you created for this form. **/
20 $form_folder = 'pelvic_soap';
22 /* Check the access control lists to ensure permissions to this page */
23 $thisauth = acl_check('patients', 'med');
25 die($form_name.': Access Denied.');
27 /* perform a squad check for pages touching patients, if we're in 'athletic team' mode */
28 if ($GLOBALS['athletic_team']!='false') {
29 $tmp = getPatientData($pid, 'squad');
30 if ($tmp['squad'] && ! acl_check('squads', $tmp['squad']))
33 /* Use the formFetch function from api.inc to load the saved record */
34 $xyzzy = formFetch($table_name, $_GET['id']);
36 /* in order to use the layout engine's draw functions, we need a fake table of layout data. */
37 $manual_layouts = array(
38 'pelvic_complaints' =>
39 array( 'field_id' => 'pelvic_complaints',
41 'fld_length' => '140',
43 'list_id' => 'Pelvic_Complaints' ),
45 array( 'field_id' => 'pelvic_exam',
47 'fld_length' => '140',
49 'list_id' => 'Pelvic_Exam' ),
50 'pelvic_assessment' =>
51 array( 'field_id' => 'pelvic_assessment',
53 'fld_length' => '140',
55 'list_id' => 'Pelvic_Assessment' ),
57 array( 'field_id' => 'pelvic_plan',
59 'fld_length' => '140',
61 'list_id' => 'Pelvic_Plan' ),
63 array( 'field_id' => 'plan_discussion',
65 'fld_length' => '151',
71 $returnurl = $GLOBALS['concurrent_layout'] ?
'encounter_top.php' : 'patient_encounter.php';
74 /* define check field functions. used for translating from fields to html viewable strings */
76 function chkdata_Txt(&$record, $var) {
77 return htmlspecialchars($record{"$var"},ENT_QUOTES
);
80 ?
><!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
82 <html xmlns
="http://www.w3.org/1999/xhtml" xml
:lang
="en">
85 <!-- declare this document
as being encoded in UTF
-8 -->
86 <meta http
-equiv
="Content-Type" content
="text/html;charset=utf-8" ></meta
>
88 <!-- supporting javascript code
-->
90 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot']; ?>/library/dialog.js"></script
>
91 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot']; ?>/library/textformat.js"></script
>
93 <!-- Global Stylesheet
-->
94 <link rel
="stylesheet" href
="<?php echo $css_header; ?>" type
="text/css"/>
95 <!-- Form Specific Stylesheet
. -->
96 <link rel
="stylesheet" href
="../../forms/<?php echo $form_folder; ?>/style.css" type
="text/css"/>
97 <title
><?php
echo htmlspecialchars('Print '.$form_name); ?
></title
>
100 <body
class="body_top">
102 <div
class="print_date"><?php
xl('Printed on ','e'); echo date('F d, Y', time()); ?
></div
>
104 <form method
="post" id
="<?php echo $form_folder; ?>" action
="">
105 <div
class="title"><?php
xl($form_name,'e'); ?
></div
>
107 <!-- container
for the main body of the form
-->
108 <div id
="print_form_container">
111 <!-- display the form
's manual based fields -->
112 <table border='0' cellpadding='0' width='100%
'>
113 <tr><td class='sectionlabel
'><input type='checkbox
' id='form_cb_m_1
' value='1' data-section="subjective" checked="checked" />Subjective</td></tr><tr><td><div id="print_subjective" class='section
'><table>
114 <!-- called consumeRows 012--> <!-- generating not($fields[$checked+1]) and calling last --><td class='fieldlabel
' colspan='1'><?php echo xl_layout_label('Complaints
','e
').':'; ?></td><td class='text data
' colspan='1'><?php echo generate_form_field($manual_layouts['pelvic_complaints
'], $xyzzy['pelvic_complaints
']); ?></td><!-- called consumeRows 212--> <!-- Exiting not($fields) and generating 0 empty fields --></tr>
116 </td></tr> <!-- end section subjective -->
117 <tr><td class='sectionlabel
'><input type='checkbox
' id='form_cb_m_2
' value='1' data-section="objective" checked="checked" />Objective</td></tr><tr><td><div id="print_objective" class='section
'><table>
118 <!-- called consumeRows 012--> <!-- generating not($fields[$checked+1]) and calling last --><td class='fieldlabel
' colspan='1'><?php echo xl_layout_label('Exam
','e
').':'; ?></td><td class='text data
' colspan='1'><?php echo generate_form_field($manual_layouts['pelvic_exam
'], $xyzzy['pelvic_exam
']); ?></td><!-- called consumeRows 212--> <!-- Exiting not($fields) and generating 0 empty fields --></tr>
120 </td></tr> <!-- end section objective -->
121 <tr><td class='sectionlabel
'><input type='checkbox
' id='form_cb_m_3
' value='1' data-section="assessment" checked="checked" />Assessment</td></tr><tr><td><div id="print_assessment" class='section
'><table>
122 <!-- called consumeRows 012--> <!-- generating not($fields[$checked+1]) and calling last --><td class='fieldlabel
' colspan='1'><?php echo xl_layout_label('Assessment
','e
').':'; ?></td><td class='text data
' colspan='1'><?php echo generate_form_field($manual_layouts['pelvic_assessment
'], $xyzzy['pelvic_assessment
']); ?></td><!-- called consumeRows 212--> <!-- Exiting not($fields) and generating 0 empty fields --></tr>
124 </td></tr> <!-- end section assessment -->
125 <tr><td class='sectionlabel
'><input type='checkbox
' id='form_cb_m_4
' value='1' data-section="plan" checked="checked" />Plan</td></tr><tr><td><div id="print_plan" class='section
'><table>
126 <!-- called consumeRows 012--> <!-- generating 2 cells and calling --><td class='fieldlabel
' colspan='1'><?php echo xl_layout_label('Pelvic Plan
','e
').':'; ?></td><td class='text data
' colspan='1'><?php echo generate_form_field($manual_layouts['pelvic_plan
'], $xyzzy['pelvic_plan
']); ?></td><!-- generating empties --><td class='emptycell
' colspan='1'></td></tr>
127 <!-- called consumeRows 012--> <!-- generating not($fields[$checked+1]) and calling last --><td class='fieldlabel
' colspan='1'><?php echo xl_layout_label('Discussion
','e
').':'; ?></td><td class='text data
' colspan='1'><?php echo generate_form_field($manual_layouts['plan_discussion
'], $xyzzy['plan_discussion
']); ?></td><!-- called consumeRows 212--> <!-- Exiting not($fields) and generating 0 empty fields --></tr>
129 </td></tr> <!-- end section plan -->
134 </div><!-- end print_form_container -->
137 <script type="text/javascript">