Files
ilycats/storage/framework/views/d274b39dd3d50d6d08d3d41df11495b5.php
T
2026-09-23 12:45:02 +07:00

190 lines
12 KiB
PHP

<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\AppLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<div class="max-w-5xl mx-auto space-y-6 pb-12">
<div class="flex items-center justify-between px-2">
<div class="flex items-center gap-4">
<a href="<?php echo e(route('treatments.index')); ?>" class="p-3 bg-white border border-slate-200 rounded-2xl text-slate-400 hover:text-indigo-600 transition-all shadow-sm">
<i class="fas fa-arrow-left"></i>
</a>
<div>
<h2 class="text-2xl font-black text-slate-800 tracking-tight leading-none uppercase">Detail Rekam Medis</h2>
<p class="text-[10px] text-indigo-600 font-black uppercase tracking-widest mt-1">ID Pemeriksaan: #TR-<?php echo e(str_pad($treatment->id, 5, '0', STR_PAD_LEFT)); ?></p>
</div>
</div>
<div class="flex gap-2">
<button onclick="window.print()" class="px-4 py-2 bg-white border border-slate-200 text-slate-600 text-[10px] font-black rounded-xl uppercase tracking-widest hover:bg-slate-50">
<i class="fas fa-print mr-2"></i> Cetak Laporan
</button>
</div>
</div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
<div class="space-y-6">
<div class="bg-white border border-slate-200 rounded-[2.5rem] p-6 shadow-sm text-center">
<div class="w-24 h-24 rounded-3xl bg-slate-100 mx-auto overflow-hidden ring-4 ring-indigo-50 shadow-md">
<img src="<?php echo e($treatment->cat->foto ? asset('storage/'.$treatment->cat->foto) : 'https://ui-avatars.com/api/?name='.urlencode($treatment->cat->nama_kucing)); ?>" class="w-full h-full object-cover">
</div>
<h3 class="mt-4 text-xl font-black text-slate-800 uppercase tracking-tight"><?php echo e($treatment->cat->nama_kucing); ?></h3>
<p class="text-[10px] font-bold text-slate-400 uppercase"><?php echo e($treatment->cat->ras); ?> • <?php echo e(\Carbon\Carbon::parse($treatment->tanggal)->format('d F Y')); ?></p>
<div class="mt-6 pt-6 border-t border-slate-50">
<p class="text-[9px] font-black text-slate-400 uppercase tracking-widest mb-3">Progres Pengobatan</p>
<?php
$isImproving = Str::contains(strtolower($treatment->diagnosa), ['baik', 'makan', 'aktif', 'sembuh', 'turun panas']);
?>
<?php if($isImproving || $treatment->status_perawatan == 2): ?>
<div class="bg-emerald-50 border border-emerald-100 rounded-2xl p-4">
<i class="fas fa-chart-line text-emerald-500 text-xl mb-2"></i>
<p class="text-xs font-black text-emerald-700 uppercase">Kondisi Membaik / Sembuh</p>
<p class="text-[10px] text-emerald-600 font-medium mt-1">Pasien menunjukkan respon positif terhadap terapi obat.</p>
</div>
<?php else: ?>
<div class="bg-amber-50 border border-amber-100 rounded-2xl p-4">
<i class="fas fa-stagnation text-amber-500 text-xl mb-2"></i>
<p class="text-xs font-black text-amber-700 uppercase">Kondisi Stuck / Tetap</p>
<p class="text-[10px] text-amber-600 font-medium mt-1">Belum ada perubahan signifikan. Perlu observasi lanjutan.</p>
</div>
<?php endif; ?>
</div>
</div>
<div class="bg-white border border-slate-200 rounded-[2.5rem] p-6 shadow-sm">
<p class="text-[9px] font-black text-slate-400 uppercase tracking-widest mb-4">Lampiran Bukti</p>
<?php if($treatment->foto_bukti): ?>
<img src="<?php echo e(asset('storage/'.$treatment->foto_bukti)); ?>" class="w-full rounded-2xl shadow-sm border border-slate-100">
<?php else: ?>
<div class="py-8 text-center bg-slate-50 rounded-2xl border border-dashed border-slate-200">
<i class="fas fa-image text-slate-200 text-2xl mb-2"></i>
<p class="text-[9px] font-black text-slate-300 uppercase">Tidak ada lampiran foto</p>
</div>
<?php endif; ?>
</div>
</div>
<?php
// Logika Pemisahan String: Mengekstrak Dosis dan Keterangan dari Kolom Diagnosa
// Contoh: "Flu Berat | Dosis: 0.5cc (Campur wetfood)"
$fullDiagnosa = $treatment->diagnosa;
$pureDiagnosa = $fullDiagnosa;
$extractedDosis = 'Sesuai Resep / Standar';
$extractedKeterangan = '-';
// Pisahkan berdasarkan tanda "|" (pemisah Dosis)
if (str_contains($fullDiagnosa, '| Dosis:')) {
$parts = explode('| Dosis:', $fullDiagnosa);
$pureDiagnosa = trim($parts[0]);
// Cek jika ada keterangan dalam tanda kurung "()" setelah Dosis
$dosisAndKet = trim($parts[1]);
if (preg_match('/^(.*)\((.*)\)$/', $dosisAndKet, $matches)) {
$extractedDosis = trim($matches[1]);
$extractedKeterangan = trim($matches[2]);
} else {
$extractedDosis = $dosisAndKet;
}
}
?>
<div class="lg:col-span-2 space-y-6">
<div class="bg-white border border-slate-200 rounded-[2.5rem] p-8 shadow-sm">
<div class="flex items-center gap-3 mb-6">
<div class="w-10 h-10 rounded-xl bg-rose-50 text-rose-500 flex items-center justify-center">
<i class="fas fa-stethoscope"></i>
</div>
<h4 class="text-sm font-black text-slate-800 uppercase tracking-widest">Laporan Diagnosa</h4>
</div>
<div class="space-y-4">
<div>
<label class="text-[10px] font-black text-slate-400 uppercase tracking-widest">Keluhan / Gejala Utama:</label>
<p class="text-sm font-bold text-slate-700 mt-1"><?php echo e($treatment->keluhan); ?></p>
</div>
<div>
<label class="text-[10px] font-black text-slate-400 uppercase tracking-widest">Hasil Pemeriksaan Klinik:</label>
<div class="bg-slate-50 p-4 rounded-2xl border border-slate-100 mt-2">
<p class="text-sm text-slate-600 font-medium leading-relaxed italic">"<?php echo e($pureDiagnosa); ?>"</p>
</div>
</div>
</div>
</div>
<div class="bg-white border border-slate-200 rounded-[2.5rem] overflow-hidden shadow-sm">
<div class="px-8 py-5 border-b border-slate-50 bg-emerald-50/30">
<h4 class="text-xs font-black text-emerald-700 uppercase tracking-widest">Daftar Obat Terkait Kasus Ini</h4>
</div>
<div class="overflow-x-auto">
<table class="w-full text-left">
<thead class="bg-slate-50 text-[9px] font-black text-slate-400 uppercase tracking-widest">
<tr>
<th class="px-8 py-4">Item Obat</th>
<th class="px-4 py-4 text-center">Qty / Potong Stok</th>
<th class="px-4 py-4">Dosis</th>
<th class="px-8 py-4">Keterangan Khusus</th>
</tr>
</thead>
<tbody class="divide-y divide-slate-50">
<tr>
<td class="px-8 py-4">
<span class="text-xs font-black text-slate-800 uppercase"><?php echo e($treatment->medicine->nama_obat ?? 'OBAT DIHAPUS'); ?></span>
</td>
<td class="px-4 py-4 text-center text-xs font-black text-indigo-600">
<?php echo e((float)$treatment->qty_used); ?> <span class="text-[9px] text-slate-400 uppercase"><?php echo e($treatment->medicine->unit ?? ''); ?></span>
</td>
<td class="px-4 py-4 text-xs font-bold text-slate-600"><?php echo e($extractedDosis); ?></td>
<td class="px-8 py-4 text-[10px] font-medium text-slate-400 italic"><?php echo e($extractedKeterangan); ?></td>
</tr>
</tbody>
</table>
</div>
</div>
<?php if($treatment->status_perawatan == 2): ?>
<div class="bg-emerald-50 border border-emerald-200 rounded-[2.5rem] p-6 shadow-sm flex items-start gap-4">
<div class="w-10 h-10 bg-emerald-100 text-emerald-600 rounded-xl flex items-center justify-center shrink-0">
<i class="fas fa-check-circle"></i>
</div>
<div>
<h4 class="text-sm font-black text-emerald-700 uppercase tracking-widest mb-1">Kasus Diselesaikan (Sembuh)</h4>
<p class="text-xs font-bold text-emerald-600 italic">"<?php echo e($treatment->remark_pasca_sakit ?? 'Tidak ada catatan pasca sakit'); ?>"</p>
</div>
</div>
<?php endif; ?>
<div class="flex items-center justify-between px-6 text-[9px] font-black text-slate-300 uppercase tracking-[0.2em]">
<span>Diperiksa Oleh: <?php echo e($treatment->user->name ?? 'Staf / Dokter'); ?></span>
<span>Terakhir Update: <?php echo e($treatment->updated_at->format('d/m/Y H:i')); ?></span>
</div>
</div>
</div>
</div>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?><?php /**PATH /home/u806112658/domains/earrinasia.com/ilycats/resources/views/pages/treatments/show.blade.php ENDPATH**/ ?>