function get_pe_list() { if (func_num_args() > 0) { $arg_list = func_get_args(); $notes_id = $arg_list[0]; } $sql = "select breast_screen, breast_remarks, skin_code, skin_remarks, heent_code, heent_remarks,\n\t \tchest_code, chest_remarks, heart_code, heart_remarks,\n\t \tabdomen_code, abdomen_remarks, extremities_code, extremities_remarks\n\t \tfrom m_consult_notes_pe where notes_id = '{$notes_id}'"; if ($result = mysql_query($sql)) { if (mysql_num_rows($result)) { list($breast_screen, $breast_remarks, $skin_code, $skin_remarks, $heent_code, $heent_remarks, $chest_code, $chest_remarks, $heart_code, $heart_remarks, $abdomen_code, $abdomen_remarks, $extremities_code, $extremities_remarks) = mysql_fetch_array($result); /*if ($skin_code) { $skin = explode(",", $skin_code); $ret_val .= "<b>Skin:</b> $skin_remarks"; $ret_val .= "<ul style='margin:0;'>"; foreach ($skin as $key => $value) { $ret_val .= notes::get_pe_name($value); } $ret_val .= "</ul>"; }*/ if ($breast_screen != null) { $ret_val .= "<span class='boxtitle'>BREAST CANCER SCREENING: </span>{$breast_screen}<br/>"; $ret_val .= "Remarks: {$breast_remarks}<br/><br />"; } $ret_val .= notes::show_pe_list($skin_code, 'Skin', $skin_remarks); $ret_val .= notes::show_pe_list($heent_code, 'HEENT', $heent_remarks); $ret_val .= notes::show_pe_list($chest_code, 'Chest/Lungs', $chest_remarks); $ret_val .= notes::show_pe_list($heart_code, 'Heart', $heart_remarks); $ret_val .= notes::show_pe_list($abdomen_code, 'Abdomen', $abdomen_remarks); $ret_val .= notes::show_pe_list($extremities_code, 'Extremities', $extremities_remarks); } } return $ret_val; }