@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')
@if(count($data['custom_tests'])) @php $count_custom_tests=0; @endphp @foreach($data['custom_tests'] as $custom_test) @php $count_custom_tests++; @endphp @include('pdf.custom_working_paper.v3.'.$custom_test['test']['custom_name']) @if(count($data['custom_tests'])>$count_custom_tests) @endif @endforeach @if(count($data['categories'])) @endif @endif @php $count_categories=0; @endphp @if(count($data['categories'])) @foreach($data['categories'] as $category) @php $count_categories++; $count_category_test=0; @endphp @foreach($category['main_tests'] as $main_test) @php $count_category_test++; $count_test_component=0; @endphp @if($count_category_test==1) @endif @if($main_test['show_group_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.working_sheet.template_3.partials.test_component',[ 'has_two_units'=>true ]) @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.working_sheet.template_3.partials.test_component',[ 'has_two_units'=>true ]) @endforeach @endif
{{$category['name']}}
Test SI Unit Conv. Unit
{{$main_test['test']['name']}}
Comment : {!! $main_test['comment_html'] !!}
@endforeach {{-- @if(count($data['categories'])>$count_categories) @endif --}} @endforeach @endif @if((count($data['custom_tests'])&&count($data['alone_tests']))||(count($data['categories'])&&count($data['alone_tests']))) @endif @php $count_alone=0; @endphp @foreach($data['alone_tests'] as $test) @php $count_alone++; @endphp @php $has_two_units=$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($test['results']); @endphp @if($has_two_units) @else @endif @foreach($test["results"] as $result) @php $count_test_component++; @endphp @include('pdf.working_sheet.template_3.partials.test_component',[ 'alone'=>true, 'has_two_units'=>$has_two_units, 'main_test'=>$test, ]) @endforeach
{{$test['test']['category']['name']}}
{{$test['test']['name']}} SI Unit Conv. Unit Result
Comment : {!! $test['comment_html'] !!}
@if($count_alone @endif @endforeach @if((count($data['cultures'])&&count($data['alone_tests']))||(count($data['cultures'])&&count($data['categories']))||(count($data['cultures'])&&count($data['custom_tests']))) @endif @php $count_cultures=0; @endphp @if(count($data['cultures'])) @foreach($data['cultures'] as $culture) @php $count_cultures++; @endphp @if(count($culture['culture_options'])) @endif
{{$culture['culture']['name']}} @if(isset($culture['assigned_to'])&&isset($culture['assigned_to']['user'])) ( {{$culture['assigned_to']['user']['name']}} ) @endif
@php $count_options=1; @endphp @foreach($culture['culture_options'] as $culture_option) @if($count_options%2>0) @endif @if($count_options%2>0) @endif @php $count_options++; @endphp @endforeach
{{$culture_option['name']}} :
Sensitive Moderate Resistant
Comment :
@if($count_cultures @endif @endforeach @endif
@endsection