@php $results=$custom_test['results']; $blood_picture_tests=$results->take(12); // segmented $segmented['relative']=$results->filter(function ($value, $key) { return in_array($value['component']['custom_name'],['segmented']); }) ->first(); $bands['relative']=$results->filter(function ($value, $key) { return in_array($value['component']['custom_name'],['band']); }) ->first(); $segmented['absolute']=$results->filter(function ($value, $key) { return in_array($value['component']['custom_name'],['segmented_absolute']); }) ->first(); $bands['absolute']=$results->filter(function ($value, $key) { return in_array($value['component']['custom_name'],['band_absolute']); }) ->first(); // relatives & absolutes $neutrophils['relative']=$results->filter(function ($value, $key) { return in_array($value['component']['custom_name'],['neutrophil']); }) ->first(); $neutrophils['absolute']=$results->filter(function ($value, $key) { return in_array($value['component']['custom_name'],['neutrophil_absolute']); }) ->first(); $lymphocytes['relative']=$results->filter(function ($value, $key) { return in_array($value['component']['custom_name'],['lymphocytes']); }) ->first(); $lymphocytes['absolute']=$results->filter(function ($value, $key) { return in_array($value['component']['custom_name'],['lymphocytes_absolute']); }) ->first(); $monocytes['relative']=$results->filter(function ($value, $key) { return in_array($value['component']['custom_name'],['monocytes']); }) ->first(); $monocytes['absolute']=$results->filter(function ($value, $key) { return in_array($value['component']['custom_name'],['monocytes_absolute']); }) ->first(); $eosinophils['relative']=$results->filter(function ($value, $key) { return in_array($value['component']['custom_name'],['eosinophils']); }) ->first(); $eosinophils['absolute']=$results->filter(function ($value, $key) { return in_array($value['component']['custom_name'],['eosinophils_absolute']); }) ->first(); $basophils['relative']=$results->filter(function ($value, $key) { return in_array($value['component']['custom_name'],['basophils']); }) ->first(); $basophils['absolute']=$results->filter(function ($value, $key) { return in_array($value['component']['custom_name'],['basophils_absolute']); }) ->first(); //Extra $extra_tests=\App\Models\InvoiceTestResult::where([ ['invoice_test_id',$custom_test['id']], ]) ->whereHas('component',function($query){ $query->whereIn('custom_name',[ 'NRBC','blast','juvenile','promyelocyte','myelocytes' ]); }) ->orderBy('id','asc') ->get(); $extra_tests=$results->filter(function ($value, $key) { return in_array($value['component']['custom_name'],['NRBC','blast','juvenile','promyelocyte','myelocytes']); }); @endphp
{{$custom_test['test']['report_name']}}
@foreach($blood_picture_tests as $test) @endforeach
▪ Blood Picture : Reference range
▪ {{$test['component']['shortcut']}}

{{$test['normal_from']}} - {{$test['normal_to']}} {{$test['component']['unit']}}

>
▪ Differential White Cell Count :
@foreach($extra_tests as $test) @endforeach
Test Relative count % Absolute count K/uL
▪ Neutrophils @include('pdf.partials.medical_report_reference_range',['result'=>$neutrophils['relative']]) @include('pdf.partials.medical_report_reference_range',['result'=>$neutrophils['absolute']])
▪ Segmented @include('pdf.partials.medical_report_reference_range',['result'=>$segmented['relative']]) @include('pdf.partials.medical_report_reference_range',['result'=>$segmented['absolute']])
▪ Band @include('pdf.partials.medical_report_reference_range',['result'=>$bands['relative']]) @include('pdf.partials.medical_report_reference_range',['result'=>$bands['absolute']])
▪ Lymphocytes @include('pdf.partials.medical_report_reference_range',['result'=>$lymphocytes['relative']]) @include('pdf.partials.medical_report_reference_range',['result'=>$lymphocytes['absolute']])
▪ Monocytes @include('pdf.partials.medical_report_reference_range',['result'=>$monocytes['relative']]) @include('pdf.partials.medical_report_reference_range',['result'=>$monocytes['absolute']])
▪ Eosinophils @include('pdf.partials.medical_report_reference_range',['result'=>$eosinophils['relative']]) @include('pdf.partials.medical_report_reference_range',['result'=>$eosinophils['absolute']])
▪ Basophils @include('pdf.partials.medical_report_reference_range',['result'=>$basophils['relative']]) @include('pdf.partials.medical_report_reference_range',['result'=>$basophils['absolute']])
▪ {{$test['component']['name']}} Normal 0%
Blood Film :
Comment :