Files
ilycats/storage/framework/views/5368db417689e345f3b2c25e559c4304.php
T

163 lines
12 KiB
PHP
Raw Normal View History

2026-09-23 12:45:02 +07:00
<div style="font-family: Helvetica, Arial, sans-serif; color: #334155;">
<div style="text-align: center; border-bottom: 2px solid #4f46e5; padding-bottom: 15px; margin-bottom: 20px;">
<h1 style="margin:0; font-size: 24px; color: #0f172a; letter-spacing: 1px;">MEDICAL REPORT: <?php echo e(strtoupper($cat->nama_kucing)); ?></h1>
<p style="margin:5px 0; font-size: 10px; color: #64748b; letter-spacing: 2px;">ILY AREGAU CATTERY MANAGEMENT SYSTEM</p>
</div>
<div style="background-color: #f8fafc; border: 1px solid #e2e8f0; padding: 15px; margin-bottom: 30px; border-radius: 8px; font-size: 11px;">
<table style="width: 100%; border-collapse: collapse;">
<tr>
<td style="width: 50%; vertical-align: top;">
<p style="margin: 4px 0;"><strong style="color: #4f46e5;">Cat Name:</strong> <?php echo e($cat->nama_kucing); ?></p>
<p style="margin: 4px 0;"><strong style="color: #4f46e5;">Breed / Gender:</strong> <?php echo e($cat->ras); ?> / <?php echo e($cat->jenis_kelamin); ?></p>
<p style="margin: 4px 0;"><strong style="color: #4f46e5;">Microchip:</strong> <?php echo e($cat->microchip ?? 'Unchipped'); ?></p>
</td>
<td style="width: 50%; vertical-align: top; text-align: right;">
<p style="margin: 4px 0;"><strong style="color: #4f46e5;">Downloaded By:</strong> <?php echo e(auth()->user()->name ?? 'System Administrator'); ?></p>
<p style="margin: 4px 0;"><strong style="color: #4f46e5;">Timestamp:</strong> <?php echo e(\Carbon\Carbon::now()->translatedFormat('d F Y, H:i')); ?> WIB</p>
<p style="margin: 4px 0;">
<strong style="color: #4f46e5;">Summary Records:</strong> <br>
<?php echo e($cat->medicalRecords->count()); ?> Routine Log •
<span style="color: #e11d48; font-weight: bold;"><?php echo e($cat->treatments->count()); ?> Clinical Log</span> •
<?php echo e($cat->weightHistories->count()); ?> Weight Log
</p>
</td>
</tr>
</table>
</div>
<?php $__currentLoopData = ['Vaccine', 'Deworming', 'Flea Treatment', 'Grooming']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $type): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php $records = $cat->medicalRecords->where('type', $type)->sortByDesc('date_given'); ?>
<div style="margin-top: 25px;">
<div style="background: #e0e7ff; padding: 8px 12px; border-left: 4px solid #4f46e5; font-weight: bold; font-size: 11px; margin-bottom: 8px; color: #3730a3;">
<?php echo e(strtoupper($type)); ?> HISTORY (<?php echo e($records->count()); ?> Data)
</div>
<table style="width: 100%; border-collapse: collapse; font-size: 10px;">
<thead>
<tr style="background: #4f46e5; color: white;">
<th style="padding: 8px; text-align: left; border: 1px solid #4f46e5; width: 15%;">DATE GIVEN</th>
<th style="padding: 8px; text-align: left; border: 1px solid #4f46e5; width: 30%;">PRODUCT / TREATMENT</th>
<th style="padding: 8px; text-align: left; border: 1px solid #4f46e5; width: 40%;">NOTES</th>
<th style="padding: 8px; text-align: center; border: 1px solid #4f46e5; width: 15%;">NEXT SCHEDULE</th>
</tr>
</thead>
<tbody>
<?php $__empty_1 = true; $__currentLoopData = $records; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $r): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<tr style="background: <?php echo e($loop->even ? '#f8fafc' : '#ffffff'); ?>;">
<td style="padding: 8px; border: 1px solid #e2e8f0;"><?php echo e($r->date_given->format('d/m/Y')); ?></td>
<td style="padding: 8px; border: 1px solid #e2e8f0; font-weight: bold;">
<?php echo e($r->treatment_name); ?>
<?php if($r->dosage): ?> <br><span style="font-size: 8px; color: #059669; font-weight: normal;">Dose: <?php echo e($r->dosage); ?> <?php echo e($r->unit); ?></span> <?php endif; ?>
</td>
<td style="padding: 8px; border: 1px solid #e2e8f0; font-style: italic;"><?php echo e($r->notes ?? '-'); ?></td>
<td style="padding: 8px; border: 1px solid #e2e8f0; text-align: center;"><?php echo e($r->next_schedule?->format('d/m/Y') ?? '-'); ?></td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
<tr><td colspan="4" style="padding: 10px; text-align: center; color: #94a3b8; border: 1px solid #e2e8f0;">No routine records.</td></tr>
<?php endif; ?>
</tbody>
</table>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<div style="margin-top: 35px;">
<div style="background: #fff1f2; padding: 8px 12px; border-left: 4px solid #e11d48; font-weight: bold; font-size: 11px; margin-bottom: 8px; color: #9f1239;">
CLINICAL CASE & TREATMENT HISTORY (<?php echo e($cat->treatments->count()); ?> Data)
</div>
<table style="width: 100%; border-collapse: collapse; font-size: 10px;">
<thead>
<tr style="background: #e11d48; color: white;">
<th style="padding: 8px; text-align: left; border: 1px solid #e11d48; width: 15%;">DATE</th>
<th style="padding: 8px; text-align: left; border: 1px solid #e11d48; width: 25%;">DIAGNOSIS / COMPLAINT</th>
<th style="padding: 8px; text-align: left; border: 1px solid #e11d48; width: 25%;">THERAPY (MEDICINE)</th>
<th style="padding: 8px; text-align: left; border: 1px solid #e11d48; width: 35%;">STATUS & RESOLUTION</th>
</tr>
</thead>
<tbody>
<?php $__empty_1 = true; $__currentLoopData = $cat->treatments->sortByDesc('tanggal'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $t): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<tr style="background: <?php echo e($loop->even ? '#fff1f2' : '#ffffff'); ?>; vertical-align: top;">
<td style="padding: 8px; border: 1px solid #fecdd3;"><?php echo e($t->tanggal->format('d/m/Y')); ?></td>
<td style="padding: 8px; border: 1px solid #fecdd3;">
<strong style="color: #be123c;"><?php echo e($t->keluhan); ?></strong><br>
<span style="font-size: 9px; color: #64748b;"><?php echo e($t->diagnosa); ?></span>
</td>
<td style="padding: 8px; border: 1px solid #fecdd3;">
<strong><?php echo e($t->nama_obat ?? ($t->medicine ? $t->medicine->nama_obat : '-')); ?></strong><br>
<span style="font-size: 9px;">Dosis/Qty: <?php echo e($t->dosis ?? $t->qty_used); ?></span>
</td>
<td style="padding: 8px; border: 1px solid #fecdd3;">
<?php if($t->status_perawatan == 2): ?>
<div style="color: #059669; font-weight: bold; margin-bottom: 4px;">✓ RESOLVED (SEMBUH)</div>
<?php if($t->remark_pasca_sakit): ?>
<div style="font-style: italic; font-size: 9px; color: #475569;">
"<?php echo e($t->remark_pasca_sakit); ?>"
</div>
<?php endif; ?>
<?php else: ?>
<div style="color: #e11d48; font-weight: bold; margin-bottom: 4px;">⚠ ONGOING TREATMENT</div>
<?php endif; ?>
<?php if($t->keterangan): ?>
<div style="margin-top: 6px; font-size: 9px; border-top: 1px dashed #fecdd3; padding-top: 4px;">
<strong style="color: #94a3b8;">Initial Notes:</strong> <?php echo e($t->keterangan); ?>
</div>
<?php endif; ?>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
<tr><td colspan="4" style="padding: 10px; text-align: center; color: #94a3b8; border: 1px solid #fecdd3;">No clinical cases found.</td></tr>
<?php endif; ?>
</tbody>
</table>
</div>
<?php if($cat->weightHistories->count() > 0): ?>
<div style="page-break-before: auto; margin-top: 35px;">
<div style="background: #ecfdf5; padding: 8px 12px; border-left: 4px solid #10b981; font-weight: bold; font-size: 11px; margin-bottom: 8px; color: #065f46;">
GROWTH & WEIGHT MONITORING (<?php echo e($cat->weightHistories->count()); ?> Data)
</div>
<table style="width: 100%; border-collapse: collapse; font-size: 10px;">
<thead>
<tr style="background: #10b981; color: white;">
<th style="padding: 8px; text-align: left; border: 1px solid #10b981;">DATE RECORDED</th>
<th style="padding: 8px; text-align: center; border: 1px solid #10b981;">WEIGHT (KG)</th>
<th style="padding: 8px; text-align: center; border: 1px solid #10b981;">PROGRESSION</th>
</tr>
</thead>
<tbody>
<?php $wLogs = $cat->weightHistories->sortByDesc('created_at')->values(); ?>
<?php $__currentLoopData = $wLogs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $weight): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php
$trend = '-';
$trendColor = '#64748b';
if (isset($wLogs[$index + 1])) {
$prev = (float)$wLogs[$index + 1]->berat;
$curr = (float)$weight->berat;
if ($curr > $prev) { $trend = 'Gain ( + )'; $trendColor = '#059669'; }
elseif ($curr < $prev) { $trend = 'Loss ( - )'; $trendColor = '#e11d48'; }
else { $trend = 'Stable'; }
}
?>
<tr style="background: <?php echo e($loop->even ? '#ecfdf5' : '#ffffff'); ?>;">
<td style="padding: 8px; border: 1px solid #d1fae5;"><?php echo e($weight->created_at->format('d M Y, H:i')); ?></td>
<td style="padding: 8px; border: 1px solid #d1fae5; text-align: center; font-weight: bold;"><?php echo e($weight->berat); ?> Kg</td>
<td style="padding: 8px; border: 1px solid #d1fae5; text-align: center; font-weight: bold; color: <?php echo e($trendColor); ?>;"><?php echo e($trend); ?></td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
<?php endif; ?>
</div><?php /**PATH /home/u806112658/domains/earrinasia.com/ilycats/resources/views/pages/reports/medical_history.blade.php ENDPATH**/ ?>