datepicker in standard forms (#520)
[openemr.git] / interface / forms / aftercare_plan / new.php
blob007a531bdf94fc8e4c30ff9934d3b4cf3425ea69
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>
7 * LICENSE: This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 3
10 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
18 * @package OpenEMR
19 * @author Naina Mohamed <naina@capminds.com>
20 * @author Brady Miller <brady.g.miller@gmail.com>
21 * @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:AfterCare Planning");
36 $returnurl = 'encounter_top.php';
37 $formid = 0 + (isset($_GET['id']) ? $_GET['id'] : '');
38 $obj = $formid ? formFetch("form_aftercare_plan", $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>
69 <body class="body_top">
70 <p><span class="forms-title"><?php echo xlt('AfterCare Planning'); ?></span></p>
71 </br>
72 <?php
73 echo "<form method='post' name='my_form' " .
74 "action='$rootdir/forms/aftercare_plan/save.php?id=" . attr($formid) ."'>\n";
76 <table border="0">
77 <tr>
78 <td align="left" class="forms" class="forms"><?php echo xlt('Client Name' ); ?>:</td>
79 <td class="forms">
80 <label class="forms-data"> <?php if (is_numeric($pid)) {
82 $result = getPatientData($pid, "fname,lname,squad");
83 echo htmlspecialchars(text($result['fname'])." ".text($result['lname']));}
84 $patient_name=($result['fname'])." ".($result['lname']);
86 </label>
87 <input type="hidden" name="client_name" value="<?php echo attr($patient_name);?>">
88 </td>
89 <td align="left" class="forms"><?php echo xlt('DOB'); ?>:</td>
90 <td class="forms">
91 <label class="forms-data"> <?php if (is_numeric($pid)) {
93 $result = getPatientData($pid, "*");
94 echo htmlspecialchars($result['DOB']);}
95 $dob=($result['DOB']);
97 </label>
98 <input type="hidden" name="DOB" value="<?php echo attr($dob);?>">
99 </td>
100 </tr>
101 <tr>
104 <td align="left" class="forms"><?php echo xlt('Admit Date'); ?>:</td>
105 <td class="forms">
106 <input type='text' size='10' class='datepicker' name='admit_date' id='admission_date' <?php echo attr($disabled); ?>;
107 value='<?php echo attr($obj{"admit_date"}); ?>'
108 title='<?php echo xla('yyyy-mm-dd Date of service'); ?>' />
109 </td>
110 <td align="left" class="forms"><?php echo xlt('Discharged'); ?>:</td>
111 <td class="forms">
112 <input type='text' size='10' class='datepicker' name='discharged' id='discharge_date' <?php echo attr($disabled); ?>;
113 value='<?php echo attr($obj{"discharged"}); ?>'
114 title='<?php echo xla('yyyy-mm-dd Date of service'); ?>' />
115 </td>
116 </tr>
117 <tr>
118 <td align="left colspan="3" style="padding-bottom:7px;"></td>
119 </tr>
120 <tr>
122 <td class="forms-subtitle" colspan="4"><B><?php echo xlt('Goal and Methods');?></B></td>
124 </tr>
125 <tr>
126 <td align="left colspan="3" style="padding-bottom:7px;"></td>
127 </tr>
128 <tr>
130 <td class="forms-subtitle" colspan="4"><B><?php echo xlt('Goal A');?>:</B>&nbsp;<?php echo xlt('Acute Intoxication/Withdrawal'); ?></td>
132 </tr>
133 <tr>
134 <td align="right" class="forms">1.</td>
135 <td colspan="3"><textarea name="goal_a_acute_intoxication" rows="2" cols="80" wrap="virtual name"><?php echo text($obj{"goal_a_acute_intoxication"});?></textarea></td>
137 </tr>
138 <tr>
139 <td align="right" class="forms">2.</td>
140 <td colspan="3"><textarea name="goal_a_acute_intoxication_I" rows="2" cols="80" wrap="virtual name"><?php echo text($obj{"goal_a_acute_intoxication_I"});?></textarea></td>
142 </tr>
143 <tr>
144 <td align="right" class="forms">3.</td>
145 <td colspan="3"><textarea name="goal_a_acute_intoxication_II" rows="2" cols="80" wrap="virtual name"><?php echo text($obj{"goal_a_acute_intoxication_II"});?></textarea></td>
148 <tr>
150 <td class="forms-subtitle" colspan="4"><B><?php echo xlt('Goal B');?>:</B>&nbsp;<?php echo xlt('Emotional / Behavioral Conditions & Complications'); ?></td>
152 </tr>
153 <tr>
154 <td align="right" class="forms">1.</td>
155 <td colspan="3"><textarea name="goal_b_emotional_behavioral_conditions" rows="2" cols="80" wrap="virtual name"><?php echo text($obj{"goal_b_emotional_behavioral_conditions"});?></textarea></td>
157 </tr>
158 <tr>
159 <td align="right" class="forms">2.</td>
160 <td colspan="3"><textarea name="goal_b_emotional_behavioral_conditions_I" rows="2" cols="80" wrap="virtual name"><?php echo text($obj{"goal_b_emotional_behavioral_conditions_I"});?></textarea></td>
162 </tr>
165 <td class="forms-subtitle" colspan="4"><B><?php echo xlt('Goal C');?>:</B>&nbsp;<?php echo xlt('Relapse Potential'); ?></td>
167 </tr>
168 <tr>
169 <td align="right" class="forms">1.</td>
170 <td colspan="3"><textarea name="goal_c_relapse_potential" rows="2" cols="80" wrap="virtual name"><?php echo text($obj{"goal_c_relapse_potential"});?></textarea></td>
172 </tr>
173 <tr>
174 <td align="right" class="forms">2.</td>
175 <td colspan="3"><textarea name="goal_c_relapse_potential_I" rows="2" cols="80" wrap="virtual name"><?php echo text($obj{"goal_c_relapse_potential_I"});?></textarea></td>
177 </tr>
179 <tr>
180 <td align="left colspan="3" style="padding-bottom:7px;"></td>
181 </tr>
182 <tr>
183 <td></td>
184 <td><input type='submit' value='<?php echo xla('Save'); ?>' class='button-css' />&nbsp;
185 <input type='button' value='<?php echo xla('Print'); ?>' id='printbutton' class='button-css' />&nbsp;
186 <input type='button' class='button-css' value='<?php echo xla('Cancel'); ?>'
187 onclick="top.restoreSession();location='<?php echo "$rootdir/patient_file/encounter/$returnurl" ?>'" /></td>
188 </tr>
189 </table>
190 </form>
191 <?php
192 formFooter();