migrated ubiquitous libraries to composer autoloader (#421)
[openemr.git] / interface / forms / aftercare_plan / new.php
blob43ebe86bf07bde8a3ceb104e89c8510f92345927
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
23 //SANITIZE ALL ESCAPES
24 $sanitize_all_escapes=true;
26 //STOP FAKE REGISTER GLOBALS
27 $fake_register_globals=false;
29 include_once("../../globals.php");
30 include_once("$srcdir/api.inc");
31 require_once("$srcdir/patient.inc");
32 require_once("$srcdir/options.inc.php");
33 formHeader("Form:AfterCare Planning");
34 $returnurl = 'encounter_top.php';
35 $formid = 0 + (isset($_GET['id']) ? $_GET['id'] : '');
36 $obj = $formid ? formFetch("form_aftercare_plan", $formid) : array();
39 <html>
40 <head>
41 <?php html_header_show();?>
42 <script type="text/javascript" src="../../../library/dialog.js?v=<?php echo $v_js_includes; ?>"></script>
43 <!-- pop up calendar -->
44 <style type="text/css">@import url(<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar.css);</style>
45 <script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar.js"></script>
46 <?php include_once("{$GLOBALS['srcdir']}/dynarch_calendar_en.inc.php"); ?>
47 <script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar_setup.js"></script>
48 <script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/textformat.js"></script>
49 <script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/dialog.js?v=<?php echo $v_js_includes; ?>"></script>
50 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
52 <script type="text/javascript" src="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-min-1-9-1/index.js"></script>
53 <script language="JavaScript">
54 $(document).ready(function() {
55 var win = top.printLogSetup ? top : opener.top;
56 win.printLogSetup(document.getElementById('printbutton'));
57 });
58 </script>
60 </head>
61 <body class="body_top">
62 <p><span class="forms-title"><?php echo xlt('AfterCare Planning'); ?></span></p>
63 </br>
64 <?php
65 echo "<form method='post' name='my_form' " .
66 "action='$rootdir/forms/aftercare_plan/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 htmlspecialchars(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 htmlspecialchars($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>
96 <td align="left" class="forms"><?php echo xlt('Admit Date'); ?>:</td>
97 <td class="forms">
98 <input type='text' size='10' name='admit_date' id='admission_date' <?php echo attr($disabled); ?>;
99 value='<?php echo attr($obj{"admit_date"}); ?>'
100 title='<?php echo xla('yyyy-mm-dd Date of service'); ?>'
101 onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)' />
102 <img src='../../pic/show_calendar.gif' align='absbottom' width='24' height='22'
103 id='img_admission_date' border='0' alt='[?]' style='cursor:pointer;cursor:hand'
104 title='<?php echo xla('Click here to choose a date'); ?>'>
105 </td>
109 <td align="left" class="forms"><?php echo xlt('Discharged'); ?>:</td>
110 <td class="forms">
111 <input type='text' size='10' name='discharged' id='discharge_date' <?php echo attr($disabled); ?>;
112 value='<?php echo attr($obj{"discharged"}); ?>'
113 title='<?php echo xla('yyyy-mm-dd Date of service'); ?>'
114 onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)' />
115 <img src='../../pic/show_calendar.gif' align='absbottom' width='24' height='22'
116 id='img_discharge_date' border='0' alt='[?]' style='cursor:pointer;cursor:hand'
117 title='<?php echo xla('Click here to choose a date'); ?>'>
118 </td>
119 </tr>
120 <tr>
121 <td align="left colspan="3" style="padding-bottom:7px;"></td>
122 </tr>
123 <tr>
125 <td class="forms-subtitle" colspan="4"><B><?php echo xlt('Goal and Methods');?></B></td>
127 </tr>
128 <tr>
129 <td align="left colspan="3" style="padding-bottom:7px;"></td>
130 </tr>
131 <tr>
133 <td class="forms-subtitle" colspan="4"><B><?php echo xlt('Goal A');?>:</B>&nbsp;<?php echo xlt('Acute Intoxication/Withdrawal'); ?></td>
135 </tr>
136 <tr>
137 <td align="right" class="forms">1.</td>
138 <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>
140 </tr>
141 <tr>
142 <td align="right" class="forms">2.</td>
143 <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>
145 </tr>
146 <tr>
147 <td align="right" class="forms">3.</td>
148 <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>
151 <tr>
153 <td class="forms-subtitle" colspan="4"><B><?php echo xlt('Goal B');?>:</B>&nbsp;<?php echo xlt('Emotional / Behavioral Conditions & Complications'); ?></td>
155 </tr>
156 <tr>
157 <td align="right" class="forms">1.</td>
158 <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>
160 </tr>
161 <tr>
162 <td align="right" class="forms">2.</td>
163 <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>
165 </tr>
168 <td class="forms-subtitle" colspan="4"><B><?php echo xlt('Goal C');?>:</B>&nbsp;<?php echo xlt('Relapse Potential'); ?></td>
170 </tr>
171 <tr>
172 <td align="right" class="forms">1.</td>
173 <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>
175 </tr>
176 <tr>
177 <td align="right" class="forms">2.</td>
178 <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>
180 </tr>
182 <tr>
183 <td align="left colspan="3" style="padding-bottom:7px;"></td>
184 </tr>
185 <tr>
186 <td></td>
187 <td><input type='submit' value='<?php echo xla('Save'); ?>' class='button-css' />&nbsp;
188 <input type='button' value='<?php echo xla('Print'); ?>' id='printbutton' class='button-css' />&nbsp;
189 <input type='button' class='button-css' value='<?php echo xla('Cancel'); ?>'
190 onclick="top.restoreSession();location='<?php echo "$rootdir/patient_file/encounter/$returnurl" ?>'" /></td>
191 </tr>
192 </table>
193 </form>
194 <script language="javascript">
195 /* required for popup calendar */
196 Calendar.setup({inputField:"admission_date", ifFormat:"%Y-%m-%d", button:"img_admission_date"});
197 Calendar.setup({inputField:"discharge_date", ifFormat:"%Y-%m-%d", button:"img_discharge_date"});
198 </script>
199 <?php
200 formFooter();