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
22 //SANITIZE ALL ESCAPES
23 $sanitize_all_escapes=true;
25 //STOP FAKE REGISTER GLOBALS
26 $fake_register_globals=false;
28 include_once("../../globals.php");
29 include_once("$srcdir/api.inc");
30 require_once("$srcdir/patient.inc");
31 require_once("$srcdir/options.inc.php");
32 formHeader("Form:Treatment Planning");
33 $returnurl = $GLOBALS['concurrent_layout'] ?
'encounter_top.php' : 'patient_encounter.php';
34 $formid = 0 +
(isset($_GET['id']) ?
$_GET['id'] : '');
35 $obj = $formid ?
formFetch("form_treatment_plan", $formid) : array();
38 // Get the providers list.
39 $ures = sqlStatement("SELECT id, username, fname, lname FROM users WHERE " .
40 "authorized != 0 AND active = 1 ORDER BY lname, fname");
43 <?php
html_header_show();?
>
44 <script type
="text/javascript" src
="../../../library/dialog.js"></script
>
45 <!-- pop up calendar
-->
46 <style type
="text/css">@import
url(<?php
echo $GLOBALS['webroot'] ?
>/library
/dynarch_calendar
.css
);</style
>
47 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar.js"></script
>
48 <?php
include_once("{$GLOBALS['srcdir']}/dynarch_calendar_en.inc.php"); ?
>
49 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar_setup.js"></script
>
50 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/textformat.js"></script
>
51 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/dialog.js"></script
>
52 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
54 <body
class="body_top">
55 <p
><span
class="forms-title"><?php
echo xlt('Treatment Planning'); ?
></span
></p
>
58 echo "<form method='post' name='my_form' " .
59 "action='$rootdir/forms/treatment_plan/save.php?id=" . attr($formid) ."'>\n";
65 <td align
="left" class="forms" class="forms"><?php
echo xlt('Client Name' ); ?
>:</td
>
67 <label
class="forms-data"> <?php
if (is_numeric($pid)) {
69 $result = getPatientData($pid, "fname,lname,squad");
70 echo text($result['fname'])." ".text($result['lname']);}
71 $patient_name=($result['fname'])." ".($result['lname']);
74 <input type
="hidden" name
="client_name" value
="<?php echo attr($patient_name);?>">
76 <td align
="left" class="forms"><?php
echo xlt('DOB'); ?
>:</td
>
78 <label
class="forms-data"> <?php
if (is_numeric($pid)) {
80 $result = getPatientData($pid, "*");
81 echo text($result['DOB']);}
82 $dob=($result['DOB']);
85 <input type
="hidden" name
="DOB" value
="<?php echo attr($dob);?>">
92 <td align
="left" class="forms"><?php
echo xlt('Client Number'); ?
>:</td
>
94 <label
class="forms-data" > <?php
if (is_numeric($pid)) {
96 $result = getPatientData($pid, "*");
97 echo text($result['pid']);}
98 $patient_id=$result['pid'];
101 <input type
="hidden" name
="client_number" value
="<?php echo attr($patient_id);?>">
105 <td align
="left" class="forms"><?php
echo xlt('Admit Date'); ?
>:</td
>
107 <input type
='text' size
='10' name
='admit_date' id
='admission_date' <?php
echo attr($disabled) ?
>;
108 value
='<?php echo attr($obj{"admit_date"}); ?>'
109 title
='<?php echo xla('yyyy
-mm
-dd Date of service
'); ?>'
110 onkeyup
='datekeyup(this,mypcc)' onblur
='dateblur(this,mypcc)' />
111 <img src
='../../pic/show_calendar.gif' align
='absbottom' width
='24' height
='22'
112 id
='img_admission_date' border
='0' alt
='[?]' style
='cursor:pointer;cursor:hand'
113 title
='<?php echo xla('Click here to choose a date
'); ?>'>
118 <td align
="left" class="forms"><?php
echo xlt('Provider'); ?
>:</td
>
119 <td
class="forms" width
="280px">
122 echo "<select name='provider' style='width:60%' />";
123 while ($urow = sqlFetchArray($ures)) {
124 echo " <option value='" . attr($urow['lname']) . "'";
125 if ($urow['lname'] == attr($obj{"provider"})) echo " selected";
126 echo ">" . text($urow['lname']);
127 if ($urow['fname']) echo ", " . text($urow['fname']);
138 <td colspan
='3' nowrap style
='font-size:8pt'>
144 <td align
="left" class="forms"><?php
echo xlt('Presenting Issue(s)'); ?
>:</td
>
145 <td colspan
="3"><textarea name
="presenting_issues" rows
="2" cols
="60" wrap
="virtual name"><?php
echo text($obj{"presenting_issues"});?
></textarea
></td
>
149 <td align
="left" class="forms"><?php
echo xlt('Patient History'); ?
>:</td
>
150 <td colspan
="3"><textarea name
="patient_history" rows
="2" cols
="60" wrap
="virtual name"><?php
echo text($obj{"patient_history"});?
></textarea
></td
>
155 <td align
="left" class="forms"><?php
echo xlt('Medications'); ?
>:</td
>
156 <td colspan
="3"><textarea name
="medications" rows
="2" cols
="60" wrap
="virtual name"><?php
echo text($obj{"medications"});?
></textarea
></td
>
161 <td align
="left" class="forms"><?php
echo xlt('Anyother Relevant Information'); ?
>:</td
>
162 <td colspan
="3"><textarea name
="anyother_relevant_information" rows
="2" cols
="60" wrap
="virtual name"><?php
echo text($obj{"anyother_relevant_information"});?
></textarea
></td
>
166 <td align
="left" class="forms"><?php
echo xlt('Diagnosis'); ?
>:</td
>
167 <td colspan
="3"><textarea name
="diagnosis" rows
="2" cols
="60" wrap
="virtual name"><?php
echo text($obj{"diagnosis"});?
></textarea
></td
>
171 <td align
="left" class="forms"><?php
echo xlt('Treatment Received'); ?
>:</td
>
172 <td colspan
="3"><textarea name
="treatment_received" rows
="2" cols
="60" wrap
="virtual name"><?php
echo text($obj{"treatment_received"});?
></textarea
></td
>
176 <td align
="left" class="forms"><?php
echo xlt('Recommendation For Follow Up'); ?
>:</td
>
177 <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
>
181 <td align
="left colspan="3" style="padding
-bottom
:7px
;"></td>
184 <td align="left colspan
="3" style
="padding-bottom:7px;"></td
>
188 <td
><input type
='submit' value
='<?php echo xlt('Save
');?>' class="button-css"> 
;
189 <input type
='button' value
="Print" onclick
="window.print()" class="button-css"> 
;
190 <input type
='button' class="button-css" value
='<?php echo xlt('Cancel
');?>'
191 onclick
="top.restoreSession();location='<?php echo "$rootdir/patient_file
/encounter
/$returnurl" ?>'" /></td
>
195 <script language
="javascript">
196 /* required for popup calendar */
197 Calendar
.setup({inputField
:"admission_date", ifFormat
:"%Y-%m-%d", button
:"img_admission_date"});