{{-- ═══ ICD-10 Diagnosis Picker ═══════════════════════════════════════════ --}} {{-- Shared partial included in consultation show, visits/show, and inpatient --}} {{-- Usage: @include('partials._icd10_picker', ['consultation' => $consultation]) --}} @php $existingDiagnoses = isset($consultation) && $consultation ? $consultation->diagnoses()->with('icd10Code')->get() : collect(); $consultationId = $consultation->id ?? null; @endphp
{{-- Selected diagnoses chips. No min-height — when there are no chips the wrapper collapses to zero so it doesn't leave an unexplained blank band above the search input on fresh visits. --}}
@foreach($existingDiagnoses as $diag) @if($diag->is_primary)PRIMARY@endif {{ $diag->icd10Code->code }} {{ $diag->icd10Code->description }} @if($consultationId) @else @endif @endforeach
{{-- Hidden JSON field posted with the form (for new consultations) --}} {{-- Search input --}}
{{-- Dropdown results --}}
{{-- Legacy free-text fallback --}}
Can't find the code? Enter free-text diagnosis ▾

⚠ Free-text diagnoses are not linked to ICD-10 and will not appear in MOH reports or analytics.

@once @push('scripts') @endpush @endonce