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_dub_soap';
16 /** CHANGE THIS name to the name of your form. **/
17 $form_name = 'DUB/Pain';
19 /** CHANGE THIS to match the folder you created for this form. **/
20 $form_folder = 'dub_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 'menstrual_history' =>
39 array( 'field_id' => 'menstrual_history',
41 'fld_length' => '140',
43 'list_id' => 'DUB_Menstrual_History' ),
44 'previous_sonogram' =>
45 array( 'field_id' => 'previous_sonogram',
47 'fld_length' => '163',
48 'max_length' => '255',
51 'previous_blood_work' =>
52 array( 'field_id' => 'previous_blood_work',
54 'fld_length' => '163',
55 'max_length' => '255',
58 'previous_needs_rx' =>
59 array( 'field_id' => 'previous_needs_rx',
61 'fld_length' => '163',
62 'max_length' => '255',
66 array( 'field_id' => 'other',
68 'fld_length' => '151',
73 array( 'field_id' => 'dub_objective',
75 'fld_length' => '140',
77 'list_id' => 'DUB_Objective' ),
79 array( 'field_id' => 'a_dub',
81 'fld_length' => '140',
83 'list_id' => 'DUB_Diagnosis' ),
85 array( 'field_id' => 'plan_lab_work',
87 'fld_length' => '140',
89 'list_id' => 'DUB_Lab_Work' ),
90 'plan_tests_procedures' =>
91 array( 'field_id' => 'plan_tests_procedures',
93 'fld_length' => '140',
95 'list_id' => 'DUB_Tests_Procedures' ),
97 array( 'field_id' => 'plan_medications',
99 'fld_length' => '140',
101 'list_id' => 'DUB_Medications' )
104 $returnurl = $GLOBALS['concurrent_layout'] ?
'encounter_top.php' : 'patient_encounter.php';
107 /* define check field functions. used for translating from fields to html viewable strings */
109 function chkdata_Txt(&$record, $var) {
110 return htmlspecialchars($record{"$var"},ENT_QUOTES
);
113 ?
><!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
115 <html xmlns
="http://www.w3.org/1999/xhtml" xml
:lang
="en">
118 <!-- declare this document
as being encoded in UTF
-8 -->
119 <meta http
-equiv
="Content-Type" content
="text/html;charset=utf-8" ></meta
>
121 <!-- supporting javascript code
-->
123 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot']; ?>/library/dialog.js"></script
>
124 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot']; ?>/library/textformat.js"></script
>
126 <!-- Global Stylesheet
-->
127 <link rel
="stylesheet" href
="<?php echo $css_header; ?>" type
="text/css"/>
128 <!-- Form Specific Stylesheet
. -->
129 <link rel
="stylesheet" href
="../../forms/<?php echo $form_folder; ?>/style.css" type
="text/css"/>
130 <title
><?php
echo htmlspecialchars('Print '.$form_name); ?
></title
>
133 <body
class="body_top">
135 <div
class="print_date"><?php
xl('Printed on ','e'); echo date('F d, Y', time()); ?
></div
>
137 <form method
="post" id
="<?php echo $form_folder; ?>" action
="">
138 <div
class="title"><?php
xl($form_name,'e'); ?
></div
>
140 <!-- container
for the main body of the form
-->
141 <div id
="print_form_container">
144 <!-- display the form
's manual based fields -->
145 <table border='0' cellpadding='0' width='100%
'>
146 <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>
147 <!-- called consumeRows 012--> <!-- generating 2 cells and calling --><td class='fieldlabel
' colspan='1'><?php echo xl_layout_label('Menstrual History
','e
').':'; ?></td><td class='text data
' colspan='1'><?php echo generate_form_field($manual_layouts['menstrual_history
'], $xyzzy['menstrual_history
']); ?></td><!-- generating empties --><td class='emptycell
' colspan='1'></td></tr>
148 <!-- called consumeRows 012--> <!-- generating 2 cells and calling --><td class='fieldlabel
' colspan='1'><?php echo xl_layout_label('Previous Sonogram
','e
').':'; ?></td><td class='text data
' colspan='1'><?php echo generate_form_field($manual_layouts['previous_sonogram
'], $xyzzy['previous_sonogram
']); ?></td><!-- generating empties --><td class='emptycell
' colspan='1'></td></tr>
149 <!-- called consumeRows 012--> <!-- generating 2 cells and calling --><td class='fieldlabel
' colspan='1'><?php echo xl_layout_label('Previous Blood Work
','e
').':'; ?></td><td class='text data
' colspan='1'><?php echo generate_form_field($manual_layouts['previous_blood_work
'], $xyzzy['previous_blood_work
']); ?></td><!-- generating empties --><td class='emptycell
' colspan='1'></td></tr>
150 <!-- called consumeRows 012--> <!-- generating 2 cells and calling --><td class='fieldlabel
' colspan='1'><?php echo xl_layout_label('Previous Needs
for Rx
','e
').':'; ?></td><td class='text data
' colspan='1'><?php echo generate_form_field($manual_layouts['previous_needs_rx
'], $xyzzy['previous_needs_rx
']); ?></td><!-- generating empties --><td class='emptycell
' colspan='1'></td></tr>
151 <!-- called consumeRows 012--> <!-- generating not($fields[$checked+1]) and calling last --><td class='fieldlabel
' colspan='1'><?php echo xl_layout_label('Other
','e
').':'; ?></td><td class='text data
' colspan='1'><?php echo generate_form_field($manual_layouts['other
'], $xyzzy['other
']); ?></td><!-- called consumeRows 212--> <!-- Exiting not($fields) and generating 0 empty fields --></tr>
153 </td></tr> <!-- end section subjective -->
154 <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>
155 <!-- called consumeRows 012--> <!-- generating not($fields[$checked+1]) and calling last --><td class='fieldlabel
' colspan='1'><?php echo xl_layout_label('Objective
','e
').':'; ?></td><td class='text data
' colspan='1'><?php echo generate_form_field($manual_layouts['dub_objective
'], $xyzzy['dub_objective
']); ?></td><!-- called consumeRows 212--> <!-- Exiting not($fields) and generating 0 empty fields --></tr>
157 </td></tr> <!-- end section objective -->
158 <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>
159 <!-- called consumeRows 012--> <!-- generating not($fields[$checked+1]) and calling last --><td class='fieldlabel
' colspan='1'><?php echo xl_layout_label('DUB Assessment
','e
').':'; ?></td><td class='text data
' colspan='1'><?php echo generate_form_field($manual_layouts['a_dub
'], $xyzzy['a_dub
']); ?></td><!-- called consumeRows 212--> <!-- Exiting not($fields) and generating 0 empty fields --></tr>
161 </td></tr> <!-- end section assessment -->
162 <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>
163 <!-- called consumeRows 012--> <!-- generating 2 cells and calling --><td class='fieldlabel
' colspan='1'><?php echo xl_layout_label('Lab Work
','e
').':'; ?></td><td class='text data
' colspan='1'><?php echo generate_form_field($manual_layouts['plan_lab_work
'], $xyzzy['plan_lab_work
']); ?></td><!-- generating empties --><td class='emptycell
' colspan='1'></td></tr>
164 <!-- called consumeRows 012--> <!-- generating 2 cells and calling --><td class='fieldlabel
' colspan='1'><?php echo xl_layout_label('Tests
/Procedures
','e
').':'; ?></td><td class='text data
' colspan='1'><?php echo generate_form_field($manual_layouts['plan_tests_procedures
'], $xyzzy['plan_tests_procedures
']); ?></td><!-- generating empties --><td class='emptycell
' colspan='1'></td></tr>
165 <!-- called consumeRows 012--> <!-- generating not($fields[$checked+1]) and calling last --><td class='fieldlabel
' colspan='1'><?php echo xl_layout_label('Medications
','e
').':'; ?></td><td class='text data
' colspan='1'><?php echo generate_form_field($manual_layouts['plan_medications
'], $xyzzy['plan_medications
']); ?></td><!-- called consumeRows 212--> <!-- Exiting not($fields) and generating 0 empty fields --></tr>
167 </td></tr> <!-- end section plan -->
172 </div><!-- end print_form_container -->
175 <script type="text/javascript">