Update 01-02-2025

This commit is contained in:
Duidev Software House
2025-02-01 10:59:55 +07:00
parent f2c4fb19eb
commit 6f7beddec6
7 changed files with 292 additions and 14 deletions

View File

@@ -6,7 +6,6 @@ use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Mail;
use App\Http\Controllers\SendMail;
use App\Services\AstmMessageService;
use App\Poli;
use App\Periksa;
use App\DataListiner;
@@ -952,6 +951,8 @@ class DokterController extends Controller
'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'),
]
);
}
@@ -1075,6 +1076,8 @@ class DokterController extends Controller
'resistance' => $getdata->diskcontent,
'value' => $setval,
'interpretation' => $setnilai,
'created_at' => $getdataawal->daftar ?? date('Y-m-d H:i:s'),
'updated_at' => $getdataawal->akhir ?? date('Y-m-d H:i:s'),
]
);
}
@@ -1136,6 +1139,8 @@ class DokterController extends Controller
'resistance' => $getdata->diskcontent,
'value' => $setval,
'interpretation' => $setnilai,
'created_at' => $getdataawal->daftar ?? date('Y-m-d H:i:s'),
'updated_at' => $getdataawal->akhir ?? date('Y-m-d H:i:s'),
]
);
}

View File

@@ -12,6 +12,7 @@ use App\Dokter;
use App\Pasien;
use App\Jadwalperiksa;
use App\Riwayat;
use App\RekapAntibiotik;
use DateTime;
use Carbon\Carbon;
use Session;
@@ -29,7 +30,7 @@ class ReportController extends Controller
set_time_limit(0);
$bulan = $request->input('bulan');
$tahun = $request->input('tahun');
if ($bulan == 'ALL' || $bulan == 'Pick Month') {
if ($bulan == 'ALL' OR $bulan == 'Pick Month') {
$orderbydate = Periksa::selectRaw('SUM(id) as jumlah, DATE(daftar) as day')->whereYear('daftar', $tahun)->groupBy(DB::raw('daftar'))->orderBy('daftar', 'ASC')->get();
$bulan = '';
} else {
@@ -306,4 +307,136 @@ class ReportController extends Controller
echo json_encode($arraylist);
}
}
public function genRekapAntibiotik(Request $request) {
$data = [];
$bulan = $request->input('bulan');
$tahun = $request->input('tahun');
if ($tahun == '' OR is_null($tahun)){
$getarray = explode('?', $bulan);
$bulan = $getarray[0] ?? date('m');
$tahun = $getarray[1] ?? date('Y');
}
if ($bulan == '' OR $bulan == 'ALL' OR $bulan == 'Pick Month') {
$orderbydate = Periksa::whereYear('daftar', $tahun)->get();
$jsonantibiotik = RekapAntibiotik::whereIn('orderid', $orderbydate->pluck('id'))->get()->groupBy('orderid');
} else {
$orderbydate = Periksa::whereMonth('daftar', $bulan)->whereYear('daftar', $tahun)->get();
$jsonantibiotik = RekapAntibiotik::whereIn('orderid', $orderbydate->pluck('id'))->get()->groupBy('orderid');
}
return view('admin.rekapantibiotik', compact('orderbydate', 'jsonantibiotik', 'bulan', 'tahun'));
}
public function genGlassReport(Request $request) {
$data = [];
$bulan = $request->input('bulan');
$tahun = $request->input('tahun');
if ($tahun == '' OR is_null($tahun)){
$getarray = explode('?', $bulan);
$bulan = $getarray[0] ?? date('m');
$tahun = $getarray[1] ?? date('Y');
}
if ($bulan == '' OR $bulan == 'ALL' OR $bulan == 'Pick Month') {
$orderbydate = Periksa::whereYear('daftar', $tahun)->get();
$jsonantibiotik = array(
'Oxacillin-OX',
'Cefoxitin-FOX',
'Benzylpenicillin-P',
'Ampicillin-AM',
'Azithromycin-AZM',
'Erythromycin-ERY',
'Cefazolin-CZO',
'Cefepime-FEP',
'Cefixime-CFM',
'Cefotaxime-CTX',
'Cefuroxime-CXM',
'Ceftazidime-CAZ',
'Ceftriaxone-CRO',
'Ceftazidime/Avibactam-CZA',
'Piperacilin/Tazobactam-TZP',
'Ampicillin/Sulbactam-SAM',
'Amoxicillin/Clavulanate-AMC',
'Cefoperazon/Sulbactam-SCF',
'Aztreonam-ATM',
'Ceftaroline-CPT',
'Ciprofloxacin-CIP',
'Levofloxacin-LEV',
'Moxifloxacin-MFX',
'Clindamycin-CLI',
'Colistin-CS', //tidak ada
'Tetracyclin-TCY',
'Tigecycline-TGC', //double
'Gentamicin-GM',
'Amikacin-AN',
'Meropenem-MEM',
'Imipenem-IPM',
'Doripenem-DOR',
'Ertapenem-ETP',
'Minocycline-MNO',
'Doxycycline-DOX',
'Spectinomycin-SPT',
'Tigecycline-TGC', //sama-ini
'Trimethoprim/Sulfamethoxazole-SXT',
'Fosfomycin-FOS',
'Vancomycin-VAN',
'Linezolid-LNZ',
'Fluconazole', //tidak ada
'Voriconazole', //tidak ada
'Caspofungin', //tidak ada
'Micafungin', //tidak ada
'Amphotericin B', //tidak ada
'Flucytosine' //tidak ada
);
} else {
$orderbydate = Periksa::whereMonth('daftar', $bulan)->whereYear('daftar', $tahun)->get();
$jsonantibiotik = array(
'Oxacillin-OX',
'Cefoxitin-FOX',
'Benzylpenicillin-P',
'Ampicillin-AM',
'Azithromycin-AZM',
'Erythromycin-ERY',
'Cefazolin-CZO',
'Cefepime-FEP',
'Cefixime-CFM',
'Cefotaxime-CTX',
'Cefuroxime-CXM',
'Ceftazidime-CAZ',
'Ceftriaxone-CRO',
'Ceftazidime/Avibactam-CZA',
'Piperacilin/Tazobactam-TZP',
'Ampicillin/Sulbactam-SAM',
'Amoxicillin/Clavulanate-AMC',
'Cefoperazon/Sulbactam-SCF',
'Aztreonam-ATM',
'Ceftaroline-CPT',
'Ciprofloxacin-CIP',
'Levofloxacin-LEV',
'Moxifloxacin-MFX',
'Clindamycin-CLI',
'Colistin-CS',
'Tetracyclin-TCY',
'Tigecycline-TGC',
'Gentamicin-GM',
'Amikacin-AN',
'Meropenem-MEM',
'Imipenem-IPM',
'Doripenem-DOR',
'Ertapenem-ETP',
'Minocycline-MNO',
'Doxycycline-DOX',
'Spectinomycin-SPT',
'Tigecycline-TGC',
'Trimethoprim/Sulfamethoxazole-SXT',
'Fosfomycin-FOS',
'Vancomycin-VAN',
'Linezolid-LNZ',
'Fluconazole',
'Voriconazole',
'Caspofungin',
'Micafungin',
'Amphotericin B',
'Flucytosine'
);
}
return view('admin.glassreport', compact('orderbydate', 'jsonantibiotik', 'bulan', 'tahun'));
}
}

