@extends('layouts.app') @section('title', __('laboratory::messages.wizard.step_tests')) @php use App\Modules\Laboratory\Models\LabTest; use App\Support\Money\Money; $grouped = $tests->groupBy(fn (LabTest $test): string => $test->category->value); $selected = array_map(intval(...), (array) $selected); /* | The basket totals in the browser, so it needs the two things PHP knows | about this currency and JavaScript does not: how many decimal places it | has, and how the clinic writes it. Sending a worked example rather than a | format string keeps Money the only place that decides either. */ $zero = Money::fromMinor(0, $currency); $exponent = strlen(substr(strrchr($zero->toMajor(), '.') ?: '', 1)); @endphp @section('content')

{{ __('laboratory::messages.wizard.step_tests_heading') }}

{{ __('laboratory::messages.wizard.step_tests_hint') }}

{{ __('common.cancel') }}
@include('laboratory::wizard.partials.steps', ['current' => 'tests']) @if (session('status')) @endif @if ($errors->any()) @endif {{-- Who this is for, on the screen where the clinical choice is made. --}}
{{ $patient->name }}
{{ $patient->mrn }} · {{ $patient->ageLabel }}
@if ($patient->activeAllergyCount > 0) {{ trans_choice('laboratory::messages.wizard.allergies', $patient->activeAllergyCount, ['count' => $patient->activeAllergyCount]) }} @endif {{ __('laboratory::messages.wizard.change_patient') }}
@if ($tests->isEmpty()) {{-- The state most clinics meet first: a catalogue is loaded but nothing in it has been made available yet. Says which, and who can change it, rather than showing an empty list. --}}

{{ __('laboratory::messages.orders.no_tests_available') }}

{{ __('laboratory::messages.orders.no_tests_available_text') }}

@else {{-- Filtering is done by the bundled app.js through these data attributes — never by an inline