-
Notifications
You must be signed in to change notification settings - Fork 9
/
qc_edit.php
281 lines (245 loc) · 10.1 KB
/
qc_edit.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
<?php
############################################
# ThaiRIS (Thai Radiology Information System)
# Version: 1.0
# File last modified: 8 Nov 2016
# File name:
# Description :
# http://www.thairis.net
# Email : [email protected]
############################################
include "session.php";
include "connectdb.php";
echo "<script type=\"text/JavaScript\" src=\"examroom-examlist.js\"></script>";
$ACCESSION = $_GET['ACCESSION'];
$ORDERID = $_GET['ORDERID'];
$MRN = $_GET['MRN'];
?>
<link rel="stylesheet" type="text/css" href="css/smoothness/jquery-ui-1.7.2.custom.css">
<style type="text/css">
/* Overide css code*/
.ui-datepicker{
width:170px;
font-family:tahoma;
font-size:11px;
text-align:center;
}
</style>
<script language="javascript">
function fncSubmit()
{
if(document.qc.tech1.value == "")
{
alert('Please input Input Technician');
document.qc.tech1.focus();
return false;
}
if(document.qc.tech1.value == document.qc.tech2.value )
{
alert('Please input Input New Technician2');
document.qc.tech2.focus();
return false;
}
if(document.qc.tech1.value !=="" && document.qc.tech2.value == "" && document.qc.tech3.value !== "")
{
alert('Please input Input New Technician2 before Technician3');
document.qc.tech2.focus();
return false;
}
if(document.qc.tech1.value == document.qc.tech3.value )
{
alert('Please input Input New Technician3');
document.qc.tech3.focus();
return false;
}
if(document.qc.tech2.value !=="" && document.qc.tech2.value == document.qc.tech3.value )
{
alert('Please input Input New Technician3');
document.qc.tech3.focus();
return false;
}
if(document.qc.radio0.checked == false && document.qc.radio1.checked == false && document.qc.radio2.checked == false && document.qc.radio3.checked == false)
{
alert('Please input Input Time for Report');
document.qc.radio1.focus();
return false;
}
if(document.qc.radio3.checked == true && document.qc.dateInput.value =="")
{
alert('Please input Input DD/MM/YYYY');
document.qc.dateInput.focus();
return false;
}
if(document.qc.selectrad.value == "")
{
alert('Please input Input Radiologist');
document.qc.selectrad.focus();
return false;
}
document.qc.submit();
}
</script>
<?php
$sql = "SELECT TECH1, TECH2, TECH3, FLAG1, FLAG2, FLAG3 FROM xray_request_deatil WHERE ID = $ORDERID";
$result1 = mysql_query($sql);
while ($row =mysql_fetch_array($result1))
{
if ($row[TECH1] !== '')
{
$TECH1 = $row[TECH1];
}
if ($row[TECH2] !== '')
{
$TECH2 = $row[TECH2];
}
if ($row[TECH3] !== '')
{
$TECH3 = $row[TECH3];
}
}
echo $TECH1;
echo $TECH2;
echo $TECH3;
echo "<body bgcolor=#E8E8E8 >";
echo "<center><table bgcolor=#F0F0F0 ><tr><td>";
echo "<form name=qc action=examroom-assignradQC.php onSubmit=\"JavaScript:return fncSubmit();\">";
echo "<INPUT TYPE=hidden NAME=\"ORDERID\" value=".$ORDERID.">";
echo "<u><font color=green><b>QC : บันทึกการตรวจรังสี </b></font></u><br/>";
echo "HN = ".$MRN."<br />";
echo "ACCESSION=".$ACCESSION."<br /><br />";
//echo "ORDER_ID=".$ORDERID."<br /><br />";
echo "<u><font color=blue>Technician </font></u><br />";
$sql = "SELECT ID, NAME FROM xray_user WHERE USER_TYPE_CODE='TECHNICIAN' AND ENABLE ='1' ORDER BY CODE asc";
$result1 = mysql_query($sql);
$result2 = mysql_query($sql);
$result3 = mysql_query($sql);
echo "1. <INPUT TYPE=hidden NAME=\"radiograper\" value=\"1\">
<select name=\"tech1\">";
echo "<option value=''>Please Select Technician 1</option>";
while($row = mysql_fetch_array($result1))
{
echo "<option value=\"".$row[ID]."\">".$row[NAME]."</option>";
}
echo "</select><br />";
echo "2. <INPUT TYPE=hidden NAME=\"radiograper\" value=\"1\">
<select name=\"tech2\">";
echo "<option value=''>Please Select Technician 2</option>";
while($row = mysql_fetch_array($result2))
{
echo "<option value=\"".$row[ID]."\">".$row[NAME]."</option>";
}
echo "</select><br />";
echo "3. <INPUT TYPE=hidden NAME=\"radiograper3\" value=\"1\">
<select name=\"tech3\">";
echo "<option value=''>Please Select Technician 3</option>";
while($row = mysql_fetch_array($result3))
{
echo "<option value=\"".$row[ID]."\">".$row[NAME]."</option>";
}
echo "</select><br />";
//echo "Repeating Xray<br />";
//echo "<select name='repeating'>";
//echo "<option value=''>Over Exposure</option>";
//echo "<option value=''>Under Exposure</option>";
//echo "<option value=''>Patient Movment</option>";
//echo "<option value=''>Artifact</option>";
//echo "<option value=''>Scater Ray</option>";
echo "</select><br />";
echo "<u><font color=blue>ความเร่งด่วน </font></u><br />";
echo "<input type=radio name=readtime id=radio1 value=1>อ่านผลทันที<br />";
echo "<input type=radio name=readtime id=radio2 value=2>หนึ่งวันทำการ<br />";
/////////////////////////////////////////// Auto select radiologist (no)///////////////////////////////////////
echo "<input type=radio name=\"readtime\" id=radio0 value='' onClick=\"javaScript:if(this.checked) { document.getElementById('selectrad').getElementsByTagName('option')[3].selected = 'selected'; }\">แพทย์ผู้ส่งอ่านผลเอง<br />";
////////////////////////////////
echo "<input type=radio name=readtime id=radio3 value=3>ระบุวัน";
?>
<input type="text" name="dateInput" id="dateInput" />
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript">
$(function(){
var dateBefore=null;
$("#dateInput").datepicker({
dateFormat: 'dd-mm-yy',
showOn: 'button',
buttonImage: 'image/calandar.jpg',
buttonImageOnly: true,
dayNamesMin: ['อา', 'จ', 'อ', 'พ', 'พฤ', 'ศ', 'ส'],
monthNamesShort: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน','กรกฎาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'],
changeMonth: true,
changeYear: true ,
beforeShow:function(){
if($(this).val()!=""){
var arrayDate=$(this).val().split("-");
arrayDate[2]=parseInt(arrayDate[2]);
//arrayDate[2]=parseInt(arrayDate[2])-543;
$(this).val(arrayDate[0]+"-"+arrayDate[1]+"-"+arrayDate[2]);
}
setTimeout(function(){
$.each($(".ui-datepicker-year option"),function(j,k){
var textYear=parseInt($(".ui-datepicker-year option").eq(j).val());
//var textYear=parseInt($(".ui-datepicker-year option").eq(j).val())+543;
$(".ui-datepicker-year option").eq(j).text(textYear);
});
},50);
},
onChangeMonthYear: function(){
setTimeout(function(){
$.each($(".ui-datepicker-year option"),function(j,k){
var textYear=parseInt($(".ui-datepicker-year option").eq(j).val());
//var textYear=parseInt($(".ui-datepicker-year option").eq(j).val())+543;
$(".ui-datepicker-year option").eq(j).text(textYear);
});
},50);
},
onClose:function(){
if($(this).val()!="" && $(this).val()==dateBefore){
var arrayDate=dateBefore.split("-");
arrayDate[2]=parseInt(arrayDate[2]);
//arrayDate[2]=parseInt(arrayDate[2])+543;
$(this).val(arrayDate[0]+"-"+arrayDate[1]+"-"+arrayDate[2]);
}
},
onSelect: function(dateText, inst){
dateBefore=$(this).val();
var arrayDate=dateText.split("-");
arrayDate[2]=parseInt(arrayDate[2]);
//arrayDate[2]=parseInt(arrayDate[2])+543;
$(this).val(arrayDate[0]+"-"+arrayDate[1]+"-"+arrayDate[2]);
}
});
});
</script>
<br />
<input type=checkbox name="flag02" value="1"> ผู้ป่วยคดีความ <br />
<br />
<u><font color=blue>Assign Radiologist </font></u><br />
<?php
$sql2 ="select * FROM xray_user WHERE USER_TYPE_CODE ='RADIOLOGIST' AND CENTER_CODE='$center_code' order by ID";
$result2 = mysql_query($sql2);
//echo "<div id='".$ORDERID."'>\n";
//echo "<select name=selectrad id=selectrad".$ORDERID.">";
echo "<select name=selectrad id=selectrad>";
echo "<option value=''>Select Radiologist</option>\n";
while ($row =mysql_fetch_array($result2))
{
echo "<option name=radid value=\"".$row[CODE]."\">".$row[NAME]." ".$row[LASTNAME]."</option>\n";
}
echo "</select>";
//echo "<input type=button name=Start value=Submit onclick=assignradQC('".$ORDERID."','ASSIGN')></div>";
//echo "<a href=\"#close\"><input type=button name=Submit value=Completed onclick=pt_qc('".$ORDERID."','ENDEXAM')></a>";
//echo "<input type=button value=Submit>";
//echo "<a href=\"#close\"><input type=button name=Start value=Completed onclick=pt_qc('".$ORDERID."','ENDEXAM')></a>";
//echo "<a href=\"#close\"><input type=button name=Cancel value=Cancel></a>";
echo "</td>";
echo "<td valign=top>";
echo "<u><font color=blue>Exam Note</font></u><br />";
echo "<textarea name=examnote rows=\"20\" cols=\"20\"></textarea>";
echo "</td></tr></table></center>";
echo "<center><input type=submit value=Submit></center>";
echo "</form>";
?>
<br />
<br />
<center><a href="javascript:parent.jQuery.fancybox.close();"><input type=button value=Cancle></a></center>
</body>