7 * @link http://www.open-emr.org
8 * @author Naina Mohamed <naina@capminds.com>
9 * @author Brady Miller <brady.g.miller@gmail.com>
10 * @copyright Copyright (c) 2012-2013 Naina Mohamed <naina@capminds.com> CapMinds Technologies
11 * @copyright Copyright (c) 2017-2019 Brady Miller <brady.g.miller@gmail.com>
12 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
15 require_once(__DIR__
. "/../../globals.php");
16 require_once("$srcdir/api.inc.php");
17 require_once("$srcdir/patient.inc.php");
18 require_once("$srcdir/options.inc.php");
20 use OpenEMR\Common\Csrf\CsrfUtils
;
21 use OpenEMR\Core\Header
;
23 formHeader("Form:Treatment Planning");
24 $returnurl = 'encounter_top.php';
25 $formid = (int) (isset($_GET['id']) ?
$_GET['id'] : 0);
26 $obj = $formid ?
formFetch("form_treatment_plan", $formid) : array();
28 // Get the providers list.
29 $ures = sqlStatement("SELECT id, username, fname, lname FROM users WHERE " .
30 "authorized != 0 AND active = 1 ORDER BY lname, fname");
34 <?php Header
::setupHeader('datetime-picker'); ?
>
38 var win
= top
.printLogSetup ? top
: opener
.top
;
39 win
.printLogSetup(document
.getElementById('printbutton'));
41 $
('.datepicker').datetimepicker({
42 <?php
$datetimepicker_timepicker = false; ?
>
43 <?php
$datetimepicker_showseconds = false; ?
>
44 <?php
$datetimepicker_formatInput = false; ?
>
45 <?php
require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?
>
46 <?php
// can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
52 <body
class="body_top">
53 <p
><span
class="forms-title"><?php
echo xlt('Treatment Planning'); ?
></span
></p
>
56 echo "<form method='post' name='my_form' " .
57 "action='$rootdir/forms/treatment_plan/save.php?id=" . attr_url($formid) . "'>\n";
59 <input type
="hidden" name
="csrf_token_form" value
="<?php echo attr(CsrfUtils::collectCsrfToken()); ?>" />
63 <td align
="left" class="forms" class="forms"><?php
echo xlt('Client Name'); ?
>:</td
>
65 <label
class="forms-data"> <?php
if (is_numeric($pid)) {
66 $result = getPatientData($pid, "fname,lname,squad");
67 echo text($result['fname']) . " " . text($result['lname']);
70 $patient_name = ($result['fname']) . " " . ($result['lname']);
73 <input type
="hidden" name
="client_name" value
="<?php echo attr($patient_name);?>">
75 <td align
="left" class="forms"><?php
echo xlt('DOB'); ?
>:</td
>
77 <label
class="forms-data"> <?php
if (is_numeric($pid)) {
78 $result = getPatientData($pid, "*");
79 echo text($result['DOB']);
82 $dob = ($result['DOB']);
85 <input type
="hidden" name
="DOB" value
="<?php echo attr($dob);?>">
89 <td align
="left" class="forms"><?php
echo xlt('Client Number'); ?
>:</td
>
91 <label
class="forms-data" > <?php
if (is_numeric($pid)) {
92 $result = getPatientData($pid, "*");
93 echo text($result['pid']);
96 $patient_id = $result['pid'];
99 <input type
="hidden" name
="client_number" value
="<?php echo attr($patient_id);?>">
103 <td align
="left" class="forms"><?php
echo xlt('Admit Date'); ?
>:</td
>
105 <input type
='text' size
='10' class='datepicker' name
='admit_date' id
='admission_date' <?php
echo attr($disabled) ?
>;
106 value
='<?php echo attr($obj["admit_date"]); ?>'
107 title
='<?php echo xla('yyyy
-mm
-dd Date of service
'); ?>' />
112 <td align
="left" class="forms"><?php
echo xlt('Provider'); ?
>:</td
>
113 <td
class="forms" width
="280px">
116 echo "<select name='provider' style='width:60%' />";
117 while ($urow = sqlFetchArray($ures)) {
118 echo " <option value='" . attr($urow['lname']) . "'";
119 if ($urow['lname'] == attr($obj["provider"])) {
123 echo ">" . text($urow['lname']);
124 if ($urow['fname']) {
125 echo ", " . text($urow['fname']);
139 <td colspan
='3' nowrap style
='font-size:8pt'>
145 <td align
="left" class="forms"><?php
echo xlt('Presenting Issue(s)'); ?
>:</td
>
146 <td colspan
="3"><textarea name
="presenting_issues" rows
="2" cols
="60" wrap
="virtual name"><?php
echo text($obj["presenting_issues"]);?
></textarea
></td
>
150 <td align
="left" class="forms"><?php
echo xlt('Patient History'); ?
>:</td
>
151 <td colspan
="3"><textarea name
="patient_history" rows
="2" cols
="60" wrap
="virtual name"><?php
echo text($obj["patient_history"]);?
></textarea
></td
>
156 <td align
="left" class="forms"><?php
echo xlt('Medications'); ?
>:</td
>
157 <td colspan
="3"><textarea name
="medications" rows
="2" cols
="60" wrap
="virtual name"><?php
echo text($obj["medications"]);?
></textarea
></td
>
162 <td align
="left" class="forms"><?php
echo xlt('Anyother Relevant Information'); ?
>:</td
>
163 <td colspan
="3"><textarea name
="anyother_relevant_information" rows
="2" cols
="60" wrap
="virtual name"><?php
echo text($obj["anyother_relevant_information"]);?
></textarea
></td
>
167 <td align
="left" class="forms"><?php
echo xlt('Diagnosis'); ?
>:</td
>
168 <td colspan
="3"><textarea name
="diagnosis" rows
="2" cols
="60" wrap
="virtual name"><?php
echo text($obj["diagnosis"]);?
></textarea
></td
>
172 <td align
="left" class="forms"><?php
echo xlt('Treatment Received'); ?
>:</td
>
173 <td colspan
="3"><textarea name
="treatment_received" rows
="2" cols
="60" wrap
="virtual name"><?php
echo text($obj["treatment_received"]);?
></textarea
></td
>
177 <td align
="left" class="forms"><?php
echo xlt('Recommendation For Follow Up'); ?
>:</td
>
178 <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
>
182 <td align
="left colspan="3" style="padding
-bottom
:7px
;"></td>
185 <td align="left colspan
="3" style
="padding-bottom:7px;"></td
>
189 <td
><input type
='submit' value
='<?php echo xla('Save
');?>' class="button-css"> 
;
190 <input type
='button' value
='<?php echo xla('Print'); ?>' id
='printbutton' /> 
;
192 <input type
='button' class="button-css" value
='<?php echo xla('Cancel
');?>'
193 onclick
="parent.closeTab(window.name, false)" /></td
>