Update
This commit is contained in:
@@ -1709,6 +1709,7 @@ class DokterController extends Controller
|
||||
$idpasien = $request->input('val01');
|
||||
$arrayfiles = [];
|
||||
if ($idpasien == 'sirab'){
|
||||
/*
|
||||
$jumlah = 0;
|
||||
$getklonin = SiraB::orderBy('family', 'ASC')->orderBy('spesies', 'ASC')->whereNull('cek')->get();
|
||||
foreach($getklonin as $row){
|
||||
@@ -1739,33 +1740,34 @@ class DokterController extends Controller
|
||||
}
|
||||
}
|
||||
echo $jumlah;
|
||||
/*
|
||||
$getsirab = SiraB::orderBy('family', 'ASC')->orderBy('spesies', 'ASC')->get();
|
||||
foreach($getsirab as $row){
|
||||
if ($row->subantibiotik !== null && $row->subantibiotik != ''){
|
||||
$antibiotikall = $row->subantibiotik;
|
||||
} else {
|
||||
$antibiotikall = $row->antibiotik;
|
||||
}
|
||||
$arrayfiles[] = array(
|
||||
'id' => $row->id,
|
||||
'family' => $row->family,
|
||||
'spesies' => $row->spesies,
|
||||
'antibiotik' => $row->antibiotik,
|
||||
'subantibiotik' => $row->subantibiotik,
|
||||
'diskcontent' => $row->diskcontent,
|
||||
'batasatas' => $row->batasatas,
|
||||
'midrange' => $row->midrange,
|
||||
'batasbawah' => $row->batasbawah,
|
||||
'sumber' => $row->sumber,
|
||||
'kodedok' => $row->kodedok,
|
||||
'atu' => $row->atu,
|
||||
'kelompok' => $row->kelompok,
|
||||
'antibiotikall' => $antibiotikall,
|
||||
);
|
||||
}
|
||||
echo json_encode($arrayfiles);
|
||||
*/
|
||||
$getsirab = SiraB::orderBy('family', 'ASC')
|
||||
->orderBy('spesies', 'ASC')
|
||||
->get()
|
||||
->map(function($row) {
|
||||
return [
|
||||
'id' => $row->id,
|
||||
'family' => $row->family,
|
||||
'spesies' => $row->spesies,
|
||||
'antibiotik' => $row->antibiotik,
|
||||
'subantibiotik' => $row->subantibiotik,
|
||||
'diskcontent' => $row->diskcontent,
|
||||
'batasatas' => $row->batasatas,
|
||||
'midrange' => $row->midrange,
|
||||
'batasbawah' => $row->batasbawah,
|
||||
'sumber' => $row->sumber,
|
||||
'kodedok' => $row->kodedok,
|
||||
'atu' => $row->atu,
|
||||
'kelompok' => $row->kelompok,
|
||||
'antibiotikall' => $row->subantibiotik !== null && $row->subantibiotik !== ''
|
||||
? $row->subantibiotik
|
||||
: $row->antibiotik,
|
||||
];
|
||||
})
|
||||
->toArray();
|
||||
|
||||
echo json_encode($getsirab);
|
||||
|
||||
} else if ($idpasien == 'Bakteri'){
|
||||
$getsirab = Organisms::where('kelompok', 'biakankultur')->orderBy('category', 'ASC')->orderBy('name', 'ASC')->get();
|
||||
echo json_encode($getsirab);
|
||||
|
||||
Reference in New Issue
Block a user