From fdbe9c2522870199008e0f82c672f290ab29381e Mon Sep 17 00:00:00 2001 From: Duidev Software House Date: Sun, 30 Nov 2025 08:49:12 +0700 Subject: [PATCH] Update --- .../app/Http/Controllers/DokterController.php | 212 +- .../Http/Controllers/FrontpageController.php | 2 +- htdocs/database/seeders/JawabanSeeder.php | 2 +- .../views/dokter/pemeriksaan.blade.php | 2258 +++++++++++------ htdocs/resources/views/dokter/ppds.blade.php | 393 ++- .../views/dokter/ppdsdeveloper.blade.php | 284 ++- 6 files changed, 2116 insertions(+), 1035 deletions(-) diff --git a/htdocs/app/Http/Controllers/DokterController.php b/htdocs/app/Http/Controllers/DokterController.php index 721af67f..ba838825 100644 --- a/htdocs/app/Http/Controllers/DokterController.php +++ b/htdocs/app/Http/Controllers/DokterController.php @@ -1313,85 +1313,127 @@ class DokterController extends Controller try { $kuman = $request->input('isi'); $komponen = $request->input('komponen'); - KomponenJawaban::updateOrCreate( - [ - 'accnumber' => $nofoto, - 'template' => $dlp, - 'komponen' => $komponen, - ], - [ - 'isidata' => $kuman, - 'created_by' => Session('nama') - ] - ); + $astmanual = $request->input('astmanual'); if ($kuman == 'Pilih Salah Satu' OR $kuman == 'undefined' OR $kuman == '' OR is_null($kuman)){ + KomponenJawaban::where('accnumber', $nofoto)->where('template', $dlp)->where('komponen', $komponen)->delete(); + Riwayat::create([ + 'nofoto' => $nofoto, + 'jawaban' => $kuman, + 'inputor' => Session('nama'), + 'keterangan' => 'Delete Kuman Manual ('.$komponen.')', + 'verifikasi' => '', + ]); return response()->json(['icon' => 'success', 'warna' => '#1dcbbd', 'status' => 'Success', 'message' => 'Data Kuman Manual Dihapus']); } else { - $jumlah = 0; - $jsonantibiotikmanual = array( - 'Amoxycillin', - 'Amoxycillin and Clavulanic Acid', - 'Ampicillin', - 'Ampicillin/ Sulbactam', - 'Benzilpenicillin', - 'Piperacillin/ Tazobactam', - 'Cloxacillin', - 'Cefadroxil', - 'Cefotaxim', - 'Ceftriaxone', - 'Cefuroxime', - 'Cefazoline', - 'Cefixime', - 'Ceftazidime', - 'Cefoxitin', - 'Cefepime', - 'Cefoperazone/ sulbactam', - 'Aztreonam', - 'Meropenem', - 'Imipenem', - 'Ertapenem', - 'Gentamicin', - 'Amikacin', - 'Ciprofloxacin', - 'Levofloxacin', - 'Moxifloxacin', - 'Tetracyline', - 'Erythomycin', - 'Clindamycin', - 'Chloramphenicol', - 'Nitrofurantoin', - 'Colistine', - 'Co-trimoxazole', - 'Vancomycin', - 'Linezolid', - 'Tigecycline', - 'Fluconazole', - 'Voriconazole', - 'Micafungin', - 'Amphothericin B', - 'Caspofungin', - 'Flucytosine' + KomponenJawaban::updateOrCreate( + [ + 'accnumber' => $nofoto, + 'template' => $dlp, + 'komponen' => $komponen, + ], + [ + 'isidata' => $kuman, + 'created_by' => Session('nama') + ] ); - foreach($jsonantibiotikmanual as $antibiotic_name){ - $ceksudah = RekapAntibiotik::where('orderid', $idperiksa)->where('kuman', $kuman)->where('antibiotic', $antibiotic_name)->count(); - if ($ceksudah == 0){ - RekapAntibiotik::create([ - 'orderid' => $idperiksa, - 'kuman' => $kuman, - 'antibiotic' => $antibiotic_name, - 'resistance' => null, - 'value' => null, - 'interpretation' => null, - 'glassreportname' => in_array($antibiotic_name, $jsonantibiotik), - 'printrow' => false, - 'printcol' => false, - 'created_at' => date('Y-m-d H:i:s'), - 'updated_at' => date('Y-m-d H:i:s'), - ] - ); - $jumlah++; + if (isset($astmanual) AND $astmanual != 'default'){ + $getsirab = SiraB::where('setmanual', 'LIKE', $astmanual.'%')->get(); + + $jumlah = count($getsirab); + foreach($getsirab as $rsira){ + $ceksudah = RekapAntibiotik::where('orderid', $idperiksa)->where('kuman', $kuman)->where('antibiotic', $rsira->subantibiotik)->count(); + if ($ceksudah == 0){ + RekapAntibiotik::create([ + 'orderid' => $idperiksa, + 'kuman' => $kuman, + 'antibiotic' => $rsira->subantibiotik, + 'resistance' => null, + 'value' => null, + 'interpretation' => null, + 'glassreportname' => in_array($rsira->subantibiotik, $jsonantibiotik), + 'printrow' => false, + 'printcol' => false, + 'batasatas' => $rsira->batasatas, + 'midrange' => $rsira->midrange, + 'batasbawah' => $rsira->batasbawah, + 'created_at' => date('Y-m-d H:i:s'), + 'updated_at' => date('Y-m-d H:i:s'), + ] + ); + $jumlah++; + } + } + } else { + $jumlah = 0; + $jsonantibiotikmanual = array( + 'Amoxycillin', + 'Amoxycillin and Clavulanic Acid', + 'Ampicillin', + 'Ampicillin/ Sulbactam', + 'Benzilpenicillin', + 'Piperacillin/ Tazobactam', + 'Cloxacillin', + 'Cefadroxil', + 'Cefotaxim', + 'Ceftriaxone', + 'Cefuroxime', + 'Cefazoline', + 'Cefixime', + 'Ceftazidime', + 'Cefoxitin', + 'Cefepime', + 'Cefoperazone/ sulbactam', + 'Aztreonam', + 'Meropenem', + 'Imipenem', + 'Ertapenem', + 'Gentamicin', + 'Amikacin', + 'Ciprofloxacin', + 'Levofloxacin', + 'Moxifloxacin', + 'Tetracyline', + 'Erythomycin', + 'Clindamycin', + 'Chloramphenicol', + 'Nitrofurantoin', + 'Colistine', + 'Co-trimoxazole', + 'Vancomycin', + 'Linezolid', + 'Tigecycline', + 'Fluconazole', + 'Voriconazole', + 'Micafungin', + 'Amphothericin B', + 'Caspofungin', + 'Flucytosine' + ); + foreach($jsonantibiotikmanual as $antibiotic_name){ + $ceksudah = RekapAntibiotik::where('orderid', $idperiksa)->where('kuman', $kuman)->where('antibiotic', $antibiotic_name)->count(); + if ($ceksudah == 0){ + RekapAntibiotik::create([ + 'orderid' => $idperiksa, + 'kuman' => $kuman, + 'antibiotic' => $antibiotic_name, + 'resistance' => null, + 'value' => null, + 'interpretation' => null, + 'glassreportname' => in_array($antibiotic_name, $jsonantibiotik), + 'printrow' => false, + 'printcol' => false, + 'batasatas' => null, + 'midrange' => null, + 'batasbawah' => null, + 'created_at' => date('Y-m-d H:i:s'), + 'updated_at' => date('Y-m-d H:i:s'), + ] + ); + $jumlah++; + } } } + if ($jumlah != 0){ $update = Riwayat::create([ 'nofoto' => $nofoto, @@ -1401,7 +1443,7 @@ class DokterController extends Controller 'verifikasi'=> '', ]); } - return response()->json(['icon' => 'success', 'warna' => '#1dcbbd', 'status' => 'Success', 'message' => 'Data Kuman Manual Disimpan dengan '.$jumlah.' Antibiotik']); + return response()->json(['icon' => 'success', 'warna' => '#1dcbbd', 'status' => 'Success', 'message' => 'Data Kuman Manual Disimpan dengan '.$jumlah.' Antibiotik '.$astmanual]); } } catch (Exception $e) { $pesan = $e->getMessage(); @@ -1416,7 +1458,7 @@ class DokterController extends Controller $idtabel = $request->input('isi'); if ($idtabel == 'new'){ DB::table('pertumkolomni')->insert([ - 'orderid' => $idperiksa, + 'orderid' => $nofoto, 'tglpenyimpanan' => date('Y-m-d'), 'media' => $request->input('komponen') ?? '', 'kuman' => $request->input('kuman') ?? '', @@ -1424,7 +1466,7 @@ class DokterController extends Controller 'katalase' => $request->input('katalase') ?? '', 'koagulase' => $request->input('koagulase') ?? '', 'oksidase' => $request->input('oksidase') ?? '', - 'ujilainnya' => $request->input('ujilainnya') ?? '', + 'lainnya' => $request->input('ujilainnya') ?? '', 'status' => $request->input('status') ?? '', 'tindaklanjut' => $request->input('tindaklanjut') ?? '', 'created_by' => Session('nama'), @@ -1436,7 +1478,7 @@ class DokterController extends Controller 'katalase' => $request->input('katalase') ?? '', 'koagulase' => $request->input('koagulase') ?? '', 'oksidase' => $request->input('oksidase') ?? '', - 'ujilainnya' => $request->input('ujilainnya') ?? '', + 'lainnya' => $request->input('ujilainnya') ?? '', 'status' => $request->input('status') ?? '', 'tindaklanjut' => $request->input('tindaklanjut') ?? '', 'created_by' => Session('nama'), @@ -1629,6 +1671,17 @@ class DokterController extends Controller RekapAntibiotik::where('id', $nofoto)->delete(); } if ($request->input('isi') == 'updatemic'){ + RekapAntibiotik::where('id', $nofoto)->update([ + 'interpretation' => $request->input('komponen'), + 'value' => $request->input('micval') + ]); + } + if ($request->input('isi') == 'updatevaluemic'){ + RekapAntibiotik::where('id', $nofoto)->update([ + 'value' => $request->input('komponen') + ]); + } + if ($request->input('isi') == 'updateinterpretationmic'){ RekapAntibiotik::where('id', $nofoto)->update([ 'interpretation' => $request->input('komponen') ]); @@ -1891,6 +1944,11 @@ class DokterController extends Controller $norm = $request->input('norm'); $sql = ResultSample::where('accession_number', 'NOT LIKE', $nofoto.'%')->where('patient_id', $norm)->get(); return $sql; + } else if ($worklist == 'generatetblpertumbuhankoloni'){ + $orderid = $request->input('nofoto'); + $media = $request->input('komponen'); + $sql = DB::table('pertumkolomni')->where('orderid', $orderid)->where('media', $media)->get(); + return $sql; } else { $periksa = Periksa::where('id', $idperiksa)->first(); if (isset($periksa->id)){ diff --git a/htdocs/app/Http/Controllers/FrontpageController.php b/htdocs/app/Http/Controllers/FrontpageController.php index df7f4c57..cca4c425 100644 --- a/htdocs/app/Http/Controllers/FrontpageController.php +++ b/htdocs/app/Http/Controllers/FrontpageController.php @@ -194,7 +194,7 @@ class FrontpageController extends Controller 'antrkrmsitu' => 0, ]; $allOrganisms = Organisms::orderBy('name', 'ASC')->get(); - $allASTManual = SiraB::whereNotNull('setmanual')->select('setmanual')->orderBy('setmanual', 'ASC')->get(); + $allASTManual = SiraB::whereNotNull('setmanual')->select('setmanual')->groupBy('setmanual')->get(); $groupOrganisms = function ($kelompok) use ($allOrganisms) { $organisms = $allOrganisms->where('kelompok', $kelompok); if ($organisms->isEmpty()) { diff --git a/htdocs/database/seeders/JawabanSeeder.php b/htdocs/database/seeders/JawabanSeeder.php index e68e5c66..934b0e23 100644 --- a/htdocs/database/seeders/JawabanSeeder.php +++ b/htdocs/database/seeders/JawabanSeeder.php @@ -23,7 +23,7 @@ class JawabanSeeder extends Seeder ['kategori' => '1', 'judul' => 'TBC', 'subjawaban' => '', 'kesimpulan' => ''], ['kategori' => '1', 'judul' => 'Viral Load', 'subjawaban' => '', 'kesimpulan' => ''], ['kategori' => '1', 'judul' => 'PCR COVID', 'subjawaban' => '', 'kesimpulan' => ''], - ['kategori' => '1', 'judul' => 'IgM/IgG Leptospira', 'subjawaban' => '', 'kesimpulan' => ''] + ['kategori' => '1', 'judul' => 'IgM IgG Leptospira', 'subjawaban' => '', 'kesimpulan' => ''] ]); DB::table('dokter')->insert([ [ 'id' => 2, 'nama' => 'NON DOKTER', 'jk' => '', 'tgl_lahir' => null, 'kota' => 'ND', 'alamat' => 'UMUM', 'created_at' => '2025-08-02 07:14:51', 'updated_at' => '2025-08-02 07:14:51'], diff --git a/htdocs/resources/views/dokter/pemeriksaan.blade.php b/htdocs/resources/views/dokter/pemeriksaan.blade.php index 86864302..c1af27f5 100644 --- a/htdocs/resources/views/dokter/pemeriksaan.blade.php +++ b/htdocs/resources/views/dokter/pemeriksaan.blade.php @@ -522,274 +522,138 @@
B. Biakan Kultur
+
+
+
+ + +
+
+ + +
+
+
-
-
- - +
+
+ +
+
+
+
+
+ +
+
+
+
+
+
-
- - +
+
+
+
+ +
+
+
+
+
+
-
- - +
+
+
+
+ +
+
+
+
+
+
-
- - +
+
+
+
+ +
+
+
+
+
+
-
- - +
+
+
+
+ +
+
+
+
+
+
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - +
+
+
+
+ +
+
+
+
+
+
@@ -1159,7 +1023,6 @@ -
@@ -1284,7 +1147,7 @@ - + @@ -1410,19 +1273,27 @@
-
Neg
+
TCM XDR
- - - - - + +
+
+
MTB
+
+ +
+
H Low
@@ -1475,21 +1346,9 @@
-
-
Invalid
-
- -
-
+
Amk
@@ -1542,33 +1401,6 @@
-
-
Error
-
- -
-
-
-
No Result
-
- -
-
@@ -1593,16 +1425,24 @@
-
Neg
+
TCM XDR
- - - - + - + + +
+
+
+
MTB
+
+
@@ -1662,20 +1502,6 @@
-
-
Invalid
-
- -
-
@@ -1734,34 +1560,6 @@
-
-
Error
-
- -
-
-
-
No Result
-
- -
-
@@ -1870,13 +1668,30 @@
+
+
+ + +
+
+ + +
+
+ + +
+