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 require_once("$srcdir/htmlspecialchars.inc.php");
34 formHeader("Form:AfterCare Planning");
35 $returnurl = $GLOBALS['concurrent_layout'] ?
'encounter_top.php' : 'patient_encounter.php';
36 $formid = 0 +
(isset($_GET['id']) ?
$_GET['id'] : '');
37 $obj = $formid ?
formFetch("form_aftercare_plan", $formid) : array();
42 <?php
html_header_show();?
>
43 <script type
="text/javascript" src
="../../../library/dialog.js"></script
>
44 <!-- pop up calendar
-->
45 <style type
="text/css">@import
url(<?php
echo $GLOBALS['webroot'] ?
>/library
/dynarch_calendar
.css
);</style
>
46 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar.js"></script
>
47 <?php
include_once("{$GLOBALS['srcdir']}/dynarch_calendar_en.inc.php"); ?
>
48 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar_setup.js"></script
>
49 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/textformat.js"></script
>
50 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/dialog.js"></script
>
51 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
53 <body
class="body_top">
54 <p
><span
class="forms-title"><?php
echo xlt('AfterCare Planning'); ?
></span
></p
>
57 echo "<form method='post' name='my_form' " .
58 "action='$rootdir/forms/aftercare_plan/save.php?id=" . attr($formid) ."'>\n";
62 <td align
="left" class="forms" class="forms"><?php
echo xlt('Client Name' ); ?
>:</td
>
64 <label
class="forms-data"> <?php
if (is_numeric($pid)) {
66 $result = getPatientData($pid, "fname,lname,squad");
67 echo htmlspecialchars(text($result['fname'])." ".text($result['lname']));}
68 $patient_name=($result['fname'])." ".($result['lname']);
71 <input type
="hidden" name
="client_name" value
="<?php echo attr($patient_name);?>">
73 <td align
="left" class="forms"><?php
echo xlt('DOB'); ?
>:</td
>
75 <label
class="forms-data"> <?php
if (is_numeric($pid)) {
77 $result = getPatientData($pid, "*");
78 echo htmlspecialchars($result['DOB']);}
79 $dob=($result['DOB']);
82 <input type
="hidden" name
="DOB" value
="<?php echo attr($dob);?>">
88 <td align
="left" class="forms"><?php
echo xlt('Admit Date'); ?
>:</td
>
90 <input type
='text' size
='10' name
='admit_date' id
='admission_date' <?php
echo attr($disabled); ?
>;
91 value
='<?php echo attr($obj{"admit_date"}); ?>'
92 title
='<?php echo xla('yyyy
-mm
-dd Date of service
'); ?>'
93 onkeyup
='datekeyup(this,mypcc)' onblur
='dateblur(this,mypcc)' />
94 <img src
='../../pic/show_calendar.gif' align
='absbottom' width
='24' height
='22'
95 id
='img_admission_date' border
='0' alt
='[?]' style
='cursor:pointer;cursor:hand'
96 title
='<?php echo xla('Click here to choose a date
'); ?>'>
101 <td align
="left" class="forms"><?php
echo xl('Discharged'); ?
>:</td
>
103 <input type
='text' size
='10' name
='discharged' id
='discharge_date' <?php
echo attr($disabled); ?
>;
104 value
='<?php echo attr($obj{"discharged"}); ?>'
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_discharge_date' border
='0' alt
='[?]' style
='cursor:pointer;cursor:hand'
109 title
='<?php echo xla('Click here to choose a date
'); ?>'>
113 <td align
="left colspan="3" style="padding
-bottom
:7px
;"></td>
117 <td class="forms
-subtitle
" colspan="4"><B><?php echo xlt('Goal and Methods');?></B></td>
121 <td align="left colspan
="3" style
="padding-bottom:7px;"></td
>
125 <td
class="forms-subtitle" colspan
="4"><B
><?php
echo xlt('Goal A');?
>:</B
> 
;<?php
echo xlt('Acute Intoxication/Withdrawal'); ?
></td
>
129 <td align
="right" class="forms">1.</td
>
130 <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
>
134 <td align
="right" class="forms">2.</td
>
135 <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
>
139 <td align
="right" class="forms">3.</td
>
140 <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
>
145 <td
class="forms-subtitle" colspan
="4"><B
><?php
echo xlt('Goal B');?
>:</B
> 
;<?php
echo xlt('Emotional / Behavioral Conditions & Complications'); ?
></td
>
149 <td align
="right" class="forms">1.</td
>
150 <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
>
154 <td align
="right" class="forms">2.</td
>
155 <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
>
160 <td
class="forms-subtitle" colspan
="4"><B
><?php
echo xlt('Goal C');?
>:</B
> 
;<?php
echo xlt('Relapse Potential'); ?
></td
>
164 <td align
="right" class="forms">1.</td
>
165 <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
>
169 <td align
="right" class="forms">2.</td
>
170 <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
>
175 <td align
="left colspan="3" style="padding
-bottom
:7px
;"></td>
179 <td><input type='submit' value='<?php echo xlt('Save');?>' class="button
-css
">
180 <input type='button' value="Print" onclick="window
.print()" class="button
-css
">
181 <input type='button' class="button
-css
" value='<?php echo xlt('Cancel');?>'
182 onclick="top
.restoreSession();location
='<?php echo "$rootdir/patient_file/encounter/$returnurl" ?>'" /></td>
186 <script language="javascript
">
187 /* required for popup calendar */
188 Calendar.setup({inputField:"admission_date
", ifFormat:"%Y
-%m
-%d
", button:"img_admission_date
"});
189 Calendar.setup({inputField:"discharge_date
", ifFormat:"%Y
-%m
-%d
", button:"img_discharge_date
"});