function display_consult_appointments() { if (func_num_args()>0) { $arg_list = func_get_args(); $menu_id = $arg_list[0]; $post_vars = $arg_list[1]; $get_vars = $arg_list[2]; $validuser = $arg_list[3]; $isadmin = $arg_list[4]; } if ($post_vars["submitsked"]) { if (module::confirm_delete($menu_id, $post_vars, $get_vars)) { $sql = "delete from m_consult_appointments where schedule_id = '".$get_vars["schedule_id"]."'"; if ($result = mysql_query($sql)) { header("location: ".$_SERVER["SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=".$get_vars["ptmenu"]."&module=".$get_vars["module"]); } } else { if ($post_vars["confirm_delete"]=="No") { header("location: ".$_SERVER["SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=".$get_vars["ptmenu"]."&module=".$get_vars["module"]); } } } $patient_id = healthcenter::get_patient_id($get_vars["consult_id"]); print "<b>".FTITLE_APPOINTMENTS_MADE_TODAY."</b><br/>"; $sql = "select schedule_id, date_format(visit_date, '%a %d %b %Y') visit_date, appointment_id ". "from m_consult_appointments where consult_id = '".$get_vars["consult_id"]."'"; if ($result = mysql_query($sql)) { if (mysql_num_rows($result)) { while ($appt = mysql_fetch_array($result)) { print "<img src='../images/arrow_redwhite.gif' border='0'/> "; print "<a href='".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=APPTS&schedule_id=".$appt["schedule_id"]."'>".$appt["visit_date"]."</a> "; print appointment::get_appointment_name($appt["appointment_id"])."<br/>"; if ($get_vars["schedule_id"]==$appt["schedule_id"]) { appointment::show_details($menu_id, $post_vars, $get_vars); } } } else { print "<font color='red'>No records</font><br/>"; } } print "<br/>"; print "<b>".FTITLE_PREVIOUS_APPOINTMENTS."</b><br/>"; $sql = "select schedule_id, date_format(visit_date, '%a %d %b %Y') visit_date, appointment_id ". "from m_consult_appointments where patient_id = '$patient_id' and ". "to_days(visit_date) < to_days(sysdate()) order by visit_date desc"; if ($result = mysql_query($sql)) { if (mysql_num_rows($result)) { while ($appt = mysql_fetch_array($result)) { print "<img src='../images/arrow_redwhite.gif' border='0'/> "; print "<a href='".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=APPTS&schedule_id=".$appt["schedule_id"]."'>".$appt["visit_date"]."</a> "; print appointment::get_appointment_name($appt["appointment_id"])."<br/>"; if ($get_vars["schedule_id"]==$appt["schedule_id"]) { appointment::show_details($menu_id, $post_vars, $get_vars); } } } else { print "<font color='red'>No records</font><br/>"; } } }
function display_consult_appointments() { if (func_num_args() > 0) { $arg_list = func_get_args(); $menu_id = $arg_list[0]; $post_vars = $arg_list[1]; $get_vars = $arg_list[2]; $validuser = $arg_list[3]; $isadmin = $arg_list[4]; } if ($post_vars["submitsked"]) { if (module::confirm_delete($menu_id, $post_vars, $get_vars)) { $sql = "delete from m_consult_appointments where schedule_id = '" . $get_vars["schedule_id"] . "'"; if ($result = mysql_query($sql)) { header("location: " . $_SERVER["SELF"] . "?page=" . $get_vars["page"] . "&menu_id=" . $get_vars["menu_id"] . "&consult_id=" . $get_vars["consult_id"] . "&ptmenu=" . $get_vars["ptmenu"] . "&module=" . $get_vars["module"]); } } else { if ($post_vars["confirm_delete"] == "No") { header("location: " . $_SERVER["SELF"] . "?page=" . $get_vars["page"] . "&menu_id=" . $get_vars["menu_id"] . "&consult_id=" . $get_vars["consult_id"] . "&ptmenu=" . $get_vars["ptmenu"] . "&module=" . $get_vars["module"]); } } } $patient_id = healthcenter::get_patient_id($get_vars["consult_id"]); print "<b>" . FTITLE_APPOINTMENTS_MADE_TODAY . "</b><br/>"; $sql = "select schedule_id, date_format(visit_date, '%a %d %b %Y') visit_date, appointment_id " . "from m_consult_appointments where consult_id = '" . $get_vars["consult_id"] . "'"; if ($result = mysql_query($sql)) { if (mysql_num_rows($result)) { while ($appt = mysql_fetch_array($result)) { print "<img src='../images/arrow_redwhite.gif' border='0'/> "; print "<a href='" . $_SERVER["PHP_SELF"] . "?page=" . $get_vars["page"] . "&menu_id=" . $get_vars["menu_id"] . "&consult_id=" . $get_vars["consult_id"] . "&ptmenu=APPTS&schedule_id=" . $appt["schedule_id"] . "'>" . $appt["visit_date"] . "</a> "; print appointment::get_appointment_name($appt["appointment_id"]) . "<br/>"; if ($get_vars["schedule_id"] == $appt["schedule_id"]) { appointment::show_details($menu_id, $post_vars, $get_vars); } } } else { print "<font color='red'>No records</font><br/>"; } } print "<br/>"; print "<b>" . FTITLE_PREVIOUS_APPOINTMENTS . "</b><br/>"; $sql = "select schedule_id, date_format(visit_date, '%a %d %b %Y') visit_date, appointment_id " . "from m_consult_appointments where patient_id = '{$patient_id}' and " . "to_days(visit_date) < to_days(sysdate()) order by visit_date desc"; if ($result = mysql_query($sql)) { if (mysql_num_rows($result)) { while ($appt = mysql_fetch_array($result)) { print "<img src='../images/arrow_redwhite.gif' border='0'/> "; print "<a href='" . $_SERVER["PHP_SELF"] . "?page=" . $get_vars["page"] . "&menu_id=" . $get_vars["menu_id"] . "&consult_id=" . $get_vars["consult_id"] . "&ptmenu=APPTS&schedule_id=" . $appt["schedule_id"] . "'>" . $appt["visit_date"] . "</a> "; print appointment::get_appointment_name($appt["appointment_id"]) . "<br/>"; if ($get_vars["schedule_id"] == $appt["schedule_id"]) { appointment::show_details($menu_id, $post_vars, $get_vars); } } } else { print "<font color='red'>No records</font><br/>"; } } print "</br>"; print "<b>SMS SCHEDULER</b><br/></br>"; appointment::delete_sms_appt(); echo "<a href='../site/send_sms.php?pxid={$patient_id}&consult_id={$get_vars['consult_id']}' target='new'>Create SMS Schedule</a>"; echo "</br></br>"; echo "<table bgcolor='ffccff'>"; echo "<tr class='alert_table_header'><td colspan='4'>List of Scheduled SMS</td></tr>"; echo "<tr><td class='alert_table_row'> Sending Date </td>"; echo "<td class='alert_table_row'> Type </td>"; echo "<td class='alert_table_row'> Sending Status </td>"; echo "<td class='alert_table_row'> Action </td>"; echo "</tr>"; appointment::show_sms_appointments($patient_id); echo "</table>"; }