function get_history_list()
 {
     if (func_num_args() > 0) {
         $arg_list = func_get_args();
         $notes_id = $arg_list[0];
     }
     $patient_id = healthcenter::get_patient_id($_GET["consult_id"]);
     $checkSQL = "select pasthistory_id, familyhistory_id, medintake_id,\n\t        \t\tmenarche, date_format(lmp,'%m/%d/%Y'), period_duration, cycle, pads_perday,\n\t        \t\tonset_sexinter, method_id, menopause, meno_age,\n\t        \t\tsmoking, pack_peryear, alcohol, bottles_perday, ill_drugs\n\t        \t\tfrom m_patient_history where patient_id = '{$patient_id}'";
     if ($checkResult = mysql_query($checkSQL)) {
         if (mysql_num_rows($checkResult)) {
             list($pasthistory_id, $familyhistory_id, $medintake_id, $menarche, $lmp, $period_duration, $cycle, $pads_perday, $onset_sexinter, $method_id, $menopause, $meno_age, $smoking, $pack_peryear, $alcohol, $bottles_perday, $ill_drugs) = mysql_fetch_array($checkResult);
             $ret_val .= notes::show_history_list($pasthistory_id, 'PAST MEDICAL HISTORY');
             $ret_val .= notes::show_history_list($familyhistory_id, 'FAMILY HISTORY');
             $med = explode(',', $medintake_id);
             if ($medintake_id) {
                 $ret_val .= "<span class='boxtitle'>MEDICINE INTAKE HISTORY:</span>";
                 $ret_val .= "<ul style='margin:0;'>";
                 foreach ($med as $key => $value) {
                     if ($value == 'ORALHYPO') {
                         $ret_val .= "<li>Intake of oral hypoglycemic agents</li>";
                     }
                     if ($value == 'HYPERMED') {
                         $ret_val .= "<li>Intake of hypertension medicine</li>";
                     }
                 }
                 $ret_val .= "</ul><br/>";
             }
             $ret_val .= notes::show_menstrual_list($menarche, $lmp, $period_duration, $cycle, $pads_perday, $onset_sexinter, $method_id, $menopause, $meno_age);
             if ($smoking || $pack_peryear || $alcohol || $bottles_perday || $ill_drugs) {
                 $ret_val .= "<span class='boxtitle'>PERSONAL/SOCIAL HISTORY:</span><br/>";
                 if ($smoking && ($smoking == 'Y' || $smoking == 'Q')) {
                     if ($smoking == 'Y') {
                         $value = 'Yes';
                     }
                     if ($smoking == 'Q') {
                         $value = 'Quit';
                     }
                     $ret_val .= "<span class='boxtitle'>Smoking: </span>{$value}<br/>";
                     $ret_val .= "<span class='boxtitle'>No. of Pack/Year: </span>{$pack_peryear}<br/>";
                 }
                 if ($smoking && $smoking == 'N') {
                     $ret_val .= "<span class='boxtitle'>Smoking: </span>No<br/>";
                 }
                 if ($alcohol && ($alcohol == 'Y' || $alcohol == 'Q')) {
                     if ($alcohol == 'Y') {
                         $value = 'Yes';
                     }
                     if ($alcohol == 'Q') {
                         $value = 'Quit';
                     }
                     $ret_val .= "<span class='boxtitle'>Alcohol: </span>{$value}<br/>";
                     $ret_val .= "<span class='boxtitle'>No. of Bottles/Day: </span>{$bottles_perday}<br/>";
                 }
                 if ($alcohol && $alcohol == 'N') {
                     $ret_val .= "<span class='boxtitle'>Smoking: </span>No<br/>";
                 }
                 if ($ill_drugs) {
                     if ($ill_drugs == 'Y') {
                         $value = 'Yes';
                     }
                     if ($ill_drugs == 'N') {
                         $value = 'No';
                     }
                     if ($ill_drugs == 'Q') {
                         $value = 'Quit';
                     }
                     $ret_val .= "<span class='boxtitle'>Illicit Drugs: </span>{$value}<br/>";
                 }
             }
             $ret_val .= "<br/>";
         }
     }
     $ret_val .= notes::show_surgical_list();
     return $ret_val;
 }