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

@if($imaging_type == 'Imaging') {{ __('investigations.incoming_radiology_investigations') }} @elseif($imaging_type == 'Cardio') {{ __('investigations.incoming_cardiology_investigations') }} @elseif($imaging_type == 'Ultrasound') {{ __('investigations.incoming_ultrasound_investigations') }} @elseif($imaging_type == 'Ultrasound_Obstetric') {{ __('investigations.incoming_obstetric_ultrasound_investigations') }} @endif

{{ Form::open(['url' => '/investigations/incoming_imaging/' . $imaging_type, 'data-toggle' => 'validator']) }} {{ Form::hidden('patient_id', 0, ['id' => 'patient_id']) }}
{{ Form::label('search_patient', 'Search By Patient') }}
{{ Form::submit(__('investigations.search'), ['class'=>'btn btn-success pull-right']) }}
{{ Form::close() }}
@include('flash::message') @if($search_text != "")

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


@endif
@foreach($incomings as $incoming) @if($incoming->inpatient == 0 && $incoming->inpatient_bill_generated == 0 && $incoming->payment_status == 0 && !can_investigations_be_performed($incoming->patients_category_id)) @else @endif @endforeach @if(count($incomings) <= 0) @endif
{{ __('investigations.patient_names') }} {{ __('investigations.requested') }} {{ __('investigations.source') }} {{ __('investigations.payment') }} {{ __('investigations.request') }} {{ __('investigations.actions') }}
{!! insurance_flag($incoming->patient_id) !!} ({{ $incoming->patient_number }}) - ({{ $patient_categories[$incoming->patients_category_id] ?? '' }}) {{ streamline_date_time_short($incoming->created_at) }} @if($incoming->inpatient == 1 || $incoming->inpatient_bill_generated == 1) {{ get_ward_name($incoming->patient_id, $incoming->episode_id) }} @else OPD @endif @if($incoming->payment_status == 0) @if($incoming->inpatient_bill_generated == 1) @else @endif @else @endif {{ count(explode(",", $incoming->investigation_id)) }} {{ __('investigations.tests') }} {{ __('investigations.patient_has_not_paid_for_ordered_investigations') }} @if($imaging_type == 'Ultrasound_Obstetric') {{ Form::open(['route' => 'investigations.ultrasound_obstetric_report']) }} @else {{ Form::open(['route' => 'investigations.ordered_results']) }} @endif {{ Form::hidden('order_id',$incoming->id) }} {{ Form::hidden('order_type', $imaging_type) }} {{ Form::hidden('patient_id',$incoming->patient_id) }} {{ Form::hidden('episode_id',$incoming->episode_id) }} {{ Form::close() }} {{ __('investigations.select_patient') }} {{ __('investigations.print_request') }}
{{ __('investigations.no_requests_available') }}
@foreach($results as $result) @if($result->inpatient == 0 && $result->inpatient_bill_generated == 0 && $result->payment_status == 0 && !can_investigations_be_performed($result->patients_category_id)) @else @endif @endforeach @if(count($results) <= 0) @endif
{{ __('investigations.patient_names') }} {{ __('investigations.requested') }} Performed At {{ __('investigations.turn_around_time') }} {{ __('investigations.source') }} {{ __('investigations.payment') }} {{ __('investigations.request') }} {{ __('investigations.done_by') }} {{ __('investigations.actions') }}
{!! insurance_flag($result->patient_id) !!} ({{ $result->patient_number }}) - ({{ $patient_categories[$result->patients_category_id] ?? '' }}) {{ streamline_date_time_short($result->created_at) }} {{ $result->results_created_at ? streamline_date_time_short($result->results_created_at) : "N/A" }} {{ \Carbon\Carbon::parse($result->results_created_at)->diffForHumans(\Carbon\Carbon::parse($result->created_at)) }} request @if($result->inpatient == 1 || $result->inpatient_bill_generated == 1) {{ get_ward_name($result->patient_id, $result->episode_id) }} @else OPD @endif @if($result->payment_status == 0) @if($result->inpatient_bill_generated == 1) @else @endif @else @endif {{ count(explode(",", $result->investigation_id)) }} {{ __('investigations.tests') }} {{ get_full_name($result->created_by, "id", "first_name", "last_name", "users") }} {{ __('investigations.patient_has_not_paid_for_ordered_investigations') }} @if($imaging_type == 'Ultrasound_Obstetric') {{ __('investigations.view_results') }} @else {{ __('investigations.view_results') }} @endif
{{ __('investigations.no_requests_available') }}
@if (count($urgent_incomings) > 0)
@foreach($urgent_incomings as $urgent_incoming) @if($urgent_incoming->inpatient == 0 && $urgent_incoming->inpatient_bill_generated == 0 && $urgent_incoming->payment_status == 0 && !can_investigations_be_performed($urgent_incoming->patients_category_id)) @else @endif @endforeach
{{ __('investigations.patient_names') }} {{ __('investigations.requested') }} {{ __('investigations.source') }} {{ __('investigations.payment') }} {{ __('investigations.request') }} {{ __('investigations.actions') }}
{!! insurance_flag($urgent_incoming->patient_id) !!} ({{ $urgent_incoming->patient_number }}) - ({{ $patient_categories[$urgent_incoming->patients_category_id] ?? '' }}) {{ streamline_date_time_short($urgent_incoming->created_at) }} @if($urgent_incoming->inpatient == 1 || $urgent_incoming->inpatient_bill_generated == 1) {{ get_ward_name($urgent_incoming->patient_id, $urgent_incoming->episode_id) }} @else OPD @endif @if($urgent_incoming->payment_status == 0) @if($urgent_incoming->inpatient_bill_generated == 1) @else @endif @else @endif {{ count(explode(",", $urgent_incoming->investigation_id)) }} {{ __('investigations.tests') }} {{ __('investigations.patient_has_not_paid_for_ordered_investigations') }} @if($imaging_type == 'Ultrasound_Obstetric') {{ Form::open(['route' => 'investigations.ultrasound_obstetric_report']) }} @else {{ Form::open(['route' => 'investigations.ordered_results']) }} @endif {{ Form::hidden('order_id',$urgent_incoming->id) }} {{ Form::hidden('order_type', $imaging_type) }} {{ Form::hidden('patient_id',$urgent_incoming->patient_id) }} {{ Form::hidden('episode_id',$urgent_incoming->episode_id) }} {{ Form::close() }} {{ __('investigations.select_patient') }} {{ __('investigations.print_request') }}
@endif
@endsection @push('scripts') @endpush