Files
streamline-emr/docker/statistics/Modules/Investigations/Resources/views/investigations/delete_investigations.blade.php
T
2025-03-31 03:46:05 +03:00

175 lines
8.2 KiB
PHP
Executable File

@extends('layouts.main')
@push('styles')
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
@endpush
@section('content')
<div class="row bg-title">
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
<h4 class="page-title">{{ __('investigations.cancel_ordered_investigations') }}</h4>
</div>
<div class="col-lg-6 col-sm-6 col-md-6 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('investigations.dashboard') }}</a></li>
</ol>
</div>
</div>
{{ Form::open(['route' => 'investigations.investigations_to_cancel', 'method' => 'ANY']) }}
<div class="white-box">
<div class="row">
<div class="col-md-3">
<div class="form-group" id="searchby">
{{ Form::label('search_by', __('investigations.date')) }}
{{ Form::select('search_by', ['0'=>'Today','1'=>'Custom Date','2'=>'Custom Range'], '', ['class' => 'form-control','id'=>'search_by', 'required']) }}
<div class="help-block with-errors"></div>
</div>
</div>
<div class="col-md-3" style="display: none;" id="date_search">
<div class="form-group" id="reg_date" style="padding-top: 23px;">
<div class="input-group">
{{ Form::text('reg_date','',['class' => 'form-control compulsory', 'required','readonly','id'=>'datepicker-autoclose']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
</div>
<div class="col-md-3" style="display: none;" id="date_range_search">
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('start_date', __('investigations.from')) }}
<div class="input-group">
{{ Form::text('start_date','',['class' => 'form-control compulsory','readonly','id'=>'datepicker-autoclose-1']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group" id="reg_date">
{{ Form::label('end_date', __('investigations.to')) }}
<div class="input-group">
{{ Form::text('end_date','',['class' => 'form-control compulsory','readonly','id'=>'datepicker-autoclose-2']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="form-group" style="padding-top: 5px;"><br>
{{ Form::button(__('investigations.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10', 'id'=>'select_patient']) }}
</div>
</div>
</div>
</div>
{{ Form::close() }}
<div class="white-box">
@include('flash::message')
<div class="table-responsive">
<table class="table table-hover color-bordered-table success-bordered-table table-striped">
<thead>
<tr>
<th>#</th>
<th>{{ __('investigations.date') }}</th>
<th>{{ __('investigations.patient_names') }}</th>
<th>{{ __('investigations.investigations') }}</th>
<th>{{ __('investigations.action') }}</th>
<th></th>
</tr>
</thead>
<tbody>
@php $count=1; @endphp
@foreach($ordered_investigations as $ordered_inv)
@php
$urgent_ids = $ordered_inv->urgent_ids;
$ordered_ids = explode(",", $ordered_inv->investigation_id);
$ordered_investigation_comments_string = "";
$ordered_investigation_comments_string = $ordered_inv->order_comments;
@endphp
<tr>
<td>{{ $count }}.</td>
<td>{{ streamline_date_time($ordered_inv->created_at) }}</td>
<td>{!! insurance_flag($ordered_inv->patient_id) !!} ({{ get_name($ordered_inv->patient_id, 'id', 'number', 'patients') }})</td>
<td>
<ol>
@for($i=0; $i < count($ordered_ids); $i++)
<li>{{ get_name($ordered_ids[$i], 'id', 'name', 'investigations') }}</li>
@endfor
</ol>
</td>
<td>
{{ Form::model($ordered_inv->id ,['method' => 'DELETE', 'route' => ['ordered_investigation.destroy', $ordered_inv->id]]) }}
<button type="submit" class="btn btn-rounded btn-danger" onclick="return confirm('Are you sure?')"><i class="fa fa-trash"></i>
<span style="margin-left: 10px;">{{ __('investigations.cancel_order') }}</span>
</button>
{{ Form::close() }}
</td>
<td>
<a href="/patient_episodes/set_patient_id/{{ $ordered_inv->patient_id }}" class="btn btn-info btn-rounded">{{ __('investigations.select_patient') }}</a>
</td>
</tr>
@php $count++; @endphp
@endforeach
</tbody>
</table>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
<!-- Date Picker Plugin JavaScript -->
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
<script>
$('.table').DataTable({
dom: 'Bfrtip',
//order: [ [0, 'desc'] ],
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
],
'pageLength' : 50,
});
$('#datepicker-autoclose,#datepicker-autoclose-1,#datepicker-autoclose-2').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
$('#search_by').change(function () {
if ($(this).val() == 1) {
$('#date_search').show();
$('#date_range_search').hide();
}
else if ($(this).val() == 2) {
$('#date_range_search').show();
$('#date_search').hide();
}
else {
$('#date_search,#date_range_search').hide();
}
});
</script>
@endpush