Add new modules loaded event (#7463)
[openemr.git] / interface / forms / treatment_plan / new.php
blob7e651b47e578bcace9d286f33c4311cb2b9468f5
1 <?php
3 /**
4 * treatment plan form.
6 * @package OpenEMR
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");
32 <html><head>
34 <?php Header::setupHeader('datetime-picker'); ?>
36 <script>
37 $(function () {
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 ?>
47 });
48 });
49 </script>
51 </head>
52 <body class="body_top">
53 <p><span class="forms-title"><?php echo xlt('Treatment Planning'); ?></span></p>
54 <br />
55 <?php
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()); ?>" />
60 <table border="0">
62 <tr>
63 <td align="left" class="forms" class="forms"><?php echo xlt('Client Name'); ?>:</td>
64 <td class="forms">
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']);
72 </label>
73 <input type="hidden" name="client_name" value="<?php echo attr($patient_name);?>">
74 </td>
75 <td align="left" class="forms"><?php echo xlt('DOB'); ?>:</td>
76 <td class="forms">
77 <label class="forms-data"> <?php if (is_numeric($pid)) {
78 $result = getPatientData($pid, "*");
79 echo text($result['DOB']);
82 $dob = ($result['DOB']);
84 </label>
85 <input type="hidden" name="DOB" value="<?php echo attr($dob);?>">
86 </td>
87 </tr>
88 <tr>
89 <td align="left" class="forms"><?php echo xlt('Client Number'); ?>:</td>
90 <td class="forms">
91 <label class="forms-data" > <?php if (is_numeric($pid)) {
92 $result = getPatientData($pid, "*");
93 echo text($result['pid']);
96 $patient_id = $result['pid'];
98 </label>
99 <input type="hidden" name="client_number" value="<?php echo attr($patient_id);?>">
100 </td>
103 <td align="left" class="forms"><?php echo xlt('Admit Date'); ?>:</td>
104 <td class="forms">
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'); ?>' />
108 </td>
110 </tr>
111 <tr>
112 <td align="left" class="forms"><?php echo xlt('Provider'); ?>:</td>
113 <td class="forms" width="280px">
114 <?php
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"])) {
120 echo " selected";
123 echo ">" . text($urow['lname']);
124 if ($urow['fname']) {
125 echo ", " . text($urow['fname']);
128 echo "</option>\n";
131 echo "</select>";
133 </td>
135 </tr>
137 <tr>
139 <td colspan='3' nowrap style='font-size:8pt'>
140 &nbsp;
141 </td>
142 </tr>
144 <tr>
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>
148 </tr>
149 <tr>
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>
153 </tr>
154 <tr>
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>
160 </tr>
161 <tr>
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>
165 </tr>
166 <tr>
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>
170 </tr>
171 <tr>
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>
175 </tr>
176 <tr>
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>
180 </tr>
181 <tr>
182 <td align="left colspan="3" style="padding-bottom:7px;"></td>
183 </tr>
184 <tr>
185 <td align="left colspan="3" style="padding-bottom:7px;"></td>
186 </tr>
187 <tr>
188 <td></td>
189 <td><input type='submit' value='<?php echo xla('Save');?>' class="button-css">&nbsp;
190 <input type='button' value='<?php echo xla('Print'); ?>' id='printbutton' />&nbsp;
192 <input type='button' class="button-css" value='<?php echo xla('Cancel');?>'
193 onclick="parent.closeTab(window.name, false)" /></td>
194 </tr>
195 </table>
196 </form>
197 <?php
198 formFooter();