This commit is contained in:
servdal
2025-08-27 15:29:56 +07:00
parent c7ecb66ba1
commit fef0acb867
10 changed files with 237 additions and 173 deletions

No files matched your search

@@ -1080,6 +1080,7 @@ class DokterController extends Controller
]);
}
}
$jsondata = json_decode($jsondata, true);
if(is_array($jsondata) && count($jsondata) > 0){
foreach ($jsondata as $item){
RekapAntibiotik::updateOrCreate(
@@ -1102,9 +1103,9 @@ class DokterController extends Controller
$gentabel = RekapAntibiotik::where('orderid', $orderid)->get();
if (!empty($gentabel)){
$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>';
$isidata = $isidata.'<br /><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>';
@@ -1328,10 +1329,10 @@ class DokterController extends Controller
$setval = $batasbawah;
}
if ($nomor == 1){
$tabel = '<table border="1" cellpadding="0" cellspacing="0" width="100%"><tr><td width="5%"><strong>No</strong></td><td width="20%"><strong>Antibiotik</strong></td><td width="20%"><strong>Sub</strong></td><td width="10%"><strong>Disc Content</strong></td><td width="5%"><strong>S/I/R</strong></td></tr><tr><td>'.$nomor.'</td><td>'.$getdata->antibiotik.'</td><td>'.$getdata->subantibiotik.'</td><td>'.$getdata->diskcontent.'</td><td>'.$setnilai.'</td></tr></table>';
$tabel = '<table border="1" cellpadding="0" cellspacing="0" width="100%"><tr><td width="5%"><strong>No</strong></td><td width="20%"><strong>Antibiotik</strong></td><td width="20%"><strong>Sub</strong></td><td width="10%"><strong>Disc Content</strong></td><td width="5%"><strong>S/I/R</strong></td></tr><tr><td>'.$nomor.'</td><td>'.$getdata->antibiotik.' '.$getdata->subantibiotik.'</td><td>'.$getdata->diskcontent.'</td><td>'.$setnilai.'</td></tr></table>';
} else {
$baris = '<tr><td>'.$nomor.'</td><td>'.$getdata->antibiotik.'</td><td>'.$getdata->subantibiotik.'</td><td>'.$getdata->diskcontent.'</td><td>'.$setnilai.'</td></tr>';
$baris = '<tr><td>'.$nomor.'</td><td>'.$getdata->antibiotik.' '.$getdata->subantibiotik.'</td><td>'.$getdata->diskcontent.'</td><td>'.$setnilai.'</td></tr>';
$tabel = str_replace('</table>', $baris, $tabelawal);
$tabel = $tabel.'</table>';
}
@@ -1730,6 +1731,36 @@ class DokterController extends Controller
'antibiotikall' => $antibiotikall,
);
}
/*
$getsirab = SiraB::orderBy('family', 'ASC')->orderBy('spesies', 'ASC')->where('cek', '1')->get();
foreach($getsirab as $row){
$family = $row->family;
$spesies= $row->spesies;
$getallantibiotik = SiraB::where('family', $family)->where('spesies', $spesies)->get();
foreach ($getallantibiotik as $row2){
SiraB::updateOrCreate(
[
'family' => $row->family,
'spesies' => $row->spesies,
'antibiotik' => $row2->antibiotik,
'subantibiotik' => $row2->subantibiotik,
],
[
'diskcontent' => $row2->diskcontent,
'batasatas' => $row2->batasatas,
'midrange' => $row2->midrange,
'batasbawah' => $row2->batasbawah,
'sumber' => $row2->sumber,
'kodedok' => $row2->kodedok,
'atu' => $row2->atu,
'kelompok' => $row2->kelompok,
'glassreportname' => trim($row2->glassreportname),
'cek' => '0',
]
);
}
}
*/
echo json_encode($arrayfiles);
} else if ($idpasien == 'Bakteri'){
$getsirab = Organisms::where('kelompok', 'biakankultur')->orderBy('category', 'ASC')->orderBy('name', 'ASC')->get();