Highway to PSR2
[openemr.git] / interface / patient_tracker / patient_tracker.php
blobfd226b14147881e7fc7592a411c301637d7e6b70
1 <?php
2 /**
3 * Patient Tracker (Patient Flow Board)
5 * This program displays the information entered in the Calendar program ,
6 * allowing the user to change status and view those changed here and in the Calendar
7 * Will allow the collection of length of time spent in each status
9 * @package OpenEMR
10 * @link http://www.open-emr.org
11 * @author Terry Hill <terry@lilysystems.com>
12 * @author Brady Miller <brady.g.miller@gmail.com>
13 * @copyright Copyright (c) 2015 Terry Hill <terry@lillysystems.com>
14 * @copyright Copyright (c) 2017 Brady Miller <brady.g.miller@gmail.com>
15 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
19 require_once("../globals.php");
20 require_once("$srcdir/patient.inc");
21 require_once("$srcdir/options.inc.php");
22 require_once("$srcdir/patient_tracker.inc.php");
23 require_once("$srcdir/user.inc");
25 // mdsupport - user_settings prefix
26 $uspfx = substr(__FILE__, strlen($webserver_root)) . '.';
27 $setting_new_window = prevSetting($uspfx, 'setting_new_window', 'form_new_window', ' ');
29 #define variables, future enhancement allow changing the to_date and from_date
30 #to allow picking a date to review
32 if (!is_null($_POST['form_provider'])) {
33 $provider = $_POST['form_provider'];
34 } else if ($_SESSION['userauthorized']) {
35 $provider = $_SESSION['authUserID'];
36 } else {
37 $provider = null;
40 $facility = !is_null($_POST['form_facility']) ? $_POST['form_facility'] : null;
41 $form_apptstatus = !is_null($_POST['form_apptstatus']) ? $_POST['form_apptstatus'] : null;
42 $form_apptcat=null;
43 if (isset($_POST['form_apptcat'])) {
44 if ($form_apptcat!="ALL") {
45 $form_apptcat=intval($_POST['form_apptcat']);
49 $form_patient_name = !is_null($_POST['form_patient_name']) ? $_POST['form_patient_name'] : null;
50 $form_patient_id = !is_null($_POST['form_patient_id']) ? $_POST['form_patient_id'] : null;
52 $appointments = array();
53 $from_date = date("Y-m-d");
54 $to_date = date("Y-m-d");
55 $datetime = date("Y-m-d H:i:s");
57 # go get the information and process it
58 $appointments = fetch_Patient_Tracker_Events($from_date, $to_date, $provider, $facility, $form_apptstatus, $form_apptcat, $form_patient_name, $form_patient_id);
59 $appointments = sortAppointments($appointments, 'time');
61 //grouping of the count of every status
62 $appointments_status = getApptStatus($appointments);
64 // Below are new constants for the translation pipeline
65 // xl('None')
66 // xl('Reminder done')
67 // xl('Chart pulled')
68 // xl('Canceled')
69 // xl('No show')
70 // xl('Arrived')
71 // xl('Arrived late')
72 // xl('Left w/o visit')
73 // xl('Ins/fin issue')
74 // xl('In exam room')
75 // xl('Checked out')
76 // xl('Coding done')
77 // xl('Canceled < 24h')
78 $lres = sqlStatement("SELECT option_id, title FROM list_options WHERE list_id = ? AND activity=1", array('apptstat'));
79 while ($lrow = sqlFetchArray($lres)) {
80 // if exists, remove the legend character
81 if ($lrow['title'][1] == ' ') {
82 $splitTitle = explode(' ', $lrow['title']);
83 array_shift($splitTitle);
84 $title = implode(' ', $splitTitle);
85 } else {
86 $title = $lrow['title'];
89 $statuses_list[$lrow['option_id']] = $title;
92 $chk_prov = array(); // list of providers with appointments
94 // Scan appointments for additional info
95 foreach ($appointments as $apt) {
96 $chk_prov[$apt['uprovider_id']] = $apt['ulname'] . ', ' . $apt['ufname'] . ' ' . $apt['umname'];
99 <html>
100 <head>
101 <title><?php echo xlt("Flow Board") ?></title>
102 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
103 <link rel="stylesheet" href="<?php echo $GLOBALS['assets_static_relative'];?>/font-awesome-4-6-3/css/font-awesome.css" type="text/css">
105 <script type="text/javascript" src="../../library/dialog.js?v=<?php echo $v_js_includes; ?>"></script>
106 <script type="text/javascript" src="../../library/js/common.js"></script>
107 <script type="text/javascript" src="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-min-3-1-1/index.js"></script>
109 <script language="JavaScript">
110 // Refresh self
111 function refreshme() {
112 top.restoreSession();
113 document.pattrk.submit();
115 // popup for patient tracker status
116 function bpopup(tkid) {
117 top.restoreSession()
118 dlgopen('../patient_tracker/patient_tracker_status.php?tracker_id=' + tkid, '_blank', 500, 250);
119 return false;
122 // popup for calendar add edit
123 function calendarpopup(eid,date_squash) {
124 top.restoreSession()
125 dlgopen('../main/calendar/add_edit_event.php?eid=' + eid + '&date=' + date_squash, '_blank', 775, 500);
126 return false;
129 // auto refresh screen pat_trkr_timer is the timer variable
130 function refreshbegin(first){
131 <?php if ($GLOBALS['pat_trkr_timer'] != '0') { ?>
132 var reftime="<?php echo attr($GLOBALS['pat_trkr_timer']); ?>";
133 var parsetime=reftime.split(":");
134 parsetime=(parsetime[0]*60)+(parsetime[1]*1)*1000;
135 if (first != '1') {
136 refreshme();
138 setTimeout("refreshbegin('0')",parsetime);
139 <?php } else { ?>
140 return;
141 <?php } ?>
144 // used to display the patient demographic and encounter screens
145 function topatient(newpid, enc) {
146 if (document.pattrk.form_new_window.checked) {
147 openNewTopWindow(newpid,enc);
149 else {
150 top.restoreSession();
151 if (enc > 0) {
152 top.RTop.location= "<?php echo $GLOBALS['webroot']; ?>/interface/patient_file/summary/demographics.php?set_pid=" + newpid + "&set_encounterid=" + enc;
154 else {
155 top.RTop.location = "<?php echo $GLOBALS['webroot']; ?>/interface/patient_file/summary/demographics.php?set_pid=" + newpid;
160 // opens the demographic and encounter screens in a new window
161 function openNewTopWindow(newpid,newencounterid) {
162 document.fnew.patientID.value = newpid;
163 document.fnew.encounterID.value = newencounterid;
164 top.restoreSession();
165 document.fnew.submit();
168 </script>
170 </head>
172 <?php
173 if ($GLOBALS['pat_trkr_timer'] == '0') {
174 // if the screen is not set up for auto refresh, use standard page call
175 $action_page = "patient_tracker.php";
176 } else {
177 // if the screen is set up for auto refresh, this will allow it to be closed by auto logoff
178 $action_page = "patient_tracker.php?skip_timeout_reset=1";
182 <span class="title"><?php echo xlt("Flow Board") ?></span>
183 <body class="body_top" >
184 <form method='post' name='theform' id='theform' action='<?php echo $action_page; ?>' onsubmit='return top.restoreSession()'>
185 <div id="flow_board_parameters">
186 <table>
187 <tr class="text">
188 <td class='label_custom'><?php echo xlt('Provider'); ?>:</td>
189 <td><?php
191 # Build a drop-down list of providers.
193 $query = "SELECT id, lname, fname FROM users WHERE ".
194 "authorized = 1 ORDER BY lname, fname"; #(CHEMED) facility filter
196 $ures = sqlStatement($query);
198 echo " <select name='form_provider'>\n";
199 echo " <option value='ALL'>-- " . xlt('All') . " --\n";
201 while ($urow = sqlFetchArray($ures)) {
202 $provid = $urow['id'];
203 echo " <option value='" . attr($provid) . "'";
204 if (isset($_POST['form_provider']) && $provid == $_POST['form_provider']) {
205 echo " selected";
206 } elseif (!isset($_POST['form_provider'])&& $_SESSION['userauthorized'] && $provid == $_SESSION['authUserID']) {
207 echo " selected";
210 echo ">" . text($urow['lname']) . ", " . text($urow['fname']) . "\n";
213 echo " </select>\n";
216 </td>
217 <td class='label_custom'><?php echo xlt('Status'); # status code drop down creation ?>:</td>
218 <td><?php generate_form_field(array('data_type'=>1,'field_id'=>'apptstatus','list_id'=>'apptstat','empty_title'=>'All'), $_POST['form_apptstatus']);?></td>
219 <td><?php echo xlt('Category') #category drop down creation ?>:</td>
220 <td>
221 <select id="form_apptcat" name="form_apptcat">
222 <?php
223 $categories=fetchAppointmentCategories();
224 echo "<option value='ALL'>".xlt("All")."</option>";
225 while ($cat=sqlFetchArray($categories)) {
226 echo "<option value='".attr($cat['id'])."'";
227 if ($cat['id']==$_POST['form_apptcat']) {
228 echo " selected='true' ";
231 echo ">".text(xl_appt_category($cat['category']))."</option>";
234 </select>
235 </td>
236 <td style="border-left: 1px solid;" rowspan="2">
237 <div style='margin-left: 15px'>
238 <a href='#' class='css_button' onclick='$("#form_refresh").attr("value","true"); $("#theform").submit();'>
239 <span> <?php echo xlt('Filter'); ?> </span> </a>
240 <?php if ($_POST['form_refresh'] || $_POST['form_orderby']) { ?>
241 <a href='#' class='css_button' id='printbutton'>
242 <span> <?php echo xlt('Print'); ?> </span> </a>
243 <?php } ?>
244 </div>
245 </td>
246 </tr>
247 <tr class="text">
248 <td><?php echo xlt('Patient ID') ?>:</td>
249 <td>
250 <input type="text" id="patient_id" name="form_patient_id" value="<?php echo ($form_patient_id) ? attr($form_patient_id) : ""; ?>">
251 </td>
252 <td><?php echo xlt('Patient Name') ?>:</td>
253 <td>
254 <input type="text" id="patient_name" name="form_patient_name" value="<?php echo ($form_patient_name) ? attr($form_patient_name) : ""; ?>">
255 </td>
256 </tr>
257 </table>
258 </div>
259 </form>
261 <form name='pattrk' id='pattrk' method='post' action='<?php echo $action_page; ?>' onsubmit='return top.restoreSession()' enctype='multipart/form-data'>
263 <div>
264 <?php if (count($chk_prov) == 1) {?>
265 <h2><span style='float: left'><?php echo xlt('Appointments for'). ' : '. text(reset($chk_prov)) ?></span></h2>
266 <?php } ?>
267 <div id= 'inanewwindow' class='inanewwindow'>
268 <span style='float: right'>
269 <a id='setting_cog'><i class="fa fa-cog fa-2x fa-fw">&nbsp;</i></a>
270 <?php // Note that are unable to html escape below $setting_new_window, or else will break the code, secondary to white space issues. ?>
271 <input type='hidden' name='setting_new_window' id='setting_new_window' value='<?php echo $setting_new_window ?>' />
272 <label id='settings'><input type='checkbox' name='form_new_window' id='form_new_window' value='1'<?php echo $setting_new_window ?> >
273 <?php echo xlt('Open Patient in New Window'); ?></input></label>
274 <a id='refreshme'><i class="fa fa-refresh fa-2x fa-fw">&nbsp;</i></a>
275 </span>
276 </div>
277 </div>
278 <?php if ($GLOBALS['pat_trkr_timer'] =='0') { ?>
279 <table border='0' cellpadding='5' cellspacing='0'>
280 <tr>
281 <td align='center'><br>
282 <a href='javascript:;' class='css_button_small' align='center' style='color:gray' onclick="document.getElementById('pattrk').submit();"><span><?php echo xlt('Refresh Screen'); ?></span></a>
283 </td>
284 </tr>
285 </table>
286 <?php } ?>
288 <table border='0' cellpadding='1' cellspacing='2' width='100%'>
289 <tr>
290 <td colspan="12">
291 <b><small>
292 <?php
293 $statuses_output = xlt('Total patients') . ':' . text($appointments_status['count_all']);
294 unset($appointments_status['count_all']);
295 foreach ($appointments_status as $status_symbol => $count) {
296 $statuses_output .= " | " . text(xl_list_label($statuses_list[$status_symbol])) .":" . $count;
299 echo $statuses_output;
301 </small></b>
302 </td>
303 </tr>
304 <tr bgcolor="#cccff">
305 <?php if ($GLOBALS['ptkr_show_pid']) { ?>
306 <td class="dehead" align="center">
307 <?php echo xlt('PID'); ?>
308 </td>
309 <?php } ?>
310 <td class="dehead" align="center">
311 <?php echo xlt('Patient'); ?>
312 </td>
313 <?php if ($GLOBALS['ptkr_visit_reason']) { ?>
314 <td class="dehead" align="center">
315 <?php echo xlt('Reason'); ?>
316 </td>
317 <?php } ?>
318 <?php if ($GLOBALS['ptkr_show_encounter']) { ?>
319 <td class="dehead" align="center">
320 <?php echo xlt('Encounter'); ?>
321 </td>
322 <?php } ?>
323 <td class="dehead" align="center">
324 <?php echo xlt('Exam Room #'); ?>
325 </td>
326 <td class="dehead" align="center">
327 <?php echo xlt('Appt Time'); ?>
328 </td>
329 <td class="dehead" align="center">
330 <?php echo xlt('Arrive Time'); ?>
331 </td>
332 <td class="dehead" align="center">
333 <?php echo xlt('Status'); ?>
334 </td>
335 <td class="dehead" align="center">
336 <?php echo xlt('Current Status Time'); ?>
337 </td>
338 <td class="dehead" align="center">
339 <?php echo xlt('Visit Type'); ?>
340 </td>
341 <?php if (count($chk_prov) > 1) { ?>
342 <td class="dehead" align="center">
343 <?php echo xlt('Provider'); ?>
344 </td>
345 <?php } ?>
346 <td class="dehead" align="center">
347 <?php echo xlt('Total Time'); ?>
348 </td>
349 <td class="dehead" align="center">
350 <?php echo xlt('Check Out Time'); ?>
351 </td>
352 <td class="dehead" align="center">
353 <?php echo xlt('Updated By'); ?>
354 </td>
355 <?php if ($GLOBALS['drug_screen']) { ?>
356 <td class="dehead" align="center">
357 <?php echo xlt('Random Drug Screen'); ?>
358 </td>
359 <td class="dehead" align="center">
360 <?php echo xlt('Drug Screen Completed'); ?>
361 </td>
362 <?php } ?>
363 </tr>
365 <?php
366 foreach ($appointments as $appointment) {
367 # Collect appt date and set up squashed date for use below
368 $date_appt = $appointment['pc_eventDate'];
369 $date_squash = str_replace("-", "", $date_appt);
371 # Collect variables and do some processing
372 $docname = $chk_prov[$appointment['uprovider_id']];
373 if (strlen($docname)<= 3) {
374 continue;
377 $ptname = $appointment['lname'] . ', ' . $appointment['fname'] . ' ' . $appointment['mname'];
378 $appt_enc = $appointment['encounter'];
379 $appt_eid = (!empty($appointment['eid'])) ? $appointment['eid'] : $appointment['pc_eid'];
380 $appt_pid = (!empty($appointment['pid'])) ? $appointment['pid'] : $appointment['pc_pid'];
381 if ($appt_pid ==0) {
382 continue; // skip when $appt_pid = 0, since this means it is not a patient specific appt slot
385 $status = (!empty($appointment['status'])) ? $appointment['status'] : $appointment['pc_apptstatus'];
386 $appt_room = (!empty($appointment['room'])) ? $appointment['room'] : $appointment['pc_room'];
387 $appt_time = (!empty($appointment['appttime'])) ? $appointment['appttime'] : $appointment['pc_startTime'];
388 $tracker_id = $appointment['id'];
389 # reason for visit
390 if ($GLOBALS['ptkr_visit_reason']) {
391 $reason_visit = $appointment['pc_hometext'];
394 $newarrive = collect_checkin($tracker_id);
395 $newend = collect_checkout($tracker_id);
396 $colorevents = (collectApptStatusSettings($status));
397 $bgcolor = $colorevents['color'];
398 $statalert = $colorevents['time_alert'];
399 # process the time to allow items with a check out status to be displayed
400 if (is_checkout($status) && ($GLOBALS['checkout_roll_off'] > 0)) {
401 $to_time = strtotime($newend);
402 $from_time = strtotime($datetime);
403 $display_check_out = round(abs($from_time - $to_time) / 60, 0);
404 if ($display_check_out >= $GLOBALS['checkout_roll_off']) {
405 continue;
409 <tr bgcolor='<?php echo $bgcolor ?>'>
410 <?php if ($GLOBALS['ptkr_show_pid']) { ?>
411 <td class="detail" align="center">
412 <?php echo text($appt_pid) ?>
413 </td>
414 <?php } ?>
415 <td class="detail" align="center">
416 <a href="#" onclick="return topatient('<?php echo attr($appt_pid);?>','<?php echo attr($appt_enc);?>')" >
417 <?php echo text($ptname); ?></a>
418 </td>
419 <!-- reason -->
420 <?php if ($GLOBALS['ptkr_visit_reason']) { ?>
421 <td class="detail" align="center">
422 <?php echo text($reason_visit) ?>
423 </td>
424 <?php } ?>
425 <?php if ($GLOBALS['ptkr_show_encounter']) { ?>
426 <td class="detail" align="center">
427 <?php if ($appt_enc != 0) {
428 echo text($appt_enc);
429 } ?></a>
430 </td>
431 <?php } ?>
432 <td class="detail" align="center">
433 <?php echo getListItemTitle('patient_flow_board_rooms', $appt_room);?>
434 </td>
435 <td class="detail" align="center">
436 <?php echo oeFormatTime($appt_time) ?>
437 </td>
438 <td class="detail" align="center">
439 <?php echo ($newarrive ? oeFormatTime($newarrive) : '&nbsp;') ?>
440 </td>
441 <td class="detail" align="center">
442 <?php if (empty($tracker_id)) { #for appt not yet with tracker id and for recurring appt ?>
443 <a href="" onclick="return calendarpopup(<?php echo attr($appt_eid).",".attr($date_squash); # calls popup for add edit calendar event?>)">
444 <?php } else { ?>
445 <a href="" onclick="return bpopup(<?php echo attr($tracker_id); # calls popup for patient tracker status?>)">
446 <?php } ?>
447 <?php echo text(getListItemTitle("apptstat", $status)); # drop down list for appointment status?>
448 </a>
450 </td>
451 <?php
452 #time in current status
453 $to_time = strtotime(date("Y-m-d H:i:s"));
454 $yestime = '0';
455 if (strtotime($newend) != '') {
456 $from_time = strtotime($newarrive);
457 $to_time = strtotime($newend);
458 $yestime = '0';
459 } else {
460 $from_time = strtotime($appointment['start_datetime']);
461 $yestime = '1';
464 $timecheck = round(abs($to_time - $from_time) / 60, 0);
465 if ($timecheck >= $statalert && ($statalert != '0')) { # Determine if the time in status limit has been reached.
466 echo "<td align='center' class='js-blink-infinite'> "; # and if so blink
467 } else {
468 echo "<td align='center' class='detail'> "; # and if not do not blink
471 if (($yestime == '1') && ($timecheck >=1) && (strtotime($newarrive)!= '')) {
472 echo text($timecheck . ' ' .($timecheck >=2 ? xl('minutes'): xl('minute')));
475 #end time in current status
477 </td>
478 <td class="detail" align="center">
479 <?php echo text(xl_appt_category($appointment['pc_title'])) ?>
480 </td>
481 <?php if (count($chk_prov) > 1) { ?>
482 <td class="detail" align="center">
483 <?php echo text($docname); ?>
484 </td>
485 <?php } ?>
486 <td class="detail" align="center">
487 <?php
489 # total time in practice
490 if (strtotime($newend) != '') {
491 $from_time = strtotime($newarrive);
492 $to_time = strtotime($newend);
493 } else {
494 $from_time = strtotime($newarrive);
495 $to_time = strtotime(date("Y-m-d H:i:s"));
498 $timecheck2 = round(abs($to_time - $from_time) / 60, 0);
499 if (strtotime($newarrive) != '' && ($timecheck2 >=1)) {
500 echo text($timecheck2 . ' ' .($timecheck2 >=2 ? xl('minutes'): xl('minute')));
503 # end total time in practice
505 <?php echo text($appointment['pc_time']); ?>
506 </td>
507 <td class="detail" align="center">
508 <?php
509 if (strtotime($newend) != '') {
510 echo oeFormatTime($newend) ;
513 </td>
514 <td class="detail" align="center">
515 <?php echo text($appointment['user']) ?>
516 </td>
517 <?php if ($GLOBALS['drug_screen']) { ?>
518 <?php if (strtotime($newarrive) != '') { ?>
519 <td class="detail" align="center">
520 <?php if (text($appointment['random_drug_test']) == '1') {
521 echo xl('Yes');
522 } else {
523 echo xl('No');
525 </td>
526 <?php } else {
527 echo " <td>";
529 <?php if (strtotime($newarrive) != '' && $appointment['random_drug_test'] == '1') { ?>
530 <td class="detail" align="center">
531 <?php if (strtotime($newend) != '') { # the following block allows the check box for drug screens to be disabled once the status is check out ?>
532 <input type=checkbox disabled='disable' class="drug_screen_completed" id="<?php echo htmlspecialchars($appointment['pt_tracker_id'], ENT_NOQUOTES) ?>" <?php if ($appointment['drug_screen_completed'] == "1") {
533 echo "checked";
534 }?>>
535 <?php } else { ?>
536 <input type=checkbox class="drug_screen_completed" id='<?php echo htmlspecialchars($appointment['pt_tracker_id'], ENT_NOQUOTES) ?>' name="drug_screen_completed" <?php if ($appointment['drug_screen_completed'] == "1") {
537 echo "checked";
538 }?>>
539 <?php } ?>
540 </td>
541 <?php } else {
542 echo " <td>";
544 <?php } ?>
545 </tr>
546 <?php
547 } //end for
550 <?php
551 //saving the filter for auto refresh
552 if (!is_null($_POST['form_provider'])) {
553 echo "<input type='hidden' name='form_provider' value='" . attr($_POST['form_provider']) . "'>";
556 if (!is_null($_POST['form_facility'])) {
557 echo "<input type='hidden' name='form_facility' value='" . attr($_POST['form_facility']) . "'>";
560 if (!is_null($_POST['form_apptstatus'])) {
561 echo "<input type='hidden' name='form_apptstatus' value='" . attr($_POST['form_apptstatus']) . "'>";
564 if (!is_null($_POST['form_apptcat'])) {
565 echo "<input type='hidden' name='form_apptcat' value='" . attr($_POST['form_apptcat']) . "'>";
568 if (!is_null($_POST['form_patient_id'])) {
569 echo "<input type='hidden' name='form_patient_id' value='" . attr($_POST['form_patient_id']) . "'>";
572 if (!is_null($_POST['form_patient_name'])) {
573 echo "<input type='hidden' name='form_patient_name' value='" . attr($_POST['form_patient_name']) . "'>";
577 </table>
578 </form>
580 <script type="text/javascript">
581 $(document).ready(function() {
582 $('#settings').css("display","none");
583 refreshbegin('1');
585 $('.js-blink-infinite').each(function() {
586 // set up blinking text
587 var elem = $(this);
588 setInterval(function() {
589 if (elem.css('visibility') == 'hidden') {
590 elem.css('visibility', 'visible');
591 } else {
592 elem.css('visibility', 'hidden');
594 }, 500);
597 // toggle of the check box status for drug screen completed and ajax call to update the database
598 $(".drug_screen_completed").change(function() {
599 top.restoreSession();
600 if (this.checked) {
601 testcomplete_toggle="true";
602 } else {
603 testcomplete_toggle="false";
605 $.post( "../../library/ajax/drug_screen_completed.php", {
606 trackerid: this.id,
607 testcomplete: testcomplete_toggle
612 // mdsupport - Immediately post changes to form_new_window
613 $('#form_new_window').click(function () {
614 $('#setting_new_window').val(this.checked ? ' checked' : ' ');
615 $.post( "<?php echo basename(__FILE__) ?>", {
616 data: $('form#pattrk').serialize(),
617 success: function (data) {}
621 $('#setting_cog').click(function () {
622 $(this).css("display","none");
623 $('#settings').css("display","inline");
626 $('#refreshme').click(function () {
627 refreshme();
629 </script>
630 <!-- form used to open a new top level window when a patient row is clicked -->
631 <form name='fnew' method='post' target='_blank' action='../main/main_screen.php?auth=login&site=<?php echo attr($_SESSION['site_id']); ?>'>
632 <input type='hidden' name='patientID' value='0' />
633 <input type='hidden' name='encounterID' value='0' />
634 </form>
635 </body>
636 </html>