added cache clearing support for dialog.js (#411)
[openemr.git] / interface / forms / transfer_summary / new.php
blobe274478fe587514d337cfa1e22e20bb6a855bdff
1 <?php
2 /**
4 * Copyright (C) 2012-2013 Naina Mohamed <naina@capminds.com> CapMinds Technologies
6 * LICENSE: This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 3
9 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
17 * @package OpenEMR
18 * @author Naina Mohamed <naina@capminds.com>
19 * @link http://www.open-emr.org
22 //SANITIZE ALL ESCAPES
23 $sanitize_all_escapes=true;
25 //STOP FAKE REGISTER GLOBALS
26 $fake_register_globals=false;
28 include_once("../../globals.php");
29 include_once("$srcdir/api.inc");
30 require_once("$srcdir/patient.inc");
31 require_once("$srcdir/options.inc.php");
32 formHeader("Form:Transfer Summary");
33 $returnurl = 'encounter_top.php';
34 $formid = 0 + (isset($_GET['id']) ? $_GET['id'] : '');
35 $obj = $formid ? formFetch("form_transfer_summary", $formid) : array();
38 <html>
39 <head>
40 <?php html_header_show();?>
41 <script type="text/javascript" src="../../../library/dialog.js?v=<?php echo $v_js_includes; ?>"></script>
42 <!-- pop up calendar -->
43 <style type="text/css">@import url(<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar.css);</style>
44 <script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar.js"></script>
45 <?php include_once("{$GLOBALS['srcdir']}/dynarch_calendar_en.inc.php"); ?>
46 <script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar_setup.js"></script>
47 <script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/textformat.js"></script>
48 <script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/dialog.js?v=<?php echo $v_js_includes; ?>"></script>
49 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
51 <script type="text/javascript" src="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-min-1-9-1/index.js"></script>
52 <script language="JavaScript">
53 $(document).ready(function() {
54 var win = top.printLogSetup ? top : opener.top;
55 win.printLogSetup(document.getElementById('printbutton'));
56 });
57 </script>
59 </head>
61 <body class="body_top">
62 <p><span class="forms-title"><?php echo xlt('Transfer Summary'); ?></span></p>
63 </br>
64 <?php
65 echo "<form method='post' name='my_form' " .
66 "action='$rootdir/forms/transfer_summary/save.php?id=" . attr($formid) ."'>\n";
68 <table border="0">
69 <tr>
70 <td align="left" class="forms" class="forms"><?php echo xlt('Client Name' ); ?>:</td>
71 <td class="forms">
72 <label class="forms-data"> <?php if (is_numeric($pid)) {
74 $result = getPatientData($pid, "fname,lname,squad");
75 echo text($result['fname'])." ".text($result['lname']);}
76 $patient_name=($result['fname'])." ".($result['lname']);
78 </label>
79 <input type="hidden" name="client_name" value="<?php echo attr($patient_name);?>">
80 </td>
81 <td align="left" class="forms"><?php echo xlt('DOB'); ?>:</td>
82 <td class="forms">
83 <label class="forms-data"> <?php if (is_numeric($pid)) {
85 $result = getPatientData($pid, "*");
86 echo text($result['DOB']);}
87 $dob=($result['DOB']);
89 </label>
90 <input type="hidden" name="DOB" value="<?php echo attr($dob);?>">
91 </td>
92 </tr>
93 <tr>
95 <td align="left" class="forms"><?php echo xlt('Transfer to'); ?>:</td>
97 <td class="forms">
98 <input type="text" name="transfer_to" id="transfer_to"
99 value="<?php echo text($obj{"transfer_to"});?>"></td>
101 <td align="left" class="forms"><?php echo xlt('Transfer date'); ?>:</td>
102 <td class="forms">
103 <input type='text' size='10' name='transfer_date' id='transfer_date' <?php echo attr ($disabled)?>;
104 value='<?php echo attr($obj{"transfer_date"}); ?>'
105 title='<?php echo xla('yyyy-mm-dd Date of service'); ?>'
106 onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)' />
107 <img src='../../pic/show_calendar.gif' align='absbottom' width='24' height='22'
108 id='img_transfer_date' border='0' alt='[?]' style='cursor:pointer;cursor:hand'
109 title='<?php echo xla('Click here to choose a date'); ?>'>
110 </td>
112 </tr>
114 <tr>
115 <td align="left colspan="3" style="padding-bottom:7px;"></td>
116 </tr>
118 <tr>
119 <td align="left" class="forms"><b><?php echo xlt('Status Of Admission'); ?>:</b></td>
120 <td colspan="3"><textarea name="status_of_admission" rows="3" cols="60" wrap="virtual name"><?php echo text($obj{"status_of_admission"});?></textarea></td>
121 </tr>
122 <tr>
123 <td align="left colspan="3" style="padding-bottom:7px;"></td>
124 </tr>
125 <tr>
126 <td align="left" class="forms"><b><?php echo xlt('Diagnosis'); ?>:</b></td>
127 <td colspan="3"><textarea name="diagnosis" rows="3" cols="60" wrap="virtual name"><?php echo text($obj{"diagnosis"});?></textarea></td>
128 </tr>
129 <tr>
130 <td align="left colspan="3" style="padding-bottom:7px;"></td>
131 </tr>
132 <tr>
133 <td align="left" class="forms"><b><?php echo xlt('Intervention Provided'); ?>:</b></td>
134 <td colspan="3"><textarea name="intervention_provided" rows="3" cols="60" wrap="virtual name"><?php echo text($obj{"intervention_provided"});?></textarea></td>
135 </tr>
136 <tr>
137 <td align="left colspan="3" style="padding-bottom:7px;"></td>
138 </tr>
139 <tr>
140 <td align="left" class="forms"><b><?php echo xlt('Overall Status Of Discharge'); ?>:</b></td>
141 <td colspan="3"><textarea name="overall_status_of_discharge" rows="3" cols="60" wrap="virtual name"><?php echo text($obj{"overall_status_of_discharge"});?></textarea></td>
142 </tr>
144 <tr>
145 <td align="left colspan="3" style="padding-bottom:7px;"></td>
146 </tr>
148 <tr>
149 <td align="left colspan="3" style="padding-bottom:7px;"></td>
150 </tr>
151 <tr>
152 <td></td>
153 <td><input type='submit' value='<?php echo xlt('Save');?>' class="button-css">&nbsp;
154 <input type='button' value='<?php echo xla('Print'); ?>' id='printbutton' />&nbsp;
155 <input type='button' class="button-css" value='<?php echo xla('Cancel'); ?>'
156 onclick="top.restoreSession();location='<?php echo "$rootdir/patient_file/encounter/$returnurl" ?>'" />
158 </td>
159 </tr>
160 </table>
161 </form>
163 <script language="javascript">
164 /* required for popup calendar */
165 Calendar.setup({inputField:"transfer_date", ifFormat:"%Y-%m-%d", button:"img_transfer_date"});
167 </script>
168 <?php
169 formFooter();