Update
This commit is contained in:
@@ -1062,25 +1062,31 @@ class DokterController extends Controller
|
||||
if ($request->input('isi') != 0){
|
||||
if ($request->input('komponen') == 'analis'){
|
||||
$analis = $request->input('isi');
|
||||
$getnama = User::where('id', $analis)->first();
|
||||
Periksa::where('nofoto', $nofoto)->update([
|
||||
'analis' => $analis,
|
||||
'nmanalis' => $getnama->nama ?? ''
|
||||
]);
|
||||
if ($analis){
|
||||
$getnama = User::where('id', $analis)->first();
|
||||
Periksa::where('nofoto', $nofoto)->update([
|
||||
'analis' => $analis,
|
||||
'nmanalis' => $getnama->nama ?? ''
|
||||
]);
|
||||
}
|
||||
} else if ($request->input('komponen') == 'ppds3'){
|
||||
$ppds3 = $request->input('isi');
|
||||
$getnama = User::where('id', $ppds3)->first();
|
||||
Periksa::where('nofoto', $nofoto)->update([
|
||||
'ppdssenior' => $ppds3,
|
||||
'nmppdssenior' => $getnama->nama ?? ''
|
||||
]);
|
||||
if ($ppds3){
|
||||
$getnama = User::where('id', $ppds3)->first();
|
||||
Periksa::where('nofoto', $nofoto)->update([
|
||||
'ppdssenior' => $ppds3,
|
||||
'nmppdssenior' => $getnama->nama ?? ''
|
||||
]);
|
||||
}
|
||||
} else {
|
||||
$dokter_id = $request->input('isi');
|
||||
$getnama = User::where('id', $dokter_id)->first();
|
||||
Periksa::where('nofoto', $nofoto)->update([
|
||||
'dokter_id' => $dokter_id,
|
||||
'nmdokter' => $getnama->nama ?? ''
|
||||
]);
|
||||
if ($dokter_id){
|
||||
$getnama = User::where('id', $dokter_id)->first();
|
||||
Periksa::where('nofoto', $nofoto)->update([
|
||||
'dokter_id' => $dokter_id,
|
||||
'nmdokter' => $getnama->nama ?? ''
|
||||
]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($request->input('komponen') == 'analis'){
|
||||
@@ -1406,6 +1412,62 @@ class DokterController extends Controller
|
||||
}
|
||||
return response()->json(['pesan' => $pesan, 'organism' => $organism]);
|
||||
return back();
|
||||
} else if ($worklist == 'generatetabelantibiotik'){
|
||||
$arraysurat = [];
|
||||
$i = 0;
|
||||
$data = new RekapAntibiotik();
|
||||
$limit = ($request->input('limit') == null ? '20' : $request->input('limit'));
|
||||
$order = ($request->input('order') == null ? 'id asc' : $request->input('order'));
|
||||
$data = $data->where('orderid', $nofoto);
|
||||
$data = $data->orderByRaw($order)->paginate($limit);
|
||||
$totaldata = $data->total();
|
||||
if ($data) {
|
||||
foreach($data as $rows){
|
||||
$arraysurat[$i] = $rows;
|
||||
$i++;
|
||||
}
|
||||
$response = [
|
||||
'message' => 'List Data Antibiotik',
|
||||
'total' => $totaldata,
|
||||
'data' => $arraysurat
|
||||
];
|
||||
return response()->json($response, 200);
|
||||
}
|
||||
$response = [
|
||||
'message' => 'No Data'
|
||||
];
|
||||
return response()->json($response, 500);
|
||||
} else if ($worklist == 'printunprinttblantibiotik'){
|
||||
try {
|
||||
if ($request->input('isi') == 'unprintrow'){
|
||||
RekapAntibiotik::where('id', $nofoto)->update([
|
||||
'printrow' => false
|
||||
]);
|
||||
}
|
||||
if ($request->input('isi') == 'printrow'){
|
||||
RekapAntibiotik::where('id', $nofoto)->update([
|
||||
'printrow' => true
|
||||
]);
|
||||
}
|
||||
if ($request->input('isi') == 'unprintmic'){
|
||||
RekapAntibiotik::where('id', $nofoto)->update([
|
||||
'printcol'=> false
|
||||
]);
|
||||
}
|
||||
if ($request->input('isi') == 'printmic'){
|
||||
RekapAntibiotik::where('id', $nofoto)->update([
|
||||
'printcol'=> true
|
||||
]);
|
||||
}
|
||||
|
||||
$pesan = 'Success';
|
||||
} catch (Exception $e) {
|
||||
$pesan = $e->getMessage();
|
||||
Log::error('Gagal Arsipkan Data.', [
|
||||
'message' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
return $pesan;
|
||||
} else if ($worklist == 'getbbachtect' OR $worklist == 'getmgit' OR $worklist == 'getabbot'){
|
||||
$isidata = $request->input('isi');
|
||||
try {
|
||||
@@ -1585,17 +1647,8 @@ class DokterController extends Controller
|
||||
$tabelawal = $request->input('tabelawal');
|
||||
$idtabel = $request->input('idtabel');
|
||||
$setnilai = $request->input('setnilai');
|
||||
$cekada = explode('</table', $tabelawal);
|
||||
if (isset($cekada[1])){
|
||||
$cekbaris = explode('</tr>', $tabelawal);
|
||||
$jumlahbaris= count($cekbaris);
|
||||
$nomor = $jumlahbaris - 1;
|
||||
} else {
|
||||
$nomor = 1;
|
||||
}
|
||||
$getdataawal = Periksa::where('nofoto', $nofoto)->first();
|
||||
$orderid = $getdataawal->id ?? 0;
|
||||
$tabel = '';
|
||||
$getdata = SiraB::where('id', $idtabel)->first();
|
||||
if (isset($getdata->id)){
|
||||
$batasatas = $getdata->batasatas;
|
||||
@@ -1608,14 +1661,7 @@ class DokterController extends Controller
|
||||
} else {
|
||||
$setval = $batasbawah;
|
||||
}
|
||||
if ($nomor == 1){
|
||||
$tabel = '<table border="1" cellpadding="0" cellspacing="0" width="80%"><tr><td style="text-align:center;" width="5%"><strong>No</strong></td><td style="text-align:center;" width="20%"><strong>Antibiotik</strong></td><td style="text-align:center;" width="20%"><strong>Sub</strong></td><td style="text-align:center;" width="10%"><strong>Disc Content</strong></td><td style="text-align:center;" width="5%"><strong>S/I/R</strong></td></tr><tr><td style="text-align:center;">'.$nomor.'</td><td>'.$getdata->antibiotik.'</td><td>'.$getdata->subantibiotik.'</td><td style="text-align:center;">'.$getdata->diskcontent.'</td><td style="text-align:center;">'.$setnilai.'</td></tr></table>';
|
||||
|
||||
} else {
|
||||
$baris = '<tr><td style="text-align:center;">'.$nomor.'</td><td>'.$getdata->antibiotik.'</td><td>'.$getdata->subantibiotik.'</td><td style="text-align:center;">'.$getdata->diskcontent.'</td><td style="text-align:center;">'.$setnilai.'</td></tr>';
|
||||
$tabel = str_replace('</table>', $baris, $tabelawal);
|
||||
$tabel = $tabel.'</table>';
|
||||
}
|
||||
|
||||
if ($orderid != 0){
|
||||
if ($getdata->subantibiotik !== null && $getdata->subantibiotik != ''){
|
||||
$antibiotik = $getdata->subantibiotik;
|
||||
@@ -1631,16 +1677,15 @@ class DokterController extends Controller
|
||||
'resistance' => $getdata->diskcontent,
|
||||
'value' => $setval,
|
||||
'interpretation' => $setnilai,
|
||||
'printrow' => true,
|
||||
'printcol' => false,
|
||||
'created_at' => $getdataawal->daftar ?? date('Y-m-d H:i:s'),
|
||||
'updated_at' => $getdataawal->akhir ?? date('Y-m-d H:i:s'),
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
Periksa::where('nofoto', $nofoto)->update([
|
||||
'keterangan' => $tabel
|
||||
]);
|
||||
return $tabel;
|
||||
return 'Success';
|
||||
} else {
|
||||
$periksa = Periksa::where('id', $idperiksa)->first();
|
||||
if (isset($periksa->id)){
|
||||
|
||||
@@ -265,7 +265,12 @@ class FrontpageController extends Controller
|
||||
}
|
||||
|
||||
// Kembalikan view dengan data
|
||||
return view('dokter.ppds', $data);
|
||||
if (Session::get('previlage') == 'developer'){
|
||||
return view('dokter.ppdsdeveloper', $data);
|
||||
} else {
|
||||
return view('dokter.ppds', $data);
|
||||
}
|
||||
|
||||
}
|
||||
public function pengambilan() {
|
||||
if (Session::get('previlage') == ''){
|
||||
|
||||
@@ -12,6 +12,7 @@ use App\DataListiner;
|
||||
use App\Periksa;
|
||||
use App\RekapAntibiotik;
|
||||
use App\PendaftaranOnListiner;
|
||||
use App\Organisms;
|
||||
|
||||
// Proses untuk Growth and Detection Result
|
||||
function processGrowthDetectionResult($rawData){
|
||||
@@ -289,10 +290,11 @@ class AstmMessageService
|
||||
|
||||
} else {
|
||||
if (!empty($mltrData)){
|
||||
$mulaikirim = 0;
|
||||
$tanggalmasuk = '';
|
||||
$tanggalkeluar = '';
|
||||
$parsedData = [
|
||||
$mulaikirim = 0;
|
||||
$tanggalmasuk = '';
|
||||
$tanggalkeluar = '';
|
||||
$organism = '';
|
||||
$parsedData = [
|
||||
'patient_info' => [],
|
||||
'antibiotics' => []
|
||||
];
|
||||
@@ -377,7 +379,8 @@ class AstmMessageService
|
||||
$resultSample->specimen_type = substr($field, 2);
|
||||
}
|
||||
if ($kodeduadigit == 'o2'){
|
||||
$resultSample->organism = substr($field, 2);
|
||||
$organism = substr($field, 2);
|
||||
$resultSample->organism = $organism;
|
||||
}
|
||||
if ($kodeduadigit == 's1'){
|
||||
$tanggalmasuk = substr($field, 2);
|
||||
@@ -411,6 +414,41 @@ class AstmMessageService
|
||||
$resultSample->save();
|
||||
if ($accession_number){
|
||||
$accession_number = substr($accession_number, 0, 9);
|
||||
if ($organism !== ''){
|
||||
$sudah = Organisms::where('name', $organism)->count();
|
||||
if ($sudah == 0){
|
||||
Organisms::create([
|
||||
'kelompok' => 'biakankultur',
|
||||
'name' => $organism,
|
||||
'category' => 'Vitek',
|
||||
]);
|
||||
}
|
||||
}
|
||||
$cekdataperiksa = Periksa::where('nofoto', $accession_number)->first();
|
||||
if (isset($cekdataperiksa->id)){
|
||||
if (is_array($parsedData['antibiotics'])) {
|
||||
foreach ($parsedData['antibiotics'] as $item) {
|
||||
$glassreportname = in_array($item['antibiotic_name'], $jsonantibiotik);
|
||||
RekapAntibiotik::updateOrCreate(
|
||||
[
|
||||
'orderid' => $cekdataperiksa->id,
|
||||
'antibiotic' => $item['antibiotic_name'],
|
||||
],
|
||||
[
|
||||
'resistance' => $item['resistance_note'] ?? null,
|
||||
'value' => $item['value'] ?? null,
|
||||
'interpretation' => $item['interpretation'] ?? null,
|
||||
'glassreportname' => $glassreportname,
|
||||
'printrow' => true,
|
||||
'printcol' => false,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s'),
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Periksa::where('nofoto', $accession_number)->update([
|
||||
'status' => 'Data Vitek di Terima',
|
||||
]);
|
||||
|
||||
@@ -131,7 +131,76 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@php
|
||||
$cekketerangan = explode('/table', $keterangan);
|
||||
@endphp
|
||||
|
||||
@if (!isset($cekketerangan[1]) && isset($antibiotiks) && $antibiotiks->isNotEmpty())
|
||||
@php
|
||||
// Filter antibiotik yang printrow == true
|
||||
$filtered = $antibiotiks->filter(function($row) {
|
||||
return $row->printrow;
|
||||
})->values(); // reset index
|
||||
|
||||
$total = $filtered->count();
|
||||
$half = ceil($total / 2);
|
||||
$left = $filtered->slice(0, $half)->values();
|
||||
$right = $filtered->slice($half)->values();
|
||||
@endphp
|
||||
<table style="width:100%" border="1" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><strong>No</strong></th>
|
||||
<th><strong>Antibiotik</strong></th>
|
||||
<th><strong>Value</strong></th>
|
||||
<th><strong>Interpretation</strong></th>
|
||||
<th> </th>
|
||||
<th><strong>No</strong></th>
|
||||
<th><strong>Antibiotik</strong></th>
|
||||
<th><strong>Value</strong></th>
|
||||
<th><strong>Interpretation</strong></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for ($i = 0; $i < $half; $i++)
|
||||
<tr>
|
||||
{{-- Kolom kiri --}}
|
||||
@if (isset($left[$i]))
|
||||
<td>{{ $i + 1 }}</td>
|
||||
<td>{{ $left[$i]->antibiotic }}</td>
|
||||
@if (isset($left[$i]->printcol))
|
||||
<td>{{ $left[$i]->value }}</td>
|
||||
@else
|
||||
<td> </td>
|
||||
@endif
|
||||
<td align="center">{{ $left[$i]->interpretation }}</td>
|
||||
@else
|
||||
<td colspan="4"> </td>
|
||||
@endif
|
||||
|
||||
<td> </td> {{-- Spacer kolom tengah --}}
|
||||
|
||||
{{-- Kolom kanan --}}
|
||||
@if (isset($right[$i]))
|
||||
<td>{{ $i + 1 + $half }}</td>
|
||||
<td>{{ $right[$i]->antibiotic }}</td>
|
||||
@if (isset($right[$i]->printcol))
|
||||
<td>{{ $right[$i]->value }}</td>
|
||||
@else
|
||||
<td> </td>
|
||||
@endif
|
||||
<td align="center">{{ $right[$i]->interpretation }}</td>
|
||||
@else
|
||||
<td colspan="4"> </td>
|
||||
@endif
|
||||
</tr>
|
||||
@endfor
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
|
||||
@if ($keterangan != '')
|
||||
|
||||
Komentar: <br /> {!! $keterangan !!}
|
||||
@endif
|
||||
</td>
|
||||
|
||||
@@ -83,7 +83,79 @@
|
||||
<td valign="top"> </td>
|
||||
<td valign="top" colspan="2"> </td>
|
||||
</tr>
|
||||
<tr><td colspan="8"> </td></tr>
|
||||
<tr>
|
||||
<td colspan="8">
|
||||
@php
|
||||
$cekketerangan = explode('/table', $keterangan);
|
||||
@endphp
|
||||
|
||||
@if (!isset($cekketerangan[1]) && isset($antibiotiks) && $antibiotiks->isNotEmpty())
|
||||
@php
|
||||
// Filter antibiotik yang printrow == true
|
||||
$filtered = $antibiotiks->filter(function($row) {
|
||||
return $row->printrow;
|
||||
})->values(); // reset index
|
||||
|
||||
$total = $filtered->count();
|
||||
$half = ceil($total / 2);
|
||||
$left = $filtered->slice(0, $half)->values();
|
||||
$right = $filtered->slice($half)->values();
|
||||
@endphp
|
||||
|
||||
<table style="width:100%" border="1" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><strong>No</strong></th>
|
||||
<th><strong>Antibiotik</strong></th>
|
||||
<th><strong>Value</strong></th>
|
||||
<th><strong>Interpretation</strong></th>
|
||||
<th> </th>
|
||||
<th><strong>No</strong></th>
|
||||
<th><strong>Antibiotik</strong></th>
|
||||
<th><strong>Value</strong></th>
|
||||
<th><strong>Interpretation</strong></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for ($i = 0; $i < $half; $i++)
|
||||
<tr>
|
||||
{{-- Kolom kiri --}}
|
||||
@if (isset($left[$i]))
|
||||
<td>{{ $i + 1 }}</td>
|
||||
<td>{{ $left[$i]->antibiotic }}</td>
|
||||
@if (isset($left[$i]->printcol))
|
||||
<td>{{ $left[$i]->value }}</td>
|
||||
@else
|
||||
<td> </td>
|
||||
@endif
|
||||
<td align="center">{{ $left[$i]->interpretation }}</td>
|
||||
@else
|
||||
<td colspan="4"> </td>
|
||||
@endif
|
||||
|
||||
<td> </td> {{-- Spacer kolom tengah --}}
|
||||
|
||||
{{-- Kolom kanan --}}
|
||||
@if (isset($right[$i]))
|
||||
<td>{{ $i + 1 + $half }}</td>
|
||||
<td>{{ $right[$i]->antibiotic }}</td>
|
||||
@if (isset($right[$i]->printcol))
|
||||
<td>{{ $right[$i]->value }}</td>
|
||||
@else
|
||||
<td> </td>
|
||||
@endif
|
||||
<td align="center">{{ $right[$i]->interpretation }}</td>
|
||||
@else
|
||||
<td colspan="4"> </td>
|
||||
@endif
|
||||
</tr>
|
||||
@endfor
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="45"> </td>
|
||||
<td valign="top" colspan="7" width="755">
|
||||
|
||||
@@ -9,12 +9,14 @@
|
||||
<body>
|
||||
@php
|
||||
$data = [];
|
||||
$keterangan = $periksa->keterangan;
|
||||
$data['keterangan'] = $periksa->keterangan;
|
||||
if (!empty($komponens)) {
|
||||
foreach ($komponens as $rows) {
|
||||
$key = trim($rows->komponen);
|
||||
if (!empty($key)) {
|
||||
if ($key == 'keterangan') {
|
||||
|
||||
} else {
|
||||
$data[$key] = $rows->isidata;
|
||||
}
|
||||
@@ -357,6 +359,75 @@
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
@php
|
||||
$cekketerangan = explode('/table', $keterangan);
|
||||
@endphp
|
||||
|
||||
@if (!isset($cekketerangan[1]) && isset($antibiotiks) && $antibiotiks->isNotEmpty())
|
||||
@php
|
||||
// Filter antibiotik yang printrow == true
|
||||
$filtered = $antibiotiks->filter(function($row) {
|
||||
return $row->printrow;
|
||||
})->values(); // reset index
|
||||
|
||||
$total = $filtered->count();
|
||||
$half = ceil($total / 2);
|
||||
$left = $filtered->slice(0, $half)->values();
|
||||
$right = $filtered->slice($half)->values();
|
||||
@endphp
|
||||
|
||||
<table style="width:100%" border="1" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><strong>No</strong></th>
|
||||
<th><strong>Antibiotik</strong></th>
|
||||
<th><strong>Value</strong></th>
|
||||
<th><strong>Interpretation</strong></th>
|
||||
<th> </th>
|
||||
<th><strong>No</strong></th>
|
||||
<th><strong>Antibiotik</strong></th>
|
||||
<th><strong>Value</strong></th>
|
||||
<th><strong>Interpretation</strong></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for ($i = 0; $i < $half; $i++)
|
||||
<tr>
|
||||
{{-- Kolom kiri --}}
|
||||
@if (isset($left[$i]))
|
||||
<td>{{ $i + 1 }}</td>
|
||||
<td>{{ $left[$i]->antibiotic }}</td>
|
||||
@if (isset($left[$i]->printcol))
|
||||
<td>{{ $left[$i]->value }}</td>
|
||||
@else
|
||||
<td> </td>
|
||||
@endif
|
||||
<td align="center">{{ $left[$i]->interpretation }}</td>
|
||||
@else
|
||||
<td colspan="4"> </td>
|
||||
@endif
|
||||
|
||||
<td> </td> {{-- Spacer kolom tengah --}}
|
||||
|
||||
{{-- Kolom kanan --}}
|
||||
@if (isset($right[$i]))
|
||||
<td>{{ $i + 1 + $half }}</td>
|
||||
<td>{{ $right[$i]->antibiotic }}</td>
|
||||
@if (isset($right[$i]->printcol))
|
||||
<td>{{ $right[$i]->value }}</td>
|
||||
@else
|
||||
<td> </td>
|
||||
@endif
|
||||
<td align="center">{{ $right[$i]->interpretation }}</td>
|
||||
@else
|
||||
<td colspan="4"> </td>
|
||||
@endif
|
||||
</tr>
|
||||
@endfor
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
|
||||
@if (isset($data['keterangan']))
|
||||
@php
|
||||
if (isset($data['id_kbamc'])){
|
||||
|
||||
@@ -211,6 +211,75 @@
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
@php
|
||||
$cekketerangan = explode('/table', $keterangan);
|
||||
@endphp
|
||||
|
||||
@if (!isset($cekketerangan[1]) && isset($antibiotiks) && $antibiotiks->isNotEmpty())
|
||||
@php
|
||||
// Filter antibiotik yang printrow == true
|
||||
$filtered = $antibiotiks->filter(function($row) {
|
||||
return $row->printrow;
|
||||
})->values(); // reset index
|
||||
|
||||
$total = $filtered->count();
|
||||
$half = ceil($total / 2);
|
||||
$left = $filtered->slice(0, $half)->values();
|
||||
$right = $filtered->slice($half)->values();
|
||||
@endphp
|
||||
|
||||
<table style="width:100%" border="1" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><strong>No</strong></th>
|
||||
<th><strong>Antibiotik</strong></th>
|
||||
<th><strong>Value</strong></th>
|
||||
<th><strong>Interpretation</strong></th>
|
||||
<th> </th>
|
||||
<th><strong>No</strong></th>
|
||||
<th><strong>Antibiotik</strong></th>
|
||||
<th><strong>Value</strong></th>
|
||||
<th><strong>Interpretation</strong></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for ($i = 0; $i < $half; $i++)
|
||||
<tr>
|
||||
{{-- Kolom kiri --}}
|
||||
@if (isset($left[$i]))
|
||||
<td>{{ $i + 1 }}</td>
|
||||
@if (isset($left[$i]->printcol))
|
||||
<td>{{ $left[$i]->value }}</td>
|
||||
@else
|
||||
<td> </td>
|
||||
@endif
|
||||
<td>{{ $left[$i]->value }}</td>
|
||||
<td align="center">{{ $left[$i]->interpretation }}</td>
|
||||
@else
|
||||
<td colspan="4"> </td>
|
||||
@endif
|
||||
|
||||
<td> </td> {{-- Spacer kolom tengah --}}
|
||||
|
||||
{{-- Kolom kanan --}}
|
||||
@if (isset($right[$i]))
|
||||
<td>{{ $i + 1 + $half }}</td>
|
||||
<td>{{ $right[$i]->antibiotic }}</td>
|
||||
@if (isset($right[$i]->printcol))
|
||||
<td>{{ $right[$i]->value }}</td>
|
||||
@else
|
||||
<td> </td>
|
||||
@endif
|
||||
<td align="center">{{ $right[$i]->interpretation }}</td>
|
||||
@else
|
||||
<td colspan="4"> </td>
|
||||
@endif
|
||||
</tr>
|
||||
@endfor
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
|
||||
@if ($keterangan != '')
|
||||
Komentar: <br /> {!! $keterangan !!}
|
||||
@endif
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
@php
|
||||
$data = [];
|
||||
$data['keterangan'] = $periksa->keterangan;
|
||||
|
||||
$keterangan = $periksa->keterangan;
|
||||
if (!empty($komponens)) {
|
||||
foreach ($komponens as $rows) {
|
||||
$key = trim($rows->komponen);
|
||||
@@ -169,6 +169,75 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@php
|
||||
$cekketerangan = explode('/table', $keterangan);
|
||||
@endphp
|
||||
|
||||
@if (!isset($cekketerangan[1]) && isset($antibiotiks) && $antibiotiks->isNotEmpty())
|
||||
@php
|
||||
// Filter antibiotik yang printrow == true
|
||||
$filtered = $antibiotiks->filter(function($row) {
|
||||
return $row->printrow;
|
||||
})->values(); // reset index
|
||||
|
||||
$total = $filtered->count();
|
||||
$half = ceil($total / 2);
|
||||
$left = $filtered->slice(0, $half)->values();
|
||||
$right = $filtered->slice($half)->values();
|
||||
@endphp
|
||||
|
||||
<table style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><strong>No</strong></th>
|
||||
<th><strong>Antibiotik</strong></th>
|
||||
<th><strong>Value</strong></th>
|
||||
<th><strong>Interpretation</strong></th>
|
||||
<th> </th>
|
||||
<th><strong>No</strong></th>
|
||||
<th><strong>Antibiotik</strong></th>
|
||||
<th><strong>Value</strong></th>
|
||||
<th><strong>Interpretation</strong></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for ($i = 0; $i < $half; $i++)
|
||||
<tr>
|
||||
{{-- Kolom kiri --}}
|
||||
@if (isset($left[$i]))
|
||||
<td>{{ $i + 1 }}</td>
|
||||
<td>{{ $left[$i]->antibiotic }}</td>
|
||||
@if (isset($left[$i]->printcol))
|
||||
<td>{{ $left[$i]->value }}</td>
|
||||
@else
|
||||
<td> </td>
|
||||
@endif
|
||||
<td align="center">{{ $left[$i]->interpretation }}</td>
|
||||
@else
|
||||
<td colspan="4"> </td>
|
||||
@endif
|
||||
|
||||
<td> </td> {{-- Spacer kolom tengah --}}
|
||||
|
||||
{{-- Kolom kanan --}}
|
||||
@if (isset($right[$i]))
|
||||
<td>{{ $i + 1 + $half }}</td>
|
||||
<td>{{ $right[$i]->antibiotic }}</td>
|
||||
@if (isset($right[$i]->printcol))
|
||||
<td>{{ $right[$i]->value }}</td>
|
||||
@else
|
||||
<td> </td>
|
||||
@endif
|
||||
<td align="center">{{ $right[$i]->interpretation }}</td>
|
||||
@else
|
||||
<td colspan="4"> </td>
|
||||
@endif
|
||||
</tr>
|
||||
@endfor
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
|
||||
Komentar:<br />
|
||||
@if (isset($data['viralload']))
|
||||
{!! $data['viralload'] !!}
|
||||
|
||||
@@ -1872,9 +1872,11 @@
|
||||
</div>
|
||||
<div class="form-group setelahdipilihtemplate">
|
||||
<div class="form-group account-btn text-center m-t-10">
|
||||
<!--
|
||||
<button type="button" class="btn btn-light waves-effect" id="btnviewvitek">
|
||||
<i class="mdi mdi-alpha-v-box mr-1"></i> Vitek
|
||||
</button>
|
||||
-->
|
||||
<button type="button" class="btn btn-light waves-effect" id="btnbachtect">
|
||||
<i class="mdi mdi-alpha-b-box mr-1"></i> BachTech
|
||||
</button>
|
||||
@@ -1891,18 +1893,39 @@
|
||||
<i class="mdi mdi-alphabetical-variant mr-1"></i> SIR Ab
|
||||
</button>
|
||||
</div>
|
||||
<div class="form-group col-lg-12 table-responsive p-0">
|
||||
<table class="table table-striped table-valign-middle" id="tblvitek">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Print </th>
|
||||
<th>Antibiotik</th>
|
||||
<th>Value</th>
|
||||
<th>Interpretation</th>
|
||||
<th>Print Value.?</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group col-lg-12" id="sirabketerangan">
|
||||
<div id="gridsirab"></div>
|
||||
</div>
|
||||
<div class="form-group col-lg-12">
|
||||
<label for="keterangan" class="col-form-label">Expertise</label>
|
||||
<textarea id="keterangan" style="width: 100%; height: 300px;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group setelahdipilihtemplate">
|
||||
<input type="hidden" id="periksa_id" name="periksa_id">
|
||||
<button type="button" id="btnkembali" class="btn btn-primary">Back</button>
|
||||
<button type="button" id="btnsendexpertisetopacs" class="btn btn-warning pull-right">Final Expertise</button>
|
||||
<button type="button" id="btnsavedraft" class="btn btn-success pull-right">Save as Draft</button>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-lg-3">
|
||||
<input type="hidden" id="periksa_id" name="periksa_id">
|
||||
<button type="button" id="btnkembali" class="btn btn-primary">Back</button>
|
||||
</div>
|
||||
<div class="form-group col-lg-9 setelahdipilihtemplate">
|
||||
<button type="button" id="btnsendexpertisetopacs" class="btn btn-warning pull-right">Final Expertise</button>
|
||||
<button type="button" id="btnsavedraft" class="btn btn-success pull-right">Save as Draft</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group setelahdipilihtemplate">
|
||||
<div id="gridadendum"></div>
|
||||
@@ -2149,6 +2172,34 @@
|
||||
|
||||
@push('script')
|
||||
<script type="text/javascript">
|
||||
function btnUnprintRow(id){
|
||||
$.post('{{ route("getResult") }}', { nofoto: id, komponen: '', isi: 'unprintrow', keterangan: 'printunprinttblantibiotik', _token: '{{ csrf_token() }}' },
|
||||
function(data){
|
||||
$("#tblvitek").DataTable().ajax.reload();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
function btnPrintRow(id){
|
||||
$.post('{{ route("getResult") }}', { nofoto: id, komponen: '', isi: 'printrow', keterangan: 'printunprinttblantibiotik', _token: '{{ csrf_token() }}' },
|
||||
function(data){
|
||||
$("#tblvitek").DataTable().ajax.reload();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
function btnUnprintMic(id){
|
||||
$.post('{{ route("getResult") }}', { nofoto: id, komponen: '', isi: 'unprintmic', keterangan: 'printunprinttblantibiotik', _token: '{{ csrf_token() }}' },
|
||||
function(data){
|
||||
$("#tblvitek").DataTable().ajax.reload();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
function btnPrintMic(id){
|
||||
$.post('{{ route("getResult") }}', { nofoto: id, komponen: '', isi: 'printmic', keterangan: 'printunprinttblantibiotik', _token: '{{ csrf_token() }}' },
|
||||
function(data){
|
||||
$("#tblvitek").DataTable().ajax.reload();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
function openlamanekpertise( jQuery ){
|
||||
var dlp = document.getElementById('dlp').value;
|
||||
var nofoto = document.getElementById('nofoto').value;
|
||||
@@ -2643,7 +2694,7 @@
|
||||
contentType : false,
|
||||
processData : false,
|
||||
success : function (response) {
|
||||
CKEDITOR.instances['keterangan'].setData(response);
|
||||
$("#tblvitek").DataTable().ajax.reload();
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
var response = xhr.responseJSON || {};
|
||||
@@ -2674,7 +2725,7 @@
|
||||
contentType : false,
|
||||
processData : false,
|
||||
success : function (response) {
|
||||
CKEDITOR.instances['keterangan'].setData(response);
|
||||
$("#tblvitek").DataTable().ajax.reload();
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
var response = xhr.responseJSON || {};
|
||||
@@ -2705,7 +2756,7 @@
|
||||
contentType : false,
|
||||
processData : false,
|
||||
success : function (response) {
|
||||
CKEDITOR.instances['keterangan'].setData(response);
|
||||
$("#tblvitek").DataTable().ajax.reload();
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
var response = xhr.responseJSON || {};
|
||||
@@ -2720,6 +2771,126 @@
|
||||
$.post('{{ route("exCekAksess") }}', { nofoto: 'stiker', noregister: dataRecord.noregister, daftartgl: dataRecord.daftartgl, nm_spesimen: dataRecord.nm_spesimen, _token: token },
|
||||
function(data){
|
||||
|
||||
});
|
||||
if ( $.fn.DataTable.isDataTable('#tblvitek') ) {
|
||||
$('#tblvitek').DataTable().clear().destroy();
|
||||
}
|
||||
$('#tblvitek').DataTable({
|
||||
ajax : function(data, callback, settings) {
|
||||
$.ajax({
|
||||
url: '{{ route("getResult") }}',
|
||||
data: {
|
||||
limit : settings._iDisplayLength,
|
||||
page : Math.ceil(settings._iDisplayStart / settings._iDisplayLength) + 1,
|
||||
nofoto : dataRecord.id,
|
||||
jenis : 'tabelvitek',
|
||||
komponen : 'all',
|
||||
isi : '',
|
||||
keterangan : 'generatetabelantibiotik',
|
||||
_token : '{{ csrf_token() }}'
|
||||
},
|
||||
type: "POST",
|
||||
success: function(res) {
|
||||
callback({
|
||||
recordsTotal : res.total,
|
||||
recordsFiltered : res.total,
|
||||
data : res.data
|
||||
});
|
||||
},
|
||||
})
|
||||
},
|
||||
searching : false,
|
||||
autoWidth : false,
|
||||
serverSide : true,
|
||||
columnDefs : [
|
||||
{
|
||||
targets : 0,
|
||||
responsivePriority : 4,
|
||||
render : function (data, type, full, meta) {
|
||||
var $id = full['id'];
|
||||
var $printrow = full['printrow'];
|
||||
if ($printrow || $printrow == 1){
|
||||
var button = '<a class="btn btn-sm btn-success" href="#" data-bs-toggle="tooltip" data-bs-placement="top" title="Click to Remove Print Row" onClick="btnUnprintRow('+$id+')"><i class="fa fa-check"></i></a>';
|
||||
} else {
|
||||
var button = '<a class="btn btn-sm btn-danger" href="#" data-bs-toggle="tooltip" data-bs-placement="top" title="Click to Set Print Row" onClick="btnPrintRow('+$id+')"><i class="fa fa-ban"></i></a>';
|
||||
}
|
||||
return button;
|
||||
}
|
||||
},
|
||||
{
|
||||
targets : 1,
|
||||
responsivePriority : 4,
|
||||
render : function (data, type, full, meta) {
|
||||
return full['antibiotic'];
|
||||
}
|
||||
},
|
||||
{
|
||||
targets : 2,
|
||||
responsivePriority : 4,
|
||||
render : function (data, type, full, meta) {
|
||||
return full['value'];
|
||||
}
|
||||
},
|
||||
{
|
||||
targets : 3,
|
||||
responsivePriority : 4,
|
||||
render : function (data, type, full, meta) {
|
||||
return full['interpretation'];
|
||||
}
|
||||
},
|
||||
{
|
||||
targets : 4,
|
||||
responsivePriority : 4,
|
||||
render : function (data, type, full, meta) {
|
||||
var $id = full['id'];
|
||||
var $printcol = full['printcol'];
|
||||
if ($printcol || $printcol == 1){
|
||||
var button = '<a class="btn btn-sm btn-success" href="#" data-bs-toggle="tooltip" data-bs-placement="top" title="Click to Remove Print MIC" onClick="btnUnprintMic('+$id+')"><i class="fa fa-check"></i></a>';
|
||||
} else {
|
||||
var button = '<a class="btn btn-sm btn-danger" href="#" data-bs-toggle="tooltip" data-bs-placement="top" title="Click to Set Print MIC" onClick="btnPrintMic('+$id+')"><i class="fa fa-ban"></i></a>';
|
||||
}
|
||||
return button;
|
||||
}
|
||||
},
|
||||
],
|
||||
order : [[ 1, "asc" ]],
|
||||
dom: '<"row d-flex justify-content-between align-items-center m-1"' +
|
||||
'<"col-lg-6 d-flex align-items-center"l>' +
|
||||
'<"col-lg-6 d-flex align-items-center justify-content-lg-end flex-lg-nowrap flex-wrap pe-lg-1 p-0"f<"invoice_status ms-sm-2">>' +
|
||||
'>t' +
|
||||
'<"d-flex justify-content-between mx-2 row"' +
|
||||
'<"col-sm-12 col-md-6"i>' +
|
||||
'<"col-sm-12 col-md-6"p>' +
|
||||
'>',
|
||||
language: {
|
||||
'lengthMenu': 'Display _MENU_',
|
||||
},
|
||||
responsive: {
|
||||
details: {
|
||||
display : $.fn.dataTable.Responsive.display.modal({
|
||||
header: function (row) {
|
||||
var data = row.data();
|
||||
return 'Details of ' + data['matpel'];
|
||||
}
|
||||
}),
|
||||
type : 'column',
|
||||
renderer: function (api, rowIdx, columns) {
|
||||
var data = $.map(columns, function (col, i) {
|
||||
return col.columnIndex !== 2
|
||||
? '<tr data-dt-row="' + col.rowIdx +'" data-dt-column="' + col.columnIndex +'">' +
|
||||
'<td>' +col.title + ':' + '</td> ' +
|
||||
'<td>' +col.data +'</td>' +
|
||||
'</tr>'
|
||||
: '';
|
||||
}).join('');
|
||||
return data ? $('<table class="table"/>').append('<tbody>' + data + '</tbody>') : false;
|
||||
}
|
||||
}
|
||||
},
|
||||
initComplete: function () {
|
||||
},
|
||||
drawCallback: function () {
|
||||
}
|
||||
});
|
||||
if (statuse === null) {
|
||||
$('#divperiksa').show();
|
||||
@@ -2847,41 +3018,6 @@
|
||||
$('#divperiksa').hide();
|
||||
$('#divreadonly').hide();
|
||||
$('#divawal').show();
|
||||
$("#gridpemeriksaan").jqxGrid('updatebounddata', 'filter');
|
||||
});
|
||||
$("#btncancel").click(function() {
|
||||
var set01 = document.getElementById('id_alasanpembatan').value;
|
||||
var set05 = document.getElementById('periksa_id').value;
|
||||
var token = document.getElementById('token').value;
|
||||
if (set01 == ''){
|
||||
swal({
|
||||
title : 'Mohon Di Isi?',
|
||||
text : "Alasan Wajib di Isi",
|
||||
type : 'warning',
|
||||
});
|
||||
} else {
|
||||
$("#modalpembatalan").modal('hide');
|
||||
$.post('{{ route("cancelPACSorder") }}', { val01: set01, val05: set05, _token: token },
|
||||
function(data){
|
||||
var status = data.status;
|
||||
var message = data.message;
|
||||
$('#divperiksa').hide();
|
||||
$('#divawal').show();
|
||||
$("#gridpemeriksaan").jqxGrid('updatebounddata', 'filter');
|
||||
$.toast({
|
||||
heading : status,
|
||||
text : message,
|
||||
position : 'top-right',
|
||||
loaderBg : warna,
|
||||
icon : icon,
|
||||
hideAfter : 5000,
|
||||
stack : 1
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
$("#btnopenmodalcancel").click(function() {
|
||||
$("#modalpembatalan").modal('show');
|
||||
});
|
||||
$("#btnshowtemplate").click(function() {
|
||||
$('#divtemplate').show();
|
||||
@@ -3016,63 +3152,7 @@
|
||||
hideAfter : 5000,
|
||||
stack : 1
|
||||
});
|
||||
$('#divperiksa').hide();
|
||||
$('#divawal').show();
|
||||
$("#gridpemeriksaan").jqxGrid('updatebounddata', 'filter');
|
||||
return false;
|
||||
});
|
||||
}
|
||||
});
|
||||
$("#btnSavePeriksa").click(function(){
|
||||
var nofoto = document.getElementById('nofoto').value;
|
||||
var ruangan = document.getElementById('ruangan').value;
|
||||
var dokter = document.getElementById('dokter').value;
|
||||
var keterangan = CKEDITOR.instances['keterangan'].getData();
|
||||
var kesimpulan = CKEDITOR.instances['kesimpulan'].getData();
|
||||
var periksa_id = document.getElementById('periksa_id').value;
|
||||
var set01 = document.getElementById('template_jenis').value;
|
||||
var set02 = 'Send';
|
||||
var set07 = '1';
|
||||
var set09 = document.getElementById('modaliti').value;
|
||||
var set10 = document.getElementById('template_jenis').value;
|
||||
var set11 = document.getElementById('ppds1').value;
|
||||
var set12 = document.getElementById('ppds2').value;
|
||||
var set13 = document.getElementById('ppds3').value;
|
||||
var set14 = document.getElementById('kave').value;
|
||||
var set15 = document.getElementById('mas').value;
|
||||
var set16 = document.getElementById('diagnosa2').value;
|
||||
var set17 = document.getElementById('klinis').value;
|
||||
var set18 = document.getElementById('klinisi').value;
|
||||
var set19 = document.getElementById('berat').value;
|
||||
var set20 = document.getElementById('otheras').value;
|
||||
var set21 = document.getElementById('otherppds').value;
|
||||
var analis = document.getElementById('analis').value;
|
||||
var token = document.getElementById('token').value;
|
||||
if (dokter == 'Pilih' || dokter == '' || dokter == '0' || dokter == null){
|
||||
swal({
|
||||
title : 'Stop',
|
||||
text : 'Please Select SPV',
|
||||
type : 'warning',
|
||||
})
|
||||
} else {
|
||||
$.post('{{ route("exexpertise") }}', { nofoto: nofoto, analis: analis, ruangan: ruangan, dokter: dokter, keterangan: keterangan, kesimpulan: kesimpulan, periksa_id: periksa_id, val01: set01, val02: set02, val07: set07, val09: set09, val10: set10, val11: set11, val12: set12, val13: set13, val14: set14, val15: set15, val16: set16, val17: set17, val18: set18, val19: set19, val20: set20, val21: set21, _token: token },
|
||||
function(data){
|
||||
var status = data.status;
|
||||
var message = data.message;
|
||||
var warna = data.warna;
|
||||
var icon = data.icon;
|
||||
$.toast({
|
||||
heading : status,
|
||||
text : message,
|
||||
position : 'top-right',
|
||||
loaderBg : warna,
|
||||
icon : icon,
|
||||
hideAfter : 5000,
|
||||
stack : 1
|
||||
});
|
||||
$('#divperiksa').hide();
|
||||
$('#divawal').show();
|
||||
$("#gridpemeriksaan").jqxGrid('updatebounddata', 'filter');
|
||||
window.location.href = "{{ url('/reportppds') }}";
|
||||
return false;
|
||||
});
|
||||
}
|
||||
@@ -3124,9 +3204,6 @@
|
||||
hideAfter : 5000,
|
||||
stack : 1
|
||||
});
|
||||
$('#divperiksa').hide();
|
||||
$('#divawal').show();
|
||||
$("#gridpemeriksaan").jqxGrid('updatebounddata', 'filter');
|
||||
return false;
|
||||
});
|
||||
}
|
||||
@@ -3176,43 +3253,6 @@
|
||||
},
|
||||
]
|
||||
});
|
||||
$("#btnmultisendsitu").click(function(){
|
||||
var rowsgridcetak = $("#gridpemeriksaan").jqxGrid('selectedrowindexes');
|
||||
var selectedRecords = new Array();
|
||||
for (var m = 0; m < rowsgridcetak.length; m++) {
|
||||
var row = $("#gridpemeriksaan").jqxGrid('getrowdata', rowsgridcetak[m]);
|
||||
selectedRecords.push(row.id);
|
||||
}
|
||||
if (m == '0'){
|
||||
swal({
|
||||
title: 'Stop',
|
||||
text: 'Please Select Patient First',
|
||||
type: 'warning',
|
||||
})
|
||||
} else {
|
||||
var token = document.getElementById('token').value;
|
||||
$.post('{{ route("exsendtoinsitu") }}', { set01: selectedRecords, _token: token },
|
||||
function(data){
|
||||
var status = data.status;
|
||||
var message = data.message;
|
||||
var warna = data.warna;
|
||||
var icon = data.icon;
|
||||
$.toast({
|
||||
heading: status,
|
||||
text: message,
|
||||
position: 'top-right',
|
||||
loaderBg: warna,
|
||||
icon: icon,
|
||||
hideAfter: 3000,
|
||||
stack: 1
|
||||
});
|
||||
setTimeout(function () {
|
||||
location.reload();
|
||||
}, 3000);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
});
|
||||
$("#btnviewcustom").click(function() {
|
||||
var mulai=document.getElementById('mulai').value;
|
||||
var akhir=document.getElementById('akhir').value;
|
||||
|
||||
@@ -1920,9 +1920,11 @@
|
||||
</div>
|
||||
<div class="form-group setelahdipilihtemplate">
|
||||
<div class="form-group account-btn text-center m-t-10">
|
||||
<!--
|
||||
<button type="button" class="btn btn-light waves-effect" id="btnviewvitek">
|
||||
<i class="mdi mdi-alpha-v-box mr-1"></i> Vitek
|
||||
</button>
|
||||
-->
|
||||
<button type="button" class="btn btn-light waves-effect" id="btnbachtect">
|
||||
<i class="mdi mdi-alpha-b-box mr-1"></i> BachTech
|
||||
</button>
|
||||
@@ -1939,6 +1941,22 @@
|
||||
<i class="mdi mdi-alphabetical-variant mr-1"></i> SIR Ab
|
||||
</button>
|
||||
</div>
|
||||
<div class="form-group col-lg-12 table-responsive p-0">
|
||||
<table class="table table-striped table-valign-middle" id="tblvitek">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Print </th>
|
||||
<th>Antibiotik</th>
|
||||
<th>Value</th>
|
||||
<th>Interpretation</th>
|
||||
<th>Print Value.?</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group col-lg-12" id="sirabketerangan">
|
||||
<div id="gridsirab"></div>
|
||||
</div>
|
||||
@@ -1946,15 +1964,19 @@
|
||||
<textarea id="keterangan" style="width: 100%; height: 300px;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group setelahdipilihtemplate">
|
||||
<input type="hidden" id="periksa_id" name="periksa_id">
|
||||
<button type="button" id="btnkembali" class="btn btn-primary">Back</button>
|
||||
@if (Session('previlage') == 'supervisor' OR Session('previlage') == 'developer')
|
||||
<button type="button" id="btnsendexpertisetopacs" class="btn btn-warning pull-right">Save Final Result</button>
|
||||
@else
|
||||
<button type="button" id="btnSavePeriksa" class="btn btn-warning pull-right">Save and Send To SPV</button>
|
||||
@endif
|
||||
<button type="button" id="btnsavedraft" class="btn btn-success pull-right">Save as Draft</button>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-lg-3">
|
||||
<input type="hidden" id="periksa_id" name="periksa_id">
|
||||
<button type="button" id="btnkembali" class="btn btn-primary">Back</button>
|
||||
</div>
|
||||
<div class="form-group col-lg-9 setelahdipilihtemplate">
|
||||
@if (Session('previlage') == 'supervisor' OR Session('previlage') == 'developer')
|
||||
<button type="button" id="btnsendexpertisetopacs" class="btn btn-warning pull-right">Save Final Result</button>
|
||||
@else
|
||||
<button type="button" id="btnSavePeriksa" class="btn btn-warning pull-right">Save and Send To SPV</button>
|
||||
@endif
|
||||
<button type="button" id="btnsavedraft" class="btn btn-success pull-right">Save as Draft</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group setelahdipilihtemplate">
|
||||
<div id="gridadendum"></div>
|
||||
@@ -2218,7 +2240,34 @@
|
||||
@endsection
|
||||
@push('script')
|
||||
<script type="text/javascript">
|
||||
|
||||
function btnUnprintRow(id){
|
||||
$.post('{{ route("getResult") }}', { nofoto: id, komponen: '', isi: 'unprintrow', keterangan: 'printunprinttblantibiotik', _token: '{{ csrf_token() }}' },
|
||||
function(data){
|
||||
$("#tblvitek").DataTable().ajax.reload();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
function btnPrintRow(id){
|
||||
$.post('{{ route("getResult") }}', { nofoto: id, komponen: '', isi: 'printrow', keterangan: 'printunprinttblantibiotik', _token: '{{ csrf_token() }}' },
|
||||
function(data){
|
||||
$("#tblvitek").DataTable().ajax.reload();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
function btnUnprintMic(id){
|
||||
$.post('{{ route("getResult") }}', { nofoto: id, komponen: '', isi: 'unprintmic', keterangan: 'printunprinttblantibiotik', _token: '{{ csrf_token() }}' },
|
||||
function(data){
|
||||
$("#tblvitek").DataTable().ajax.reload();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
function btnPrintMic(id){
|
||||
$.post('{{ route("getResult") }}', { nofoto: id, komponen: '', isi: 'printmic', keterangan: 'printunprinttblantibiotik', _token: '{{ csrf_token() }}' },
|
||||
function(data){
|
||||
$("#tblvitek").DataTable().ajax.reload();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
function openlamanekpertise( jQuery ){
|
||||
var dlp = document.getElementById('dlp').value;
|
||||
var nofoto = document.getElementById('nofoto').value;
|
||||
@@ -2750,7 +2799,7 @@
|
||||
contentType : false,
|
||||
processData : false,
|
||||
success : function (response) {
|
||||
CKEDITOR.instances['keterangan'].setData(response);
|
||||
$("#tblvitek").DataTable().ajax.reload();
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
var response = xhr.responseJSON || {};
|
||||
@@ -2781,7 +2830,7 @@
|
||||
contentType : false,
|
||||
processData : false,
|
||||
success : function (response) {
|
||||
CKEDITOR.instances['keterangan'].setData(response);
|
||||
$("#tblvitek").DataTable().ajax.reload();
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
var response = xhr.responseJSON || {};
|
||||
@@ -2812,7 +2861,7 @@
|
||||
contentType : false,
|
||||
processData : false,
|
||||
success : function (response) {
|
||||
CKEDITOR.instances['keterangan'].setData(response);
|
||||
$("#tblvitek").DataTable().ajax.reload();
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
var response = xhr.responseJSON || {};
|
||||
@@ -2827,6 +2876,126 @@
|
||||
$.post('{{ route("exCekAksess") }}', { nofoto: 'stiker', noregister: dataRecord.noregister, daftartgl: dataRecord.daftartgl, nm_spesimen: dataRecord.nm_spesimen, _token: token },
|
||||
function(data){
|
||||
|
||||
});
|
||||
if ( $.fn.DataTable.isDataTable('#tblvitek') ) {
|
||||
$('#tblvitek').DataTable().clear().destroy();
|
||||
}
|
||||
$('#tblvitek').DataTable({
|
||||
ajax : function(data, callback, settings) {
|
||||
$.ajax({
|
||||
url: '{{ route("getResult") }}',
|
||||
data: {
|
||||
limit : settings._iDisplayLength,
|
||||
page : Math.ceil(settings._iDisplayStart / settings._iDisplayLength) + 1,
|
||||
nofoto : dataRecord.id,
|
||||
jenis : 'tabelvitek',
|
||||
komponen : 'all',
|
||||
isi : '',
|
||||
keterangan : 'generatetabelantibiotik',
|
||||
_token : '{{ csrf_token() }}'
|
||||
},
|
||||
type: "POST",
|
||||
success: function(res) {
|
||||
callback({
|
||||
recordsTotal : res.total,
|
||||
recordsFiltered : res.total,
|
||||
data : res.data
|
||||
});
|
||||
},
|
||||
})
|
||||
},
|
||||
searching : false,
|
||||
autoWidth : false,
|
||||
serverSide : true,
|
||||
columnDefs : [
|
||||
{
|
||||
targets : 0,
|
||||
responsivePriority : 4,
|
||||
render : function (data, type, full, meta) {
|
||||
var $id = full['id'];
|
||||
var $printrow = full['printrow'];
|
||||
if ($printrow || $printrow == 1){
|
||||
var button = '<a class="btn btn-sm btn-success" href="#" data-bs-toggle="tooltip" data-bs-placement="top" title="Click to Remove Print Row" onClick="btnUnprintRow('+$id+')"><i class="fa fa-check"></i></a>';
|
||||
} else {
|
||||
var button = '<a class="btn btn-sm btn-danger" href="#" data-bs-toggle="tooltip" data-bs-placement="top" title="Click to Set Print Row" onClick="btnPrintRow('+$id+')"><i class="fa fa-ban"></i></a>';
|
||||
}
|
||||
return button;
|
||||
}
|
||||
},
|
||||
{
|
||||
targets : 1,
|
||||
responsivePriority : 4,
|
||||
render : function (data, type, full, meta) {
|
||||
return full['antibiotic'];
|
||||
}
|
||||
},
|
||||
{
|
||||
targets : 2,
|
||||
responsivePriority : 4,
|
||||
render : function (data, type, full, meta) {
|
||||
return full['value'];
|
||||
}
|
||||
},
|
||||
{
|
||||
targets : 3,
|
||||
responsivePriority : 4,
|
||||
render : function (data, type, full, meta) {
|
||||
return full['interpretation'];
|
||||
}
|
||||
},
|
||||
{
|
||||
targets : 4,
|
||||
responsivePriority : 4,
|
||||
render : function (data, type, full, meta) {
|
||||
var $id = full['id'];
|
||||
var $printcol = full['printcol'];
|
||||
if ($printcol || $printcol == 1){
|
||||
var button = '<a class="btn btn-sm btn-success" href="#" data-bs-toggle="tooltip" data-bs-placement="top" title="Click to Remove Print MIC" onClick="btnUnprintMic('+$id+')"><i class="fa fa-check"></i></a>';
|
||||
} else {
|
||||
var button = '<a class="btn btn-sm btn-danger" href="#" data-bs-toggle="tooltip" data-bs-placement="top" title="Click to Set Print MIC" onClick="btnPrintMic('+$id+')"><i class="fa fa-ban"></i></a>';
|
||||
}
|
||||
return button;
|
||||
}
|
||||
},
|
||||
],
|
||||
order : [[ 1, "asc" ]],
|
||||
dom: '<"row d-flex justify-content-between align-items-center m-1"' +
|
||||
'<"col-lg-6 d-flex align-items-center"l>' +
|
||||
'<"col-lg-6 d-flex align-items-center justify-content-lg-end flex-lg-nowrap flex-wrap pe-lg-1 p-0"f<"invoice_status ms-sm-2">>' +
|
||||
'>t' +
|
||||
'<"d-flex justify-content-between mx-2 row"' +
|
||||
'<"col-sm-12 col-md-6"i>' +
|
||||
'<"col-sm-12 col-md-6"p>' +
|
||||
'>',
|
||||
language: {
|
||||
'lengthMenu': 'Display _MENU_',
|
||||
},
|
||||
responsive: {
|
||||
details: {
|
||||
display : $.fn.dataTable.Responsive.display.modal({
|
||||
header: function (row) {
|
||||
var data = row.data();
|
||||
return 'Details of ' + data['matpel'];
|
||||
}
|
||||
}),
|
||||
type : 'column',
|
||||
renderer: function (api, rowIdx, columns) {
|
||||
var data = $.map(columns, function (col, i) {
|
||||
return col.columnIndex !== 2
|
||||
? '<tr data-dt-row="' + col.rowIdx +'" data-dt-column="' + col.columnIndex +'">' +
|
||||
'<td>' +col.title + ':' + '</td> ' +
|
||||
'<td>' +col.data +'</td>' +
|
||||
'</tr>'
|
||||
: '';
|
||||
}).join('');
|
||||
return data ? $('<table class="table"/>').append('<tbody>' + data + '</tbody>') : false;
|
||||
}
|
||||
}
|
||||
},
|
||||
initComplete: function () {
|
||||
},
|
||||
drawCallback: function () {
|
||||
}
|
||||
});
|
||||
if (statuse === null) {
|
||||
$('#divperiksa').show();
|
||||
@@ -3013,7 +3182,6 @@
|
||||
$('#divperiksa').hide();
|
||||
$('#divreadonly').hide();
|
||||
$('#divawal').show();
|
||||
$("#gridpemeriksaan").jqxGrid('updatebounddata', 'filter');
|
||||
});
|
||||
$("#btncancel").click(function() {
|
||||
var set01 = document.getElementById('id_alasanpembatan').value;
|
||||
@@ -3182,9 +3350,7 @@
|
||||
hideAfter : 5000,
|
||||
stack : 1
|
||||
});
|
||||
$('#divperiksa').hide();
|
||||
$('#divawal').show();
|
||||
$("#gridpemeriksaan").jqxGrid('updatebounddata', 'filter');
|
||||
window.location.href = "{{ url('/mikro') }}";
|
||||
return false;
|
||||
});
|
||||
}
|
||||
@@ -3232,9 +3398,7 @@
|
||||
hideAfter : 5000,
|
||||
stack : 1
|
||||
});
|
||||
$('#divperiksa').hide();
|
||||
$('#divawal').show();
|
||||
$("#gridpemeriksaan").jqxGrid('updatebounddata', 'filter');
|
||||
window.location.href = "{{ url('/mikro') }}";
|
||||
return false;
|
||||
});
|
||||
}
|
||||
@@ -3286,9 +3450,6 @@
|
||||
hideAfter : 5000,
|
||||
stack : 1
|
||||
});
|
||||
$('#divperiksa').hide();
|
||||
$('#divawal').show();
|
||||
$("#gridpemeriksaan").jqxGrid('updatebounddata', 'filter');
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user