@extends('layouts.medical_report_pdf3')
@section('title')
{{'medical_report_'.$invoice['barcode'].'_'.date('d-m-Y_H-i',strtotime($invoice['created_at'])).'.pdf'}}
@endsection
@section('content')
@php
$count_categories=0;
@endphp
@if(count($data['all_categories']))
@foreach($data['all_categories'] as $category)
@php
$count_categories++;
$count_category_test=0;
$first=1;
@endphp
@foreach($category['main_tests'] as $main_test)
@php
$count_category_test++;
$count_test_component=0;
if(isset($category['main_tests'][$count_category_test]))
{
$next_test=$category['main_tests'][$count_category_test];
}
elseif(isset($data['all_categories'][$count_categories]))
{
$next_test=$data['all_categories'][$count_categories]['main_tests'][0];
}
else{
$next_test=null;
}
if(isset($category['main_tests'][$count_category_test-2]))
{
$previous_test=$category['main_tests'][$count_category_test-2];
}
elseif(isset($data['all_categories'][$count_categories-2]))
{
$previous_test=$data['all_categories'][$count_categories-2]['main_tests'][0];
}
else{
$previous_test=null;
}
@endphp
@if($main_test['custom']&&!$main_test['is_parent'])
@if($count_category_test>1||$count_categories>1)
@endif
@include('pdf.custom_reports.v3.'.$main_test['test']['custom_name'],['custom_test'=>$main_test])
@if(($count_category_test
@endif
@php
$first=1;
@endphp
@elseif($main_test['print_alone']&&!$main_test['is_parent'])
@if($count_category_test>1||$count_categories>1)
@endif
|
{{$main_test['test']['category']['name']}}
|
|
|
@if($main_test['show_group_name'])
{{$main_test['test']['name']}}
@else
Test
@endif
|
@php
$has_two_units=$main_test->results()->where(function($query){
$query->where('enable_si_unit',true)
->where('enable_conventional_unit',true);
})->count();
$count_test_component=0;
$count_main_test_component=count($main_test['results']);
@endphp
@if($has_two_units)
SI Unit
|
Conv. Unit
|
@else
Result
|
@endif
|
@foreach($main_test["results"] as $result)
@php
$count_test_component++;
@endphp
@include('pdf.medical_report.template_3.partials.test_component',[
'alone'=>true,
'has_two_units'=>$has_two_units,
'main_test'=>$main_test,
])
@endforeach
@if(!empty($test['comment']))
@endif
@if(($count_category_test
@endif
@php
$first=1;
@endphp
@else
@if($first)
@php
$first=0;
@endphp
|
{{$category['name']}}
|
|
|
|
Test
|
SI Unit
|
Conv. Unit
|
@endif
|
@if($main_test['show_group_name'])
|
{{$main_test['test']['name']}}
|
@endif
@if(count($main_test['childs']))
@php
$count_main_test_component=0;
foreach($main_test["childs"] as $test)
{
$count_main_test_component+=count($test['results']);
}
@endphp
@foreach($main_test["childs"] as $test)
@foreach($test["results"] as $result)
@php
$count_test_component++;
@endphp
@include('pdf.medical_report.template_3.partials.test_component',[
'has_two_units'=>(($result['enable_si_unit']&&$result['enable_conventional_unit'])||$result['enable_conventional_unit'])
])
@endforeach
@endforeach
@else
@php
$count_main_test_component=count($main_test['results']);
@endphp
@foreach($main_test["results"] as $result)
@php
$count_test_component++;
@endphp
@include('pdf.medical_report.template_3.partials.test_component',[
'has_two_units'=>(($result['enable_si_unit']&&$result['enable_conventional_unit'])||$result['enable_conventional_unit'])
])
@endforeach
@endif
@if(!empty($main_test['comment']))
@endif
@endif
@endforeach
@endforeach
@endif
@if(count($data['cultures'])&&count($data['categories']))
@endif
@php
$count_cultures=0;
@endphp
@if(count($data['cultures']))
@foreach($data['cultures'] as $culture)
@php
$count_cultures++;
@endphp
|
|
{{$culture['culture']['name']}}
|
|
@if(count($culture['report_culture_options']))
@php
$count_options=1;
@endphp
@foreach($culture['report_culture_options'] as $culture_option)
@if($count_options%2>0)
@endif
|
{{$culture_option['name']}} :
|
@include('pdf.partials.culture_option_result',['culture_option'=>$culture_option])
|
|
@if($count_options%2>0)
@endif
@php
$count_options++;
@endphp
@endforeach
@endif
@include('pdf.partials.culture_'.$medical_report_settings['culture_format'])
@if(!empty($culture['comment']))
@endif
@if($count_cultures
@endif
@endforeach
@endif
@endsection