@extends('layouts.app') @section('title', __('laboratory::messages.cultures.title')) @section('content')

{{ __('laboratory::messages.cultures.title') }}

{{ $result->item?->test_name }}

@if ($result->isVerified())
{{ __('laboratory::messages.cultures.verified_locked') }}
@endif
@if ($result->isolates->isEmpty()) {{-- No growth is the commonest culture result, so the empty state says what it means rather than looking broken. --}}

{{ __('laboratory::messages.cultures.nothing_yet') }}

@else @foreach ($result->isolates as $isolate)
{{ $isolate->organism_name }} @if ($isolate->colony_count)
{{ $isolate->colony_count }}
@endif
@unless ($result->isVerified())
@csrf @method('DELETE')
@endunless
@if ($isolate->sensitivities->isNotEmpty())
@foreach ($isolate->sensitivities as $s) @endforeach
{{ $s->antibiotic_name }} {{-- S / I / R. The letter carries the meaning on its own, so the colour is reinforcement rather than the only way to read the antibiogram. --}} $s->sensitivity === \App\Modules\Laboratory\Enums\Sensitivity::Sensitive, 'px-pill--amber' => $s->sensitivity === \App\Modules\Laboratory\Enums\Sensitivity::Intermediate, 'px-pill--red' => $s->sensitivity === \App\Modules\Laboratory\Enums\Sensitivity::Resistant, ])>{{ $s->sensitivity->letter() }}
@endif @if ($isolate->note)
{{ $isolate->note }}
@endif
@endforeach

{{ __('laboratory::messages.cultures.key') }}

@endif
@unless ($result->isVerified())
{{-- One organism per submission. A single form that grows rows as you click leaves a half-finished culture at the mercy of a closed tab; this saves each organism as it is finished. --}}
@csrf

{{ __('laboratory::messages.cultures.no_growth_hint') }}

@error('organism_id')
{{ $message }}
@enderror
{{ __('laboratory::messages.cultures.colony_count_hint') }}
@error('colony_count')
{{ $message }}
@enderror
{{-- Free text as well as the list: refusing to record an organism the catalogue has not met yet would be the wrong way round. --}}
@error('organism')
{{ $message }}
@enderror
@error('note')
{{ $message }}
@enderror

{{ __('laboratory::messages.cultures.antibiotics') }}

{{ __('laboratory::messages.cultures.antibiotics_hint') }}

@if ($antibiotics->isEmpty())

—

@else
@foreach ($antibiotics as $drug) @endforeach
{{ $drug->name }}
@endif
{{ __('common.back') }}
@endunless
@endsection