Update Cara Baca
This commit is contained in:
@@ -1136,23 +1136,6 @@ class DokterController extends Controller
|
||||
]);
|
||||
}
|
||||
}
|
||||
if(is_array($jsondata) && count($jsondata) > 0){
|
||||
foreach ($jsondata as $item){
|
||||
RekapAntibiotik::updateOrCreate(
|
||||
[
|
||||
'orderid' => $orderid,
|
||||
'antibiotic' => $item['antibiotic'],
|
||||
],
|
||||
[
|
||||
'resistance' => $item['resistance'],
|
||||
'value' => $item['value'],
|
||||
'interpretation' => $item['interpretation'],
|
||||
'created_at' => $getdataawal->daftar ?? date('Y-m-d H:i:s'),
|
||||
'updated_at' => $getdataawal->akhir ?? date('Y-m-d H:i:s'),
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$gentabel = RekapAntibiotik::where('orderid', $orderid)->get();
|
||||
@@ -1160,7 +1143,7 @@ class DokterController extends Controller
|
||||
$nomor = 1;
|
||||
$isidata = '<table border="1" cellpadding="0" cellspacing="0" width="100%"><tr><td width="5%"><strong>No</strong></td><td width="65%"><strong>Antibiotik</strong></td><td width="15%"><strong>Value</strong></td><td width="15%"><strong>S/I/R</strong></td></tr>';
|
||||
foreach($gentabel as $rtabel){
|
||||
$isidata = $isidata.'<tr><td>'.$nomor.'</td><td>'.$rtabel->antibiotic.'</td<td>'.$rtabel->value.'</td><td>'.$rtabel->interpretation.'</td></tr>';
|
||||
$isidata = $isidata.'<tr><td>'.$nomor.'</td><td>'.$rtabel->resistance.'</td><td>'.$rtabel->value.'</td><td>'.$rtabel->interpretation.'</td></tr>';
|
||||
$nomor++;
|
||||
}
|
||||
$isidata = $isidata.'</table>';
|
||||
|
||||
@@ -815,7 +815,7 @@ class FrontpageController extends Controller
|
||||
}
|
||||
}
|
||||
public function registerApi(Request $request) {
|
||||
Log::info(' Incomming '.json_encode($request->input()));
|
||||
//Log::info(' Incomming '.json_encode($request->input()));
|
||||
$decodedData = $request->json()->all();
|
||||
$norm = $decodedData['norm'] ?? null;
|
||||
$nama = $decodedData['nama'] ?? null;
|
||||
|
||||
@@ -9,7 +9,7 @@ use App\Jawaban;
|
||||
use App\Subjawaban;
|
||||
use App\SiraB;
|
||||
use App\Organisms;
|
||||
|
||||
use App\Periksa;
|
||||
use Validator;
|
||||
use Picqer\Barcode\BarcodeGeneratorPNG;
|
||||
use Session;
|
||||
@@ -276,8 +276,9 @@ class TemplateController extends Controller
|
||||
return back();
|
||||
}
|
||||
} else if ($tabel == 'Speciment'){
|
||||
$kodelama = '';
|
||||
if ($id == 'new'){
|
||||
$ceksudah = Organisms::where('name', $request->name)->where('category', $request->category)->where('kelompok', $request->kelompok)->count();
|
||||
$ceksudah = Organisms::where('name', $request->name)->where('kelompok', $request->kelompok)->count();
|
||||
if ($ceksudah == 0){
|
||||
$data = new Organisms;
|
||||
$inputData = $request->except(['id', 'tabel', '_token']);
|
||||
@@ -287,9 +288,11 @@ class TemplateController extends Controller
|
||||
$pesan = $request->name.' ('.$request->category.') Sudah ada, Mohon ubah Data sebelum simpan kembali';
|
||||
}
|
||||
} else {
|
||||
$ceksudah = Organisms::where('id', '!=', $id)->where('name', $request->name)->where('category', $request->category)->where('kelompok', $request->kelompok)->count();
|
||||
$ceksudah = Organisms::where('id', '!=', $id)->where('name', $request->name)->where('kelompok', $request->kelompok)->count();
|
||||
if ($ceksudah == 0){
|
||||
$data = Organisms::find($id);
|
||||
$kodelama = $data->category;
|
||||
$kodebaru = $request->category;
|
||||
$inputData = $request->except(['id', 'tabel', '_token']);
|
||||
$data->update($inputData);
|
||||
} else {
|
||||
@@ -297,6 +300,9 @@ class TemplateController extends Controller
|
||||
}
|
||||
}
|
||||
if ($data){
|
||||
if ($kodelama != ''){
|
||||
Periksa::where('kd_spesimen', $kodelama)->update(['kd_spesimen' => $kodebaru]);
|
||||
}
|
||||
return response()->json(['icon' => 'success', 'warna' => '#5ba035', 'status' => 'Success', 'message' => 'Saved']);
|
||||
return back();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user