diff --git a/.DS_Store b/.DS_Store index 9f59a8f7..ba12edce 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/htdocs/.DS_Store b/htdocs/.DS_Store index d60a687b..5687dfd1 100644 Binary files a/htdocs/.DS_Store and b/htdocs/.DS_Store differ diff --git a/htdocs/app/Http/Controllers/DokterController.php b/htdocs/app/Http/Controllers/DokterController.php index 873468ba..5a222001 100644 --- a/htdocs/app/Http/Controllers/DokterController.php +++ b/htdocs/app/Http/Controllers/DokterController.php @@ -967,7 +967,75 @@ class DokterController extends Controller $berat = $request->input('val11'); $klinisi = $request->input('val12'); $klinis = $request->input('val13'); + $jsonantibiotik = array( + 'Oxacillin-OX', + 'Cefoxitin-FOX', + 'Benzylpenicillin-P', + 'Ampicillin-AM', + 'Azithromycin-AZM', + 'Erythromycin-ERY', + 'Cefazolin-CZO', + 'Cefepime-FEP', + 'Cefixime-CFM', + 'Cefotaxime-CTX', + 'Cefuroxime-CXM', + 'Ceftazidime-CAZ', + 'Ceftriaxone-CRO', + 'Ceftazidime/Avibactam-CZA', + 'Piperacilin/Tazobactam-TZP', + 'Ampicillin/Sulbactam-SAM', + 'Amoxicillin/Clavulanate-AMC', + 'Cefoperazon/Sulbactam-SCF', + 'Aztreonam-ATM', + 'Ceftaroline-CPT', + 'Ciprofloxacin-CIP', + 'Levofloxacin-LEV', + 'Moxifloxacin-MFX', + 'Clindamycin-CLI', + 'Colistin-CS', + 'Tetracyclin-TCY', + 'Tigecycline-TGC', + 'Gentamicin-GM', + 'Amikacin-AN', + 'Meropenem-MEM', + 'Imipenem-IPM', + 'Doripenem-DOR', + 'Ertapenem-ETP', + 'Minocycline-MNO', + 'Doxycycline-DOX', + 'Spectinomycin-SPT', + 'Tigecycline-TGC', + 'Trimethoprim/Sulfamethoxazole-SXT', + 'Fosfomycin-FOS', + 'Vancomycin-VAN', + 'Linezolid-LNZ', + 'Fluconazole', + 'Voriconazole', + 'Caspofungin', + 'Micafungin', + 'Amphotericin B', + 'Flucytosine' + ); if ($worklist == 'getkomponenjawaban'){ + $cekada = ResultSample::where('accession_number', 'LIKE', $nofoto.'%')->get(); + if (!empty($cekada)){ + foreach($cekada as $rows){ + if ($rows->organism !== null){ + $organism = $rows->organism; + KomponenJawaban::updateOrCreate( + [ + 'accnumber' => $nofoto, + 'isidata' => $organism, + 'komponen' => 'bakteri', + ], + [ + 'template' => $ruangan, + 'created_by' => Session('nama') + ] + ); + } + } + } $cekdatanmaddendum = Periksa::where('nofoto', $nofoto)->first(); $getdatapasangannya = Periksa::whereNotNull('nmadendum')->where('dlp', '!=', $ruangan)->where('daftar', $cekdatanmaddendum->daftar)->where('nofoto', '!=', $nofoto)->get(); foreach ($getdatapasangannya as $item){ @@ -1260,55 +1328,7 @@ class DokterController extends Controller $ketemu = ''; $organism = ''; $nomor = 1; - $jsonantibiotik = array( - 'Oxacillin-OX', - 'Cefoxitin-FOX', - 'Benzylpenicillin-P', - 'Ampicillin-AM', - 'Azithromycin-AZM', - 'Erythromycin-ERY', - 'Cefazolin-CZO', - 'Cefepime-FEP', - 'Cefixime-CFM', - 'Cefotaxime-CTX', - 'Cefuroxime-CXM', - 'Ceftazidime-CAZ', - 'Ceftriaxone-CRO', - 'Ceftazidime/Avibactam-CZA', - 'Piperacilin/Tazobactam-TZP', - 'Ampicillin/Sulbactam-SAM', - 'Amoxicillin/Clavulanate-AMC', - 'Cefoperazon/Sulbactam-SCF', - 'Aztreonam-ATM', - 'Ceftaroline-CPT', - 'Ciprofloxacin-CIP', - 'Levofloxacin-LEV', - 'Moxifloxacin-MFX', - 'Clindamycin-CLI', - 'Colistin-CS', - 'Tetracyclin-TCY', - 'Tigecycline-TGC', - 'Gentamicin-GM', - 'Amikacin-AN', - 'Meropenem-MEM', - 'Imipenem-IPM', - 'Doripenem-DOR', - 'Ertapenem-ETP', - 'Minocycline-MNO', - 'Doxycycline-DOX', - 'Spectinomycin-SPT', - 'Tigecycline-TGC', - 'Trimethoprim/Sulfamethoxazole-SXT', - 'Fosfomycin-FOS', - 'Vancomycin-VAN', - 'Linezolid-LNZ', - 'Fluconazole', - 'Voriconazole', - 'Caspofungin', - 'Micafungin', - 'Amphotericin B', - 'Flucytosine' - ); + try { $cekada = ResultSample::where('accession_number', 'LIKE', $nofoto.'%')->get(); @@ -1414,11 +1434,52 @@ class DokterController extends Controller return back(); } else if ($worklist == 'generatetabelantibiotik'){ $arraysurat = []; + $getdataawal = Periksa::where('id', $nofoto)->first(); + $id = $getdataawal->id ?? $nofoto; + $nofoto = $getdataawal->nofoto ?? 0; + $cekdulu = RekapAntibiotik::where('orderid', $id)->count(); + if ($cekdulu == 0){ + $cekada = ResultSample::where('accession_number', 'LIKE', $nofoto.'%')->get(); + if (!empty($cekada)){ + foreach($cekada as $rows){ + if (!empty($rows->additional_result)) { + $firstDecode = json_decode($rows->additional_result, true); + if (is_string($firstDecode)) { + $data = json_decode($firstDecode, true); + } else { + $data = $firstDecode; + } + if (is_array($data)) { + foreach ($data as $item) { + $glassreportname = in_array($item['antibiotic_name'], $jsonantibiotik); + RekapAntibiotik::updateOrCreate( + [ + 'orderid' => $orderid, + 'antibiotic' => $item['antibiotic_name'], + ], + [ + 'resistance' => $item['resistance_note'] ?? null, + 'value' => $item['value'] ?? null, + 'interpretation' => $item['interpretation'] ?? null, + 'glassreportname' => $glassreportname, + 'printrow' => true, + 'printcol' => false, + 'created_at' => date('Y-m-d H:i:s'), + 'updated_at' => date('Y-m-d H:i:s'), + ] + ); + } + } + } + } + } + } + $i = 0; $data = new RekapAntibiotik(); $limit = ($request->input('limit') == null ? '20' : $request->input('limit')); $order = ($request->input('order') == null ? 'id asc' : $request->input('order')); - $data = $data->where('orderid', $nofoto); + $data = $data->where('orderid', $id); $data = $data->orderByRaw($order)->paginate($limit); $totaldata = $data->total(); if ($data) { @@ -1427,7 +1488,7 @@ class DokterController extends Controller $i++; } $response = [ - 'message' => 'List Data Antibiotik', + 'message' => 'List Data orderid '.$id, 'total' => $totaldata, 'data' => $arraysurat ]; @@ -1437,8 +1498,158 @@ class DokterController extends Controller 'message' => 'No Data' ]; return response()->json($response, 500); - } else if ($worklist == 'printunprinttblantibiotik'){ + } else if ($worklist == 'isitabelantibiotik'){ try { + $getdataawal = Periksa::where('nofoto', $nofoto)->first(); + $id = $getdataawal->id ?? $nofoto; + $nofoto = $getdataawal->nofoto ?? 0; + $antibiotic_name= ''; + $value = ''; + $interpretation = ''; + if ($request->input('komponen') == 'id_kbamc' OR $request->input('komponen') == 'id_sirkbamc'){ + $antibiotic_name = 'Amoxicillin - clavulanic acid'; + $cekdatalam = RekapAntibiotik::where('orderid', $id)->where('antibiotic', $antibiotic_name)->first(); + $interpretation = $cekdatalam->interpretation ?? ''; + $value = $cekdatalam->value ?? ''; + if ($request->input('komponen') == 'id_sirkbamc'){ + $interpretation = $request->input('isi'); + } + if ($request->input('komponen') == 'id_kbamc'){ + $value = $request->input('isi'); + } + } + if ($request->input('komponen') == 'id_kblef' OR $request->input('komponen') == 'id_sirkblef'){ + $antibiotic_name = 'Levofloxacin'; + $cekdatalam = RekapAntibiotik::where('orderid', $id)->where('antibiotic', $antibiotic_name)->first(); + $interpretation = $cekdatalam->interpretation ?? ''; + $value = $cekdatalam->value ?? ''; + if ($request->input('komponen') == 'id_sirkblef'){ + $interpretation = $request->input('isi'); + } + if ($request->input('komponen') == 'id_kblef'){ + $value = $request->input('isi'); + } + } + if ($request->input('komponen') == 'id_kbfos' OR $request->input('komponen') == 'id_sirkbfos'){ + $antibiotic_name = 'Fosfomycin'; + $cekdatalam = RekapAntibiotik::where('orderid', $id)->where('antibiotic', $antibiotic_name)->first(); + $interpretation = $cekdatalam->interpretation ?? ''; + $value = $cekdatalam->value ?? ''; + if ($request->input('komponen') == 'id_sirkbfos'){ + $interpretation = $request->input('isi'); + } + if ($request->input('komponen') == 'id_kbfos'){ + $value = $request->input('isi'); + } + } + if ($request->input('komponen') == 'id_kbscf' OR $request->input('komponen') == 'id_sirkbscf'){ + $antibiotic_name = 'Cefoperazone - Sulbactam'; + $cekdatalam = RekapAntibiotik::where('orderid', $id)->where('antibiotic', $antibiotic_name)->first(); + $interpretation = $cekdatalam->interpretation ?? ''; + $value = $cekdatalam->value ?? ''; + if ($request->input('komponen') == 'id_sirkbscf'){ + $interpretation = $request->input('isi'); + } + if ($request->input('komponen') == 'id_kbscf'){ + $value = $request->input('isi'); + } + } + if ($antibiotic_name != ''){ + RekapAntibiotik::updateOrCreate( + [ + 'orderid' => $id, + 'antibiotic' => $antibiotic_name, + ], + [ + 'resistance' => $interpretation, + 'value' => $value, + 'interpretation' => $interpretation, + 'glassreportname' => 0, + 'printrow' => false, + 'printcol' => false, + 'created_at' => date('Y-m-d H:i:s'), + 'updated_at' => date('Y-m-d H:i:s'), + ] + ); + KomponenJawaban::updateOrCreate( + [ + 'accnumber' => $nofoto, + 'template' => $request->input('jenis'), + 'komponen' => $request->input('komponen'), + ], + [ + 'isidata' => $request->input('isi'), + 'created_by' => Session('nama') + ] + ); + return response()->json(['icon' => 'success', 'warna' => '#5ba035', 'status' => 'Success', 'message' => 'Saved to Antibiotic Tables']); + return back(); + } else { + return response()->json(['icon' => 'error', 'warna' => '#bf441d', 'status' => 'Error', 'message' => 'Nama Antibiotik tidak ditemukan']); + return back(); + } + + }catch (Exception $e) { + $pesan = $e->getMessage(); + return response()->json(['icon' => 'error', 'warna' => '#bf441d', 'status' => 'Error', 'message' => $pesan]); + return back(); + } + } else if ($worklist == 'printunprinttblantibiotik'){ + $pesan = 'Success'; + try { + if ($request->input('isi') == 'updateallmic'){ + $getdataawal = Periksa::where('nofoto', $nofoto)->first(); + $orderid = $getdataawal->id ?? 0; + $jumlah = 0; + $cekada = ResultSample::where('id', $request->input('komponen'))->first(); + if (isset($cekada->id)){ + $pesan = 'Data didapat dengan ID '.$cekada->id; + $firstDecode = json_decode($cekada->additional_result, true); + if (is_string($firstDecode)) { + $data = json_decode($firstDecode, true); + } else { + $data = $firstDecode; + } + if (is_array($data)) { + foreach ($data as $item) { + $glassreportname = in_array($item['antibiotic_name'], $jsonantibiotik); + RekapAntibiotik::updateOrCreate( + [ + 'orderid' => $orderid, + 'antibiotic' => $item['antibiotic_name'], + ], + [ + 'resistance' => $item['resistance_note'] ?? null, + 'value' => $item['value'] ?? null, + 'interpretation' => $item['interpretation'] ?? null, + 'glassreportname' => $glassreportname, + 'printrow' => true, + 'printcol' => false, + 'created_at' => date('Y-m-d H:i:s'), + 'updated_at' => date('Y-m-d H:i:s'), + ] + ); + $jumlah++; + } + } + + $pesan = $pesan.' Sejumlah '.$jumlah.' Antibiotik'; + } + } + if ($request->input('isi') == 'deletemic'){ + $data = RekapAntibiotik::where('id', $nofoto)->first(); + Log::info('Data Dihapus Oleh :', [ + 'user' => Session('nama'), + 'timestamp' => date('Y-m-d H:i:s'), + 'datayangdihapus' => json_encode($data) + ]); + RekapAntibiotik::where('id', $nofoto)->delete(); + } + if ($request->input('isi') == 'updatemic'){ + RekapAntibiotik::where('id', $nofoto)->update([ + 'interpretation' => $request->input('komponen') + ]); + } if ($request->input('isi') == 'unprintrow'){ RekapAntibiotik::where('id', $nofoto)->update([ 'printrow' => false @@ -1460,7 +1671,7 @@ class DokterController extends Controller ]); } - $pesan = 'Success'; + } catch (Exception $e) { $pesan = $e->getMessage(); Log::error('Gagal Arsipkan Data.', [ @@ -1686,6 +1897,11 @@ class DokterController extends Controller } } return 'Success'; + } else if ($worklist == 'getothervitek'){ + $nofoto = $request->input('nofoto'); + $norm = $request->input('norm'); + $sql = ResultSample::where('accession_number', 'NOT LIKE', $nofoto.'%')->where('patient_id', $norm)->get(); + return $sql; } else { $periksa = Periksa::where('id', $idperiksa)->first(); if (isset($periksa->id)){ diff --git a/htdocs/app/Http/Controllers/ListController.php b/htdocs/app/Http/Controllers/ListController.php index ed0154dd..c46e7e90 100644 --- a/htdocs/app/Http/Controllers/ListController.php +++ b/htdocs/app/Http/Controllers/ListController.php @@ -13,6 +13,8 @@ use App\Jawaban; use App\Pasien; use App\User; use App\Jadwalperiksa; +use App\PendaftaranOnListiner; + use Carbon\Carbon; use DateTime; use Session; diff --git a/htdocs/app/Services/AstmMessageService.php b/htdocs/app/Services/AstmMessageService.php index 7151fa60..aa6fff4c 100644 --- a/htdocs/app/Services/AstmMessageService.php +++ b/htdocs/app/Services/AstmMessageService.php @@ -13,6 +13,7 @@ use App\Periksa; use App\RekapAntibiotik; use App\PendaftaranOnListiner; use App\Organisms; +use App\KomponenJawaban; // Proses untuk Growth and Detection Result function processGrowthDetectionResult($rawData){ @@ -422,6 +423,17 @@ class AstmMessageService 'name' => $organism, 'category' => 'Vitek', ]); + KomponenJawaban::updateOrCreate( + [ + 'accnumber' => $accession_number, + 'komponen' => 'bakteri', + 'isidata' => $organism, + ], + [ + 'template' => 'all', + 'created_by' => 'Vitek' + ] + ); } } $cekdataperiksa = Periksa::where('nofoto', $accession_number)->first(); diff --git a/htdocs/config/global.php b/htdocs/config/global.php index 1192f101..960c9914 100644 --- a/htdocs/config/global.php +++ b/htdocs/config/global.php @@ -1,6 +1,6 @@ 'MIS', + 'Title' => 'MyLIS-RSSA', 'namaapps' => 'Mikrobiologi Information System', 'domainapps' => 'RSUD Dr. Saiful Anwar', 'subdomainapps' => 'Kota Malang', @@ -8,7 +8,7 @@ return [ 'addressapps' => 'Jl. Lamandau 18A Bunulrejo Blimbing Malang', 'kota' => 'Malang', 'emailapps' => 'swandhana17@gmail.com', - 'lamanapps' => 'https://mis.rssa.id', + 'lamanapps' => 'https://mylis.rssa.id', 'logofrontapps' => 'header.png', ]; ?> \ No newline at end of file diff --git a/htdocs/public/banner.png b/htdocs/public/banner.png index ac222bbb..dac658b7 100644 Binary files a/htdocs/public/banner.png and b/htdocs/public/banner.png differ diff --git a/htdocs/public/logo.png b/htdocs/public/logo.png index 6c224f33..6e0c2853 100644 Binary files a/htdocs/public/logo.png and b/htdocs/public/logo.png differ diff --git a/htdocs/public/logo_rssa.png b/htdocs/public/logo_rssa.png new file mode 100644 index 00000000..4af06927 Binary files /dev/null and b/htdocs/public/logo_rssa.png differ diff --git a/htdocs/resources/views/cetak/ekspertisecci.blade.php b/htdocs/resources/views/cetak/ekspertisecci.blade.php index 7ed6b4c8..9dc86845 100644 --- a/htdocs/resources/views/cetak/ekspertisecci.blade.php +++ b/htdocs/resources/views/cetak/ekspertisecci.blade.php @@ -93,6 +93,7 @@ $id_swabtenggorok = ''; $id_urine = ''; $id_swabperineum = ''; + $bakteri = ''; $keterangan = $periksa->keterangan; if (!empty($komponens)){ foreach($komponens as $rows){ @@ -100,6 +101,7 @@ if (trim($rows->komponen) == 'id_swabtenggorok') {$id_swabtenggorok = $rows->isidata; } if (trim($rows->komponen) == 'id_urine') {$id_urine = $rows->isidata; } if (trim($rows->komponen) == 'id_swabperineum') {$id_swabperineum = $rows->isidata; } + if (trim($rows->komponen) == 'bakteri') {$bakteri = $rows->isidata; } } } @@ -136,6 +138,9 @@ @endphp @if (!isset($cekketerangan[1]) && isset($antibiotiks) && $antibiotiks->isNotEmpty()) + @if ($bakteri != '') +
Bakteri Yang ditemukan : {{$bakteri}} {{$data['bakterisir'] ?? ''}}
+ @endif @php // Filter antibiotik yang printrow == true $filtered = $antibiotiks->filter(function($row) { @@ -168,7 +173,7 @@ @if (isset($left[$i]))