Ejemplo n.º 1
0
 function show_menstrual_list()
 {
     if (func_num_args() > 0) {
         $arg_list = func_get_args();
         $menarche = $arg_list[0];
         $lmp = $arg_list[1];
         $pduration = $arg_list[2];
         $cycle = $arg_list[3];
         $pads = $arg_list[4];
         $sexinter = $arg_list[5];
         $controlmethod = $arg_list[6];
         $menopause = $arg_list[7];
         $menopauseage = $arg_list[8];
     }
     if ($lmp != '00/00/0000') {
         //list($year,$month,$day)=explode('-', $lmp);
         //$lmp_date = $month.'/'.$day.'/'.$year;
         $lmp_date = $lmp;
     } else {
         $lmp_date = '';
     }
     $gender = notes::get_patient_info();
     if ($gender == 'F') {
         $ret_val .= "<span class='boxtitle'>MENSTRUAL HISTORY</span><br/>";
         $ret_val .= "<span class='boxtitle'>Menarche: </span>{$menarche}<br />";
         $ret_val .= "<span class='boxtitle'>Last Menstrual Period: </span>{$lmp_date}<br/>";
         $ret_val .= "<span class='boxtitle'>Period Duration: </span>{$pduration}<br />";
         $ret_val .= "<span class='boxtitle'>Interval/Cycle: </span>{$cycle}<br />";
         $ret_val .= "<span class='boxtitle'>No. of pads/day during menstruation: </span>{$pads}<br />";
         $ret_val .= "<span class='boxtitle'>Onset of sexual intercourse: </span>{$sexinter}<br />";
         $ret_val .= "<span class='boxtitle'>Birth control method: </span>";
         $sql = "select method_id, method_name from m_lib_fp_methods where method_gender ='F' and method_id = '{$controlmethod}'";
         if ($result = mysql_query($sql)) {
             if (mysql_num_rows($result)) {
                 while (list($id, $name) = mysql_fetch_array($result)) {
                     $ret_val .= $name . "<br/>";
                 }
             }
         }
         $ret_val .= "<span class='boxtitle'>Menopause: </span>" . ($menopause == 'Y' ? 'Yes' : 'No') . "<br/>";
         $ret_val .= "<span class='boxtitle'>If yes, at what age?: </span>{$menopauseage}<br />";
         $ret_val .= "<br/>";
         //$ret_val .= $menopause;
         return $ret_val;
     } else {
         return false;
     }
 }