@php $results=$custom_test['results']; $receipt_tests=$results->filter(function ($value, $key) { return in_array($value['component']['custom_name'],['cm_recipient']); }); $donor_tests=$results->filter(function ($value, $key) { return in_array($value['component']['custom_name'],['cm_donor']); }); $comp_tests=$results->filter(function ($value, $key) { return in_array($value['component']['custom_name'],['cm_comp']); }); @endphp
Recipient Data
@foreach($receipt_tests as $result) @endforeach
{{$result['component']['name']}} @include('partials.custom_tests.cross_matching.result',['result'=>$result]) @include('partials.custom_tests.cross_matching.reference_range',['result'=>$result]) @include('partials.custom_tests.cross_matching.status',['result'=>$result])
Donor Data
@foreach($donor_tests as $result) @endforeach
{{$result['component']['name']}} @include('partials.custom_tests.cross_matching.result',['result'=>$result]) @include('partials.custom_tests.cross_matching.reference_range',['result'=>$result]) @include('partials.custom_tests.cross_matching.status',['result'=>$result])
Compatibility result
@foreach($comp_tests as $result) @endforeach
{{$result['component']['name']}} @include('partials.custom_tests.cross_matching.result',['result'=>$result]) @include('partials.custom_tests.cross_matching.reference_range',['result'=>$result]) @include('partials.custom_tests.cross_matching.status',['result'=>$result])

{{__('Comment')}}

@include('admin.medical_reports.modals.comments')