".__("You must select a patient.")."
"; template_display(); } // end checking for patient //------HIPAA Logging $user_to_log=$_SESSION['authdata']['user']; if((LOGLEVEL<1)||LOG_HIPAA){syslog(LOG_INFO,"manageappointment.php|user $user_to_log accesses patient $patient");} switch ($action) { case "del": $page_title = __("Deleting Appointment"); $display_buffer .= "\n".__("Deleting")." ... \n"; $query = "DELETE FROM scheduler WHERE id='".addslashes($id)."'"; $result = $sql->query ($query); if ($result) { $display_buffer .= __("done")."."; } else { $display_buffer .= __("ERROR"); } $display_buffer .= "\n".template::link_bar(array( __("Manage Appointments") => "$page_name?action=view&patient=$patient", __("Manage Patient") => "manage.php?id=$patient" )). "\n"; // By default, we return to patient emr view $refresh = "manage.php?id=".urlencode($patient); break; // end delete appointment section default: // default action is to view appointments // grab patient information $this_patient = CreateObject('FreeMED.Patient', $patient); // display top of the box $page_title = __("Manage Appointments"); $display_buffer .= freemed::patient_box($this_patient). "\n".template::link_bar(array( __("Book Appointment") => "book_appointment.php?patient=$patient&type=pat", __("Manage Patient") => "manage.php?id=$patient" ))."\n"; // form the query $query = "SELECT * FROM scheduler WHERE ( (caldateof >= '".addslashes($cur_date)."' ) AND (calpatient = '".addslashes($patient)."' ) AND (caltype = 'pat' ) ) ORDER BY caldateof, calhour, calminute"; // submit the query $result = $sql->query ($query); // check for results if (!$sql->results($result)) { $display_buffer .= "| ".__("This patient has no appointments.")." |
| ".__("Date")." | ".__("Time/Duration")." | ".__("Location")." | ".__("Note")." | ".__("CPT Code")." | ".__("Action")." |
| $caldateof | ".$scheduler->display_time(
$calhour,$calminute)." (".$hours."h ".$minutes."m) |
".( !empty($location) ? $location : " " )." | ".( !empty($calprenote) ? $calprenote : " " )." | $calcptcode | ".__("Move")." ".__("Delete")." |