{{ $isCompleted ? 'Completed' : 'In progress' }}

{{ $consultation->patient->fullName() }}

{{ $consultation->patient->patient_number }} @if ($consultation->practitioner) · {{ $consultation->practitioner->name }} @endif

@if ($canManage && ! $isCompleted) @endif @if ($canPrescribe) Prescribe @endif @if ($canGenerateBill && $isCompleted && $consultation->visit)
@csrf
@endif
@if ($canRequestInvestigations && $investigationTypes->isNotEmpty())

Request investigations

@csrf
@foreach ($investigationTypes as $type) @endforeach
@if ($consultation->investigationRequests->isNotEmpty())

Requested tests

@foreach ($consultation->investigationRequests as $req)

{{ $req->investigationType->name }} · {{ config('care.investigation_statuses')[$req->status] ?? $req->status }}

@endforeach
@endif
@endif @if ($consultation->prescriptions->isNotEmpty())

Prescriptions

@endif @if ($canViewAssessments ?? false) {{-- Layer 1: universal intake (structured overlay; does not replace free-text symptoms) --}} @if ($universalTemplate)

Universal intake

Structured Layer 1 assessment (presenting complaint, social history, function). Free-text Symptoms and Clinical notes below remain the narrative source of truth — they are not auto-copied either way.

@if ($universalAssessment) {{ $universalAssessment->isDraft() ? 'Continue intake' : 'View intake' }} @elseif (($canCaptureUniversal ?? false) && ! $isCompleted)
@csrf
@endif
@if ($universalAssessment)

Status: {{ $assessmentStatuses[$universalAssessment->status] ?? $universalAssessment->status }} @if ($universalAssessment->consultation_id !== $consultation->id) (from another visit — open to review) @endif

@php $cc = $universalAssessment->answers->first(fn ($a) => $a->question?->code === 'chief_complaint'); $pain = $universalAssessment->answers->first(fn ($a) => $a->question?->code === 'pain_score'); @endphp @if ($cc || $pain)
@if ($cc)
Chief complaint
{{ \Illuminate\Support\Str::limit((string) $cc->authoritativeValue(), 160) }}
@endif @if ($pain)
Pain score
{{ $pain->authoritativeValue() ?? '—' }}
@endif
@endif @elseif (! ($canCaptureUniversal ?? false))

No universal intake for this patient yet.

@endif
@endif {{-- Layer 2: pathways (suggest from persisted diagnoses; clinician confirms) --}}

Clinical pathways

Manage pathways
@if (($activePathways ?? collect())->isNotEmpty())
@foreach ($activePathways as $pp) {{ $pp->pathway->name }} @endforeach
@endif @if (($pathwayInstruments ?? collect())->isNotEmpty())
Pathway instruments
    @foreach ($pathwayInstruments as $instrument)
  • {{ $instrument['template_name'] }} · {{ $instrument['pathway_name'] }} · {{ $instrument['template_code'] }} @if ($instrument['required']) · required @endif @if ($instrument['assessment']?->score) score {{ $instrument['assessment']->score->total_score }}@if($instrument['assessment']->score->max_score !== null)/{{ $instrument['assessment']->score->max_score }}@endif @endif
    @if ($instrument['pack_missing']) Content pack not seeded @elseif ($instrument['assessment']) {{ $assessmentStatuses[$instrument['assessment']->status] ?? $instrument['assessment']->status }} {{ $instrument['assessment']->isDraft() ? 'Continue' : 'View' }} @elseif (($canCaptureAssessment ?? false) && ! $isCompleted)
    @csrf
    @else Not started @endif
  • @endforeach
@endif @if (($pathwaySuggestions ?? collect())->isNotEmpty()) @else

@if ($consultation->diagnoses->isEmpty()) Save diagnoses to see pathway suggestions. @else No pathway matches for saved diagnoses. @endif

@endif

Clinical assessments

Patient assessments
@if (($consultationAssessments ?? collect())->isNotEmpty()) @else

No assessments linked to this consultation yet.

@endif @if (($canCaptureAssessment ?? false) && ! $isCompleted && ($startableTemplates ?? collect())->isNotEmpty())
@csrf
@endif
@endif @if (! $isCompleted && ($canManage || $canVitals))
@csrf @method('PUT') @if ($canVitals)

Vital signs

@php $latestVitals = $consultation->vitalSigns->last(); @endphp
@endif @if ($canManage)

Clinical notes (narrative)

@if ($canViewAssessments ?? false)

Narrative source of truth for this encounter. Structured universal intake is a separate overlay above and is not auto-synced with these fields.

@endif

Diagnoses

Documents

@endif
@if ($canManage && ($canViewAssessments ?? false)) @endif Back to queue
@else
@if ($consultation->vitalSigns->isNotEmpty())

Vital signs

@foreach ($consultation->vitalSigns as $vitals)
BP
{{ $vitals->bp_systolic }}/{{ $vitals->bp_diastolic }}
Pulse
{{ $vitals->pulse ?? '—' }}
Temp
{{ $vitals->temperature ?? '—' }}°C
SpO₂
{{ $vitals->spo2 ? $vitals->spo2.'%' : '—' }}
@endforeach
@endif @if ($consultation->symptoms || $consultation->clinical_notes)

Clinical notes (narrative)

@if ($consultation->symptoms)

Symptoms: {{ $consultation->symptoms }}

@endif @if ($consultation->clinical_notes)

{{ $consultation->clinical_notes }}

@endif
@endif @if (($canViewAssessments ?? false) && ($universalAssessment ?? null)?->isCompleted())

Universal intake (structured)

Open
@foreach ($universalAssessment->answers->sortBy(fn ($a) => $a->question?->sort_order ?? 0) as $answer) @if ($answer->question)
{{ $answer->question->label }}
@php $v = $answer->authoritativeValue(); @endphp @if (is_array($v)) {{ implode(', ', $v) }} @elseif (is_bool($v)) {{ $v ? 'Yes' : 'No' }} @else {{ $v ?? '—' }} @endif
@endif @endforeach
@endif @if ($consultation->diagnoses->isNotEmpty())

Diagnoses

    @foreach ($consultation->diagnoses as $diagnosis)
  • {{ $diagnosis->description }} @if ($diagnosis->code) ({{ $diagnosis->code }}) @endif @if ($diagnosis->is_primary) primary @endif
  • @endforeach
@endif
@endif