function display_ntp_record() { // // contents of table m_patient_ntp // 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]; //print_r($arg_list); } $patient_id = healthcenter::get_patient_id($get_vars["consult_id"]); $sql_ntp = "select ntp_id, patient_id, date_format(ntp_consult_date, '%a %d %b %Y'), outcome_id " . "from m_patient_ntp where patient_id = '{$patient_id}' order by ntp_consult_date desc"; if ($result_ntp = mysql_query($sql_ntp)) { if (mysql_num_rows($result_ntp)) { while (list($nid, $pid, $regdate, $outcome) = mysql_fetch_array($result_ntp)) { print "<img src='../images/arrow_redwhite.gif' border='0'/> REGISTRY NO: <font color='red'>" . module::pad_zero($nid, 7) . "</font> "; print "<a href='" . $_SERVER["PHP_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"] . "&ntp=VISIT1&ntp_id={$nid}'>{$regdate}</a> "; print $outcome == "TX" ? "<font color='green'>OPEN</font>" : "<font color='red'>CLOSED</font>"; print "<br/>"; if ($get_vars["ntp_id"] && $get_vars["ntp_id"] == $nid) { ntp::display_ntp_record_details($menu_id, $post_vars, $get_vars); } } } else { print "<font color='red'>No records</font><br/>"; } } }