View File

@@ -17,6 +17,7 @@ return new class extends Migration
$table->string('resistance', 150)->nullable();
$table->string('value', 150)->nullable();
$table->string('interpretation', 150)->nullable();
$table->string('glassreportname', 150)->nullable();
$table->integer('orderid')->nullable();
$table->timestamp('created_at')->useCurrent();
$table->timestamp('updated_at')->useCurrent();

View File

@@ -0,0 +1,70 @@
@extends('base.layout')
@section('content')
<div class="wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-sm-12">
<div class="card-box ribbon-box">
<div class="ribbon ribbon-danger">Rekapitulasi Data Bulan {{$bulan}} Tahun {{$tahun}}</div>
<p></p>
<div class="table-responsive">
<table id="datatable" class="table table-bordered display">
<thead>
<tr>
<th>ID Rumah Sakit</th>
<th>Nama Pasien</th>
<th>No Rekam Medis</th>
<th>Jenis Kelamin</th>
<th>Tanggal Lahir</th>
<th>Usia</th>
<th>Ruang Rawat</th>
<th>Tanggal Pasien Masuk</th>
<th>Tanggal Pengambilan Sample</th>
<th>Specimen Origin (Comunity Origin / Hospital Origin)</th>
<th>Jenis Spesimen</th>
<th>Nama Spesies Bakteri</th>
<th>ESBL</th>
<th>MRSA</th>
@if(isset($jsonantibiotik) && !empty($jsonantibiotik))
@foreach($jsonantibiotik as $antibiotic)
<th>{{ $antibiotic }}</th>
@endforeach
@endif
</tr>
</thead>
<tbody>
@if(isset($orderbydate) && !empty($orderbydate))
@foreach($orderbydate as $data)
<tr>
<td></td>
<td>{{ $data->nmpasien }}</td>
<td>{{ $data->noregister }}</td>
<td>{{ $data->jkpasien }}</td>
<td>{{ $data->tgllahirpasien }}</td>
<td>{{ $data->usia }}</td>
<td>{{ $data->asalpasien }}</td>
<td>{{ $data->mulai }}</td>
<td>{{ $data->daftar }}</td>
<td>{{ $data->nm_spesimen }}</td>
<td>{{ $data->nm_spesimen }}</td>
<td>{{ $data->updated_at }}</td>
@if(isset($jsonantibiotik[$data->id]) && !empty($jsonantibiotik[$data->id]))
@foreach($jsonantibiotik[$data->id] as $antibiotic)
<td>{{ $antibiotic->interpretation }}</td>
@endforeach
@endif
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
<div class="card-footer">
</div>
</div>
</div>
</div>
</div>
</div>
<input type="hidden" name="_token" id="token" value="{{ csrf_token() }}">
@endsection

