Update
This commit is contained in:
@@ -1325,62 +1325,7 @@ class DokterController extends Controller
|
||||
];
|
||||
return response()->json($response, 500);
|
||||
} else if ($worklist == 'kumanmanual'){
|
||||
try {
|
||||
$kuman = $request->input('isi');
|
||||
$komponen = $request->input('komponen');
|
||||
$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 {
|
||||
KomponenJawaban::updateOrCreate(
|
||||
[
|
||||
'accnumber' => $nofoto,
|
||||
'template' => $dlp,
|
||||
'komponen' => $komponen,
|
||||
],
|
||||
[
|
||||
'isidata' => $kuman,
|
||||
'created_by' => Session('nama')
|
||||
]
|
||||
);
|
||||
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(
|
||||
$jsonantibiotikmanual = array(
|
||||
'Amoxycillin',
|
||||
'Amoxycillin and Clavulanic Acid',
|
||||
'Ampicillin',
|
||||
@@ -1424,6 +1369,65 @@ class DokterController extends Controller
|
||||
'Caspofungin',
|
||||
'Flucytosine'
|
||||
);
|
||||
try {
|
||||
$kuman = $request->input('isi');
|
||||
$komponen = $request->input('komponen');
|
||||
$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 {
|
||||
KomponenJawaban::updateOrCreate(
|
||||
[
|
||||
'accnumber' => $nofoto,
|
||||
'template' => $dlp,
|
||||
'komponen' => $komponen,
|
||||
],
|
||||
[
|
||||
'isidata' => $kuman,
|
||||
'created_by' => Session('nama')
|
||||
]
|
||||
);
|
||||
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){
|
||||
if (in_array($rsira->subantibiotik, $jsonantibiotikmanual)){
|
||||
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;
|
||||
|
||||
foreach($jsonantibiotikmanual as $antibiotic_name){
|
||||
$ceksudah = RekapAntibiotik::where('orderid', $idperiksa)->where('kuman', $kuman)->where('antibiotic', $antibiotic_name)->count();
|
||||
if ($ceksudah == 0){
|
||||
|
||||
@@ -537,7 +537,6 @@ class FrontpageController extends Controller
|
||||
'categories' => $categories,
|
||||
];
|
||||
};
|
||||
|
||||
$biakankulturData = $groupOrganisms('biakankultur');
|
||||
$mikroorganismeData = $groupOrganisms('mikroorganisme');
|
||||
$data = array_merge($data, [
|
||||
@@ -545,7 +544,7 @@ class FrontpageController extends Controller
|
||||
'bacterycateggories' => $biakankulturData['categories'],
|
||||
'mikroorganismes' => $mikroorganismeData['organismes'],
|
||||
'mikroorganismestlist' => $mikroorganismeData['categories'],
|
||||
]);
|
||||
]);
|
||||
$kelompokMapping = [
|
||||
'jsonsputum' => 'Sputum',
|
||||
'jsonswabtenggorok' => 'Swab Tenggorok',
|
||||
@@ -566,7 +565,7 @@ class FrontpageController extends Controller
|
||||
'jsonmediamcconkey' => 'Media Mc Conkey',
|
||||
'jsonpemeriksaantl' => 'Pemeriksaan Tambahan Lainnya',
|
||||
'jsonbiakankultur' => 'Biakan Kultur',
|
||||
];
|
||||
];
|
||||
foreach ($kelompokMapping as $key => $kelompok) {
|
||||
$data[$key] = $allOrganisms->where('kelompok', $kelompok)->values();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user