Change Dashboard(Reff# menjadi Visit#, Hilangkan 0 pada Patnumber) dan Header Laporan REF menjadi Visit
This commit is contained in:
parent
206ee53221
commit
fefe36db53
@ -11,15 +11,16 @@ class API_Dashboard extends ResourceController {
|
||||
// Mengetahui Apakah User Login adalah Bali atau Surabaya
|
||||
$cityid = session()->get('usercityid');
|
||||
if ($cityid == 1) {
|
||||
$filter_query = " AND (sr.HOSTORDERNUMBER LIKE 'B%' OR sr.HOSTORDERNUMBER LIKE 'Z%')";
|
||||
$filter_query = " AND (tr.REQNUMBER LIKE 'B%' OR tr.REQNUMBER LIKE 'Z%')";
|
||||
} elseif ($cityid == 2) {
|
||||
$filter_query = " AND (sr.HOSTORDERNUMBER LIKE 'S%' OR sr.HOSTORDERNUMBER LIKE 'X%')";
|
||||
$filter_query = " AND (tr.REQNUMBER LIKE 'S%' OR tr.REQNUMBER LIKE 'X%')";
|
||||
} else { $filter_query = " "; }
|
||||
|
||||
$db = \Config\Database::connect();
|
||||
$date1 = $this->request->getPost('date1');
|
||||
$date2 = $this->request->getPost('date2');
|
||||
$sql = "select sr.COLLECTIONDATE, sr.SP_ACCESSNUMBER, sr.HOSTORDERNUMBER, p.PATNUMBER, concat(p.FIRSTNAMESK, ' ', p.NAME) as NAME,
|
||||
$sql = "SELECT
|
||||
sr.COLLECTIONDATE, sr.SP_ACCESSNUMBER, tr.REQNUMBER as HOSTORDERNUMBER, p.PATNUMBER, concat(p.FIRSTNAMESK, ' ', p.NAME) as NAME,
|
||||
TESTS=stuff(( select ', '+'('+T.SP_TESTCODE+')' from
|
||||
( select T.SP_TESTCODE from SP_TESTS T
|
||||
where T.SP_ACCESSNUMBER=sr.SP_ACCESSNUMBER
|
||||
@ -60,6 +61,7 @@ class API_Dashboard extends ResourceController {
|
||||
from SP_REQUESTS sr
|
||||
left join PATIENTS p on p.PATID=sr.PATID
|
||||
left join REQUESTS r on r.ACCESSNUMBER=sr.SP_ACCESSNUMBER
|
||||
left join cmod.dbo.CM_TM_REQUESTS tr on tr.REFFID = sr.HOSTORDERNUMBER
|
||||
where sr.COLLECTIONDATE between '$date1 00:00' and '$date2 23:59'"
|
||||
.$filter_query.
|
||||
"order by sr.COLLECTIONDATE desc";
|
||||
|
||||
@ -962,7 +962,7 @@ class PrintResult extends BaseController {
|
||||
p.FIRSTNAMESK AS FIRSTNAME,
|
||||
p.NAME,
|
||||
p.BIRTHDATE,
|
||||
sr.HOSTORDERNUMBER,
|
||||
ctr.REQNUMBER as HOSTORDERNUMBER,
|
||||
sr.COLLECTIONDATE,
|
||||
sr.SP_ACCESSNUMBER,
|
||||
p.SEX,
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
<th width="12%">Patient#</th>
|
||||
<th width="17%">Patient Name</th>
|
||||
<th class='text-start' width="10%">Access#</th>
|
||||
<th width="9%">Reff#</th>
|
||||
<th width="9%">Visit#</th>
|
||||
<th>Test</th>
|
||||
<th>Status</th>
|
||||
<th></th>
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
<th width="12%">Patient#</th>
|
||||
<th width="17%">Patient Name</th>
|
||||
<th class='text-start' width="10%">Access#</th>
|
||||
<th width="9%">Reff#</th>
|
||||
<th width="9%">Visit#</th>
|
||||
<th>Test</th>
|
||||
<th>Status</th>
|
||||
<th></th>
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
<th width="12%">Patient#</th>
|
||||
<th width="17%">Patient Name</th>
|
||||
<th class='text-start' width="10%">Access#</th>
|
||||
<th width="9%">Reff#</th>
|
||||
<th width="9%">Visit#</th>
|
||||
<th>Test</th>
|
||||
<th>Status</th>
|
||||
<th></th>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user