datepicker in standard forms (#520)
[openemr.git] / interface / forms / transfer_summary / new.php
blob31639b3721d096e7b9ec6c05faa82338e9b59bfa
1 <?php
2 /**
4 * Copyright (C) 2012-2013 Naina Mohamed <naina@capminds.com> CapMinds Technologies
5 * Copyright (C) 2017 Brady Miller <brady.g.miller@gmail.com>
8 * LICENSE: This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 3
11 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
19 * @package OpenEMR
20 * @author Naina Mohamed <naina@capminds.com>
21 * @author Brady Miller <brady.g.miller@gmail.com>
22 * @link http://www.open-emr.org
25 //SANITIZE ALL ESCAPES
26 $sanitize_all_escapes=true;
28 //STOP FAKE REGISTER GLOBALS
29 $fake_register_globals=false;
31 include_once("../../globals.php");
32 include_once("$srcdir/api.inc");
33 require_once("$srcdir/patient.inc");
34 require_once("$srcdir/options.inc.php");
35 formHeader("Form:Transfer Summary");
36 $returnurl = 'encounter_top.php';
37 $formid = 0 + (isset($_GET['id']) ? $_GET['id'] : '');
38 $obj = $formid ? formFetch("form_transfer_summary", $formid) : array();
41 <html>
42 <head>
43 <?php html_header_show();?>
45 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
46 <link rel="stylesheet" href="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-datetimepicker-2-5-4/build/jquery.datetimepicker.min.css">
48 <script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/textformat.js?v=<?php echo $v_js_includes; ?>"></script>
49 <script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/dialog.js?v=<?php echo $v_js_includes; ?>"></script>
50 <script type="text/javascript" src="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-min-3-1-1/index.js"></script>
51 <script type="text/javascript" src="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-datetimepicker-2-5-4/build/jquery.datetimepicker.full.min.js"></script>
53 <script language="JavaScript">
54 $(document).ready(function() {
55 var win = top.printLogSetup ? top : opener.top;
56 win.printLogSetup(document.getElementById('printbutton'));
58 $('.datepicker').datetimepicker({
59 <?php $datetimepicker_timepicker = false; ?>
60 <?php $datetimepicker_showseconds = false; ?>
61 <?php $datetimepicker_formatInput = false; ?>
62 <?php require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?>
63 <?php // can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
64 });
65 });
66 </script>
68 </head>
70 <body class="body_top">
71 <p><span class="forms-title"><?php echo xlt('Transfer Summary'); ?></span></p>
72 </br>
73 <?php
74 echo "<form method='post' name='my_form' " .
75 "action='$rootdir/forms/transfer_summary/save.php?id=" . attr($formid) ."'>\n";
77 <table border="0">
78 <tr>
79 <td align="left" class="forms" class="forms"><?php echo xlt('Client Name' ); ?>:</td>
80 <td class="forms">
81 <label class="forms-data"> <?php if (is_numeric($pid)) {
83 $result = getPatientData($pid, "fname,lname,squad");
84 echo text($result['fname'])." ".text($result['lname']);}
85 $patient_name=($result['fname'])." ".($result['lname']);
87 </label>
88 <input type="hidden" name="client_name" value="<?php echo attr($patient_name);?>">
89 </td>
90 <td align="left" class="forms"><?php echo xlt('DOB'); ?>:</td>
91 <td class="forms">
92 <label class="forms-data"> <?php if (is_numeric($pid)) {
94 $result = getPatientData($pid, "*");
95 echo text($result['DOB']);}
96 $dob=($result['DOB']);
98 </label>
99 <input type="hidden" name="DOB" value="<?php echo attr($dob);?>">
100 </td>
101 </tr>
102 <tr>
104 <td align="left" class="forms"><?php echo xlt('Transfer to'); ?>:</td>
106 <td class="forms">
107 <input type="text" name="transfer_to" id="transfer_to"
108 value="<?php echo text($obj{"transfer_to"});?>"></td>
110 <td align="left" class="forms"><?php echo xlt('Transfer date'); ?>:</td>
111 <td class="forms">
112 <input type='text' size='10' class='datepicker' name='transfer_date' id='transfer_date' <?php echo attr ($disabled)?>;
113 value='<?php echo attr($obj{"transfer_date"}); ?>'
114 title='<?php echo xla('yyyy-mm-dd Date of service'); ?>' />
115 </td>
117 </tr>
119 <tr>
120 <td align="left colspan="3" style="padding-bottom:7px;"></td>
121 </tr>
123 <tr>
124 <td align="left" class="forms"><b><?php echo xlt('Status Of Admission'); ?>:</b></td>
125 <td colspan="3"><textarea name="status_of_admission" rows="3" cols="60" wrap="virtual name"><?php echo text($obj{"status_of_admission"});?></textarea></td>
126 </tr>
127 <tr>
128 <td align="left colspan="3" style="padding-bottom:7px;"></td>
129 </tr>
130 <tr>
131 <td align="left" class="forms"><b><?php echo xlt('Diagnosis'); ?>:</b></td>
132 <td colspan="3"><textarea name="diagnosis" rows="3" cols="60" wrap="virtual name"><?php echo text($obj{"diagnosis"});?></textarea></td>
133 </tr>
134 <tr>
135 <td align="left colspan="3" style="padding-bottom:7px;"></td>
136 </tr>
137 <tr>
138 <td align="left" class="forms"><b><?php echo xlt('Intervention Provided'); ?>:</b></td>
139 <td colspan="3"><textarea name="intervention_provided" rows="3" cols="60" wrap="virtual name"><?php echo text($obj{"intervention_provided"});?></textarea></td>
140 </tr>
141 <tr>
142 <td align="left colspan="3" style="padding-bottom:7px;"></td>
143 </tr>
144 <tr>
145 <td align="left" class="forms"><b><?php echo xlt('Overall Status Of Discharge'); ?>:</b></td>
146 <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>
147 </tr>
149 <tr>
150 <td align="left colspan="3" style="padding-bottom:7px;"></td>
151 </tr>
153 <tr>
154 <td align="left colspan="3" style="padding-bottom:7px;"></td>
155 </tr>
156 <tr>
157 <td></td>
158 <td><input type='submit' value='<?php echo xlt('Save');?>' class="button-css">&nbsp;
159 <input type='button' value='<?php echo xla('Print'); ?>' id='printbutton' />&nbsp;
160 <input type='button' class="button-css" value='<?php echo xla('Cancel'); ?>'
161 onclick="top.restoreSession();location='<?php echo "$rootdir/patient_file/encounter/$returnurl" ?>'" />
163 </td>
164 </tr>
165 </table>
166 </form>
168 <?php
169 formFooter();