Update
This commit is contained in:
No files matched your search
@@ -1325,62 +1325,7 @@ class DokterController extends Controller
|
|||||||
];
|
];
|
||||||
return response()->json($response, 500);
|
return response()->json($response, 500);
|
||||||
} else if ($worklist == 'kumanmanual'){
|
} else if ($worklist == 'kumanmanual'){
|
||||||
try {
|
$jsonantibiotikmanual = array(
|
||||||
$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(
|
|
||||||
'Amoxycillin',
|
'Amoxycillin',
|
||||||
'Amoxycillin and Clavulanic Acid',
|
'Amoxycillin and Clavulanic Acid',
|
||||||
'Ampicillin',
|
'Ampicillin',
|
||||||
@@ -1424,6 +1369,65 @@ class DokterController extends Controller
|
|||||||
'Caspofungin',
|
'Caspofungin',
|
||||||
'Flucytosine'
|
'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){
|
foreach($jsonantibiotikmanual as $antibiotic_name){
|
||||||
$ceksudah = RekapAntibiotik::where('orderid', $idperiksa)->where('kuman', $kuman)->where('antibiotic', $antibiotic_name)->count();
|
$ceksudah = RekapAntibiotik::where('orderid', $idperiksa)->where('kuman', $kuman)->where('antibiotic', $antibiotic_name)->count();
|
||||||
if ($ceksudah == 0){
|
if ($ceksudah == 0){
|
||||||
|
|||||||
@@ -537,7 +537,6 @@ class FrontpageController extends Controller
|
|||||||
'categories' => $categories,
|
'categories' => $categories,
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
$biakankulturData = $groupOrganisms('biakankultur');
|
$biakankulturData = $groupOrganisms('biakankultur');
|
||||||
$mikroorganismeData = $groupOrganisms('mikroorganisme');
|
$mikroorganismeData = $groupOrganisms('mikroorganisme');
|
||||||
$data = array_merge($data, [
|
$data = array_merge($data, [
|
||||||
|
|||||||
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 idne = $('#periksa_id').val();
|
||||||
var kuman01 = $('#id_bakteri01').val();
|
var kuman01 = $('#id_bakteri01').val();
|
||||||
var antibio1= $('#id_antibiotikmanual1').val();
|
var antibio1= $('#id_antibiotikmanual1').val();
|
||||||
|
console.log('Manual 1 Values:', { idne: idne, kuman: kuman01, antibio: antibio1 });
|
||||||
if (kuman01 == '' || kuman01 == null) {
|
if (kuman01 == '' || kuman01 == null) {
|
||||||
|
console.warn('Manual 1 BERHENTI: ID Bakteri 01 Kosong!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( $.fn.DataTable.isDataTable('#tblkumanmanual1') ) {
|
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 idne = $('#periksa_id').val();
|
||||||
var kuman02 = $('#id_bakteri02').val();
|
var kuman02 = $('#id_bakteri02').val();
|
||||||
var antibio2= $('#id_antibiotikmanual2').val();
|
var antibio2= $('#id_antibiotikmanual2').val();
|
||||||
|
console.log('Manual 2 Values:', { idne: idne, kuman: kuman02, antibio: antibio2 });
|
||||||
if (kuman02 == '' || kuman02 == null) {
|
if (kuman02 == '' || kuman02 == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3165,9 +3169,14 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function btncreateantibiotikvitek(jQuery){
|
function btncreateantibiotikvitek(){
|
||||||
var idne = document.getElementById('periksa_id').value;
|
var idne = document.getElementById('periksa_id').value;
|
||||||
var kuman = $('#bakteri').val();
|
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') ) {
|
if ( $.fn.DataTable.isDataTable('#tblvitek') ) {
|
||||||
$('#tblvitek').DataTable().clear().destroy();
|
$('#tblvitek').DataTable().clear().destroy();
|
||||||
}
|
}
|
||||||
@@ -3911,6 +3920,12 @@
|
|||||||
} else if (rows.komponen.includes("id_bakteri01") || rows.komponen.includes("id_bakteri02")) {
|
} else if (rows.komponen.includes("id_bakteri01") || rows.komponen.includes("id_bakteri02")) {
|
||||||
var isidataString = rows.isidata;
|
var isidataString = rows.isidata;
|
||||||
$("#"+rows.komponen).val(isidataString).select2().trigger('change');
|
$("#"+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")) {
|
} else if (rows.komponen.includes("inlineCheckbox")) {
|
||||||
if (rows.isidata === '' || rows.isidata === null) {
|
if (rows.isidata === '' || rows.isidata === null) {
|
||||||
$("#" + rows.komponen).prop('checked', false);
|
$("#" + rows.komponen).prop('checked', false);
|
||||||
@@ -3938,6 +3953,9 @@
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$("#" + rows.komponen).val(rows.isidata);
|
$("#" + rows.komponen).val(rows.isidata);
|
||||||
|
if (rows.komponen === 'bakteri'){
|
||||||
|
btncreateantibiotikvitek();
|
||||||
|
}
|
||||||
if (rows.komponen === 'id_jenispemeriksaantb') {
|
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') {
|
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();
|
$('#hasilpemeriksaanttcmmtbrifxpert').show();
|
||||||
@@ -4022,9 +4040,6 @@
|
|||||||
} else if (dlp == 'IgM IgG Leptospira'){
|
} else if (dlp == 'IgM IgG Leptospira'){
|
||||||
$('#templateleptospira').show();
|
$('#templateleptospira').show();
|
||||||
}
|
}
|
||||||
btncreateantibiotikvitek();
|
|
||||||
btncreateantibiotikkumanmanual1();
|
|
||||||
btncreateantibiotikkumanmanual2();
|
|
||||||
console.log('Finished loading komponen jawaban for DLP: '+dlp+' | No.Foto: '+nofoto+' | ID Periksa: '+idne);
|
console.log('Finished loading komponen jawaban for DLP: '+dlp+' | No.Foto: '+nofoto+' | ID Periksa: '+idne);
|
||||||
}
|
}
|
||||||
function openedpage( jQuery ){
|
function openedpage( jQuery ){
|
||||||
@@ -4526,6 +4541,7 @@
|
|||||||
$("#template_jenis").val('CCI');
|
$("#template_jenis").val('CCI');
|
||||||
$("#dlp").val('CCI');
|
$("#dlp").val('CCI');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (statuse === null) {
|
if (statuse === null) {
|
||||||
$('#divperiksa').show();
|
$('#divperiksa').show();
|
||||||
$('#divawal').hide();
|
$('#divawal').hide();
|
||||||
|
|||||||
@@ -2946,11 +2946,14 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function btncreateantibiotikkumanmanual1(jQuery){
|
function btncreateantibiotikkumanmanual1(){
|
||||||
|
console.log('--- START Manual 1 ---');
|
||||||
var idne = $('#periksa_id').val();
|
var idne = $('#periksa_id').val();
|
||||||
var kuman01 = $('#id_bakteri01').val();
|
var kuman01 = $('#id_bakteri01').val();
|
||||||
var antibio1= $('#id_antibiotikmanual1').val();
|
var antibio1= $('#id_antibiotikmanual1').val();
|
||||||
|
console.log('Manual 1 Values:', { idne: idne, kuman: kuman01, antibio: antibio1 });
|
||||||
if (kuman01 == '' || kuman01 == null) {
|
if (kuman01 == '' || kuman01 == null) {
|
||||||
|
console.warn('Manual 1 BERHENTI: ID Bakteri 01 Kosong!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( $.fn.DataTable.isDataTable('#tblkumanmanual1') ) {
|
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 idne = $('#periksa_id').val();
|
||||||
var kuman02 = $('#id_bakteri02').val();
|
var kuman02 = $('#id_bakteri02').val();
|
||||||
var antibio2= $('#id_antibiotikmanual2').val();
|
var antibio2= $('#id_antibiotikmanual2').val();
|
||||||
|
console.log('Manual 2 Values:', { idne: idne, kuman: kuman02, antibio: antibio2 });
|
||||||
if (kuman02 == '' || kuman02 == null) {
|
if (kuman02 == '' || kuman02 == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3165,9 +3169,14 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function btncreateantibiotikvitek(jQuery){
|
function btncreateantibiotikvitek(){
|
||||||
var idne = document.getElementById('periksa_id').value;
|
var idne = document.getElementById('periksa_id').value;
|
||||||
var kuman = $('#bakteri').val();
|
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') ) {
|
if ( $.fn.DataTable.isDataTable('#tblvitek') ) {
|
||||||
$('#tblvitek').DataTable().clear().destroy();
|
$('#tblvitek').DataTable().clear().destroy();
|
||||||
}
|
}
|
||||||
@@ -3911,6 +3920,12 @@
|
|||||||
} else if (rows.komponen.includes("id_bakteri01") || rows.komponen.includes("id_bakteri02")) {
|
} else if (rows.komponen.includes("id_bakteri01") || rows.komponen.includes("id_bakteri02")) {
|
||||||
var isidataString = rows.isidata;
|
var isidataString = rows.isidata;
|
||||||
$("#"+rows.komponen).val(isidataString).select2().trigger('change');
|
$("#"+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")) {
|
} else if (rows.komponen.includes("inlineCheckbox")) {
|
||||||
if (rows.isidata === '' || rows.isidata === null) {
|
if (rows.isidata === '' || rows.isidata === null) {
|
||||||
$("#" + rows.komponen).prop('checked', false);
|
$("#" + rows.komponen).prop('checked', false);
|
||||||
@@ -3938,6 +3953,9 @@
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$("#" + rows.komponen).val(rows.isidata);
|
$("#" + rows.komponen).val(rows.isidata);
|
||||||
|
if (rows.komponen === 'bakteri'){
|
||||||
|
btncreateantibiotikvitek();
|
||||||
|
}
|
||||||
if (rows.komponen === 'id_jenispemeriksaantb') {
|
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') {
|
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();
|
$('#hasilpemeriksaanttcmmtbrifxpert').show();
|
||||||
@@ -4022,9 +4040,6 @@
|
|||||||
} else if (dlp == 'IgM IgG Leptospira'){
|
} else if (dlp == 'IgM IgG Leptospira'){
|
||||||
$('#templateleptospira').show();
|
$('#templateleptospira').show();
|
||||||
}
|
}
|
||||||
btncreateantibiotikvitek();
|
|
||||||
btncreateantibiotikkumanmanual1();
|
|
||||||
btncreateantibiotikkumanmanual2();
|
|
||||||
console.log('Finished loading komponen jawaban for DLP: '+dlp+' | No.Foto: '+nofoto+' | ID Periksa: '+idne);
|
console.log('Finished loading komponen jawaban for DLP: '+dlp+' | No.Foto: '+nofoto+' | ID Periksa: '+idne);
|
||||||
}
|
}
|
||||||
function openedpage( jQuery ){
|
function openedpage( jQuery ){
|
||||||
|
|||||||
Reference in New Issue
Block a user