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>;.
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();
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'));
61 <body
class="body_top">
62 <p
><span
class="forms-title"><?php
echo xlt('AfterCare Planning'); ?
></span
></p
>
65 echo "<form method='post' name='my_form' " .
66 "action='$rootdir/forms/aftercare_plan/save.php?id=" . attr($formid) ."'>\n";
70 <td align
="left" class="forms" class="forms"><?php
echo xlt('Client Name' ); ?
>:</td
>
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']);
79 <input type
="hidden" name
="client_name" value
="<?php echo attr($patient_name);?>">
81 <td align
="left" class="forms"><?php
echo xlt('DOB'); ?
>:</td
>
83 <label
class="forms-data"> <?php
if (is_numeric($pid)) {
85 $result = getPatientData($pid, "*");
86 echo htmlspecialchars($result['DOB']);}
87 $dob=($result['DOB']);
90 <input type
="hidden" name
="DOB" value
="<?php echo attr($dob);?>">
96 <td align
="left" class="forms"><?php
echo xlt('Admit Date'); ?
>:</td
>
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
'); ?>'>
109 <td align
="left" class="forms"><?php
echo xlt('Discharged'); ?
>:</td
>
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
'); ?>'>
121 <td align
="left colspan="3" style="padding
-bottom
:7px
;"></td>
125 <td class="forms
-subtitle
" colspan="4"><B><?php echo xlt('Goal and Methods');?></B></td>
129 <td align="left colspan
="3" style
="padding-bottom:7px;"></td
>
133 <td
class="forms-subtitle" colspan
="4"><B
><?php
echo xlt('Goal A');?
>:</B
> 
;<?php
echo xlt('Acute Intoxication/Withdrawal'); ?
></td
>
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
>
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
>
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
>
153 <td
class="forms-subtitle" colspan
="4"><B
><?php
echo xlt('Goal B');?
>:</B
> 
;<?php
echo xlt('Emotional / Behavioral Conditions & Complications'); ?
></td
>
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
>
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
>
168 <td
class="forms-subtitle" colspan
="4"><B
><?php
echo xlt('Goal C');?
>:</B
> 
;<?php
echo xlt('Relapse Potential'); ?
></td
>
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
>
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
>
183 <td align
="left colspan="3" style="padding
-bottom
:7px
;"></td>
187 <td><input type='submit' value='<?php echo xla('Save'); ?>' class='button-css' />
188 <input type='button' value='<?php echo xla('Print'); ?>' id='printbutton' class='button-css' />
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>
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
"});