/* ===== C8, D8, E8 ===== C8 = =IF($B$8="M",1, IF($B$8="m", 1, 0.762)) C8 = male=1, female=0.762 D8 = male=1, female=0.742 E8 = male=1, female=0.85 ===== C9, D9 ===== C9 = ==IF($B$9="W",1, IF($B$9="w", 1, 1.18)) C9 = white=1, black=1.18 D9 = white=1, black=1.21 ===== G10 ==== G10 = =IF($B$4="",$B$6/2.2,B$4) if(weight[kg] == NULL){ G10 = Albumin / 2.2 }else{ G10 = weight[kg] } B11 =(((140-$B$2)*$G$10)/($B$3*72))*$E$8 B11 =((( 140 - AGE ) * G10) / (SCREAT * 72)) * E8 B12 =(170*POWER($B$3,(-0.999))*POWER($B$2,(-0.176))*POWER($B$7,(-0.17))*POWER(#REF!,(0.318)))*$C$8*$C$9 B12 =( 170 * SCREAT^-0.999 * AGE^-0.176 * BUN^-0.17 * #REF!^0.318 ) * C8 * C9 <----- what is #REF! doing there? B13 =(186.3*POWER($B$3,(-1.154))*POWER($B$2,(-0.203)))*$D$8*$D$9 B13 =( 186.3 * SCREAT^-1.154 * AGE^-0.203 ) * D8 * D9 */ // Gather Inputs $age = $_POST['age']; $screat = $_POST['screat']; $gender = $_POST['gender']; $race = $_POST['race']; //Check Values if ($gender == 'm') $gender_m = 'checked'; elseif ($gender == 'f') $gender_f = 'checked'; if ($race == 'w') $race_w = 'checked'; elseif ($race == 'b') $race_b = 'checked'; if (!empty($age) && !empty($screat) && !empty($gender) && !empty($race)){ if((1 <= $age) && ($age <= 120) && (is_numeric ($age))){ $age_true = 1; } if(is_numeric($screat)){ $screat_true = 1; } if(($screat_true == 1) && ($age_true == 1)){ // C8 Calculation if($gender == 'm') $C8 = 1; else $C8 = 0.762; // D8 Calculation if($gender == 'm') $D8 = 1; else $D8 = 0.742; // E8 Calculation if($gender == 'm') $E8 = 1; else $E8 = 0.85; // C9 Calculation if($race == 'w') $C9 = 1; else $C9 = 1.18; // D9 Calculation if($race == 'w') $D9 = 1; else $D9 = 1.21; //B13 =(186.3*POWER($B$3,(-1.154))*POWER($B$2,(-0.203)))*$D$8*$D$9 //B13 =( 186.3 * SCREAT^-1.154 * AGE^-0.203 ) * D8 * D9 $result = (186.3 * pow($screat, (-1.154)) * pow($age, (-0.203))) * $D8 * $D9; $result = round($result, 1); $display_msg = '
NANCF-MDRD v1.0, Formula by Dr. Alfino