@if(($options['include_patient'] ?? true))
Patient
{{ $patient->patient_name ?? 'Patient' }}
ID: {{ $patient->id ?? '--' }}
Age / Gender
{{ $patient->age ?? '--' }} yrs
{{ ucfirst($patient->gender ?? '--') }}
@endif
Report Date
{{ optional($performedAt)->format('M d, Y') ?? '--' }}
{{ optional($performedAt)->format('h:i A') ?? '' }}
@if(($options['include_summary'] ?? true))
Diagnostics Summary
{{ $summary ?: 'Summary pending' }}
@endif
@if(!empty($diagnosticSections))
Diagnostics Form
@foreach($diagnosticSections as $section)
{{ $section['title'] }}
| Metric |
Value |
Suggestion |
@foreach($section['items'] as $item)
@php
$suggestion = $item['suggestion'] ?? null;
$badgeClass = 'suggestion-info';
if ($suggestion) {
$s = strtolower($suggestion);
if (str_contains($s, 'normal')) $badgeClass = 'suggestion-good';
if (str_contains($s, 'mild')) $badgeClass = 'suggestion-warn';
if (str_contains($s, 'low') || str_contains($s, 'poor') || str_contains($s, 'insuff')) $badgeClass = 'suggestion-bad';
if (str_contains($s, 'high') || str_contains($s, 'excess')) $badgeClass = 'suggestion-info';
}
@endphp
| {{ $item['label'] }} |
{{ $item['value'] }} |
@if($suggestion)
{{ $suggestion }}
@else
--
@endif
|
@endforeach
@endforeach
@endif
@if(($options['include_conditions'] ?? true))
Detected Conditions
@forelse(($report['conditions'] ?? []) as $condition)
{{ $condition['condition_name'] ?? 'Condition' }}
{{ $condition['condition_key'] ?? '' }}
{{ $condition['affected_parameters'] ?? '' }}
@if(($options['include_evidence'] ?? true) && !empty($condition['evidence']))
Evidence
@foreach($condition['evidence'] as $item)
- {{ $item }}
@endforeach
@endif
@if(($options['include_therapy'] ?? true) && !empty($condition['therapy_required']))
Therapy required
{{ $condition['therapy_required'] }}
@endif
@empty
No conditions identified for this diagnostic.
@endforelse
@endif