mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-12 11:11:31 +00:00
updated streamline-setup v2
This commit is contained in:
+188
@@ -0,0 +1,188 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<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" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row bg-title">
|
||||
<div class="col-md-6">
|
||||
<h4 class="page-title">{{ __('insurance_claims.incoming_claim_adjudication_errors') }}</h4>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('insurance_claims.dashboard') }}</a></li>
|
||||
<li class="active">{{ __('insurance_claims.view') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
{{ Form::open(['method'=>'post','route' => 'insurance_claims.incoming_claim_adjudication_errors']) }}
|
||||
|
||||
{{ Form::hidden('patient_id', 0, ['id' => 'patient_id']) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label>{{ __('pharmacy.select_date') }}:</label>
|
||||
<select class="form-control compulsory required" name="search_date_by" id="search_date_by" required>
|
||||
<option value="today">{{ __('pharmacy.today') }}</option>
|
||||
<option value="yesterday">{{ __('pharmacy.yesterday') }}</option>
|
||||
<option value="custom_date">{{ __('pharmacy.custom_date') }}</option>
|
||||
<option value="custom_date_range">{{ __('pharmacy.date_range') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" id="start_date_div" style="display: none;">
|
||||
<div class="form-group">
|
||||
{{ Form::label('start_date', __('pharmacy.date_on')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('start_date', '', ['class'=>'form-control compulsory', 'readonly', 'id'=>'start_date']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" id="end_date_div" style="display: none;">
|
||||
<div class="form-group">
|
||||
{{ Form::label('end_date', __('pharmacy.end_date')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('end_date', '', ['class'=>'form-control compulsory', 'readonly', 'id'=>'end_date']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('search_patient', __('insurance_claims.search_by_patient')) }}
|
||||
<div class="input-group">
|
||||
<select class="form-control" name="patient_number" id="patient_number"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group" style="margin-top: 25px;">
|
||||
{{ Form::submit(__('investigations.search'), ['class'=>'btn btn-success pull-right']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
@if($search_text != "")
|
||||
<h4><label class="label label-info">{{ $search_text }}</label></h4>
|
||||
<br>
|
||||
@endif
|
||||
|
||||
<div class="table-responsive">
|
||||
<table id="table" class="table table-striped color-bordered-table success-bordered-table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('insurance_claims.patient') }}</th>
|
||||
<th>{{ __('insurance_claims.plan') }}</th>
|
||||
<th>{{ __('insurance_claims.claims_totals') }}</th>
|
||||
<th>{{ __('insurance_claims.last_updated') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($claims as $claim)
|
||||
<tr>
|
||||
<td>{{ $claim->first_name . ' ' . $claim->last_name}} ({{ $claim->number }})</td>
|
||||
<td>{{ $insurance_plans[$claim->plan_id] }}</td>
|
||||
<td>{{ ugandan_shillings($claim->primary_plan_claim_total_sum) }}</td>
|
||||
<td>{{ streamline_date_time($claim->created_at) }}</td>
|
||||
<td>
|
||||
<a href="/insurance_claims/incoming_claim_adjudication_errors_details/{{ $claim->patient_id }}" class="btn btn-success btn-sm">{{ __('insurance_claims.view_details') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<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>
|
||||
|
||||
<script>
|
||||
$('#patient_number').change(function () {
|
||||
let id = $('#patient_number').val();
|
||||
$('#patient_id').val(id);
|
||||
});
|
||||
|
||||
$('#patient_number').select2({
|
||||
placeholder: 'Search by patient details (names and number)',
|
||||
ajax: {
|
||||
url: '/patients/search_patient_by_name_number',
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
processResults: function (data) {
|
||||
return {
|
||||
results: $.map(data, function (item) {
|
||||
return {
|
||||
text: item.first_name + " " + item.last_name + " (" + item.number + ")",
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
$('#search_date_by').change(function() {
|
||||
if($(this).val() === "custom_date"){
|
||||
$("#end_date_div").hide();
|
||||
$("#start_date_div").show();
|
||||
} else if($(this).val() === "custom_date_range") {
|
||||
$("#start_date_div").show();
|
||||
$("#end_date_div").show();
|
||||
} else {
|
||||
$("#end_date_div").hide();
|
||||
$("#start_date_div").hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('#end_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
|
||||
$('#start_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
|
||||
$('#table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
bInfo: false,
|
||||
bPaginate: false,
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+422
@@ -0,0 +1,422 @@
|
||||
@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" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row bg-title">
|
||||
<div class="col-md-6">
|
||||
<h4 class="page-title">{{ __('insurance_claims.claim_error_details') }}</h4>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('insurance_claims.dashboard') }}</a></li>
|
||||
<li><a href="{{ route('insurance_claims.incoming_claim_adjudication_errors') }}">{{ __('insurance_claims.incoming_claim_adjudication_errors') }}</a></li>
|
||||
<li class="active">{{ __('insurance_claims.details') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
@php
|
||||
$item_types = [1 => 'Services', 2 => 'Procedures', 3 => 'Investigations', 4 => 'Drugs', 5 => 'Sundries', 6 => __('insurance_claims.inpatient_ward_stay')];
|
||||
$services = \Illuminate\Support\Facades\DB::table('services')->where('available', 1)->pluck('name', 'id');
|
||||
$procedures = \Illuminate\Support\Facades\DB::table('procedures')->where('available', 1)->pluck('name', 'id');
|
||||
$investigations = \Illuminate\Support\Facades\DB::table('investigations')->pluck('name', 'id');
|
||||
$drugs = \Illuminate\Support\Facades\DB::table('drugs')->where('available', 1)->pluck('name', 'id');
|
||||
$sundries = \Illuminate\Support\Facades\DB::table('sundries')->where('available', 1)->pluck('name', 'id');
|
||||
$overall_claim_total = 0;
|
||||
$cell_counter = 0;
|
||||
$claim_ids = [];
|
||||
$membership_diff_days = $patient_details->membership_start_date ? Carbon\Carbon::createFromFormat('Y-m-d', $patient_details->membership_start_date)->diffInDays(Carbon\Carbon::now()) : 0;
|
||||
$consumption_details = get_insurance_member_plan_yearly_consumption_details ($patient_details->id, $patient_details->family_id, $patient_details->chi_plan, date('Y'));
|
||||
@endphp
|
||||
|
||||
<h4>{{ __('insurance_claims.details') }}</h4>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<table class='table table-bordered table-striped'>
|
||||
<tr>
|
||||
<th style='color: black'>{{ __('insurance_claims.patient') }}</th>
|
||||
<td>{{ $patient_details->first_name . ' ' . $patient_details->last_name}} ({{ $patient_details->number }})</td>
|
||||
<th style='color: black'>{{ __('insurance_claims.patient_category') }}</th>
|
||||
<td>{{ get_name($patient_details->category_id, 'id', 'name', 'patient_categories') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style='color: black'>{{ __('insurance_claims.chi_family') }}</th>
|
||||
<td>{{ get_name($patient_details->family_id, 'id', 'name', 'insurance_heads_of_family') }}</td>
|
||||
<th style='color: black'>{{ __('insurance_claims.chi_group') }}</th>
|
||||
<td>{{ get_name($patient_details->group_id, 'id', 'name', 'insurance_groups') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style='color: black'>{{ __('insurance_claims.membership_start_date') }} ({{patient_duration_on_chi_sheme($patient_details->id)}})</th>
|
||||
<td>{{ streamline_date($patient_details->membership_start_date) }}</td>
|
||||
<th style='color: black'>{{ __('insurance_claims.member_account_number') }}</th>
|
||||
<td>{{ $patient_details->member_account_number }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style='color: black'>{{ __('insurance_claims.gender') }}</th>
|
||||
<td>{{ $patient_details->gender == 1 ? __('insurance_claims.male') : __('insurance_claims.female') }}</td>
|
||||
<th style='color: black'>{{ __('insurance_claims.age') }}</th>
|
||||
@php $dob = new Carbon\Carbon($patient_details->date_of_birth); @endphp
|
||||
<td>{{ $dob->diffInYears(Carbon\Carbon::now()) }} {{ __('insurance_claims.years') }} ({{ streamline_date($patient_details->date_of_birth) }})</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style='color: black'>{{ __('insurance_claims.residence') }}</th>
|
||||
<td colspan="3">{{ patient_residence($patient_details->id) }} </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<h4>{{ __('insurance_members.member_picture') }}</h4>
|
||||
@php $member_photo = asset('uploads/images/insurance_members') . '/' . $patient_details->photo; @endphp
|
||||
<img alt="member photo" style='height: 140px; width: 250px;' src="{{ asset($member_photo) }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@foreach($claims as $claim)
|
||||
<hr>
|
||||
|
||||
<h4>{{ $item_types[$claim->item_type] ?? '' }}</h4>
|
||||
|
||||
<table class='table table-bordered table-striped'>
|
||||
<tr>
|
||||
<th style='color: black'>{{ __('insurance_claims.claim_total') }}</th>
|
||||
<td>{{ ugandan_shillings($claim->primary_plan_claim_total) }}</td>
|
||||
<th style='color: black'>{{ __('insurance_claims.date_registered') }}</th>
|
||||
<td>{{ streamline_date_time($claim->created_at) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style='color: black'>{{ __('insurance_claims.insurance_plan') }}</th>
|
||||
<td>
|
||||
@php $plan_details = \Illuminate\Support\Facades\DB::table('community_health_insurance_plans')->where('id', $claim->plan_id)->first(); @endphp
|
||||
{{ $plan_details->name }}
|
||||
|
||||
@if($claim->plan_validity_error == 1)
|
||||
(<span style="color: red"><b>{{ __('insurance_claims.chi_plan_expired') }}</b></span>)
|
||||
@endif
|
||||
</td>
|
||||
<th style='color: black'>{{ __('insurance_claims.source') }}</th>
|
||||
<td>@if($claim->inpatient_outpatient == 0) OPD @else IPD @endif</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style='color: black'>{{ __('insurance_claims.plan_start_date') }}</th>
|
||||
<td>{{ streamline_date($plan_details->plan_start_date) }}</td>
|
||||
<th style='color: black'>{{ __('insurance_claims.plan_end_date') }}</th>
|
||||
<td>{{ streamline_date($plan_details->plan_end_date) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@php
|
||||
$item_ids = explode(",", $claim->item_ids);
|
||||
$item_quantities = explode(",", $claim->item_quantities);
|
||||
$tariff_ids = explode(",", $claim->tariff_ids);
|
||||
$tariff_amounts = explode(",", $claim->tariff_amounts);
|
||||
$co_payment_amounts = explode(",", $claim->co_payment_amounts);
|
||||
$authorisations = explode(",", $claim->is_item_authorisation_required);
|
||||
$benefit_ids = explode(",", $claim->benefit_ids);
|
||||
$overall_claim_total += $claim->primary_plan_claim_total;
|
||||
$claim_ids[] = $claim->id;
|
||||
$plan_limit_error = explode(",", $claim->plan_limit_error);
|
||||
$benefit_waiting_period_error = explode(",", $claim->benefit_waiting_period_error);
|
||||
$benefit_limit_error = explode(",", $claim->benefit_limit_error);
|
||||
$item_limit_error = explode(",", $claim->item_limit_error);
|
||||
@endphp
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped color-bordered-table success-bordered-table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('insurance_claims.item_name') }}</th>
|
||||
<th>{{ __('insurance_claims.insurance_benefit') }}</th>
|
||||
<th>{{ __('insurance_claims.quantity') }}</th>
|
||||
<th>{{ __('insurance_claims.tariff_applied') }}</th>
|
||||
<th>{{ __('insurance_claims.claim_amount') }}</th>
|
||||
<th>{{ __('insurance_claims.co_payment_amount') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for($i = 0; $i < count($item_ids); $i++)
|
||||
@php
|
||||
$benefit_details = \Illuminate\Support\Facades\DB::table('insurance_benefits')->where('id', $benefit_ids[$i])->first();
|
||||
$required_membership_days = $benefit_details ? $benefit_details->waiting_period : 0;
|
||||
$benefit_member_limit = $benefit_details ? $benefit_details->annual_member_limit : 0;
|
||||
$benefit_family_limit = $benefit_details ? $benefit_details->annual_family_limit : 0;
|
||||
@endphp
|
||||
<tr @if(!$benefit_details) style="display: none" @endif>
|
||||
<td>
|
||||
@if($claim->item_type == 1)
|
||||
{{ $services[$item_ids[$i]] }}
|
||||
@php $item_insurance_benefit_details = json_decode(get_name($item_ids[$i], 'id', 'insurance_benefit_details', 'services'), true) ?? []; @endphp
|
||||
@elseif($claim->item_type == 2)
|
||||
{{ $procedures[$item_ids[$i]] }}
|
||||
@php $item_insurance_benefit_details = json_decode(get_name($item_ids[$i], 'id', 'insurance_benefit_details', 'procedures'), true) ?? []; @endphp
|
||||
@elseif($claim->item_type == 3)
|
||||
{{ $investigations[$item_ids[$i]] }}
|
||||
@php $item_insurance_benefit_details = json_decode(get_name($item_ids[$i], 'id', 'insurance_benefit_details', 'investigations'), true) ?? []; @endphp
|
||||
@elseif($claim->item_type == 4)
|
||||
{{ $drugs[$item_ids[$i]] }}
|
||||
@php $item_insurance_benefit_details = json_decode(get_name($item_ids[$i], 'id', 'insurance_benefit_details', 'drugs'), true) ?? []; @endphp
|
||||
@elseif($claim->item_type == 5)
|
||||
{{ $sundries[$item_ids[$i]] }}
|
||||
@php $item_insurance_benefit_details = json_decode(get_name($item_ids[$i], 'id', 'insurance_benefit_details', 'sundries'), true) ?? []; @endphp
|
||||
@elseif($claim->item_type == 6)
|
||||
{{ get_name(get_name($item_ids[$i], 'id', 'bed_category_id', 'insurance_inpatient_accommodation_rates'), 'id', 'name', 'inpatient_bed_categories') }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $benefit_details ? $benefit_details->name : __('insurance_claims.not_under_chi_plan') }}</td>
|
||||
<td>{{ $item_quantities[$i] }}</td>
|
||||
<td>
|
||||
@if($tariff_ids[$i] == 0)
|
||||
{{ __('insurance_claims.none') }}
|
||||
@else
|
||||
{{ $tariffs[$tariff_ids[$i]] }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ ugandan_shillings($tariff_amounts[$i]) }}</td>
|
||||
<td>{{ ugandan_shillings($co_payment_amounts[$i]) }}</td>
|
||||
<td>
|
||||
<div id="benefit_waiting_period_div_{{ $cell_counter }}">
|
||||
@if($benefit_waiting_period_error[$i] == 1)
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td class="text-center" colspan="2"><span style="color: red"><b>{{ __('insurance_claims.benefits_waiting_period_error') }}</b></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style='color: black'>{{ __('insurance_claims.membership_days_elapsed') }}</th>
|
||||
<td>{{ $membership_diff_days }} {{ __('insurance_claims.days') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style='color: black'>{{ __('insurance_claims.required_membership_days') }}</th>
|
||||
<td>{{ $required_membership_days }} {{ __('insurance_claims.days') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center" colspan="2"><a class="btn btn-success btn-sm" onclick="override_benefit_period({{ $cell_counter }}, {{ $i }}, {{ $claim->id }})" onclick="return confirm('Are you sure you want to override?')">{{ __('insurance_claims.override') }}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<hr>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div id="benefit_limit_div_{{ $cell_counter }}">
|
||||
@if($benefit_limit_error[$i] == 1)
|
||||
@php
|
||||
$benefit_member_used = $consumption_details['benefits'][$benefit_ids[$i]]['member_plan_usage'] ?? 0;
|
||||
$benefit_family_used = $consumption_details['benefits'][$benefit_ids[$i]]['family_plan_usage'] ?? 0;
|
||||
$benefit_member_excess = ($tariff_amounts[$i] + $benefit_member_used) - $benefit_member_limit;
|
||||
$benefit_family_excess = ($tariff_amounts[$i] + $benefit_family_used) - $benefit_family_limit;
|
||||
@endphp
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td class="text-center" colspan="2"><span style="color: red"><b>{{ __('insurance_claims.benefits_limit_error') }}</b></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style='color: black'>{{ __('insurance_claims.benefit_member_limit') }}</th>
|
||||
<td>
|
||||
{{ ugandan_shillings($benefit_member_used) }} of {{ ugandan_shillings($benefit_member_limit) }} Consumed
|
||||
<span style="color: @if($benefit_member_excess > 0) red @else green @endif">({{ ugandan_shillings($benefit_member_excess) }} {{ __('insurance_claims.in_excess') }})</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style='color: black'>{{ __('insurance_claims.benefit_family_limit') }}</th>
|
||||
<td>
|
||||
{{ ugandan_shillings($benefit_family_used) }} of {{ ugandan_shillings($benefit_family_limit) }} Consumed
|
||||
<span style="color: @if($benefit_family_excess > 0) red @else green @endif">({{ ugandan_shillings($benefit_family_excess) }} {{ __('insurance_claims.in_excess') }})</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center" colspan="2"><a class="btn btn-success btn-sm" onclick="override_benefit_limit({{ $cell_counter }}, {{ $i }}, {{ $claim->id }})" onclick="return confirm('Are you sure you want to override?')">{{ __('insurance_claims.override') }}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<hr>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div id="item_limit_div_{{ $cell_counter }}">
|
||||
@if($item_limit_error[$i] == 1)
|
||||
@php
|
||||
if($claim->item_type == 6) {
|
||||
$rate_info = DB::table('insurance_inpatient_accommodation_rates')->where('id', $item_ids[$i])->first();
|
||||
|
||||
$item_member_limit = $rate_info->annual_member_limit ?? 0;
|
||||
$item_family_limit = $rate_info->annual_family_limit ?? 0;
|
||||
} else {
|
||||
$item_member_limit = $item_insurance_benefit_details[$benefit_ids[$i]]['annual_member_limit'] ?? 0;
|
||||
$item_family_limit = $item_insurance_benefit_details[$benefit_ids[$i]]['annual_family_limit'] ?? 0;
|
||||
}
|
||||
|
||||
$item_key = $item_ids[$i] . ',' . $claim->item_type;
|
||||
$item_member_used = $consumption_details['benefits'][$benefit_ids[$i]]["items"][$item_key]["member_plan_usage"] ?? 0;
|
||||
$item_family_used = $consumption_details['benefits'][$benefit_ids[$i]]["items"][$item_key]["family_plan_usage"] ?? 0;
|
||||
$item_member_excess = ($tariff_amounts[$i] + $item_member_used) - $item_member_limit;
|
||||
$item_family_excess = ($tariff_amounts[$i] + $item_family_used) - $item_family_limit;
|
||||
@endphp
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td class="text-center" colspan="2"><span style="color: red"><b>{{ __('insurance_claims.items_limit_error') }}</b></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style='color: black'>{{ __('insurance_claims.item_member_limit') }}</th>
|
||||
<td>
|
||||
{{ ugandan_shillings($item_member_used) }} of {{ ugandan_shillings($item_member_limit) }} Consumed
|
||||
<span style="color: @if($item_member_excess > 0) red @else green @endif">({{ ugandan_shillings($item_member_excess) }} {{ __('insurance_claims.in_excess') }})</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style='color: black'>{{ __('insurance_claims.item_family_limit') }}</th>
|
||||
<td>
|
||||
{{ ugandan_shillings($item_family_used) }} of {{ ugandan_shillings($item_family_limit) }} Consumed
|
||||
<span style="color: @if($item_family_excess > 0) red @else green @endif">({{ ugandan_shillings($item_family_excess) }} {{ __('insurance_claims.in_excess') }})</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center" colspan="2"><a class="btn btn-success btn-sm" onclick="override_item_limit({{ $cell_counter }}, {{ $i }}, {{ $claim->id }})" onclick="return confirm('Are you sure you want to override?')">{{ __('insurance_claims.override') }}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<hr>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div id="plan_limit_div_{{ $cell_counter }}">
|
||||
@if($plan_limit_error[$i] == 1)
|
||||
@php
|
||||
$plan_member_limit = $plan_details->member_annual_limit;
|
||||
$plan_family_limit = $plan_details->family_annual_limit;
|
||||
$plan_member_used = $consumption_details["member_plan_usage"] ?? 0;
|
||||
$plan_family_used = $consumption_details["family_plan_usage"] ?? 0;
|
||||
$plan_member_excess = ($tariff_amounts[$i] + $plan_member_used) - $plan_member_limit;
|
||||
$plan_family_excess = ($tariff_amounts[$i] + $plan_family_used) - $plan_family_limit;
|
||||
@endphp
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td class="text-center" colspan="2"><span style="color: red"><b>{{ __('insurance_claims.plan_limit_error') }}</b></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style='color: black'>{{ __('insurance_claims.plan_member_limit') }}</th>
|
||||
<td>
|
||||
{{ ugandan_shillings($plan_member_used) }} of {{ ugandan_shillings($plan_member_limit) }} Consumed
|
||||
<span style="color: @if($plan_member_excess > 0) red @else green @endif">({{ ugandan_shillings($plan_member_excess) }} {{ __('insurance_claims.in_excess') }})</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style='color: black'>{{ __('insurance_claims.plan_family_limit') }}</th>
|
||||
<td>
|
||||
{{ ugandan_shillings($plan_family_used) }} of {{ ugandan_shillings($plan_family_limit) }} Consumed
|
||||
<span style="color: @if($plan_family_excess > 0) red @else green @endif">({{ ugandan_shillings($plan_family_excess) }} {{ __('insurance_claims.in_excess') }})</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center" colspan="2"><a class="btn btn-success btn-sm" onclick="override_plan_limit({{ $cell_counter }}, {{ $i }}, {{ $claim->id }})" onclick="return confirm('Are you sure you want to override?')">{{ __('insurance_claims.override') }}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<hr>
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@php $cell_counter++; @endphp
|
||||
@endfor
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@if($claim->plan_validity_error == 1)
|
||||
<a class="btn btn-success btn-sm" href="/insurance_claims/override_plan_validity/{{ $claim->id }}" onclick="return confirm('Are you sure you want to override?')">{{ __('insurance_claims.override_plan_validity') }}</a>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Overall Claim Total: {{ ugandan_shillings($overall_claim_total) }}</h3>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('#table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
bInfo: false,
|
||||
bPaginate: false,
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print'
|
||||
]
|
||||
});
|
||||
|
||||
function override_benefit_period(cell_position, item_position, claim_id) {
|
||||
if(confirm("Are you sure you want to override benefit for this item?")) {
|
||||
$.ajax({
|
||||
url: '/insurance_claims/override_benefit_period/' + claim_id + '/' + item_position,
|
||||
success: function(response){
|
||||
if (response == 1) {
|
||||
$('#benefit_waiting_period_div_' + cell_position).html("<span style='color: darkgreen'><b>Benefit period error has been overridden</b></span><hr>");
|
||||
} else {
|
||||
alert("Failed to override claim item. Please try again");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function override_benefit_limit(cell_position, item_position, claim_id) {
|
||||
if(confirm("Are you sure you want to override benefit limit for this item?")) {
|
||||
$.ajax({
|
||||
url: '/insurance_claims/override_benefit_limit/' + claim_id + '/' + item_position,
|
||||
success: function(response){
|
||||
if (response == 1) {
|
||||
$('#benefit_limit_div_' + cell_position).html("<span style='color: darkgreen'><b>Benefit limit error has been overridden</b></span><hr>");
|
||||
} else {
|
||||
alert("Failed to override claim item. Please try again");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function override_item_limit(cell_position, item_position, claim_id) {
|
||||
if(confirm("Are you sure you want to override item limit for this item?")) {
|
||||
$.ajax({
|
||||
url: '/insurance_claims/override_item_limit/' + claim_id + '/' + item_position,
|
||||
success: function(response){
|
||||
if (response == 1) {
|
||||
$('#item_limit_div_' + cell_position).html("<span style='color: darkgreen'><b>Item limit error has been overridden</b></span><hr>");
|
||||
} else {
|
||||
alert("Failed to override claim item. Please try again");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function override_plan_limit(cell_position, item_position, claim_id) {
|
||||
if(confirm("Are you sure you want to override plan limit for this item?")) {
|
||||
$.ajax({
|
||||
url: '/insurance_claims/override_plan_limit/' + claim_id + '/' + item_position,
|
||||
success: function(response){
|
||||
if (response == 1) {
|
||||
$('#plan_limit_div_' + cell_position).html("<span style='color: darkgreen'><b>Plan limit error has been overridden</b></span><hr>");
|
||||
} else {
|
||||
alert("Failed to override claim item. Please try again");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
+246
@@ -0,0 +1,246 @@
|
||||
@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" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row bg-title">
|
||||
<div class="col-md-6">
|
||||
<h4 class="page-title">{{ __('insurance_claims.claim_details') }}</h4>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('insurance_claims.dashboard') }}</a></li>
|
||||
<li><a href="{{ route('insurance_claims.view_incoming_authorisations') }}">{{ __('insurance_claims.view_incoming_authorisations') }}</a></li>
|
||||
<li class="active">{{ __('insurance_claims.details') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
@php
|
||||
$item_types = [1 => 'Services', 2 => 'Procedures', 3 => 'Investigations', 4 => 'Drugs', 5 => 'Sundries', 6 => __('insurance_claims.inpatient_ward_stay')];
|
||||
$services = \Illuminate\Support\Facades\DB::table('services')->where('available', 1)->pluck('name', 'id');
|
||||
$procedures = \Illuminate\Support\Facades\DB::table('procedures')->where('available', 1)->pluck('name', 'id');
|
||||
$investigations = \Illuminate\Support\Facades\DB::table('investigations')->pluck('name', 'id');
|
||||
$drugs = \Illuminate\Support\Facades\DB::table('drugs')->where('available', 1)->pluck('name', 'id');
|
||||
$sundries = \Illuminate\Support\Facades\DB::table('sundries')->where('available', 1)->pluck('name', 'id');
|
||||
$overall_claim_total = 0;
|
||||
$cell_counter = 0;
|
||||
$claim_ids = [];
|
||||
$any_full_authorisation_required = false;
|
||||
@endphp
|
||||
|
||||
<h4>{{ __('insurance_claims.details') }}</h4>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<table class='table table-bordered table-striped'>
|
||||
<tr>
|
||||
<th style='color: black'>{{ __('insurance_claims.patient') }}</th>
|
||||
<td>{{ $patient_details->first_name . ' ' . $patient_details->last_name}} ({{ $patient_details->number }})</td>
|
||||
<th style='color: black'>{{ __('insurance_claims.patient_category') }}</th>
|
||||
<td>{{ get_name($patient_details->category_id, 'id', 'name', 'patient_categories') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style='color: black'>{{ __('insurance_claims.chi_family') }}</th>
|
||||
<td>{{ get_name($patient_details->family_id, 'id', 'name', 'insurance_heads_of_family') }}</td>
|
||||
<th style='color: black'>{{ __('insurance_claims.chi_group') }}</th>
|
||||
<td>{{ get_name($patient_details->group_id, 'id', 'name', 'insurance_groups') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style='color: black'>{{ __('insurance_claims.membership_start_date') }}</th>
|
||||
<td>{{ streamline_date($patient_details->membership_start_date) }} ({{patient_duration_on_chi_sheme($patient_details->id)}})</td>
|
||||
<th style='color: black'>{{ __('insurance_claims.member_account_number') }}</th>
|
||||
<td>{{ $patient_details->member_account_number }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style='color: black'>{{ __('insurance_claims.gender') }}</th>
|
||||
<td>{{ $patient_details->gender == 1 ? __('insurance_claims.male') : __('insurance_claims.female') }}</td>
|
||||
<th style='color: black'>{{ __('insurance_claims.age') }}</th>
|
||||
@php $dob = new Carbon\Carbon($patient_details->date_of_birth); @endphp
|
||||
<td>{{ $dob->diffInYears(Carbon\Carbon::now()) }} {{ __('insurance_claims.years') }} ({{ streamline_date($patient_details->date_of_birth) }})</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style='color: black'>{{ __('insurance_claims.residence') }}</th>
|
||||
<td colspan="3">{{ patient_residence($patient_details->id) }} </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<h4>{{ __('insurance_members.member_picture') }}</h4>
|
||||
@php $member_photo = asset('uploads/images/insurance_members') . '/' . $patient_details->photo; @endphp
|
||||
<img alt="member photo" style='height: 140px; width: 250px;' src="{{ asset($member_photo) }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@foreach($claims as $claim)
|
||||
<hr>
|
||||
|
||||
<h4>{{ $item_types[$claim->item_type] ?? '' }}</h4>
|
||||
|
||||
<table class='table table-bordered table-striped'>
|
||||
<tr>
|
||||
<th style='color: black'>{{ __('insurance_claims.claim_total') }}</th>
|
||||
<td>{{ ugandan_shillings($claim->primary_plan_claim_total) }}</td>
|
||||
<th style='color: black'>{{ __('insurance_claims.date_registered') }}</th>
|
||||
<td>{{ streamline_date_time($claim->created_at) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style='color: black'>{{ __('insurance_claims.insurance_plan') }}</th>
|
||||
<td>
|
||||
{{ $insurance_plans[$claim->plan_id] }}
|
||||
|
||||
@if($claim->plan_validity_error == 1)
|
||||
(<span style="color: red"><b>{{ __('insurance_claims.chi_plan_expired') }}</b></span>)
|
||||
@endif
|
||||
</td>
|
||||
<th style='color: black'>{{ __('insurance_claims.source') }}</th>
|
||||
<td>@if($claim->inpatient_outpatient == 0) OPD @else IPD @endif</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@php
|
||||
$item_ids = explode(",", $claim->item_ids);
|
||||
$item_quantities = explode(",", $claim->item_quantities);
|
||||
$tariff_ids = explode(",", $claim->tariff_ids);
|
||||
$tariff_amounts = explode(",", $claim->tariff_amounts);
|
||||
$co_payment_amounts = explode(",", $claim->co_payment_amounts);
|
||||
$authorisations = explode(",", $claim->is_item_authorisation_required);
|
||||
$benefit_ids = explode(",", $claim->benefit_ids);
|
||||
$overall_claim_total += $claim->primary_plan_claim_total;
|
||||
$claim_ids[] = $claim->id;
|
||||
$plan_limit_error = explode(",", $claim->plan_limit_error);
|
||||
$benefit_waiting_period_error = explode(",", $claim->benefit_waiting_period_error);
|
||||
$benefit_limit_error = explode(",", $claim->benefit_limit_error);
|
||||
$item_limit_error = explode(",", $claim->item_limit_error);
|
||||
@endphp
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped color-bordered-table success-bordered-table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('insurance_claims.item_name') }}</th>
|
||||
<th>{{ __('insurance_claims.insurance_benefit') }}</th>
|
||||
<th>{{ __('insurance_claims.quantity') }}</th>
|
||||
<th>{{ __('insurance_claims.tariff_applied') }}</th>
|
||||
<th>{{ __('insurance_claims.claim_amount') }}</th>
|
||||
<th>{{ __('insurance_claims.co_payment_amount') }}</th>
|
||||
<th>{{ __('insurance_claims.authorisation') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for($i = 0; $i < count($item_ids); $i++)
|
||||
<tr>
|
||||
<td>
|
||||
@if($claim->item_type == 1)
|
||||
{{ $services[$item_ids[$i]] }}
|
||||
@elseif($claim->item_type == 2)
|
||||
{{ $procedures[$item_ids[$i]] }}
|
||||
@elseif($claim->item_type == 3)
|
||||
{{ $investigations[$item_ids[$i]] }}
|
||||
@elseif($claim->item_type == 4)
|
||||
{{ $drugs[$item_ids[$i]] }}
|
||||
@elseif($claim->item_type == 5)
|
||||
{{ $sundries[$item_ids[$i]] }}
|
||||
@elseif($claim->item_type == 6)
|
||||
{{ get_name(get_name($item_ids[$i], 'id', 'bed_category_id', 'insurance_inpatient_accommodation_rates'), 'id', 'name', 'inpatient_bed_categories') }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $benefits[$benefit_ids[$i]] ?? __('insurance_claims.not_under_chi_plan') }}</td>
|
||||
<td>{{ $item_quantities[$i] }}</td>
|
||||
<td>
|
||||
@if($tariff_ids[$i] == 0)
|
||||
{{ __('insurance_claims.none') }}
|
||||
@else
|
||||
{{ $tariffs[$tariff_ids[$i]] }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ ugandan_shillings($tariff_amounts[$i]) }}</td>
|
||||
<td>{{ ugandan_shillings($co_payment_amounts[$i]) }}</td>
|
||||
<td id="authorise_cell_{{ $cell_counter }}">
|
||||
@if($authorisations[$i] == 1)
|
||||
<a class="btn btn-success btn-sm" onclick="authorise_item({{ $cell_counter }}, {{ $i }}, {{ $claim->id }})" onclick="return confirm('Are you sure you want to authorise?')">{{ __('insurance_claims.authorise_item') }}</a>
|
||||
@endif
|
||||
@php $cell_counter++; @endphp
|
||||
</td>
|
||||
<td>
|
||||
@if($benefit_waiting_period_error[$i] == 1)
|
||||
<span style="color: red"><b>{{ __('insurance_claims.benefits_waiting_period_error') }}</b></span><br><br>
|
||||
@endif
|
||||
|
||||
@if($plan_limit_error[$i] == 1)
|
||||
<span style="color: red"><b>{{ __('insurance_claims.plan_limit_error') }}</b></span><br><br>
|
||||
@endif
|
||||
|
||||
@if($benefit_limit_error[$i] == 1)
|
||||
<span style="color: red"><b>{{ __('insurance_claims.benefits_limit_error') }}</b></span><br><br>
|
||||
@endif
|
||||
|
||||
@if($item_limit_error[$i] == 1)
|
||||
<span style="color: red"><b>{{ __('insurance_claims.items_limit_error') }}</b></span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endfor
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@if($claim->is_authorisation_required == 1)
|
||||
@php $any_full_authorisation_required = true; @endphp
|
||||
<a class="btn btn-success btn-sm" href="/insurance_claims/authorise_claim/{{ $claim->id }}" onclick="return confirm('Are you sure you want to authorise?')">{{ __('insurance_claims.authorise_claim') }}</a>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Overall Claim Total: {{ ugandan_shillings($overall_claim_total) }}</h3>
|
||||
|
||||
@if($any_full_authorisation_required)
|
||||
{{ Form::open(['route' => 'insurance_claims.authorise_all_claims', 'data-toggle' => 'validator']) }}
|
||||
{{ Form::hidden('claim_ids', implode(",", $claim_ids)) }}
|
||||
{{ Form::button(__('insurance_claims.authorise_all_claims'),['type'=>'submit','class'=>'btn btn-success btn-sm', 'onclick' => 'return confirm("Are you sure you want to authorise?")']) }}
|
||||
{{ Form::close() }}
|
||||
@endif
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('#table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
bInfo: false,
|
||||
bPaginate: false,
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print'
|
||||
]
|
||||
});
|
||||
|
||||
function authorise_item(cell_position, item_position, claim_id) {
|
||||
if(confirm("Are you sure you want to authorise this item?")) {
|
||||
$.ajax({
|
||||
url: '/insurance_claims/authorise_item/' + claim_id + '/' + item_position,
|
||||
success: function(response){
|
||||
if (response == 1) {
|
||||
$('#authorise_cell_' + cell_position).html("<p class='text-success'>Item has been authorised</p>")
|
||||
} else {
|
||||
alert("Failed to authorise claim item. Please try again");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
+189
@@ -0,0 +1,189 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<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" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row bg-title">
|
||||
<div class="col-md-6">
|
||||
<h4 class="page-title">{{ __('insurance_claims.view_incoming_authorisations') }}</h4>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('insurance_claims.dashboard') }}</a></li>
|
||||
<li class="active">{{ __('insurance_claims.view') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
{{ Form::open(['method'=>'post','route' => 'insurance_claims.view_incoming_authorisations']) }}
|
||||
|
||||
{{ Form::hidden('patient_id', 0, ['id' => 'patient_id']) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label>{{ __('pharmacy.select_date') }}:</label>
|
||||
<select class="form-control compulsory required" name="search_date_by" id="search_date_by" required>
|
||||
<option value="today">{{ __('pharmacy.today') }}</option>
|
||||
<option value="yesterday">{{ __('pharmacy.yesterday') }}</option>
|
||||
<option value="custom_date">{{ __('pharmacy.custom_date') }}</option>
|
||||
<option value="custom_date_range">{{ __('pharmacy.date_range') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" id="start_date_div" style="display: none;">
|
||||
<div class="form-group">
|
||||
{{ Form::label('start_date', __('pharmacy.date_on')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('start_date', '', ['class'=>'form-control compulsory', 'readonly', 'id'=>'start_date']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" id="end_date_div" style="display: none;">
|
||||
<div class="form-group">
|
||||
{{ Form::label('end_date', __('pharmacy.end_date')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('end_date', '', ['class'=>'form-control compulsory', 'readonly', 'id'=>'end_date']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('search_patient', __('insurance_claims.search_by_patient')) }}
|
||||
<div class="input-group">
|
||||
<select class="form-control" name="patient_number" id="patient_number"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group" style="margin-top: 25px;">
|
||||
{{ Form::submit(__('investigations.search'), ['class'=>'btn btn-success pull-right']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
@if($search_text != "")
|
||||
<h4><label class="label label-info">{{ $search_text }}</label></h4>
|
||||
<br>
|
||||
@endif
|
||||
|
||||
<div class="table-responsive">
|
||||
<table id="table" class="table table-striped color-bordered-table success-bordered-table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('insurance_claims.patient') }}</th>
|
||||
<th>{{ __('insurance_claims.plan') }}</th>
|
||||
<th>{{ __('insurance_claims.claims_totals') }}</th>
|
||||
<th>{{ __('insurance_claims.last_updated') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $item_types = [1 => 'Services', 2 => 'Procedures', 3 => 'Investigations', 4 => 'Drugs', 5 => 'Sundries'] @endphp
|
||||
@foreach($claims as $claim)
|
||||
<tr>
|
||||
<td>{{ $claim->first_name . ' ' . $claim->last_name}} ({{ $claim->number }})</td>
|
||||
<td>{{ $insurance_plans[$claim->plan_id] }}</td>
|
||||
<td>{{ ugandan_shillings($claim->primary_plan_claim_total_sum) }}</td>
|
||||
<td>{{ streamline_date_time($claim->created_at) }}</td>
|
||||
<td>
|
||||
<a href="/insurance_claims/view_incoming_authorisation_details/{{ $claim->patient_id }}" class="btn btn-success btn-sm">{{ __('insurance_claims.view_details') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<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>
|
||||
|
||||
<script>
|
||||
$('#patient_number').change(function () {
|
||||
let id = $('#patient_number').val();
|
||||
$('#patient_id').val(id);
|
||||
});
|
||||
|
||||
$('#patient_number').select2({
|
||||
placeholder: 'Search by patient details (names and number)',
|
||||
ajax: {
|
||||
url: '/patients/search_patient_by_name_number',
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
processResults: function (data) {
|
||||
return {
|
||||
results: $.map(data, function (item) {
|
||||
return {
|
||||
text: item.first_name + " " + item.last_name + " (" + item.number + ")",
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
$('#search_date_by').change(function() {
|
||||
if($(this).val() === "custom_date"){
|
||||
$("#end_date_div").hide();
|
||||
$("#start_date_div").show();
|
||||
} else if($(this).val() === "custom_date_range") {
|
||||
$("#start_date_div").show();
|
||||
$("#end_date_div").show();
|
||||
} else {
|
||||
$("#end_date_div").hide();
|
||||
$("#start_date_div").hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('#end_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
|
||||
$('#start_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
|
||||
$('#table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
bInfo: false,
|
||||
bPaginate: false,
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
Reference in New Issue
Block a user