function display_drug_dispense_detail() { if (func_num_args()) { $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]; } // do some processing here /*if ($get_vars["delete_complaint_id"]) { if (module::confirm_delete($menu_id, $post_vars, $get_vars)) { $sql = "delete from m_consult_notes_complaint ". "where notes_id = '".$get_vars["notes_id"]."' and ". "consult_id = '".$get_vars["consult_id"]."' and ". "complaint_id = '".$get_vars["delete_complaint_id"]."'"; if ($result = mysql_query($sql)) { header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=DETAILS&module=notes¬es=".$get_vars["notes"]."¬es_id=".$get_vars["notes_id"]); } } else { if ($post_vars["confirm_delete"]=="No") { header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=DETAILS&module=notes¬es=".$get_vars["notes"]."¬es_id=".$get_vars["notes_id"]); } } } if ($get_vars["delete_class_id"]) { if (module::confirm_delete($menu_id, $post_vars, $get_vars)) { $sql = "delete from m_consult_notes_dxclass ". "where notes_id = '".$get_vars["notes_id"]."' and ". "consult_id = '".$get_vars["consult_id"]."' and ". "class_id = '".$get_vars["delete_class_id"]."'"; if ($result = mysql_query($sql)) { header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=DETAILS&module=notes¬es=".$get_vars["notes"]."¬es_id=".$get_vars["notes_id"]); } } else { if ($post_vars["confirm_delete"]=="No") { header("location: ".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"]."&consult_id=".$get_vars["consult_id"]."&ptmenu=DETAILS&module=notes¬es=".$get_vars["notes"]."¬es_id=".$get_vars["notes_id"]); } } }*/ // continue with real task /*$sql = "select notes_id, consult_id, notes_history, ". "notes_physicalexam, notes_plan, user_id, date_format(notes_timestamp, '%a %d %b %Y, %h:%i%p') ts, plan_px_info ". "from m_consult_notes where consult_id = '".$get_vars["consult_id"]."' and ". "notes_id = '".$get_vars["notes_id"]."'";*/ $sql = "select *, date_format(dispense_timestamp, '%a %d %b %Y, %h:%i%p') ts from m_consult_pcb_dispense WHERE consult_id = '" . $get_vars["consult_id"] . "' and dispense_id = '" . $get_vars["drug_id"] . "'"; if ($result = mysql_query($sql)) { if (mysql_num_rows($result)) { $drug = mysql_fetch_array($result); //list($min,$max,$class) = wtforage::_wtforage($_GET["consult_id"]); print "<form method='post' action=''>"; print "<table width='300' cellpadding='2' style='border: 1px dashed black'><tr><td>"; print "<span class='tinylight'>"; print "<b>DISPENSE ID:</b> <font color='red'>" . module::pad_zero($drug["dispense_id"], 7) . "</font><br/>"; print "<b>DATE/TIME:</b> " . $drug["ts"] . "<br/>"; print "<b>TAKEN BY:</b> " . user::get_username($drug["user_id"]) . "<br/>"; print "<hr size='1'/>"; print "<b>DIAGNOSIS:</b><br/>"; drug::show_diagnosis($menu_id, $post_vars, $get_vars); print "<br><br><hr size='1'/>"; print "<b>PLAN:</b><br/>"; $notes_id = drug::get_notes_id($get_vars["consult_id"]); $sql_notes = "select notes_id, consult_id, notes_history, " . "notes_physicalexam, notes_plan, user_id, date_format(notes_timestamp, '%a %d %b %Y, %h:%i%p') ts, plan_px_info " . "from m_consult_notes where consult_id = '" . $get_vars["consult_id"] . "' and " . "notes_id = '{$notes_id}'"; if ($result_notes = mysql_query($sql_notes)) { if (mysql_num_rows($result_notes)) { $notes = mysql_fetch_array($result_notes); if (strlen($notes["notes_plan"]) >= 0) { print stripslashes(nl2br($notes["notes_plan"])) . "<br/><br />"; print stripslashes(nl2br($notes["plan_px_info"])) . "<br/>"; $plan = stripslashes(nl2br($notes["notes_plan"])); } else { print "<font color='red'>No recorded plan.</font><br/>"; } } } print "<hr size='1'/>"; print "<input type='hidden' name='drug_id' value='" . $get_vars["drug_id"] . "' />"; if ($_SESSION["priv_delete"]) { print "<input type='submit' name='submitdrug' value='Delete Drugs' class='tinylight' style='border: 1px solid black; background-color: #FF6633;'/> "; } print "</span>"; print "</td></tr></table><br>"; print "</form>"; } } }