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>;.
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();
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 ?>
69 <body
class="body_top">
70 <p
><span
class="forms-title"><?php
echo xlt('AfterCare Planning'); ?
></span
></p
>
73 echo "<form method='post' name='my_form' " .
74 "action='$rootdir/forms/aftercare_plan/save.php?id=" . attr($formid) ."'>\n";
78 <td align
="left" class="forms" class="forms"><?php
echo xlt('Client Name' ); ?
>:</td
>
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']);
87 <input type
="hidden" name
="client_name" value
="<?php echo attr($patient_name);?>">
89 <td align
="left" class="forms"><?php
echo xlt('DOB'); ?
>:</td
>
91 <label
class="forms-data"> <?php
if (is_numeric($pid)) {
93 $result = getPatientData($pid, "*");
94 echo htmlspecialchars($result['DOB']);}
95 $dob=($result['DOB']);
98 <input type
="hidden" name
="DOB" value
="<?php echo attr($dob);?>">
104 <td align
="left" class="forms"><?php
echo xlt('Admit Date'); ?
>:</td
>
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
'); ?>' />
110 <td align
="left" class="forms"><?php
echo xlt('Discharged'); ?
>:</td
>
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
'); ?>' />
118 <td align
="left colspan="3" style="padding
-bottom
:7px
;"></td>
122 <td class="forms
-subtitle
" colspan="4"><B><?php echo xlt('Goal and Methods');?></B></td>
126 <td align="left colspan
="3" style
="padding-bottom:7px;"></td
>
130 <td
class="forms-subtitle" colspan
="4"><B
><?php
echo xlt('Goal A');?
>:</B
> 
;<?php
echo xlt('Acute Intoxication/Withdrawal'); ?
></td
>
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
>
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
>
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
>
150 <td
class="forms-subtitle" colspan
="4"><B
><?php
echo xlt('Goal B');?
>:</B
> 
;<?php
echo xlt('Emotional / Behavioral Conditions & Complications'); ?
></td
>
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
>
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
>
165 <td
class="forms-subtitle" colspan
="4"><B
><?php
echo xlt('Goal C');?
>:</B
> 
;<?php
echo xlt('Relapse Potential'); ?
></td
>
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
>
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
>
180 <td align
="left colspan="3" style="padding
-bottom
:7px
;"></td>
184 <td><input type='submit' value='<?php echo xla('Save'); ?>' class='button-css' />
185 <input type='button' value='<?php echo xla('Print'); ?>' id='printbutton' class='button-css' />
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>