@php $results=$custom_test['results']; $collection_tests=$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_time', 'semen_method', 'semen_abstinence' ]); }); $macroscopic_tests=$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_volume', 'semen_color', 'semen_consistency', 'semen_liquefacation_time', 'semen_reaction', 'semen_viscosity' ]); }); $microscopic_tests=$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_concentration', 'semen_total_spermatic_count', 'semen_pus_cells', 'semen_rbcs', 'semen_epithelial_cells', 'semen_sperm_agglutination', 'semen_spermatogenic_cells' ]); }); $motility_tests=$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_after_30_min', 'semen_after_1_h', 'semen_after_2_h', 'semen_after_3_h', 'semen_after_4_h' ]); }); $grade_a=[ '1'=>$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_1_a' ]); })->first(), '1_count'=>$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_1_a_count' ]); })->first(), '2'=>$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_2_a' ]); })->first(), '2_count'=>$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_2_a_count' ]); }) ->first() ]; $grade_b=[ '1'=>$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_1_b' ]); })->first(), '1_count'=>$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_1_b_count' ]); })->first(), '2'=>$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_2_b' ]); })->first(), '2_count'=>$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_2_b_count' ]); })->first(), ]; $grade_d=[ '1'=>$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_1_d' ]); })->first(), '1_count'=>$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_1_d_count' ]); })->first(), '2'=>$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_2_d' ]); })->first(), '2_count'=>$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_2_d_count' ]); })->first(), ]; $grade_c=[ '1'=>$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_1_c' ]); })->first(), '1_count'=>$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_1_c_count' ]); })->first(), '2'=>$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_2_c' ]); })->first(), '2_count'=>$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_2_c_count' ]); })->first(), ]; $grade_ab=[ '1'=>$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_1_ab' ]); })->first(), '1_count'=>$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_1_ab_count' ]); })->first(), '2'=>$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_2_ab' ]); })->first(), '2_count'=>$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_2_ab_count' ]); })->first(), ]; $dead_forms=[ '1'=>$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_1_dead_forms' ]); })->first(), '1_count'=>$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_1_dead_forms_count' ]); })->first(), '2'=>$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_2_dead_forms' ]); })->first(), '2_count'=>$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_2_dead_forms_count' ]); })->first(), ]; $head_defects=$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_head_defects', 'semen_head_tapered', 'semen_head_pyriform', 'semen_head_round', 'semen_head_amorphous', 'semen_head_vacuolated', 'semen_head_others' ]); }); $mid_defects=$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_mid_piece_defects', 'semen_mid_bent_nick', 'semen_mid_asymmetrical', 'semen_mid_thick_insertion', 'semne_mid_others' ]); }); $tail_defects=$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_tail_defects', 'semen_tail_short', 'semen_tail_bent', 'semen_tail_coiled' ]); }); $micro_spermia_defects=$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_micro_spermia', ]); }); $abnormal_forms=$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'semen_abnormal_forms', ]); }) ->first(); $graph_tests=$results->filter(function ($value, $key) { return in_array($value['custom_name'],[ 'motility_graph', 'first_hour_profile_graph', 'second_hour_profile_graph', 'abnormal_forms_graph', ]); }); @endphp
Collection
@foreach($collection_tests as $result) @endforeach
{{$result['component']['name']}} @include('partials.custom_tests.semen.result',['result'=>$result]) @include('partials.custom_tests.semen.reference_range',['result'=>$result]) @include('partials.custom_tests.semen.status',['result'=>$result])
Macroscopic Examination
@foreach($macroscopic_tests as $result) @endforeach
{{$result['component']['name']}} @include('partials.custom_tests.semen.result',['result'=>$result]) @include('partials.custom_tests.semen.reference_range',['result'=>$result]) @include('partials.custom_tests.semen.status',['result'=>$result])
Microscopic Examination
@foreach($microscopic_tests as $result) @endforeach
{{$result['component']['name']}} @include('partials.custom_tests.semen.result',['result'=>$result]) @include('partials.custom_tests.semen.reference_range',['result'=>$result]) @include('partials.custom_tests.semen.status',['result'=>$result])
Sperm Motility
@foreach($motility_tests as $result) @endforeach
{{__('Test')}} {{__('Result')}} million/ml
{{$result['component']['name']}} @include('partials.custom_tests.semen.result',['result'=>$result,'max'=>'100']) @include('partials.custom_tests.semen.reference_range',['result'=>$result]) @include('partials.custom_tests.semen.status',['result'=>$result]) @php $count_test=$results->filter(function ($value, $key)use($result) { return in_array($value['custom_name'],[$result['component']['custom_name'].'_count']); }) ->first(); @endphp @include('partials.custom_tests.semen.result',['result'=>$count_test,'readonly'=>'true'])
Sperm Motility Profile
{{__('Test')}}
{{__('First Hour')}} {{__('Second Hour')}}
% million/ml % million/ml
Grade A (rapid linear progression) @include('partials.custom_tests.semen.result',['result'=>$grade_a['1'],'max'=>100]) @include('partials.custom_tests.semen.result',['result'=>$grade_a['1_count'],'readonly'=>true]) @include('partials.custom_tests.semen.result',['result'=>$grade_a['2'],'max'=>100]) @include('partials.custom_tests.semen.result',['result'=>$grade_a['2_count'],'readonly'=>true])
Grade B (slow linear or non-linear) @include('partials.custom_tests.semen.result',['result'=>$grade_b['1'],'max'=>100]) @include('partials.custom_tests.semen.result',['result'=>$grade_b['1_count'],'readonly'=>true]) @include('partials.custom_tests.semen.result',['result'=>$grade_b['2'],'max'=>100]) @include('partials.custom_tests.semen.result',['result'=>$grade_b['2_count'],'readonly'=>true])
Grade C (non-progressive motility) @include('partials.custom_tests.semen.result',['result'=>$grade_c['1'],'max'=>100]) @include('partials.custom_tests.semen.result',['result'=>$grade_c['1_count'],'readonly'=>true]) @include('partials.custom_tests.semen.result',['result'=>$grade_c['2'],'max'=>100]) @include('partials.custom_tests.semen.result',['result'=>$grade_c['2_count'],'readonly'=>true])
Grade D (immotile spermatozoa) @include('partials.custom_tests.semen.result',['result'=>$grade_d['1'],'max'=>100]) @include('partials.custom_tests.semen.result',['result'=>$grade_d['1_count'],'readonly'=>true]) @include('partials.custom_tests.semen.result',['result'=>$grade_d['2'],'max'=>100]) @include('partials.custom_tests.semen.result',['result'=>$grade_d['2_count'],'readonly'=>true])
Grade A+B (forward progression) @include('partials.custom_tests.semen.result',['result'=>$grade_ab['1'],'max'=>100]) @include('partials.custom_tests.semen.result',['result'=>$grade_ab['1_count'],'readonly'=>true]) @include('partials.custom_tests.semen.result',['result'=>$grade_ab['2'],'max'=>100]) @include('partials.custom_tests.semen.result',['result'=>$grade_ab['2_count'],'readonly'=>true])
Dead forms @include('partials.custom_tests.semen.result',['result'=>$dead_forms['1'],'max'=>100]) @include('partials.custom_tests.semen.result',['result'=>$dead_forms['1_count'],'readonly'=>true]) @include('partials.custom_tests.semen.result',['result'=>$dead_forms['2'],'max'=>100]) @include('partials.custom_tests.semen.result',['result'=>$dead_forms['2_count'],'readonly'=>true])
Abnormal Forms :
@include('partials.custom_tests.semen.result',['result'=>$abnormal_forms,'max'=>100])
%
@php $count=0; @endphp @foreach($head_defects as $test) @php $count++; @endphp @endforeach
{{$test['component']['name']}} @include('partials.custom_tests.semen.result',['result'=>$test,'max'=>100])
0
@php $count=0; @endphp @foreach($mid_defects as $test) @php $count++; @endphp @endforeach
{{$test['component']['name']}} @include('partials.custom_tests.semen.result',['result'=>$test,'max'=>100])
0
@php $count=0; @endphp @foreach($tail_defects as $test) @php $count++; @endphp @endforeach
{{$test['component']['name']}} @include('partials.custom_tests.semen.result',['result'=>$test,'max'=>100])
0
@php $count=0; @endphp @foreach($micro_spermia_defects as $test) @php $count++; @endphp @endforeach
{{$test['component']['name']}} @include('partials.custom_tests.semen.result',['result'=>$test,'max'=>100])
@foreach($graph_tests as $test) @include('partials.custom_tests.semen.result',['result'=>$test]) @endforeach

{{__('Comment')}}

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