edit_examination($_POST['sample_id'], 'autoverify_action.php ', 'disabled'); } elseif ($_POST['action'] == '2') { echo '<a href="import_results_XL_640.php">Import results from XL-640</a><br>'; echo '<a href="import_results_miura.php">Import results from Miura-300</a>'; } elseif ($_POST['action'] == '3') { save_single_examination_code($_POST['sample_id'], $_POST['code'], 'Result awaited'); edit_sample($_POST['sample_id'], 'autoverify_action.php ', 'disabled', 'No'); edit_examination($_POST['sample_id'], 'autoverify_action.php ', ''); } elseif ($_POST['action'] == '5') { save_single_examination_code($_POST['sample_id'], $_POST['code'], 'not done'); insert_single_examination($_POST['sample_id'], 1002); append_single_examination($_POST['sample_id'], 1002, $_POST['code'] . ' NOT DONE done because sample inadequate.'); edit_sample($_POST['sample_id'], 'autoverify_action.php ', 'disabled', 'No'); edit_examination($_POST['sample_id'], 'autoverify_action.php ', ''); } elseif ($_POST['action'] == '6') { save_single_examination_code($_POST['sample_id'], $_POST['code'], 'not done'); insert_single_examination($_POST['sample_id'], 1002); append_single_examination($_POST['sample_id'], 1002, $_POST['code'] . ' NOT DONE done because lab. resources inadequate.'); edit_sample($_POST['sample_id'], 'autoverify_action.php ', 'disabled', 'No'); edit_examination($_POST['sample_id'], 'autoverify_action.php ', ''); } elseif ($_POST['action'] == '7') { edit_sample($_POST['sample_id'], 'autoverify_action.php ', 'disabled', 'No'); edit_examination($_POST['sample_id'], 'autoverify_action.php ', ''); } /* elseif($_POST['action']=='delete_examination') { if(isset($_POST['code'])) { $link=start_nchsls(); $sql='delete from examination where sample_id=\''.$_POST['sample_id'].'\' and code=\''.$_POST['code'].'\'';
function lipid_profile($sample_id) { //echo '111'; $cho = get_examination_result('CHO', $sample_id); $choh = get_examination_result('CHOH', $sample_id); $chol = get_examination_result('CHOL', $sample_id); $chov = get_examination_result('CHOV', $sample_id); $tg = get_examination_result('TG', $sample_id); if ($cho != FALSE && $choh != FALSE && $tg != FALSE) { //echo '222'; if (is_str_num($cho) != FALSE && is_str_num($choh) != FALSE && is_str_num($tg) != FALSE) { //echo '333'; if ($tg <= 400) { //echo '444'; save_single_examination_code($sample_id, 'CHOV', $tg / 5); save_single_examination_code($sample_id, 'CHOL', $cho - $choh - $tg / 5); } else { //echo '555'; save_single_examination_code($sample_id, 'CHOV', 'see remark'); save_single_examination_code($sample_id, 'CHOL', 'see remark'); insert_single_examination($sample_id, 1007); $str = 'if TG>400 mg/dl then LDL can not be calculated. Direct-LDL assay is advised'; append_if_not($str, $sample_id, 1007); } } } //both(TandD) are not done, both are not number, dbil>tbil }