Update htdocs/app/Services/AstmMessageService.php

This commit is contained in:
servdal
2025-09-04 12:22:55 +07:00
parent f0b5e64d16
commit 9c78f7c088
4 changed files with 32 additions and 45 deletions
@@ -6,6 +6,9 @@ use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Mail;
use App\Http\Controllers\SendMail;
use App\Services\AstmMessageService;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use App\Poli;
use App\Periksa;
use App\DataListiner;
@@ -1137,21 +1140,28 @@ class DokterController extends Controller
try {
$ketemu = '';
$nomor = 1;
$cekada = ResultSample::where('accession_number', 'LIKE', $nofoto.'%')->get();
if (!empty($cekada)){
foreach($cekada as $rows){
$ketemu = $rows->test_status;
$cekdatalangsung = DataListiner::where('no_id', $nofoto)->whereIn('alat', ['BD Mikro 1', 'BD Mikro 2'])->first();
$ketemu = $cekdatalangsung->organisme ?? '';
if ($ketemu == ''){
$cekada = ResultSample::where('accession_number', 'LIKE', $nofoto.'%')->get();
if (!empty($cekada)){
foreach($cekada as $rows){
$ketemu = $rows->test_status;
}
} else {
$cekdata = DB::table('lis_phoenix')->where('no_id', $nofoto)->first();
$ketemu = $cekdata->organisme ?? '';
}
} else {
$cekdata = DB::table('lis_phoenix')->where('no_id', $nofoto)->first();
$ketemu = $cekdata->organisme ?? '';
}
if ($ketemu != ''){
if ($isidata == '' OR is_null($isidata)){
$isidata = $ketemu;
} else {
$isidata = $isidata.'<br />'.$ketemu;
}
} else {
}
if ($isidata == '' OR is_null($isidata)){
@@ -1709,38 +1719,6 @@ class DokterController extends Controller
$idpasien = $request->input('val01');
$arrayfiles = [];
if ($idpasien == 'sirab'){
/*
$jumlah = 0;
$getklonin = SiraB::orderBy('family', 'ASC')->orderBy('spesies', 'ASC')->whereNull('cek')->get();
foreach($getklonin as $row){
$family = $row->family;
$spesies = $row->spesies;
$getallantibiotik = SiraB::where('family', $family)->get();
foreach($getallantibiotik as $rowa){
SiraB::updateOrCreate(
[
'family' => $family,
'spesies' => $spesies,
'antibiotik' => $rowa->antibiotik,
'subantibiotik' => $rowa->subantibiotik,
],
[
'diskcontent' => $row->diskcontent,
'batasatas' => $row->batasatas,
'midrange' => $row->midrange,
'batasbawah' => $row->batasbawah,
'sumber' => $row->sumber,
'kodedok' => $row->kodedok,
'atu' => $row->atu,
'kelompok' => $row->kelompok,
'cek' => '1',
]
);
$jumlah++;
}
}
echo $jumlah;
*/
$getsirab = SiraB::orderBy('family', 'ASC')
->orderBy('spesies', 'ASC')
->get()