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();
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2946,11 +2946,14 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
function btncreateantibiotikkumanmanual1(jQuery){
|
||||
function btncreateantibiotikkumanmanual1(){
|
||||
console.log('--- START Manual 1 ---');
|
||||
var idne = $('#periksa_id').val();
|
||||
var kuman01 = $('#id_bakteri01').val();
|
||||
var antibio1= $('#id_antibiotikmanual1').val();
|
||||
console.log('Manual 1 Values:', { idne: idne, kuman: kuman01, antibio: antibio1 });
|
||||
if (kuman01 == '' || kuman01 == null) {
|
||||
console.warn('Manual 1 BERHENTI: ID Bakteri 01 Kosong!');
|
||||
return;
|
||||
}
|
||||
if ( $.fn.DataTable.isDataTable('#tblkumanmanual1') ) {
|
||||
@@ -3055,11 +3058,12 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
function btncreateantibiotikkumanmanual2(jQuery){
|
||||
function btncreateantibiotikkumanmanual2(){
|
||||
console.log('--- START Manual 2 ---');
|
||||
var idne = $('#periksa_id').val();
|
||||
var kuman02 = $('#id_bakteri02').val();
|
||||
var antibio2= $('#id_antibiotikmanual2').val();
|
||||
|
||||
console.log('Manual 2 Values:', { idne: idne, kuman: kuman02, antibio: antibio2 });
|
||||
if (kuman02 == '' || kuman02 == null) {
|
||||
return;
|
||||
}
|
||||
@@ -3165,9 +3169,14 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
function btncreateantibiotikvitek(jQuery){
|
||||
function btncreateantibiotikvitek(){
|
||||
var idne = document.getElementById('periksa_id').value;
|
||||
var kuman = $('#bakteri').val();
|
||||
console.log('Vitek Values:', { idne: idne, kuman: kuman });
|
||||
|
||||
if(!kuman) {
|
||||
console.warn('Vitek mungkin kosong datanya karena Bakteri belum dipilih');
|
||||
}
|
||||
if ( $.fn.DataTable.isDataTable('#tblvitek') ) {
|
||||
$('#tblvitek').DataTable().clear().destroy();
|
||||
}
|
||||
@@ -3911,6 +3920,12 @@
|
||||
} else if (rows.komponen.includes("id_bakteri01") || rows.komponen.includes("id_bakteri02")) {
|
||||
var isidataString = rows.isidata;
|
||||
$("#"+rows.komponen).val(isidataString).select2().trigger('change');
|
||||
if (rows.komponen === 'id_bakteri01') {
|
||||
btncreateantibiotikkumanmanual1();
|
||||
}
|
||||
if (rows.komponen === 'id_bakteri02') {
|
||||
btncreateantibiotikkumanmanual2();
|
||||
}
|
||||
} else if (rows.komponen.includes("inlineCheckbox")) {
|
||||
if (rows.isidata === '' || rows.isidata === null) {
|
||||
$("#" + rows.komponen).prop('checked', false);
|
||||
@@ -3938,6 +3953,9 @@
|
||||
}
|
||||
} else {
|
||||
$("#" + rows.komponen).val(rows.isidata);
|
||||
if (rows.komponen === 'bakteri'){
|
||||
btncreateantibiotikvitek();
|
||||
}
|
||||
if (rows.komponen === 'id_jenispemeriksaantb') {
|
||||
if (rows.isidata === 'TCM MTB Rif (Xpert)' || rows.isidata === 'TCM MTB Rif (Truenat)' || rows.isidata === 'TCM MTB Rif INH (BDMAX)' || rows.isidata === 'LPA lini 2' || rows.isidata === 'LPA lini 1') {
|
||||
$('#hasilpemeriksaanttcmmtbrifxpert').show();
|
||||
@@ -4022,9 +4040,6 @@
|
||||
} else if (dlp == 'IgM IgG Leptospira'){
|
||||
$('#templateleptospira').show();
|
||||
}
|
||||
btncreateantibiotikvitek();
|
||||
btncreateantibiotikkumanmanual1();
|
||||
btncreateantibiotikkumanmanual2();
|
||||
console.log('Finished loading komponen jawaban for DLP: '+dlp+' | No.Foto: '+nofoto+' | ID Periksa: '+idne);
|
||||
}
|
||||
function openedpage( jQuery ){
|
||||
@@ -4526,6 +4541,7 @@
|
||||
$("#template_jenis").val('CCI');
|
||||
$("#dlp").val('CCI');
|
||||
}
|
||||
|
||||
if (statuse === null) {
|
||||
$('#divperiksa').show();
|
||||
$('#divawal').hide();
|
||||
|
||||
@@ -2946,11 +2946,14 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
function btncreateantibiotikkumanmanual1(jQuery){
|
||||
function btncreateantibiotikkumanmanual1(){
|
||||
console.log('--- START Manual 1 ---');
|
||||
var idne = $('#periksa_id').val();
|
||||
var kuman01 = $('#id_bakteri01').val();
|
||||
var antibio1= $('#id_antibiotikmanual1').val();
|
||||
console.log('Manual 1 Values:', { idne: idne, kuman: kuman01, antibio: antibio1 });
|
||||
if (kuman01 == '' || kuman01 == null) {
|
||||
console.warn('Manual 1 BERHENTI: ID Bakteri 01 Kosong!');
|
||||
return;
|
||||
}
|
||||
if ( $.fn.DataTable.isDataTable('#tblkumanmanual1') ) {
|
||||
@@ -3055,11 +3058,12 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
function btncreateantibiotikkumanmanual2(jQuery){
|
||||
function btncreateantibiotikkumanmanual2(){
|
||||
console.log('--- START Manual 2 ---');
|
||||
var idne = $('#periksa_id').val();
|
||||
var kuman02 = $('#id_bakteri02').val();
|
||||
var antibio2= $('#id_antibiotikmanual2').val();
|
||||
|
||||
console.log('Manual 2 Values:', { idne: idne, kuman: kuman02, antibio: antibio2 });
|
||||
if (kuman02 == '' || kuman02 == null) {
|
||||
return;
|
||||
}
|
||||
@@ -3165,9 +3169,14 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
function btncreateantibiotikvitek(jQuery){
|
||||
function btncreateantibiotikvitek(){
|
||||
var idne = document.getElementById('periksa_id').value;
|
||||
var kuman = $('#bakteri').val();
|
||||
console.log('Vitek Values:', { idne: idne, kuman: kuman });
|
||||
|
||||
if(!kuman) {
|
||||
console.warn('Vitek mungkin kosong datanya karena Bakteri belum dipilih');
|
||||
}
|
||||
if ( $.fn.DataTable.isDataTable('#tblvitek') ) {
|
||||
$('#tblvitek').DataTable().clear().destroy();
|
||||
}
|
||||
@@ -3911,6 +3920,12 @@
|
||||
} else if (rows.komponen.includes("id_bakteri01") || rows.komponen.includes("id_bakteri02")) {
|
||||
var isidataString = rows.isidata;
|
||||
$("#"+rows.komponen).val(isidataString).select2().trigger('change');
|
||||
if (rows.komponen === 'id_bakteri01') {
|
||||
btncreateantibiotikkumanmanual1();
|
||||
}
|
||||
if (rows.komponen === 'id_bakteri02') {
|
||||
btncreateantibiotikkumanmanual2();
|
||||
}
|
||||
} else if (rows.komponen.includes("inlineCheckbox")) {
|
||||
if (rows.isidata === '' || rows.isidata === null) {
|
||||
$("#" + rows.komponen).prop('checked', false);
|
||||
@@ -3938,6 +3953,9 @@
|
||||
}
|
||||
} else {
|
||||
$("#" + rows.komponen).val(rows.isidata);
|
||||
if (rows.komponen === 'bakteri'){
|
||||
btncreateantibiotikvitek();
|
||||
}
|
||||
if (rows.komponen === 'id_jenispemeriksaantb') {
|
||||
if (rows.isidata === 'TCM MTB Rif (Xpert)' || rows.isidata === 'TCM MTB Rif (Truenat)' || rows.isidata === 'TCM MTB Rif INH (BDMAX)' || rows.isidata === 'LPA lini 2' || rows.isidata === 'LPA lini 1') {
|
||||
$('#hasilpemeriksaanttcmmtbrifxpert').show();
|
||||
@@ -4022,9 +4040,6 @@
|
||||
} else if (dlp == 'IgM IgG Leptospira'){
|
||||
$('#templateleptospira').show();
|
||||
}
|
||||
btncreateantibiotikvitek();
|
||||
btncreateantibiotikkumanmanual1();
|
||||
btncreateantibiotikkumanmanual2();
|
||||
console.log('Finished loading komponen jawaban for DLP: '+dlp+' | No.Foto: '+nofoto+' | ID Periksa: '+idne);
|
||||
}
|
||||
function openedpage( jQuery ){
|
||||
|
||||
Reference in New Issue
Block a user