@extends('layouts.main') @push('styles') @endpush @section('content')

{{ __('investigations.authenticate_lab_investigations') }}

{{ Form::open(['method'=>'post','route' => 'investigations.authenticate_labs']) }} {{ Form::hidden('patient_id', 0, ['id' => 'patient_id']) }}
{{ Form::label('search_patient', __('investigations.search_by_patient')) }}
{{ Form::submit(__('investigations.search'), ['class'=>'btn btn-success pull-right']) }}
{{ Form::close() }}
{{ Form::open(['route' => 'investigations.authenticate_investigations']) }}
@include('flash::message') @php $indicator = ''; $normal_orders =array_filter($orders, function ($item) use ($indicator) { return $item['urgent_ids'] == $indicator; }); $urgent_orders= array_filter($orders, function ($item) use ($indicator) { return $item['urgent_ids'] !== $indicator; }); @endphp @if($search_text != "")

@if (count($urgent_orders) > 0)    @endif

@endif
@foreach($normal_orders as $order) {{ Form::hidden('order_id[]',$order['order_id']) }} @endforeach @if(count($orders) <= 0) @endif
{{ __('investigations.date') }} {{ __('investigations.patient_number') }} {{ __('investigations.patient_names') }} {{ __('investigations.investigations') }} {{ __('investigations.results') }} {{ __('investigations.select') }}
{{ $order['date'] }} {{ $order['number'] }} {!! insurance_flag($order['id']) !!} @foreach($order['values'] as $value) @if(get_name($value['investigation_id'], 'id', 'type', 'investigations') == 1) @php // get the specialised results and check if it is valid $specialised_results = \Illuminate\Support\Facades\DB::table('investigation_specialised_results')->find($value['value']); $specialised_ids = []; $specialised_values = []; if(!is_null($specialised_results)){ $specialised_ids = explode(",", $specialised_results->specialised_variable_id); $specialised_values = explode(",", $specialised_results->value); } @endphp @if(count($specialised_ids) > 0) @for($i = 0; $i < count($specialised_ids); $i++) @endfor @else @endif @else @endif @endforeach {{ Form::hidden('count[]',$count) }}
{{ $value['name'] }} @if(empty($value['per_investigation']) || $value['per_investigation'] == 0) @else @endif
{{ get_name($specialised_ids[$i], 'id', 'name', 'investigation_specialised_variables') }} {{ $specialised_values[$i] }}
{{ $value['name'] }} {{ $value['value'] }} @if (!empty($value['document']))

{{ $value['title'] }} @endif
@if(empty($value['per_investigation']) || $value['per_investigation'] == 0) @else @endif
{{ __('investigations.all_results_authenticated') }}
@if (count($urgent_orders) > 0)
@foreach($urgent_orders as $urgent_order) {{ Form::hidden('order_id[]',$urgent_order['order_id']) }} @endforeach
{{ __('investigations.date') }} {{ __('investigations.patient_number') }} {{ __('investigations.patient_names') }} {{ __('investigations.investigations') }} {{ __('investigations.results') }} {{ __('investigations.select') }}
{{ $urgent_order['date'] }} {{ $urgent_order['number'] }} {!! insurance_flag($urgent_order['id']) !!} @foreach($urgent_order['values'] as $value) @if(get_name($value['investigation_id'], 'id', 'type', 'investigations') == 1) @php // get the specialised results and check if it is valid $specialised_results = \Illuminate\Support\Facades\DB::table('investigation_specialised_results')->find($value['value']); $specialised_ids = []; $specialised_values = []; if(!is_null($specialised_results)){ $specialised_ids = explode(",", $specialised_results->specialised_variable_id); $specialised_values = explode(",", $specialised_results->value); } @endphp @if(count($specialised_ids) > 0) @for($i = 0; $i < count($specialised_ids); $i++) @endfor @else @endif @else @endif @endforeach {{ Form::hidden('count[]',$count) }}
{{ $value['name'] }} @if(empty($value['per_investigation']) || $value['per_investigation'] == 0) @else @endif
{{ get_name($specialised_ids[$i], 'id', 'name', 'investigation_specialised_variables') }} {{ $specialised_values[$i] }}
{{ $value['name'] }} {{ $value['value'] }} @if (!empty($value['document']))

{{ $value['title'] }} @endif
@if(empty($value['per_investigation']) || $value['per_investigation'] == 0) @else @endif
@endif
{{ Form::label('username', __('investigations.username')) }} {{ Form::text('username', '', ['class' => 'form-control compulsory', 'required']) }}
{{ Form::label('password', __('investigations.password')) }}
{{ Form::button(__('investigations.authenticate_results'),['type'=>'submit','id'=>'authenticate_submit_button','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::close() }} @endsection @push('scripts') @endpush