@extends('layouts.app')
@section('title', 'Consultation | ' . ($visit->patient->full_name ?? ''))
@section('content')
@include('partials._encounter-styles')
@php
$readOnly = in_array($visit->status, ['completed','cancelled','discharged']);
$c = $visit->consultation ?? null;
$p = $visit->patient ?? null;
$t = $visit->triage ?? null;
@endphp
{{-- ════════════ PATIENT HEADER STRIP ════════════ --}}
{{ $p->full_name ?? '-' }}
Patient # {{ $p->mrn ?? '-' }}
Age {{ $p->age ?? '-' }} {{ $p->gender ? '· '.ucfirst($p->gender) : '' }}
Visit # {{ $visit->visit_number }}
Date {{ $visit->check_in_at?->format('d M Y H:i') ?? $visit->created_at->format('d M Y H:i') }}
@if($readOnly)
Completed@endif
@if($p && $p->allergies && count($p->allergies))
⚠ Allergies: {{ implode(', ', $p->allergies) }}
@endif
{{-- ════════════ 1. TRIAGE / VITALS ════════════ --}}
1 Triage / Vitals
@if($t)Recorded
@elsePending@endif
@if($t)
| Date / Time | Height | Weight | BMI |
Temp | BP | Pulse | RR |
SpO₂ | Pain |
| {{ $t->created_at?->format('d M Y H:i') ?? '-' }} |
{{ $t->height ?? '-' }} |
{{ $t->weight ?? '-' }} |
{{ ($t->height && $t->weight) ? number_format(($t->weight / (($t->height/100) * ($t->height/100))),1) : '-' }} |
{{ $t->temperature ?? '-' }} |
{{ ($t->blood_pressure_systolic ?? '-') }}/{{ $t->blood_pressure_diastolic ?? '-' }} |
{{ $t->pulse ?? '-' }} |
{{ $t->respiratory_rate ?? '-' }} |
{{ $t->oxygen_saturation ?? '-' }} |
{{ $t->pain_score ?? '-' }} |
@else
No vitals recorded for this visit.
@endif
{{-- ════════════ 2. CLINICAL DETAILS ════════════ --}}
@if(!$c && !$readOnly)
{{-- ---- Create mode ---- --}}
@else
{{-- ---- Edit / Read-only mode ---- --}}
@endif
@stack('scripts')
@endsection