function _consult_lab_hematology()
 {
     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];
     }
     if ($exitinfo = $this->missing_dependencies('hematology')) {
         return print $exitinfo;
     }
     //print_r($);
     $h = new hematology();
     if ($_POST["submitlab"] == 'Update Lab Exam') {
         $q_request = mysql_query("SELECT request_id FROM m_consult_lab_hematology WHERE request_id='{$_POST['request_id']}'") or die("Cannot query 94:" . mysql_error());
         if ($_POST["release_flag"] == 1) {
             $release = 'Y';
             $release_date = date('Y-m-d H:i:s');
             $q_update_lab = mysql_query("UPDATE m_consult_lab SET request_done='{$release}',done_timestamp='{$release_date}',done_user_id='{$_SESSION['userid']}' WHERE request_id='{$_POST['request_id']}'") or die("Cannot query 99" . mysql_error());
         } else {
             $release = 'N';
             $release_date = '';
         }
         $pxid = healthcenter::get_patient_id($_GET[consult_id]);
         list($m, $d, $y) = explode('/', $_POST[hematology_date]);
         $date_lab_exam = $y . '-' . $m . '-' . $d;
         if (mysql_num_rows($q_request) != 0) {
             $update_hematology = mysql_query("UPDATE m_consult_lab_hematology SET consult_id='{$_GET['consult_id']}',request_id='{$_POST['request_id']}',patient_id='{$pxid}',date_lab_exam='{$date_lab_exam}',hemoglobin='{$_POST['txt_hemoglobin']}',hematocrit='{$_POST['txt_hemocrit']}',rbc='{$_POST['txt_rbc']}',rbc_mcv='{$_POST['txt_mcv']}',rbc_mchc='{$_POST['txt_mchc']}',rbc_mch='{$_POST['txt_mch']}',wbc='{$_POST['txt_wbc']}',wbc_polys='{$_POST['txt_polys']}',wbc_lympho='{$_POST['txt_lympho']}',wbc_mxd='{$_POST['txt_mxd']}',wbc_mono='{$_POST['txt_mono']}',wbc_eosin='{$_POST['txt_eosin']}',wbc_baso='{$_POST['txt_baso']}',platelet='{$_POST['txt_platelet']}',reticulocytes='{$_POST['txt_reticulocytes']}',esr='{$_POST['txt_esr']}',clotting_time='{$_POST['txt_clot']}',bleeding_time='{$_POST['txt_bleeding']}',malaria='{$_POST['txt_malaria']}',slit_smear='{$_POST['txt_slit_smear']}',fbs='{$_POST['txt_fbs']}',blood_type='{$_POST['sel_bloodtype']}',release_flag='{$release}',release_date='{$release_date}',user_id='{$_SESSION['userid']}',others='{$_POST['txt_others']}',rh='{$_POST['sel_rh']}',stabs='{$_POST['txt_stabs']}' WHERE request_id='{$_GET['request_id']}'") or die("Cannot query 99: " . mysql_error());
         } else {
             $update_hematology = mysql_query("INSERT INTO m_consult_lab_hematology SET consult_id='{$_GET['consult_id']}',request_id='{$_POST['request_id']}',patient_id='{$pxid}',date_lab_exam='{$date_lab_exam}',hemoglobin='{$_POST['txt_hemoglobin']}',hematocrit='{$_POST['txt_hemocrit']}',rbc='{$_POST['txt_rbc']}',rbc_mcv='{$_POST['txt_mcv']}',rbc_mchc='{$_POST['txt_mchc']}',rbc_mch='{$_POST['txt_mch']}',wbc='{$_POST['txt_wbc']}',wbc_polys='{$_POST['txt_polys']}',wbc_lympho='{$_POST['txt_lympho']}',wbc_mxd='{$_POST['txt_mxd']}',wbc_mono='{$_POST['txt_mono']}',wbc_eosin='{$_POST['txt_eosin']}',wbc_baso='{$_POST['txt_baso']}',platelet='{$_POST['txt_platelet']}',reticulocytes='{$_POST['txt_reticulocytes']}',esr='{$_POST['txt_esr']}',clotting_time='{$_POST['txt_clot']}',bleeding_time='{$_POST['txt_bleeding']}',malaria='{$_POST['txt_malaria']}',slit_smear='{$_POST['txt_slit_smear']}',fbs='{$_POST['txt_fbs']}',blood_type='{$_POST['sel_bloodtype']}',release_flag='{$release}',release_date='{$release_date}',user_id='{$_SESSION['userid']}',others='{$_POST['txt_others']}',rh='{$_POST['sel_rh']}',stabs='{$_POST['txt_stabs']}'") or die("Cannot query 102: " . mysql_error());
         }
         //print_r($_POST);
         if ($update_hematology) {
             echo "<script language='Javascript'>";
             echo "window.alert('Hematology data was successfully been saved.')";
             echo "</script>";
         }
     }
     $h->form_consult_lab_hematology($menu_id, $post_vars, $get_vars);
 }