Update
This commit is contained in:
@@ -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)){
|
||||
|
||||
Reference in New Issue
Block a user