View File

@@ -0,0 +1,68 @@
@extends('base.layout')
@section('content')
<div class="wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-sm-12">
<div class="card-box ribbon-box">
<div class="ribbon ribbon-danger">Rekapitulasi Data Bulan {{$bulan}} Tahun {{$tahun}}</div>
<p></p>
<div class="table-responsive">
<table id="datatable" class="table table-bordered display">
<thead>
<tr>
<th>No</th>
<th>Status</th>
<th>No.RM</th>
<th>Name</th>
<th>Order</th>
<th>Gender</th>
<th>Date</th>
<th>Urgensi</th>
<th>Comming From</th>
<th>Code</th>
<th>Spesimen</th>
<th>Finish</th>
@if(isset($jsonantibiotik) && !empty($jsonantibiotik))
@foreach($jsonantibiotik->first() as $antibiotic)
<th>{{ $antibiotic->antibiotic }}</th>
@endforeach
@endif
</tr>
</thead>
<tbody>
@if(isset($orderbydate) && !empty($orderbydate))
@foreach($orderbydate as $data)
<tr>
<td>{{ $data->noloket }}</td>
<td>{{ $data->status }}</td>
<td>{{ $data->noregister }}</td>
<td>{{ $data->nmpasien }}</td>
<td>{{ $data->reques }}</td>
<td>{{ $data->jkpasien }}</td>
<td>{{ $data->daftar }}</td>
<td>{{ $data->urgensi }}</td>
<td>{{ $data->asalpasien }}</td>
<td>{{ $data->kd_spesimen }}</td>
<td>{{ $data->nm_spesimen }}</td>
<td>{{ $data->updated_at }}</td>
@if(isset($jsonantibiotik[$data->id]) && !empty($jsonantibiotik[$data->id]))
@foreach($jsonantibiotik[$data->id] as $antibiotic)
<td>{{ $antibiotic->interpretation }}</td>
@endforeach
@endif
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
<div class="card-footer">
</div>
</div>
</div>
</div>
</div>
</div>
<input type="hidden" name="_token" id="token" value="{{ csrf_token() }}">
@endsection

View File

@@ -34,7 +34,8 @@
<button type="button" class="btn btn-primary" id="btnReport">Detail</button>
</div>
<div class="form-group col-md-3">
<button type="button" class="btn btn-warning" id="btnrekap">Rekap</button>
<button type="button" class="btn btn-warning btn-block" id="btnrekap">Rekap Antibiotik</button>
<button type="button" class="btn btn-info btn-block" id="btnrekapglassreport">Rekap Glass Report</button>
</div>
</div>
</div>
@@ -220,16 +221,14 @@ $(document).ready(function () {
$('#btnrekap').click(function () {
var bulan = document.getElementById('bulan').value;
var tahun = document.getElementById('tahun').value;
var token = document.getElementById('token').value;
$.post('{{ route("rekapPeriksa") }}', { bulan: bulan, tahun: tahun, _token: token },
function(data){
$('#tabel_cetak').html(data);
$("#tabel_cetak").btechco_excelexport({
containerid: "tabel_cetak"
, datatype: $datatype.Table
});
return false;
var url = '{{url('/')}}/rekapantibiotik?bulan='+bulan+'?tahun='+tahun;
window.location.href = url;
});
$('#btnrekapglassreport').click(function () {
var bulan = document.getElementById('bulan').value;
var tahun = document.getElementById('tahun').value;
var url = '{{url('/')}}/glassreport?bulan='+bulan+'?tahun='+tahun;
window.location.href = url;
});
$('#btndatereport').click(function () {
var bulan = 'pertanggal';

View File

@@ -121,6 +121,8 @@ Route::group(['middleware' => 'project.ipg'], function() {
Route::get('report', [ReportController::class, 'index']);
Route::post('report', [ReportController::class, 'report'])->name('reportPeriksa');
Route::post('rekapperiksa', [ReportController::class, 'rekapPeriksa'])->name('rekapPeriksa');
Route::get('rekapantibiotik', [ReportController::class, 'genRekapAntibiotik']);
Route::get('glassreport', [ReportController::class, 'genGlassReport']);
Route::get('list', [ListController::class, 'index']);
Route::get('list/getlist', [ListController::class, 'getList'])->name('getList');