@extends('layouts.main') @section('content')

{{ __('patients.view') }}

{{ csrf_field() }}
{{ csrf_field() }}
{{ csrf_field() }}

{{ $PatientCount }} {{ __('patients.patients') }}

@if(isset($criteria) && isset($resultCount))

{{ __('patients.search_criteria') }} : {{ $criteria }}    {{ __('patients.total_results') }} : {{ $resultCount }}    {{ __('patients.clear_search') }}

@endif
@if(count($patients) > 0) @foreach($patients as $patient) @php $dob = new Carbon\Carbon($patient->date_of_birth); @endphp @endforeach @else @endif
{{ __('patients.patient_number') }} {{ __('patients.full_names') }} {{ __('patients.gender') }} {{ __('patients.age') }} {{ __('patients.phone') }} {{ __('patients.category') }} {{ __('patients.marital_status') }} {{ __('patients.deleted_by') }} {{ __('patients.deleted_on') }} {{ __('patients.reason_for_deactivation') }}
{{ $patient->number }} {{ $patient->first_name." ".$patient->last_name }} @if($patient->gender == 1) {{ __('patients.male') }} @else {{ __('patients.female') }} @endif {{ $dob->diffInYears(Carbon\Carbon::now()) }}yrs {{ $patient->phone }} {{ isset($categories[$patient->category_id]) ? $categories[$patient->category_id] : "N/A" }} {{ isset($marital_statuses[$patient->marital_status]) ? $marital_statuses[$patient->marital_status] : null }} {{ is_null($patient->deleted_by) ? get_full_name(get_name($patient->id, 'patient_id','created_by', 'patient_deactivation_reasons'), "id", "first_name", "last_name", "users") : get_full_name($patient->deleted_by, "id", "first_name", "last_name", "users")}} {{ streamline_date_time($patient->deleted_at)}} {{ get_name($patient->id, 'patient_id','reason', 'patient_deactivation_reasons') }} {{ __('patients.details') }} {{ Form::model($patient->id ,['method' => 'POST', 'route' => ['patients.activate', $patient->id]]) }} {{ Form::close() }}
{{ __('patients.no_records_found') }}
{{ $patients->links() }}
@endsection