Update Result Date Untuk Tiap Chapter Yang Dipisah
This commit is contained in:
parent
bcd846799d
commit
c55de1a7a3
@ -26,6 +26,8 @@ class PrintResult extends BaseController {
|
|||||||
|
|
||||||
public function otherTests($resultData, $data, $note) {
|
public function otherTests($resultData, $data, $note) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Mengetahui Apakah User Login adalah Bali atau Surabaya
|
// Mengetahui Apakah User Login adalah Bali atau Surabaya
|
||||||
$cityid = session()->get('usercityid');
|
$cityid = session()->get('usercityid');
|
||||||
|
|
||||||
@ -118,7 +120,8 @@ class PrintResult extends BaseController {
|
|||||||
$collection_date = $dateTimeCol->format('d-m-Y H:i');
|
$collection_date = $dateTimeCol->format('d-m-Y H:i');
|
||||||
}
|
}
|
||||||
|
|
||||||
$result_date = $data[0]['RESULTDATE'];
|
$result_date = end($resultData);
|
||||||
|
$result_date = $result_date["RESDATE_FIX"];
|
||||||
$dateTimeRes = \DateTime::createFromFormat('Y-m-d H:i:s.u', $result_date);
|
$dateTimeRes = \DateTime::createFromFormat('Y-m-d H:i:s.u', $result_date);
|
||||||
if ($dateTimeRes) {
|
if ($dateTimeRes) {
|
||||||
$result_date = $dateTimeRes->format('d-m-Y H:i');
|
$result_date = $dateTimeRes->format('d-m-Y H:i');
|
||||||
@ -549,6 +552,15 @@ class PrintResult extends BaseController {
|
|||||||
$collection = $results;
|
$collection = $results;
|
||||||
$data = [$header, $collection];
|
$data = [$header, $collection];
|
||||||
|
|
||||||
|
// Memisahkan Waktu yang ditampilkan pada laporan hasil
|
||||||
|
$filter_query_resdate="";
|
||||||
|
if ($cityid == 1) {
|
||||||
|
$filter_query_resdate = " cr.RESDATE as RESDATE_FIX, ";
|
||||||
|
} elseif ($cityid == 2) {
|
||||||
|
$filter_query_resdate = " FORMAT(DATEADD(HOUR, -1, cr.RESDATE), 'yyyy-MM-dd HH:mm:ss.fff') AS RESDATE_FIX, ";
|
||||||
|
} else {
|
||||||
|
$filter_query_resdate = " cr.RESDATE as RESDATE_FIX, ";
|
||||||
|
}
|
||||||
$sql = "SELECT
|
$sql = "SELECT
|
||||||
dc.CHAPID,
|
dc.CHAPID,
|
||||||
dc.FULLTEXT as chap_eng,
|
dc.FULLTEXT as chap_eng,
|
||||||
@ -565,6 +577,7 @@ class PrintResult extends BaseController {
|
|||||||
t.VALIDATIONINITIALS as validator,
|
t.VALIDATIONINITIALS as validator,
|
||||||
dt.SHORTTEXT,
|
dt.SHORTTEXT,
|
||||||
RESULT = case when t.RESVALUE is null then tx.FULLTEXT else t.RESVALUE end,
|
RESULT = case when t.RESVALUE is null then tx.FULLTEXT else t.RESVALUE end,
|
||||||
|
" . $filter_query_resdate . "
|
||||||
cr.*
|
cr.*
|
||||||
from REQUESTS r
|
from REQUESTS r
|
||||||
left join TESTS t on t.REQUESTID = r.REQUESTID
|
left join TESTS t on t.REQUESTID = r.REQUESTID
|
||||||
@ -580,6 +593,8 @@ class PrintResult extends BaseController {
|
|||||||
$query = $db->query($sql);
|
$query = $db->query($sql);
|
||||||
$results = $query->getResultArray();
|
$results = $query->getResultArray();
|
||||||
|
|
||||||
|
// var_dump($results);die();
|
||||||
|
|
||||||
$data_pregnancy = array_filter($results, function($item) {
|
$data_pregnancy = array_filter($results, function($item) {
|
||||||
$serum_type = $item["serum_type"];
|
$serum_type = $item["serum_type"];
|
||||||
$tesscode = $item["TESTCODE"];
|
$tesscode = $item["TESTCODE"];
|
||||||
@ -595,6 +610,7 @@ class PrintResult extends BaseController {
|
|||||||
$printable = $item['NOTPRINTABLE'];
|
$printable = $item['NOTPRINTABLE'];
|
||||||
return $serum_type == 'Urine' && $tesscode != 'PPT' && $test_eng != "Pregnancy Test" && $chap_eng != "MICROBIOLOGY" && $printable !=1;
|
return $serum_type == 'Urine' && $tesscode != 'PPT' && $test_eng != "Pregnancy Test" && $chap_eng != "MICROBIOLOGY" && $printable !=1;
|
||||||
});
|
});
|
||||||
|
|
||||||
$data_urine_kultur = array_filter($results, function($item) {
|
$data_urine_kultur = array_filter($results, function($item) {
|
||||||
$serum_type = $item["serum_type"];
|
$serum_type = $item["serum_type"];
|
||||||
$chap_eng = $item["chap_eng"];
|
$chap_eng = $item["chap_eng"];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user