Files
streamline-emr/docker/_streamline-src/Modules/Patients/Resources/views/patients/inactive.blade.php
T

125 lines
6.6 KiB
PHP
Executable File

@extends('layouts.main')
@section('content')
<div class="row bg-title">
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('patients.view') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('patients.dashboard') }}</a></li>
<li><a href="{{ route('patients.index') }}">{{ __('patients.patients') }}</a></li>
<li class="active">{{ __('patients.view') }}</li>
</ol>
</div>
<!-- /.col-lg-12 -->
</div>
<div class="white-box">
<div class="row">
<div class="col-md-3">
<form action="{{ route('patients.search') }}" method="POST" role="search">
{{ csrf_field() }}
<div class="input-group">
<input type="text" class="form-control" name="number" placeholder="Patient number">
<!--<span class="input-group-btn">-->
<button type="submit" class="btn btn-success"><span class="glyphicon glyphicon-search"></span></button>
<!--</span>-->
</div>
</form>
</div>
<div class="col-md-3">
<form action="{{ route('patients.search') }}" method="POST" role="search">
{{ csrf_field() }}
<div class="input-group">
<input type="text" class="form-control" name="first_name" placeholder="First name">
<!--<span class="input-group-btn">-->
<button type="submit" class="btn btn-success"><span class="glyphicon glyphicon-search"></span></button>
<!--</span>-->
</div>
</form>
</div>
<div class="col-md-3">
<form action="{{ route('patients.search') }}" method="POST" role="search">
{{ csrf_field() }}
<div class="input-group">
<input type="text" class="form-control" name="last_name" placeholder="Last name">
<!--<span class="input-group-btn">-->
<button type="submit" class="btn btn-success"><span class="glyphicon glyphicon-search"></span></button>
<!--</span>-->
</div>
</form>
</div>
<div class="col-md-1"></div>
<div class="col-md-2">
<div class="text-center label-info btn-rounded">
<p class="text-white">{{ $PatientCount }} {{ __('patients.patients') }}</p>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
@if(isset($criteria) && isset($resultCount))
<p>{{ __('patients.search_criteria') }} : <code>{{ $criteria }}</code> &nbsp;&nbsp;&nbsp;{{ __('patients.total_results') }} : <code>{{ $resultCount }}</code> &nbsp;&nbsp;&nbsp;<a href="{{ route('patients.index') }}">{{ __('patients.clear_search') }}</a></p>
@endif
<div class="white-box">
<div class="table-responsive">
<table class="table color-bordered-table success-bordered-table table-striped table-hover">
<thead>
<tr>
<th>{{ __('patients.patient_number') }}</th>
<th>{{ __('patients.full_names') }}</th>
<th>{{ __('patients.gender') }}</th>
<th>{{ __('patients.age') }}</th>
<th>{{ __('patients.phone') }}</th>
<th>{{ __('patients.category') }}</th>
<th>{{ __('patients.marital_status') }}</th>
<th>{{ __('patients.deleted_by') }}</th>
<th>{{ __('patients.deleted_on') }}</th>
<th>{{ __('patients.reason_for_deactivation') }}</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@if(count($patients) > 0)
@foreach($patients as $patient)
@php $dob = new Carbon\Carbon($patient->date_of_birth); @endphp
<tr>
<td>{{ $patient->number }}</td>
<td>{{ $patient->first_name." ".$patient->last_name }}</td>
<td>
@if($patient->gender == 1)
{{ __('patients.male') }}
@else
{{ __('patients.female') }}
@endif
</td>
<td>{{ $dob->diffInYears(Carbon\Carbon::now()) }}yrs</td>
<td>{{ $patient->phone }}</td>
<td>{{ isset($categories[$patient->category_id]) ? $categories[$patient->category_id] : "N/A" }}</td>
<td>{{ isset($marital_statuses[$patient->marital_status]) ? $marital_statuses[$patient->marital_status] : null }}</td>
<td>{{ 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")}}</td>
<td>{{ streamline_date_time($patient->deleted_at)}}</td>
<td>{{ get_name($patient->id, 'patient_id','reason', 'patient_deactivation_reasons') }}</td>
<td><a href="/patients/{{ $patient->id }}/" class="fcbtn btn btn-outline btn-info btn-rounded"><i class="fa fa-info"></i> {{ __('patients.details') }}</a></td>
<td>
{{ Form::model($patient->id ,['method' => 'POST', 'route' => ['patients.activate', $patient->id]]) }}
<button type="submit" class="btn btn-warning btn-rounded" onclick="return confirm('<?php echo __('patients.are_you_sure') ?>')"><i class="fa fa-check"></i> {{ __('patients.activate') }}</button>
{{ Form::close() }}
</td>
</tr>
@endforeach
@else
<tr class="warning"><td class="center" colspan="8">{{ __('patients.no_records_found') }}</td></tr>
@endif
</tbody>
</table>
</div>
{{ $patients->links() }}
</div>
</div>
</div>
@endsection