@php $results=$custom_test['results']; $blood_picture_tests=$results->filter(function ($value, $key) { return in_array($value['component']['custom_name'],['blood']); }); $platelates_tests=$results->filter(function ($value, $key) { return in_array($value['component']['custom_name'],['plt','pct','mpv','pdw']); }); // WBC $wbc=$results->filter(function ($value, $key) { return in_array($value['component']['custom_name'],['wbc']); }) ->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(); $ig['relative']=$results->filter(function ($value, $key) { return in_array($value['component']['custom_name'],['ig']); }) ->first(); $ig['absolute']=$results->filter(function ($value, $key) { return in_array($value['component']['custom_name'],['ig_absolute']); }) ->first(); $extra_tests=$results->filter(function ($value, $key) { return in_array($value['component']['custom_name'],['micro']); }); @endphp
@if(count($blood_picture_tests))
Blood Picture
@foreach($blood_picture_tests as $result) @if(isset($result['component'])) @endif @endforeach
{{__('Test')}} {{__('Result')}} {{__('Manual')}} {{__('Reference range')}} {{__('Status')}}
{{$result['component']['short_name']}} @include('partials.custom_tests.cbc.result',['result'=>$result]) @include('partials.custom_tests.cbc.reference_range',['result'=>$result]) @include('partials.custom_tests.cbc.status',['result'=>$result])
@endif @if(count($platelates_tests))
Platelate
@foreach($platelates_tests as $result) @if(isset($result['component'])) @endif @endforeach
{{__('Test')}} {{__('Result')}} {{__('Manual')}} {{__('Reference range')}} {{__('Status')}}
{{$result['component']['short_name']}} @include('partials.custom_tests.cbc.result',['result'=>$result]) @include('partials.custom_tests.cbc.reference_range',['result'=>$result]) @include('partials.custom_tests.cbc.status',['result'=>$result])
@endif
@if($wbc||$neutrophils['relative']||$lymphocytes['relative']||$monocytes['relative']||$eosinophils['relative']||$basophils['relative']||$ig['relative'])
Differential white cell Count
@if($wbc) @endif @if($ig['relative']) @endif
WBCs @include('partials.custom_tests.cbc.result',['result'=>$wbc]) @include('partials.custom_tests.cbc.reference_range',['result'=>$wbc]) @include('partials.custom_tests.cbc.status',['result'=>$wbc])
{{__('Test')}} Relative count % Absolute count K/uL
Neutrophils
@include('partials.custom_tests.cbc.result',['result'=>$neutrophils['relative']]) @include('partials.custom_tests.cbc.reference_range',['result'=>$neutrophils['relative']]) @include('partials.custom_tests.cbc.status',['result'=>$neutrophils['relative']])
@include('partials.custom_tests.cbc.result',['result'=>$neutrophils['absolute']]) @include('partials.custom_tests.cbc.reference_range',['result'=>$neutrophils['absolute']]) @include('partials.custom_tests.cbc.status',['result'=>$neutrophils['absolute']])
Lymphocytes
@include('partials.custom_tests.cbc.result',['result'=>$lymphocytes['relative']]) @include('partials.custom_tests.cbc.reference_range',['result'=>$lymphocytes['relative']]) @include('partials.custom_tests.cbc.status',['result'=>$lymphocytes['relative']])
@include('partials.custom_tests.cbc.result',['result'=>$lymphocytes['absolute']]) @include('partials.custom_tests.cbc.reference_range',['result'=>$lymphocytes['absolute']]) @include('partials.custom_tests.cbc.status',['result'=>$lymphocytes['absolute']])
Monocytes
@include('partials.custom_tests.cbc.result',['result'=>$monocytes['relative']]) @include('partials.custom_tests.cbc.reference_range',['result'=>$monocytes['relative']]) @include('partials.custom_tests.cbc.status',['result'=>$monocytes['relative']])
@include('partials.custom_tests.cbc.result',['result'=>$monocytes['absolute']]) @include('partials.custom_tests.cbc.reference_range',['result'=>$monocytes['absolute']]) @include('partials.custom_tests.cbc.status',['result'=>$monocytes['absolute']])
Eosinophils
@include('partials.custom_tests.cbc.result',['result'=>$eosinophils['relative']]) @include('partials.custom_tests.cbc.reference_range',['result'=>$eosinophils['relative']]) @include('partials.custom_tests.cbc.status',['result'=>$eosinophils['relative']])
@include('partials.custom_tests.cbc.result',['result'=>$eosinophils['absolute']]) @include('partials.custom_tests.cbc.reference_range',['result'=>$eosinophils['absolute']]) @include('partials.custom_tests.cbc.status',['result'=>$eosinophils['absolute']])
Basophils
@include('partials.custom_tests.cbc.result',['result'=>$basophils['relative']]) @include('partials.custom_tests.cbc.reference_range',['result'=>$basophils['relative']]) @include('partials.custom_tests.cbc.status',['result'=>$basophils['relative']])
@include('partials.custom_tests.cbc.result',['result'=>$basophils['absolute']]) @include('partials.custom_tests.cbc.reference_range',['result'=>$basophils['absolute']]) @include('partials.custom_tests.cbc.status',['result'=>$basophils['absolute']])
IG
@include('partials.custom_tests.cbc.result',['result'=>$ig['relative']]) @include('partials.custom_tests.cbc.reference_range',['result'=>$ig['relative']]) @include('partials.custom_tests.cbc.status',['result'=>$ig['relative']])
@include('partials.custom_tests.cbc.result',['result'=>$ig['absolute']]) @include('partials.custom_tests.cbc.reference_range',['result'=>$ig['absolute']]) @include('partials.custom_tests.cbc.status',['result'=>$ig['absolute']])
Sum 0
@endif @if(count($extra_tests))
Extra
@foreach($extra_tests as $result) @if(isset($result['component'])) @endif @endforeach
{{__('Test')}} {{__('Result')}} {{__('Reference range')}} {{__('Status')}}
{{$result['component']['short_name']}} @include('partials.custom_tests.cbc.result',['result'=>$result]) Normal 0 % @include('partials.custom_tests.cbc.reference_range',['result'=>$result]) @include('partials.custom_tests.cbc.status',['result'=>$result])
@endif

{{__('Blood Film')}}

{{__('Comment')}}

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