-
Notifications
You must be signed in to change notification settings - Fork 9
/
addendumselect.php
46 lines (46 loc) · 2.03 KB
/
addendumselect.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
<?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");
include ("function.php");
echo "<div id=showsearch>";
$MRN = $_GET['MRN'];
echo $MRN."<br />";
echo "Select Order to edit Report";
$sql = "SELECT xray_request_detail.ACCESSION, xray_request_detail.XRAY_CODE, xray_request_detail.STATUS, xray_request_detail.ID AS ORDERID, xray_request_detail.REQUEST_DATE AS REQ_DATE, xray_request_detail.REPORT_STATUS, xray_code.DESCRIPTION FROM xray_request_detail LEFT JOIN xray_request ON (xray_request_detail.REQUEST_NO = xray_request.REQUEST_NO AND xray_request.MRN = '$MRN')INNER JOIN xray_code ON (xray_request_detail.XRAY_CODE = xray_code.XRAY_CODE)INNER JOIN xray_patient_info ON (xray_request.MRN = xray_patient_info.MRN) where (xray_request_detail.STATUS = 'APPROVED')";
$result = mysql_query($sql);
$bg ="#FFCCCC";
echo "<center><table width=100%>";
while($row = mysql_fetch_array($result))
{
if($bg == "#FFFFFF")
{ // Switch colour of background
$bg = "#FFCCCC";
}
else
{
$bg = "#FFFFFF";
}
if ($row['REPORT_STATUS']=='1')
{
$report_icon ="<a href=showreport.php?ACCESSION=".$row['ACCESSION']." target=_blank><img src=./image/report.gif border=0></a> <a href=showreportpdf.php?ACCESSION=".$row['ACCESSION']." target=_blank><img src=./image/pdf.gif border=0></a>";
}
else
{
$report_icon ="-";
}
$ORDERID = $row['ORDERID'];
echo "<tr bgcolor=".$bg."><td width=45>".$report_icon."</td><td>".EngEachDate($row['REQ_DATE'])."</td><td>".$row['ACCESSION']."</td><td>".$row['XRAY_CODE']."</td><td>".$row['DESCRIPTION']."</td><td>";
echo "<form action=addendum-dictate.php><input type=hidden name='ORDERID' value='".$ORDERID."'>ORDERID =".$ORDERID."<input type=submit value=Addendum></form></td></tr>";
}
echo "</table></center>";
echo "</div>";
?>