@extends('hms.layout') @section('title','Consultation') @section('content')

{{ $patient->first_name }} {{ $patient->last_name }}

Visit: {{ $appointment->scheduled_at->format('d M Y H:i') }} · {{ ucfirst($encounter->status) }}
Sick-leave certificateView full visit

Clinical notes

@if($errors->has('completion'))@endif @if($errors->any() && !$errors->has('completion'))@endif

Assessment / diagnosis and Treatment and follow-up plan must be saved before completion.

@csrf @method('PATCH') @foreach(['chief_complaint'=>'Chief complaint','clinical_notes'=>'History and examination findings','assessment'=>'Assessment / diagnosis','plan'=>'Treatment and follow-up plan','lifestyle_advice'=>'Lifestyle advice (diet, exercise, rest, etc.)'] as $field=>$label) @endforeach @if($encounter->status==='open')@endif
@if($encounter->status==='open')
@csrf
@endif

Requested laboratory tests

@forelse($labOrders as $order)
Laboratory request · {{ str_replace('_',' ',$order->status) }} @foreach($labItems->get($order->id,collect()) as $item)
{{ $item->test_name }} — {{ $item->outcome ? ucfirst(str_replace('_',' ',$item->outcome)) : 'Awaiting result' }}@if($item->result_details)
{{ $item->result_details }}
@endif
@endforeach @if($order->status==='result_recorded' && !$order->released_at)
@csrf
@endif
@empty

No laboratory tests requested.

@endforelse @if($encounter->status==='open')
@csrf @if($labTests->isEmpty())

No active tests are configured for this facility. Ask a manager to update the test catalogue.

@endif
@endif

Prescriptions

Print prescription
@forelse($prescriptions as $rx)
{{ $rx->medication_name }} · {{ $rx->dose }} · {{ $rx->frequency }}
{{ $rx->fulfillment==='internal'?'Facility pharmacy (availability unverified)':'External pharmacy / patient choice' }} · {{ $rx->status }}
@empty

No medication prescribed.

@endforelse @if($encounter->status==='open')
@csrf
@endif

Vitals recorded this visit

@if($triage)
Temperature
{{ $triage->temperature_c??'—' }} °C
Blood pressure
{{ $triage->systolic_bp??'—' }}/{{ $triage->diastolic_bp??'—' }}
Pulse
{{ $triage->pulse_bpm??'—' }} bpm
Oxygen saturation
{{ $triage->oxygen_saturation??'—' }}%
Priority
{{ ucfirst($triage->priority) }}
@else

No visit-specific vitals.

@endif

Inpatient admission

@php($admission=\App\Models\Hms\Admission::where('organization_id',$encounter->organization_id)->where('patient_id',$patient->id)->whereIn('status',['recommended','admitted'])->latest()->first()) @if($admission)

{{ ucfirst($admission->status) }} — View location / bed assignment

@elseif($encounter->status==='open')
@csrf
@else

No active admission recommendation.

@endif

Previous consultations

@forelse($pastEncounters as $past)
{{ $past->created_at->format('d M Y') }}
{{ Str::limit($past->assessment??$past->chief_complaint,135) }}
@empty

No earlier consultations in this organization.

@endforelse

Specialist referral

@forelse($referrals as $ref)
{{ $ref->physician?->name }} · {{ $ref->reason }} · {{ $ref->status }}
@empty

No specialist referrals.

@endforelse @if($encounter->status==='open')
@csrf
@endif
@endsection