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
24 //SANITIZE ALL ESCAPES
25 $sanitize_all_escapes=true;
27 //STOP FAKE REGISTER GLOBALS
28 $fake_register_globals=false;
30 include_once("../../globals.php");
31 include_once("$srcdir/api.inc");
32 require_once("$srcdir/patient.inc");
33 require_once("$srcdir/options.inc.php");
34 formHeader("Form:Treatment Planning");
35 $returnurl = 'encounter_top.php';
36 $formid = 0 +
(isset($_GET['id']) ?
$_GET['id'] : '');
37 $obj = $formid ?
formFetch("form_treatment_plan", $formid) : array();
39 // Get the providers list.
40 $ures = sqlStatement("SELECT id, username, fname, lname FROM users WHERE " .
41 "authorized != 0 AND active = 1 ORDER BY lname, fname");
44 <?php
html_header_show();?
>
46 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
47 <link rel
="stylesheet" href
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-datetimepicker-2-5-4/build/jquery.datetimepicker.min.css">
49 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/textformat.js?v=<?php echo $v_js_includes; ?>"></script
>
50 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/dialog.js?v=<?php echo $v_js_includes; ?>"></script
>
51 <script type
="text/javascript" src
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-min-3-1-1/index.js"></script
>
52 <script type
="text/javascript" src
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-datetimepicker-2-5-4/build/jquery.datetimepicker.full.min.js"></script
>
54 <script language
="JavaScript">
55 $
(document
).ready(function() {
56 var win
= top
.printLogSetup ? top
: opener
.top
;
57 win
.printLogSetup(document
.getElementById('printbutton'));
59 $
('.datepicker').datetimepicker({
60 <?php
$datetimepicker_timepicker = false; ?
>
61 <?php
$datetimepicker_showseconds = false; ?
>
62 <?php
$datetimepicker_formatInput = false; ?
>
63 <?php
require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?
>
64 <?php
// can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
70 <body
class="body_top">
71 <p
><span
class="forms-title"><?php
echo xlt('Treatment Planning'); ?
></span
></p
>
74 echo "<form method='post' name='my_form' " .
75 "action='$rootdir/forms/treatment_plan/save.php?id=" . attr($formid) ."'>\n";
81 <td align
="left" class="forms" class="forms"><?php
echo xlt('Client Name' ); ?
>:</td
>
83 <label
class="forms-data"> <?php
if (is_numeric($pid)) {
85 $result = getPatientData($pid, "fname,lname,squad");
86 echo text($result['fname'])." ".text($result['lname']);}
87 $patient_name=($result['fname'])." ".($result['lname']);
90 <input type
="hidden" name
="client_name" value
="<?php echo attr($patient_name);?>">
92 <td align
="left" class="forms"><?php
echo xlt('DOB'); ?
>:</td
>
94 <label
class="forms-data"> <?php
if (is_numeric($pid)) {
96 $result = getPatientData($pid, "*");
97 echo text($result['DOB']);}
98 $dob=($result['DOB']);
101 <input type
="hidden" name
="DOB" value
="<?php echo attr($dob);?>">
105 <td align
="left" class="forms"><?php
echo xlt('Client Number'); ?
>:</td
>
107 <label
class="forms-data" > <?php
if (is_numeric($pid)) {
109 $result = getPatientData($pid, "*");
110 echo text($result['pid']);}
111 $patient_id=$result['pid'];
114 <input type
="hidden" name
="client_number" value
="<?php echo attr($patient_id);?>">
118 <td align
="left" class="forms"><?php
echo xlt('Admit Date'); ?
>:</td
>
120 <input type
='text' size
='10' class='datepicker' name
='admit_date' id
='admission_date' <?php
echo attr($disabled) ?
>;
121 value
='<?php echo attr($obj{"admit_date"}); ?>'
122 title
='<?php echo xla('yyyy
-mm
-dd Date of service
'); ?>' />
127 <td align
="left" class="forms"><?php
echo xlt('Provider'); ?
>:</td
>
128 <td
class="forms" width
="280px">
131 echo "<select name='provider' style='width:60%' />";
132 while ($urow = sqlFetchArray($ures)) {
133 echo " <option value='" . attr($urow['lname']) . "'";
134 if ($urow['lname'] == attr($obj{"provider"})) echo " selected";
135 echo ">" . text($urow['lname']);
136 if ($urow['fname']) echo ", " . text($urow['fname']);
147 <td colspan
='3' nowrap style
='font-size:8pt'>
153 <td align
="left" class="forms"><?php
echo xlt('Presenting Issue(s)'); ?
>:</td
>
154 <td colspan
="3"><textarea name
="presenting_issues" rows
="2" cols
="60" wrap
="virtual name"><?php
echo text($obj{"presenting_issues"});?
></textarea
></td
>
158 <td align
="left" class="forms"><?php
echo xlt('Patient History'); ?
>:</td
>
159 <td colspan
="3"><textarea name
="patient_history" rows
="2" cols
="60" wrap
="virtual name"><?php
echo text($obj{"patient_history"});?
></textarea
></td
>
164 <td align
="left" class="forms"><?php
echo xlt('Medications'); ?
>:</td
>
165 <td colspan
="3"><textarea name
="medications" rows
="2" cols
="60" wrap
="virtual name"><?php
echo text($obj{"medications"});?
></textarea
></td
>
170 <td align
="left" class="forms"><?php
echo xlt('Anyother Relevant Information'); ?
>:</td
>
171 <td colspan
="3"><textarea name
="anyother_relevant_information" rows
="2" cols
="60" wrap
="virtual name"><?php
echo text($obj{"anyother_relevant_information"});?
></textarea
></td
>
175 <td align
="left" class="forms"><?php
echo xlt('Diagnosis'); ?
>:</td
>
176 <td colspan
="3"><textarea name
="diagnosis" rows
="2" cols
="60" wrap
="virtual name"><?php
echo text($obj{"diagnosis"});?
></textarea
></td
>
180 <td align
="left" class="forms"><?php
echo xlt('Treatment Received'); ?
>:</td
>
181 <td colspan
="3"><textarea name
="treatment_received" rows
="2" cols
="60" wrap
="virtual name"><?php
echo text($obj{"treatment_received"});?
></textarea
></td
>
185 <td align
="left" class="forms"><?php
echo xlt('Recommendation For Follow Up'); ?
>:</td
>
186 <td colspan
="3"><textarea name
="recommendation_for_follow_up" rows
="2" cols
="60" wrap
="virtual name"><?php
echo text($obj{"recommendation_for_follow_up"});?
></textarea
></td
>
190 <td align
="left colspan="3" style="padding
-bottom
:7px
;"></td>
193 <td align="left colspan
="3" style
="padding-bottom:7px;"></td
>
197 <td
><input type
='submit' value
='<?php echo xlt('Save
');?>' class="button-css"> 
;
198 <input type
='button' value
='<?php echo xla('Print'); ?>' id
='printbutton' /> 
;
200 <input type
='button' class="button-css" value
='<?php echo xlt('Cancel
');?>'
201 onclick
="top.restoreSession();location='<?php echo "$rootdir/patient_file
/encounter
/$returnurl" ?>'" /></td
>