function display_consult_notes_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"] . "'"; if ($result = mysql_query($sql)) { if (mysql_num_rows($result)) { $notes = 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>NOTES ID:</b> <font color='red'>" . module::pad_zero($notes["notes_id"], 7) . "</font><br/>"; print "<b>DATE/TIME:</b> " . $notes["ts"] . "<br/>"; print "<b>TAKEN BY:</b> " . user::get_username($notes["user_id"]) . "<br/>"; print "<br><b>VITAL SIGNS:</b><br>" . $this->get_vitals($_GET["consult_id"]) . "<br/>"; print "<b>WEIGHT FOR AGE (0-6 yo):</b>" . $class . "<br/>"; print "<hr size='1'/>"; print "<b>COMPLAINTS:</b><br/>"; notes::show_complaints($menu_id, $post_vars, $get_vars); print "<hr size='1'/>"; print "<b>COMPLAINT NOTES:</b><br/>"; print $this->get_consult_note($get_vars["consult_id"]); print "<hr size='1'/>"; print "<b>HISTORY:</b><br/>"; if (strlen($notes["notes_physicalexam"]) > 0 || notes::get_history_list()) { print notes::get_history_list(); if (strlen($notes["notes_history"]) > 0) { print "<b>Notes:</b><br/>"; print stripslashes(nl2br($notes["notes_history"])) . "<br/>"; } if ($_SESSION["priv_update"]) { print "<br/>"; print "<input type='submit' name='submitdetail' value='Update History' class='tinylight' style='border: 1px solid black'"; } } else { print "<font color='red'>No recorded history.</font><br/>"; } print "<br><br><hr size='1'/>"; print "<b>PHYSICAL EXAM:</b><br/>"; if (strlen($notes["notes_physicalexam"]) > 0 || notes::get_pe_list($notes["notes_id"])) { print notes::get_pe_list($notes["notes_id"]); if (strlen($notes["notes_physicalexam"]) > 0) { print "<b>PE Notes:</b><br/>"; print stripslashes(nl2br($notes["notes_physicalexam"])) . "<br/>"; } if ($_SESSION["priv_update"]) { print "<br/>"; print "<input type='submit' name='submitdetail' value='Update PE' class='tinylight' style='border: 1px solid black'"; } } else { print "<font color='red'>No recorded PE.</font><br/>"; } print "<br><br><hr size='1'>"; print "<b>DIAGNOSIS:</b><br/>"; notes::show_diagnosis($menu_id, $post_vars, $get_vars); print "<br><br><hr size='1'/>"; print "<b>PLAN:</b><br/>"; 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"])); if ($_SESSION["priv_update"]) { print "<br/>"; print "<input type='submit' name='submitdetail' value='Update Plan' class='tinylight' style='border: 1px solid black'"; } $_SESSION["plan_details"] = $plan; print "<br/> "; print "<input type='submit' name='submitdetail' value='Print Plan' class='tinylight' style='border: 1px solid black'"; echo "<br>"; } else { print "<font color='red'>No recorded plan.</font><br/>"; } print "<hr size='1'/>"; print "<input type='hidden' name='notes_id' value='" . $get_vars["notes_id"] . "' />"; if ($_SESSION["priv_delete"]) { print "<input type='submit' name='submitdetail' value='Delete Notes' class='tinylight' style='border: 1px solid black; background-color: #FF6633;'/> "; } print "</span>"; print "</td></tr></table><br>"; print "</form>"; } } }