Consultation #{{ $consultation->id }} •
{{ $consultation->scheduled_at?->format('F j, Y \a\t g:i A') }} •
Type: {{ $consultation->consultation_type }} • Status: {{ $consultation->status }}
Dr. {{ $consultation->doctor?->name ?? 'Unknown' }} •
Patient: {{ $consultation->patient?->name ?? 'Unknown' }}
@if(!empty($consultation->patient?->patient_number))
• Patient no.: {{ $consultation->patient->patient_number }}
@endif
@if(!empty($consultation->reason))
Management plan
@if(!empty($mp['treatment'] ?? null))
Treatment
{{ $mp['treatment'] }}
@endif
@if($hasRx)
Prescription
@foreach(($rx['medications'] ?? []) as $med)
@if(is_array($med) && !empty(trim($med['name'] ?? '')))
-
{{ $med['name'] }}
@if(!empty($med['form'] ?? null)) ({{ $med['form'] }}) @endif
@if(!empty($med['dosage'] ?? null)) — {{ $med['dosage'] }} @endif
@if(!empty($med['frequency'] ?? null)), {{ $med['frequency'] }} @endif
@if(!empty($med['duration'] ?? null)) ({{ $med['duration'] }}) @endif
@if(!empty($med['instructions'] ?? null))
{{ $med['instructions'] }}
@endif
@endif
@endforeach
@if(!empty($rx['instructions'] ?? null))
{{ $rx['instructions'] }}
@endif
@endif
@if(!empty($mp['investigation_radiology'] ?? null) || !empty($mp['investigation_laboratory'] ?? null) || !empty($mp['investigation_interventional'] ?? null))
Investigation
@if(!empty($mp['investigation_radiology'] ?? null))
Radiology: {{ $mp['investigation_radiology'] }}
@endif
@if(!empty($mp['investigation_laboratory'] ?? null))
Laboratory: {{ $mp['investigation_laboratory'] }}
@endif
@if(!empty($mp['investigation_interventional'] ?? null))
Interventional: {{ $mp['investigation_interventional'] }}
@endif
@endif
@if(!empty($mp['referrals'] ?? null))
Referrals
{{ $mp['referrals'] }}
@endif
@if($hasIpv)
In-person visit
@if(!empty($ipv['revisit_history'] ?? null))
Doctor revisits history:
{{ $ipv['revisit_history'] }}
@endif
@if(!empty($ipv['general_examination'] ?? null))
General examination:
@php $ge = $ipv['general_examination']; @endphp
@if(is_array($ge))
@php
$geLines = [];
if(!empty($ge['appearance'] ?? null)) $geLines[] = 'General appearance: ' . $ge['appearance'];
if(!empty($ge['jaundice'] ?? null)) $geLines[] = 'Jaundice: ' . $ge['jaundice'];
if(!empty($ge['anemia'] ?? null)) $geLines[] = 'Anemia: ' . $ge['anemia'];
if(!empty($ge['cyanosis'] ?? null)) $geLines[] = 'Cyanosis: ' . $ge['cyanosis'];
if(!empty($ge['clubbing'] ?? null)) $geLines[] = 'Clubbing: ' . $ge['clubbing'];
if(!empty($ge['oedema'] ?? null)) $geLines[] = 'Oedema: ' . $ge['oedema'];
if(!empty($ge['lymphadenopathy'] ?? null)) $geLines[] = 'Lymphadenopathy: ' . $ge['lymphadenopathy'];
if(!empty($ge['dehydration'] ?? null)) $geLines[] = 'Dehydration: ' . $ge['dehydration'];
@endphp
{{ implode("\n", $geLines) }}
@else
{{ $ge }}
@endif
@endif
@if(!empty($ipv['system_examination'] ?? null))
System examination:
{{ is_string($ipv['system_examination']) ? $ipv['system_examination'] : json_encode($ipv['system_examination']) }}
@endif
@elseif(is_string($ipv) && trim($ipv) !== '')
In-person visit
{{ $ipv }}
@endif
@elseif (is_string($mp) && trim($mp) !== '')
Outcome
@if(!empty($oc['doctor_notes']) && is_string($oc['doctor_notes']) && trim($oc['doctor_notes']) !== '')
Clinician
{{ $oc['doctor_notes'] }}
@endif
@if(array_key_exists('patient_reports_improved', $oc))
Patient follow-up
Reports improved:
@if($oc['patient_reports_improved'] === true)
Yes
@elseif($oc['patient_reports_improved'] === false)
No
@else
Not recorded
@endif
@if(!empty($oc['patient_reported_at']))
({{ $oc['patient_reported_at'] }})
@endif
@endif
@endif
@if(count($uploads) > 0)