-
Notifications
You must be signed in to change notification settings - Fork 0
/
new_qc_biochemistry.php
85 lines (64 loc) · 2.62 KB
/
new_qc_biochemistry.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
//$GLOBALS['nojunk']='';
require_once 'project_common.php';
require_once 'base/verify_login.php';
////////User code below/////////////////////
echo ' <link rel="stylesheet" href="project_common.css">
<script src="project_common.js"></script>';
$link=get_link($GLOBALS['main_user'],$GLOBALS['main_pass']);
main_menu($link);
if($_POST['action']=='qc')
{
get_data_specific($link);
}
elseif($_POST['action']=='insert')
{
$sample_id_array=save_insert_specific($link);
if(count($sample_id_array)==0){echo '<h3>No sample required // Nothing to be done</h3>';}
foreach($sample_id_array as $sample_id)
{
view_sample($link,$sample_id);
}
}
function get_data_specific($link)
{
echo '<form method=post class="bg-light jumbotron">';
echo '<input type=hidden name=session_name value=\''.session_name().'\'>';
echo '<ul class="nav nav-pills nav-justified">
<li class="active" ><button class="btn btn-secondary" type=button data-toggle="tab" href="#basic">Basic</button></li>
<li><button class="btn btn-secondary" type=button data-toggle="tab" href="#examination">Examinations</button></li>
<li><button class="btn btn-secondary" type=button data-toggle="tab" href="#profile">Profiles</button></li>
<li><button class="btn btn-secondary" type=button data-toggle="tab" href="#super_profile">SuperProfiles</button></li>
<li><button type=submit class="btn btn-primary form-control" name=action value=insert>Save</button></li>
</ul>';
echo '<div class="tab-content">';
echo '<div id=basic class="tab-pane active">';
//get_basic_specific_no_restriction(); //MRD
get_qc_mrd($link);
//get_one_field_for_insert($link,1001); //mrd
get_one_field_for_insert($link,1015); //collection date
get_one_field_for_insert($link,1016); //collection time
get_one_field_for_insert($link,9000); //equipment
get_one_field_for_insert($link,5098); //Remark
//get_one_field_for_insert($link,1008); //Sex
echo '</div>';
get_examination_data($link);
get_profile_data($link);
get_super_profile_data($link);
echo '</div>';
echo '</form>';
}
//////////////user code ends////////////////
tail();
//echo '<pre>';print_r($_POST);echo '</pre>';
//////////////Functions///////////////////////
function get_qc_mrd($link)
{
$sql='SELECT DISTINCT `mrd` FROM `lab_reference_value` WHERE `end_date`>sysdate()';
echo '<div class="basic_form">';
echo ' <label class="my_label text-danger" for="mrd">MRD</label>';
mk_select_from_sql($link,$sql,'mrd','__ex__'.$GLOBALS['mrd'],'mrd','','','yes');
echo '<p class="help"><span class=text-danger>Must have</span> QC/n/ at start where n=0-9</p>';
echo '</div>';
}
?>