resolved conflicts

This commit is contained in:
2025-03-31 03:46:05 +03:00
6454 changed files with 1520539 additions and 9 deletions
@@ -0,0 +1,125 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet"/>
@endpush
@section('title', '| Add Plan')
@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">{{ __('insurance.create_chi_plan') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ url('insurance') }}">{{ __('insurance.home') }}</a></li>
<li><a href="{{ route('community_health_insurance_plan.index') }}">{{ __('insurance.chi_plan') }}</a></li>
<li class="active">{{ __('insurance.create_chi_plan') }}</li>
</ol>
</div>
<!-- /.col-lg-12 -->
</div>
<div class="row">
<div class="col-sm-12">
@include('insurance::chi_plan.menu')
</div>
</div>
@include('flash::message')
<div class="panel panel-default" style="border-radius: 5px;">
<div class="panel-body">
{{ Form::open(['route' => 'community_health_insurance_plan.store','data-toggle'=>'validator']) }}
<div class="row">
<div class="col-sm-6">
<div class="form-group">
{{ Form::label('name', __('insurance.name')) }}
{{ Form::text('name', '', ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('plan_start_date', __('insurance.start_date')) }}
<div class="input-group">
{{ Form::text('plan_start_date','',['class' => 'form-control compulsory','readonly','id'=>'plan_start_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('plan_end_date', __('insurance.end_date')) }}
<div class="input-group">
{{ Form::text('plan_end_date','',['class' => 'form-control compulsory','readonly','id'=>'plan_end_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('is_authorization_required', __('insurance.is_authorization_required')) }}
{{ Form::select('is_authorization_required', ['' => '-- Select --', 1 => 'Yes', 0 => 'No'], '', ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
{{ Form::label('plan_fee', __('insurance.plan_fee')) }}
{{ Form::number('plan_fee', '', ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('member_annual_limit', __('insurance.overall_annual_limit_for_member') . ' (' . __('insurance_claims.no_limit_applicable') . ')') }}
{{ Form::number('member_annual_limit', 0, ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('family_annual_limit', __('insurance.overall_annual_limit_for_family') . ' (' . __('insurance_claims.no_limit_applicable') . ')') }}
{{ Form::number('family_annual_limit', 0, ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('membership_card_color', __('insurance.membership_card_color')) }}
{{ Form::select('membership_card_color', ['' => '-- Select --', 'green' => 'Green', 'blue' => 'Blue'], '', ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
</div>
</div>
{{ Form::button(__('drug_forms.submit'),['type'=>'submit','class'=>'btn btn-success btn-rounded waves-effect waves-light m-r-10']) }}
{{ Form::button(__('drug_forms.cancel'),['type'=>'reset','class'=>'btn btn-default btn-rounded waves-effect waves-light']) }}
{{ Form::close() }}
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/js/validator.js') }}"></script>
<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 type="text/javascript">
$('#plan_start_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
$('#plan_end_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
</script>
@endpush
@@ -0,0 +1,125 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet"/>
@endpush
@section('title', '| Edit Plan')
@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">{{ __('insurance.create_chi_plan') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ url('insurance') }}">{{ __('insurance.home') }}</a></li>
<li><a href="{{ route('community_health_insurance_plan.index') }}">{{ __('insurance.chi_plan') }}</a></li>
<li class="active">{{ __('insurance.create_chi_plan') }}</li>
</ol>
</div>
<!-- /.col-lg-12 -->
</div>
<div class="row">
<div class="col-sm-12">
@include('insurance::chi_plan.menu')
</div>
</div>
@include('flash::message')
<div class="panel panel-default" style="border-radius: 5px;">
<div class="panel-body">
{{ Form::model($chi_plan, ['method' => 'PUT', 'route' => ['community_health_insurance_plan.update',$chi_plan]]) }}
<div class="row">
<div class="col-sm-6">
<div class="form-group">
{{ Form::label('name', __('insurance.name')) }}
{{ Form::text('name', $chi_plan->name, ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('plan_start_date', __('insurance.start_date')) }}
<div class="input-group">
{{ Form::text('plan_start_date',date_format(date_create($chi_plan->plan_start_date), 'd-m-Y'),['class' => 'form-control compulsory','readonly','id'=>'plan_start_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('plan_end_date', __('insurance.end_date')) }}
<div class="input-group">
{{ Form::text('plan_end_date',date_format(date_create($chi_plan->plan_end_date), 'd-m-Y'),['class' => 'form-control compulsory','readonly','id'=>'plan_end_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('is_authorization_required', __('insurance.is_authorization_required')) }}
{{ Form::select('is_authorization_required', ['' => '-- Select --', 1 => 'Yes', 0 => 'No'], $chi_plan->is_authorized_required, ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
{{ Form::label('plan_fee', __('insurance.plan_fee')) }}
{{ Form::number('plan_fee', $chi_plan->plan_fee, ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('member_annual_limit', __('insurance.overall_annual_limit_for_member') . ' (' . __('insurance_claims.no_limit_applicable') . ')') }}
{{ Form::number('member_annual_limit', $chi_plan->member_annual_limit, ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('family_annual_limit', __('insurance.overall_annual_limit_for_family') . ' (' . __('insurance_claims.no_limit_applicable') . ')') }}
{{ Form::number('family_annual_limit', $chi_plan->family_annual_limit, ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('membership_card_color', __('insurance.membership_card_color')) }}
{{ Form::select('membership_card_color', ['' => '-- Select --', 'green' => 'Green', 'blue' => 'Blue'], $chi_plan->membership_card_color, ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
</div>
</div>
{{ Form::button(__('drug_forms.submit'),['type'=>'submit','class'=>'btn btn-success btn-rounded waves-effect waves-light m-r-10']) }}
{{ Form::button(__('drug_forms.cancel'),['type'=>'reset','class'=>'btn btn-default btn-rounded waves-effect waves-light']) }}
{{ Form::close() }}
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/js/validator.js') }}"></script>
<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 type="text/javascript">
$('#plan_start_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
$('#plan_end_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
</script>
@endpush
@@ -0,0 +1,76 @@
@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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance.inactive_CHI_plans') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ url('insurance') }}">{{ __('insurance.insurance') }}</a></li>
<li class="active">{{ __('insurance.inactive_CHI_plans') }}</li>
</ol>
</div>
<!-- /.col-lg-12 -->
</div>
<div class="row">
<div class="col-sm-12">
@include('insurance::chi_plan.menu')
</div>
</div>
@include('flash::message')
<div class="panel panel-default" style="border-radius: 5px;">
<div class="panel-body">
<div class="table-responsive">
<table class="table color-bordered-table success-bordered-table table-striped">
<thead>
<tr>
<th>{{ __('insurance.chi_plan') }}</th>
<th>{{ __('insurance.start_date') }}</th>
<th>{{ __('insurance.end_date') }}</th>
<th>{{ __('insurance.is_authorization_required') }}</th>
<th>{{ __('insurance.created_by') }}</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($chi_plans as $chi_plan)
<tr>
<td>{{ $chi_plan->name }}</td>
<td>{{ $chi_plan->plan_start_date }}</td>
<td>{{ $chi_plan->plan_end_date }}</td>
<td>{{ $chi_plan->is_authorization_required == 1 ? 'Yes' : 'No' }}</td>
<td>{{ get_full_name($chi_plan->created_by, "id", "first_name", "last_name", "users") }}</td>
<td>
{{ Form::model($chi_plan->id ,['method' => 'POST', 'route' => ['community_health_insurance_plan.activate', $chi_plan->id]]) }}
<button type="submit" class="btn btn-rounded btn-warning" onclick="return confirm('<?php echo __("drug_forms.are_you_sure")?>')"><i class="fa fa-check"></i> {{ __('drug_forms.activate') }}</button>
{{ Form::close() }}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
<script>
$('.table').DataTable();
</script>
@endpush
@@ -0,0 +1,147 @@
@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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance.CHI_plans') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ url('insurance') }}">{{ __('insurance.insurance') }}</a></li>
<li class="active">{{ __('insurance.CHI_plans') }}</li>
</ol>
</div>
<!-- /.col-lg-12 -->
</div>
<div class="row">
<div class="col-sm-12">
@include('insurance::chi_plan.menu')
</div>
</div>
@include('flash::message')
<div class="panel panel-default" style="border-radius: 5px;">
<div class="panel-body">
<div class="table-responsive">
<table class="table color-bordered-table success-bordered-table table-striped">
<thead>
<tr>
<th>{{ __('insurance.chi_plan') }}</th>
<th>{{ __('insurance.start_date') }}</th>
<th>{{ __('insurance.end_date') }}</th>
<th>{{ __('insurance.plan_fee') }}</th>
<th>{{ __('insurance.overall_annual_limit_for_member') }}</th>
<th>{{ __('insurance.overall_annual_limit_for_family') }}</th>
<th>{{ __('insurance.is_authorization_required') }}</th>
<th>{{ __('insurance.created_by') }}</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($chi_plans as $chi_plan)
<tr>
<td>{{ $chi_plan->name }}</td>
<td>{{ $chi_plan->plan_start_date }}</td>
<td>{{ $chi_plan->plan_end_date }}</td>
<td>{{ ugandan_shillings($chi_plan->plan_fee) }}</td>
<td>{{ ugandan_shillings($chi_plan->member_annual_limit) }}</td>
<td>{{ ugandan_shillings($chi_plan->family_annual_limit) }}</td>
<td>{{ ($chi_plan->is_authorized_required == 1) ? 'Yes' : 'No' }}</td>
<td>{{ get_full_name($chi_plan->created_by, "id", "first_name", "last_name", "users") }} at {{ streamline_date_time($chi_plan->created_at) }}</td>
<td>
<a href="/community_health_insurance_plan/{{ $chi_plan->id }}/edit/" class="btn btn-warning btn-rounded btn-sm"><i class="fa fa-pencil"></i> {{ __('drug_forms.edit') }}</a>
</td>
<td>
<a href="/community_health_insurance_plan/{{ $chi_plan->id }}" class="btn btn-info btn-rounded btn-sm"><i class="fa fa-pencil"></i> {{ __('insurance.details') }}</a>
</td>
<td>
{{ Form::model($chi_plan->id ,['method' => 'DELETE', 'route' => ['community_health_insurance_plan.destroy', $chi_plan->id]]) }}
<button type="submit" class="btn btn-danger btn-rounded btn-sm" onclick="return confirm('<?php echo __("drug_forms.are_you_sure")?>')"><i class="fa fa-trash"></i> {{ __('drug_forms.delete') }}</button>
{{ Form::close() }}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</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>
<script src="{{ asset('elite/tables/js/buttons.colVis.min.js') }}"></script>
<script>
$('.table').DataTable({
dom: 'Bfrtip',
bInfo: false,
bPaginate: false,
buttons: [
'copy',
{extend: 'csv',
message: 'LIST OF COMMUNITY HEALTH INSURANCE PLANS',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6, 7]
},
sheetName: 'LIST OF COMMUNITY HEALTH INSURANCE PLANS'
},
{extend: 'excel',
message: 'LIST OF COMMUNITY HEALTH INSURANCE PLANS',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6, 7]
},
sheetName: 'LIST OF COMMUNITY HEALTH INSURANCE PLANS'
},
{extend: 'pdf',
message: 'LIST OF COMMUNITY HEALTH INSURANCE PLANS',
orientation: 'portrait',
pageSize: 'LETTER',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6, 7]
},
customize: function (doc) {
doc.defaultStyle.fontSize = 10;
// doc.styles.tableHeader.alignment = 'left';
}
},
{extend: 'print',
message: 'LIST OF COMMUNITY HEALTH INSURANCE PLANS',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6, 7]
},
customize: function (win) {
$(win.document.body)
.css('font-size', '10pt')
.css('background', '#fff')
.prepend(
'<img src="<?php echo asset('uploads/logo/logo-sm.png'); ?>" style="position:absolute; top:0; right:0;" />'
);
$(win.document.body).find('table')
.addClass('compact')
.css('font-size', 'inherit');
}
}
]
});
</script>
@endpush
@@ -0,0 +1,7 @@
<div class="panel panel-default" style="border-radius: 5px;">
<div class="panel-body">
<a href="{{ route('community_health_insurance_plan.create') }}" class="nav-item btn btn-success"><i class="fa fa-plus"></i> <span style="margin-left: 10px;">{{ __('insurance.add_chi_plan') }}</span></a>
<a href="{{ route('community_health_insurance_plan.index') }}" class="nav-item btn btn-info"><i class="fa fa-eye"></i> <span style="margin-left: 10px;">{{ __('insurance.view_chi_plan') }}</span></a>
<a href="{{ route('community_health_insurance_plan.inactive') }}" class="nav-item btn btn-danger"><i class="fa fa-trash"></i> <span style="margin-left: 10px;">{{ __('insurance.activate_chi_plan') }}</span></a>
</div>
</div>
@@ -0,0 +1,375 @@
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('uploads/streamline/color/streamline_icon-02.png') }}">
<title>{{ config('app.name', 'Inpatient Bill - Stre@mline') }}</title>
<!-- Bootstrap Core CSS -->
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
<style>
body{
font-size: 0.8em;
}
/*thead, tfoot { display: table-row-group }*/
thead {
display: table-header-group;
}
tfoot {
display: table-row-group;
}
tr {
page-break-before: always;
page-break-after: always;
page-break-inside: avoid !important;
}
</style>
</head>
<body>
<div class="container-fluid">
@include('layouts.header_pdf_print')
<div class="row">
<div class="col-12">
<h4 class="text-center"><span style="color: blue;">{{ $chi_plan->name }}</span> {{ __('insurance.details') }} </h4>
<table class="table table-striped table-bordered">
<tbody>
<tr>
<td style="font-size: 18px; padding: 3px;">{{ __('insurance.plan_name') }}</td>
<td style="font-size: 18px; padding: 3px;">{{ $chi_plan->name }}</td>
<td style="font-size: 18px; padding: 3px;">{{ __('insurance.plan_fee') }}</td>
<td style="font-size: 18px; padding: 3px;">{{ ugandan_shillings($chi_plan->plan_fee) }}</td>
</tr>
<tr>
<td style="font-size: 18px; padding: 3px;">{{ __('insurance_groups.start_date') }}</td>
<td style="font-size: 18px; padding: 3px;">{{ streamline_date($chi_plan->plan_start_date) }}</td>
<td style="font-size: 18px; padding: 3px;">{{ __('insurance_groups.end_date') }}</td>
<td style="font-size: 18px; padding: 3px;">{{ streamline_date($chi_plan->plan_end_date) }}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="col-12">
<br><br>
<h3 class="text-center" style="font-size: 16px;">{{ __('insurance.plan_benefits') }}</h3>
@php
$insurance_benefits = \Streamline\Models\InsuranceBenefit::where('plan_id', $chi_plan->id)->get();
@endphp
@if(count($insurance_benefits) > 0)
@php $counter = 1 @endphp
@foreach($insurance_benefits as $insurance_benefit)
<table class="table" style="font-size: 16px;">
<tbody>
<tr>
<td style="padding: 3px;">{{ $counter }}. <strong>Benefit Name: </strong></td>
<td style="padding: 3px;">{{ $insurance_benefit->name }}</td>
<td style="padding: 3px;"><strong>&nbsp;&nbsp;&nbsp;&nbsp;Waiting Period:</strong></td>
<td style="padding: 3px;">{{ $insurance_benefit->waiting_period }}</td>
</tr>
<tr>
<td style="padding: 3px;"><strong>&nbsp;&nbsp;&nbsp;&nbsp;Benefit Fee: </strong></td>
<td style="padding: 3px;">{{ ugandan_shillings_with_decimals($insurance_benefit->fee) }}</td>
<td style="padding: 3px;"><strong>&nbsp;&nbsp;&nbsp;&nbsp;Created By: </strong></td>
<td style="padding: 3px;">{{ get_full_name($insurance_benefit->created_by, "id", "first_name", "last_name", "patients") }} at {{ streamline_date($insurance_benefit->created_at) }}</td>
</tr>
</tbody>
</table>
@php
$counter++;
$benefit = \Streamline\Models\InsuranceBenefit::find($insurance_benefit->id);
$benefit_drugs = DB::table('insurance_benefit_items')->whereNull('deleted_at')->where('item_type', 4)
->where('benefit_id', $insurance_benefit->id)->get();
$benefit_sundries = DB::table('insurance_benefit_items')->whereNull('deleted_at')->where('item_type', 5)
->where('benefit_id', $insurance_benefit->id)->get();
$benefit_invs = DB::table('insurance_benefit_items')->whereNull('deleted_at')->where('item_type', 3)
->where('benefit_id', $insurance_benefit->id)->get();
$benefit_procedures = DB::table('insurance_benefit_items')->whereNull('deleted_at')->where('item_type', 2)
->where('benefit_id', $insurance_benefit->id)->get();
$benefit_services = DB::table('insurance_benefit_items')->whereNull('deleted_at')->where('item_type', 1)
->where('benefit_id', $insurance_benefit->id)->get();
@endphp
{{-- start showing benefits belonging to this service --}}
<div style="border:5px solid #9b9b9b; padding: 5px;">
<h4>{{ __('insurance_benefits.procedures') }}</h4>
<table class="table color-bordered-table success-bordered-table item-tables">
<thead>
<tr>
<th>{{ __('insurance_benefits.name') }}</th>
<th>{{ __('insurance_benefits.authorisation') }}</th>
<th>{{ __('insurance_benefits.cash_price') }}</th>
<th>{{ __('insurance_benefits.co_payment') }}</th>
<th>{{ __('insurance.chi_to_pay') }}</th>
<th>{{ __('insurance_benefits.annual_member_limit') }}</th>
<th>{{ __('insurance_benefits.annual_family_limit') }}</th>
</tr>
</thead>
<tbody>
@foreach($benefit_procedures as $record)
@php $items_array = explode(",", $record->item_id); $count = 0; @endphp
@foreach($items_array as $item_id)
@php
$item_details = get_item_insurance_details($item_id, 2, $benefit->id);
if (!$item_details) {continue;}
if ($count > 4) {break;}
$count++;
@endphp
<tr>
<td style="padding: 3px;">{{ $procedures[$item_id] }}</td>
<td style="padding: 3px;">{{ $item_details['authorisation'] == 1 ? 'Yes' : 'No' }}</td>
<td style="padding: 3px;">{{ ugandan_shillings($item_details['cash_price']) }}</td>
<td style="padding: 3px;">{{ ugandan_shillings($item_details['co_payment']) }}</td>
<td style="padding: 3px;">
@php
$chi_to_pay = $item_details['cash_price'] - $item_details['co_payment'];
@endphp
{{ ugandan_shillings($chi_to_pay) }}
</td>
<td style="padding: 3px;">{{ ugandan_shillings($item_details['annual_member_limit']) }}</td>
<td style="padding: 3px;">{{ ugandan_shillings($item_details['annual_family_limit']) }}</td>
</tr>
@endforeach
@endforeach
</tbody>
</table>
<hr>
<h4>{{ __('insurance_benefits.services') }}</h4>
<table class="table color-bordered-table success-bordered-table item-tables">
<thead>
<tr>
<th>{{ __('insurance_benefits.name') }}</th>
<th>{{ __('insurance_benefits.authorisation') }}</th>
<th>{{ __('insurance_benefits.cash_price') }}</th>
<th>{{ __('insurance_benefits.co_payment') }}</th>
<th>{{ __('insurance.chi_to_pay') }}</th>
<th>{{ __('insurance_benefits.annual_member_limit') }}</th>
<th>{{ __('insurance_benefits.annual_family_limit') }}</th>
</tr>
</thead>
<tbody>
@foreach($benefit_services as $record)
@php $items_array = explode(",", $record->item_id); $count = 0; @endphp
@foreach($items_array as $item_id)
@php
$item_details = get_item_insurance_details($item_id, 1, $benefit->id);
if (!$item_details) {continue;}
if ($count > 4) {break;}
$count++;
@endphp
<tr>
<td style="padding: 3px;">{{ $services[$item_id] }}</td>
<td style="padding: 3px;">{{ $item_details['authorisation'] == 1 ? 'Yes' : 'No' }}</td>
<td style="padding: 3px;">{{ ugandan_shillings($item_details['cash_price']) }}</td>
<td style="padding: 3px;">{{ ugandan_shillings($item_details['co_payment']) }}</td>
<td style="padding: 3px;">
@php
$chi_to_pay = $item_details['cash_price'] - $item_details['co_payment'];
@endphp
{{ ugandan_shillings($chi_to_pay) }}
</td>
<td style="padding: 3px;">{{ ugandan_shillings($item_details['annual_member_limit']) }}</td>
<td style="padding: 3px;">{{ ugandan_shillings($item_details['annual_family_limit']) }}</td>
</tr>
@endforeach
@endforeach
</tbody>
</table>
<hr>
<h4>{{ __('insurance_benefits.investigations') }}</h4>
<table class="table color-bordered-table success-bordered-table item-tables">
<thead>
<tr>
<th>{{ __('insurance_benefits.name') }}</th>
<th>{{ __('insurance_benefits.authorisation') }}</th>
<th>{{ __('insurance_benefits.cash_price') }}</th>
<th>{{ __('insurance_benefits.co_payment') }}</th>
<th>{{ __('insurance.chi_to_pay') }}</th>
<th>{{ __('insurance_benefits.annual_member_limit') }}</th>
<th>{{ __('insurance_benefits.annual_family_limit') }}</th>
</tr>
</thead>
<tbody>
@foreach($benefit_invs as $record)
@php $items_array = explode(",", $record->item_id); $count = 0; @endphp
@foreach($items_array as $item_id)
@php
$item_details = get_item_insurance_details($item_id, 3, $benefit->id);
if (!$item_details) {continue;}
if ($count > 4) {break;}
$count++;
@endphp
<tr>
<td style="padding: 3px;">{{ $investigations[$item_id] }}</td>
<td style="padding: 3px;">{{ $item_details['authorisation'] == 1 ? 'Yes' : 'No' }}</td>
<td style="padding: 3px;">{{ ugandan_shillings($item_details['cash_price']) }}</td>
<td style="padding: 3px;">{{ ugandan_shillings($item_details['co_payment']) }}</td>
<td style="padding: 3px;">
@php
$chi_to_pay = $item_details['cash_price'] - $item_details['co_payment'];
@endphp
{{ ugandan_shillings($chi_to_pay) }}
</td>
<td style="padding: 3px;">{{ ugandan_shillings($item_details['annual_member_limit']) }}</td>
<td style="padding: 3px;">{{ ugandan_shillings($item_details['annual_family_limit']) }}</td>
</tr>
@endforeach
@endforeach
</tbody>
</table>
<hr>
<h4>{{ __('insurance_benefits.drugs') }}</h4>
<table class="table color-bordered-table success-bordered-table item-tables">
<thead>
<tr>
<th>{{ __('insurance_benefits.name') }}</th>
<th>{{ __('insurance_benefits.authorisation') }}</th>
<th>{{ __('insurance_benefits.cash_price') }}</th>
<th>{{ __('insurance_benefits.co_payment') }}</th>
<th>{{ __('insurance.chi_to_pay') }}</th>
<th>{{ __('insurance_benefits.annual_member_limit') }}</th>
<th>{{ __('insurance_benefits.annual_family_limit') }}</th>
</tr>
</thead>
<tbody>
@foreach($benefit_drugs as $record)
@php $items_array = explode(",", $record->item_id); $count = 0; @endphp
@foreach($items_array as $item_id)
@php
$item_details = get_item_insurance_details($item_id, 4, $benefit->id);
if (!$item_details) {continue;}
if ($count > 4) {break;}
$count++;
@endphp
<tr>
<td style="padding: 3px;">{{ $drugs[$item_id] }}</td>
<td style="padding: 3px;">{{ $item_details['authorisation'] == 1 ? 'Yes' : 'No' }}</td>
<td style="padding: 3px;">{{ ugandan_shillings($item_details['cash_price']) }}</td>
<td style="padding: 3px;">{{ ugandan_shillings($item_details['co_payment']) }}</td>
<td style="padding: 3px;">
@php
$chi_to_pay = $item_details['cash_price'] - $item_details['co_payment'];
@endphp
{{ ugandan_shillings($chi_to_pay) }}
</td>
<td style="padding: 3px;">{{ ugandan_shillings($item_details['annual_member_limit']) }}</td>
<td style="padding: 3px;">{{ ugandan_shillings($item_details['annual_family_limit']) }}</td>
</tr>
@endforeach
@endforeach
</tbody>
</table>
<hr>
<h4>{{ __('insurance_benefits.sundries') }}</h4>
<table class="table color-bordered-table success-bordered-table item-tables">
<thead>
<tr>
<th>{{ __('insurance_benefits.name') }}</th>
<th>{{ __('insurance_benefits.authorisation') }}</th>
<th>{{ __('insurance_benefits.cash_price') }}</th>
<th>{{ __('insurance_benefits.co_payment') }}</th>
<th>{{ __('insurance.chi_to_pay') }}</th>
<th>{{ __('insurance_benefits.annual_member_limit') }}</th>
<th>{{ __('insurance_benefits.annual_family_limit') }}</th>
</tr>
</thead>
<tbody>
@foreach($benefit_sundries as $record)
@php $items_array = explode(",", $record->item_id); $count = 0; @endphp
@foreach($items_array as $item_id)
@php
$item_details = get_item_insurance_details($item_id, 5, $benefit->id);
if (!$item_details) {continue;}
if ($count > 4) {break;}
$count++;
@endphp
<tr>
<td style="padding: 3px;">{{ $sundries[$item_id] }}</td>
<td style="padding: 3px;">{{ $item_details['authorisation'] == 1 ? 'Yes' : 'No' }}</td>
<td style="padding: 3px;">{{ ugandan_shillings($item_details['cash_price']) }}</td>
<td style="padding: 3px;">{{ ugandan_shillings($item_details['co_payment']) }}</td>
<td style="padding: 3px;">
@php
$chi_to_pay = $item_details['cash_price'] - $item_details['co_payment'];
@endphp
{{ ugandan_shillings($chi_to_pay) }}
</td>
<td style="padding: 3px;">{{ ugandan_shillings($item_details['annual_member_limit']) }}</td>
<td style="padding: 3px;">{{ ugandan_shillings($item_details['annual_family_limit']) }}</td>
</tr>
@endforeach
@endforeach
</tbody>
</table>
</div>
<hr>
{{-- end showing benefits belonging to this service --}}
@endforeach
@endif
</div>
</div>
<div class="row-fluid">
<div class="col-auto">
<hr>
</div>
</div>
<div class="row">
</div>
</div>
</body>
</html>
@@ -0,0 +1,434 @@
@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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ $chi_plan->name }}</span> {{ __('insurance.details') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ url('insurance') }}">{{ __('insurance.insurance') }}</a></li>
<li class="active">{{ __('insurance.CHI_plan_details') }}</li>
</ol>
</div>
<!-- /.col-lg-12 -->
</div>
<div class="row">
<div class="col-sm-12">
@include('insurance::chi_plan.menu')
</div>
</div>
@include('flash::message')
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="col-md-3"></div>
<div class="col-md-6">
<h4 class="text-center"><span style="color: blue;">{{ $chi_plan->name }}</span> {{ __('insurance.details') }} </h4>
<table class="table table-striped table-bordered">
<tbody>
<tr>
<td style="font-size: 18px;">{{ __('insurance.plan_name') }}</td>
<td style="font-size: 18px;">{{ $chi_plan->name }}</td>
<td style="font-size: 18px;">{{ __('insurance.plan_fee') }}</td>
<td style="font-size: 18px;">{{ ugandan_shillings($chi_plan->plan_fee) }}</td>
</tr>
<tr>
<td style="font-size: 18px;">{{ __('insurance_groups.start_date') }}</td>
<td style="font-size: 18px;">{{ streamline_date($chi_plan->plan_start_date) }}</td>
<td style="font-size: 18px;">{{ __('insurance_groups.end_date') }}</td>
<td style="font-size: 18px;">{{ streamline_date($chi_plan->plan_end_date) }}</td>
</tr>
</tbody>
</table>
</div>
<div class="col-md-3">
<a href="{{ url('community_health_insurance_plan/') }}/{{ $chi_plan->id}}/print" target="_blank" class="btn btn-rounded" style="background-color: #5a996d; color: white;"><i class="fa fa-print"></i><span style="margin-left: 10px;">Print Plan</span></a>
</div>
</div>
<br>
<div class="row">
<div class="col-md-12">
<h3 class="text-center" style="font-size: 16px;">{{ __('insurance.plan_benefits') }}</h3>
@php
$insurance_benefits = \Streamline\Models\InsuranceBenefit::where('plan_id', $chi_plan->id)->get();
@endphp
@if(count($insurance_benefits) > 0)
@php $counter = 1 @endphp
@foreach($insurance_benefits as $insurance_benefit)
<table class="table" style="font-size: 16px;">
<tbody>
<tr>
<td>{{ $counter }}. <strong>Benefit Name: </strong></td>
<td>{{ $insurance_benefit->name }}</td>
</tr>
<tr>
<td><strong>&nbsp;&nbsp;&nbsp;&nbsp;Waiting Period:</strong></td>
<td>{{ $insurance_benefit->waiting_period }}</td>
</tr>
<tr>
<td><strong>&nbsp;&nbsp;&nbsp;&nbsp;Benefit Fee: </strong></td>
<td>{{ ugandan_shillings_with_decimals($insurance_benefit->fee) }}</td>
</tr>
<tr>
<td><strong>&nbsp;&nbsp;&nbsp;&nbsp;Created By: </strong></td>
<td>{{ get_full_name($insurance_benefit->created_by, "id", "first_name", "last_name", "patients") }} at {{ streamline_date($insurance_benefit->created_at) }}</td>
</tr>
</tbody>
</table>
@php
$counter++;
$benefit = \Streamline\Models\InsuranceBenefit::find($insurance_benefit->id);
$benefit_drugs = DB::table('insurance_benefit_items')->whereNull('deleted_at')->where('item_type', 4)
->where('benefit_id', $insurance_benefit->id)->get();
$benefit_sundries = DB::table('insurance_benefit_items')->whereNull('deleted_at')->where('item_type', 5)
->where('benefit_id', $insurance_benefit->id)->get();
$benefit_invs = DB::table('insurance_benefit_items')->whereNull('deleted_at')->where('item_type', 3)
->where('benefit_id', $insurance_benefit->id)->get();
$benefit_procedures = DB::table('insurance_benefit_items')->whereNull('deleted_at')->where('item_type', 2)
->where('benefit_id', $insurance_benefit->id)->get();
$benefit_services = DB::table('insurance_benefit_items')->whereNull('deleted_at')->where('item_type', 1)
->where('benefit_id', $insurance_benefit->id)->get();
@endphp
{{-- start showing benefits belonging to this service --}}
<div style="border:5px solid #9b9b9b; padding: 5px;">
<h4>{{ __('insurance_benefits.procedures') }}</h4>
<table class="table color-bordered-table success-bordered-table item-tables">
<thead>
<tr>
<th>{{ __('insurance_benefits.name') }}</th>
<th>{{ __('insurance_benefits.authorisation') }}</th>
<th>{{ __('insurance_benefits.cash_price') }}</th>
<th>{{ __('insurance_benefits.co_payment') }}</th>
<th>{{ __('insurance.chi_to_pay') }}</th>
<th>{{ __('insurance_benefits.annual_member_limit') }}</th>
<th>{{ __('insurance_benefits.annual_family_limit') }}</th>
</tr>
</thead>
<tbody>
@foreach($benefit_procedures as $record)
@php $items_array = explode(",", $record->item_id); $count = 0; @endphp
@foreach($items_array as $item_id)
@php
$item_details = get_item_insurance_details($item_id, 2, $benefit->id);
if (!$item_details) {continue;}
if ($count > 4) {break;}
$count++;
@endphp
<tr>
<td>{{ $procedures[$item_id] }}</td>
<td>{{ $item_details['authorisation'] == 1 ? 'Yes' : 'No' }}</td>
<td>{{ ugandan_shillings($item_details['cash_price']) }}</td>
<td>{{ ugandan_shillings($item_details['co_payment']) }}</td>
<td>
@php
$chi_to_pay = $item_details['cash_price'] - $item_details['co_payment'];
@endphp
{{ ugandan_shillings($chi_to_pay) }}
</td>
<td>{{ ugandan_shillings($item_details['annual_member_limit']) }}</td>
<td>{{ ugandan_shillings($item_details['annual_family_limit']) }}</td>
</tr>
@endforeach
@endforeach
</tbody>
</table>
<hr>
<h4>{{ __('insurance_benefits.services') }}</h4>
<table class="table color-bordered-table success-bordered-table item-tables">
<thead>
<tr>
<th>{{ __('insurance_benefits.name') }}</th>
<th>{{ __('insurance_benefits.authorisation') }}</th>
<th>{{ __('insurance_benefits.cash_price') }}</th>
<th>{{ __('insurance_benefits.co_payment') }}</th>
<th>{{ __('insurance.chi_to_pay') }}</th>
<th>{{ __('insurance_benefits.annual_member_limit') }}</th>
<th>{{ __('insurance_benefits.annual_family_limit') }}</th>
</tr>
</thead>
<tbody>
@foreach($benefit_services as $record)
@php $items_array = explode(",", $record->item_id); $count = 0; @endphp
@foreach($items_array as $item_id)
@php
$item_details = get_item_insurance_details($item_id, 1, $benefit->id);
if (!$item_details) {continue;}
if ($count > 4) {break;}
$count++;
@endphp
<tr>
<td>{{ $services[$item_id] }}</td>
<td>{{ $item_details['authorisation'] == 1 ? 'Yes' : 'No' }}</td>
<td>{{ ugandan_shillings($item_details['cash_price']) }}</td>
<td>{{ ugandan_shillings($item_details['co_payment']) }}</td>
<td>
@php
$chi_to_pay = $item_details['cash_price'] - $item_details['co_payment'];
@endphp
{{ ugandan_shillings($chi_to_pay) }}
</td>
<td>{{ ugandan_shillings($item_details['annual_member_limit']) }}</td>
<td>{{ ugandan_shillings($item_details['annual_family_limit']) }}</td>
</tr>
@endforeach
@endforeach
</tbody>
</table>
<hr>
<h4>{{ __('insurance_benefits.investigations') }}</h4>
<table class="table color-bordered-table success-bordered-table item-tables">
<thead>
<tr>
<th>{{ __('insurance_benefits.name') }}</th>
<th>{{ __('insurance_benefits.authorisation') }}</th>
<th>{{ __('insurance_benefits.cash_price') }}</th>
<th>{{ __('insurance_benefits.co_payment') }}</th>
<th>{{ __('insurance.chi_to_pay') }}</th>
<th>{{ __('insurance_benefits.annual_member_limit') }}</th>
<th>{{ __('insurance_benefits.annual_family_limit') }}</th>
</tr>
</thead>
<tbody>
@foreach($benefit_invs as $record)
@php $items_array = explode(",", $record->item_id); $count = 0; @endphp
@foreach($items_array as $item_id)
@php
$item_details = get_item_insurance_details($item_id, 3, $benefit->id);
if (!$item_details) {continue;}
if ($count > 4) {break;}
$count++;
@endphp
<tr>
<td>{{ $investigations[$item_id] }}</td>
<td>{{ $item_details['authorisation'] == 1 ? 'Yes' : 'No' }}</td>
<td>{{ ugandan_shillings($item_details['cash_price']) }}</td>
<td>{{ ugandan_shillings($item_details['co_payment']) }}</td>
<td>
@php
$chi_to_pay = $item_details['cash_price'] - $item_details['co_payment'];
@endphp
{{ ugandan_shillings($chi_to_pay) }}
</td>
<td>{{ ugandan_shillings($item_details['annual_member_limit']) }}</td>
<td>{{ ugandan_shillings($item_details['annual_family_limit']) }}</td>
</tr>
@endforeach
@endforeach
</tbody>
</table>
<hr>
<h4>{{ __('insurance_benefits.drugs') }}</h4>
<table class="table color-bordered-table success-bordered-table item-tables">
<thead>
<tr>
<th>{{ __('insurance_benefits.name') }}</th>
<th>{{ __('insurance_benefits.authorisation') }}</th>
<th>{{ __('insurance_benefits.cash_price') }}</th>
<th>{{ __('insurance_benefits.co_payment') }}</th>
<th>{{ __('insurance.chi_to_pay') }}</th>
<th>{{ __('insurance_benefits.annual_member_limit') }}</th>
<th>{{ __('insurance_benefits.annual_family_limit') }}</th>
</tr>
</thead>
<tbody>
@foreach($benefit_drugs as $record)
@php $items_array = explode(",", $record->item_id); $count = 0; @endphp
@foreach($items_array as $item_id)
@php
$item_details = get_item_insurance_details($item_id, 4, $benefit->id);
if (!$item_details) {continue;}
if ($count > 4) {break;}
$count++;
@endphp
<tr>
<td>{{ $drugs[$item_id] }}</td>
<td>{{ $item_details['authorisation'] == 1 ? 'Yes' : 'No' }}</td>
<td>{{ ugandan_shillings($item_details['cash_price']) }}</td>
<td>{{ ugandan_shillings($item_details['co_payment']) }}</td>
<td>
@php
$chi_to_pay = $item_details['cash_price'] - $item_details['co_payment'];
@endphp
{{ ugandan_shillings($chi_to_pay) }}
</td>
<td>{{ ugandan_shillings($item_details['annual_member_limit']) }}</td>
<td>{{ ugandan_shillings($item_details['annual_family_limit']) }}</td>
</tr>
@endforeach
@endforeach
</tbody>
</table>
<hr>
<h4>{{ __('insurance_benefits.sundries') }}</h4>
<table class="table color-bordered-table success-bordered-table item-tables">
<thead>
<tr>
<th>{{ __('insurance_benefits.name') }}</th>
<th>{{ __('insurance_benefits.authorisation') }}</th>
<th>{{ __('insurance_benefits.cash_price') }}</th>
<th>{{ __('insurance_benefits.co_payment') }}</th>
<th>{{ __('insurance.chi_to_pay') }}</th>
<th>{{ __('insurance_benefits.annual_member_limit') }}</th>
<th>{{ __('insurance_benefits.annual_family_limit') }}</th>
</tr>
</thead>
<tbody>
@foreach($benefit_sundries as $record)
@php $items_array = explode(",", $record->item_id); $count = 0; @endphp
@foreach($items_array as $item_id)
@php
$item_details = get_item_insurance_details($item_id, 5, $benefit->id);
if (!$item_details) {continue;}
if ($count > 4) {break;}
$count++;
@endphp
<tr>
<td>{{ $sundries[$item_id] }}</td>
<td>{{ $item_details['authorisation'] == 1 ? 'Yes' : 'No' }}</td>
<td>{{ ugandan_shillings($item_details['cash_price']) }}</td>
<td>{{ ugandan_shillings($item_details['co_payment']) }}</td>
<td>
@php
$chi_to_pay = $item_details['cash_price'] - $item_details['co_payment'];
@endphp
{{ ugandan_shillings($chi_to_pay) }}
</td>
<td>{{ ugandan_shillings($item_details['annual_member_limit']) }}</td>
<td>{{ ugandan_shillings($item_details['annual_family_limit']) }}</td>
</tr>
@endforeach
@endforeach
</tbody>
</table>
</div>
<hr>
{{-- end showing benefits belonging to this service --}}
@endforeach
@endif
</div>
<div class="col-md-3"></div>
</div>
</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>
<script src="{{ asset('elite/tables/js/buttons.colVis.min.js') }}"></script>
<script>
$('.item-tables').DataTable({
dom: 'Bfrtip',
bInfo: false,
bPaginate: false,
buttons: [
'copy',
{extend: 'csv',
message: '<?php echo $chi_plan->name?> C.H.I Plan',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6]
},
sheetName: '<?php echo $chi_plan->name?> C.H.I Plan'
},
{extend: 'excel',
message: '<?php echo $chi_plan->name?> C.H.I Plan',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6]
},
sheetName: '<?php echo $chi_plan->name?> C.H.I Plan'
},
{extend: 'pdf',
message: '<?php echo $chi_plan->name?> C.H.I Plan',
orientation: 'portrait',
pageSize: 'LETTER',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6]
},
customize: function (doc) {
doc.defaultStyle.fontSize = 10;
// doc.styles.tableHeader.alignment = 'left';
}
},
{extend: 'print',
message: '<?php echo $chi_plan->name?> C.H.I Plan',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6]
},
customize: function (win) {
$(win.document.body)
.css('font-size', '10pt')
.css('background', '#fff')
.prepend(
'<img src="<?php echo asset('uploads/logo/logo-sm.png'); ?>" style="position:absolute; top:0; right:0;" />'
);
$(win.document.body).find('table')
.addClass('compact')
.css('font-size', 'inherit');
}
}
]
});
</script>
@endpush
@@ -0,0 +1,72 @@
@extends('layouts.main')
@push('styles')
<link rel="stylesheet" href="{{ asset('elite/bower_components/dropify/dist/css/dropify.min.css') }}">
@endpush
@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">{{ __('heads_of_family.edit_head_of_family') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('heads_of_family.dashboard') }}</a></li>
<li><a href="/heads_of_family/">{{ __('heads_of_family.heads_of_family') }}</a></li>
<li class="active">{{ __('heads_of_family.edit') }}</li>
</ol>
</div>
<!-- /.col-lg-12 -->
</div>
@include ('errors.list')
@include('insurance::heads_of_family.menu')
<div class="panel panel-default">
<div class="panel-body">
{{ Form::model($family_head, ['method' => 'PUT', 'route' => ['heads_of_family.update',$family_head], 'files' => 'required']) }}
{{ Form::hidden('patient_id', $family_head->patient_id, ['class' => 'patient_id']) }}
<div class="form-group">
{{ Form::label('name', __('heads_of_family.head_of_family_name')) }}
{{ Form::text('name', $family_head->name, ['class' => 'form-control compulsory', 'readonly' => 'true']) }}
</div>
<div class="form-group">
{{ Form::label('group_id', __('heads_of_family.insurance_group')) }}
{{ Form::select('group_id', $insurance_groups, null, ['class' => 'form-control compulsory']) }}
</div>
<div class="form-group">
{{ Form::label('photo', __('heads_of_family.profile_photo')) }}
{{ Form::file('photo', ['class' => 'dropify', 'data-default-file' => $uploaded_photo]) }}
<br>
@php
$insurance_member_id = get_name($family_head->patient_id, "patient_id", "id", "insurance_members");
@endphp
<a href="/insurance_members/{{ $insurance_member_id }}/edit/"><i class="fa fa-pencil"></i> {{ __('insurance_members.edit_family_head_details') }}</a>
</div>
{{ Form::button(__('heads_of_family.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('heads_of_family.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/dropify/dist/js/dropify.min.js') }}"></script>
<script>
$(document).ready(function() {
$('.dropify').dropify();
});
</script>
@endpush
@@ -0,0 +1,85 @@
@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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('heads_of_family.inactive_head_of_family') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('heads_of_family.dashboard') }}</a></li>
<li><a href="/heads_of_family/"></a>{{ __('heads_of_family.heads_of_family') }}</li>
<li class="active">{{ __('heads_of_family.activate') }}</li>
</ol>
</div>
<!-- /.col-lg-12 -->
</div>
@include('flash::message')
@include('insurance::heads_of_family.menu')
<div class="panel panel-default">
<div class="panel-body">
<div class="table-responsive">
<table id="table" class="table table-striped color-bordered-table success-bordered-table table-hover">
<thead>
<tr>
<th>{{ __('heads_of_family.patient_number') }}</th>
<th>{{ __('heads_of_family.name') }}</th>
<th>{{ __('heads_of_family.insurance_group') }}</th>
<th>{{ __('heads_of_family.contact') }}</th>
<th>{{ __('heads_of_family.action') }}</th>
</tr>
</thead>
<tbody>
@foreach($family_heads as $family_head)
<tr>
<td>{{ $family_head->number }}</td>
<td>{!! insurance_flag($family_head->patient_id) !!}</td>
<td>{{ isset($insurance_groups[$family_head->group_id]) ? $insurance_groups[$family_head->group_id] : 'N/A' }}</td>
<td>{{ $family_head->phone }}</td>
<td>
{{ Form::model($family_head->id ,['method' => 'POST', 'route' => ['heads_of_family.activate', $family_head->id]]) }}
<button type="submit" class="btn btn-rounded btn-warning" onclick="return confirm('<?php echo __('heads_of_family.are_you_sure');?>')"><i class="fa fa-check"></i> {{ __('heads_of_family.activate') }}</button>
{{ Form::close() }}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</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>
<script>
$('#table').DataTable({
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
</script>
@endpush
@@ -0,0 +1,217 @@
@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/select2/select2.min.css') }}" rel="stylesheet" />
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
@endpush
@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">{{ __('heads_of_family.heads_of_family') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('heads_of_family.dashboard') }}</a></li>
<li><a href="/insurance/scheme_administration">{{ __('insurance.scheme_administration') }}</a></li>
<li class="active">{{ __('heads_of_family.heads_of_family') }}</li>
</ol>
</div>
<!-- /.col-lg-12 -->
</div>
@include('insurance::heads_of_family.menu')
@include('flash::message')
<div class="white-box">
{{ Form::open(['route' => 'heads_of_family.search', 'method' => 'ANY', 'role' => 'search']) }}
<div class="row pb-3">
<div class="col">
<div class="form-group" id="full_names">
{{ Form::text('full_name', '', ['class' => 'form-control typeahead', 'placeholder' => 'Search for Family Head by Name or Number', 'autocomplete' => 'off', 'spellcheck' => false]) }}
</div>
</div>
<div class="col">
<div class="form-group">
{{ Form::select('member_type',[0 => __('heads_of_family.all_family_heads'), 1 => __('heads_of_family.family_heads_with_active_insurance'), 2 => __('heads_of_family.family_heads_with_inactive_insurance')],0,['class' => 'form-control']) }}
</div>
</div>
<div class="col">
<button type="submit" class="btn btn-success pull-right" style="border-radius: 5px;"><span class="glyphicon glyphicon-search"></span> {{ __('insurance_members.search') }}</button>
</div>
</div>
{{ Form::close() }}
@if(isset($criteria))
<div class="row">
<div class="col">
<p>{{ __('insurance_members.search_criteria') }} : <code>{{ $criteria }}</code> &nbsp;&nbsp;&nbsp;<a href="{{ route('heads_of_family.index') }}">{{ __('insurance_members.clear_search') }}</a></p>
</div>
</div>
@endif
<div class="row">
<div class="col table-responsive">
<table id="table" class="table table-striped color-bordered-table success-bordered-table table-hover">
<thead>
<tr>
<th>{{ __('heads_of_family.patient_number') }}</th>
<th>{{ __('heads_of_family.name') }}</th>
<th>{{ __('heads_of_family.insurance_group') }}</th>
<th>{{ __('heads_of_family.contact') }}</th>
<th>{{ __('heads_of_family.insurance_status') }}</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($family_heads as $family_head)
@php
// get payment details for this group
$insurance_subscriptions_details = explode("/", check_insurance_family_status($family_head->group_id, $family_head->family_id));
@endphp
<tr>
<td>{{ $family_head->number }}</td>
<td>{!! insurance_flag($family_head->patient_id) !!}</td>
<td>{{ isset($insurance_groups[$family_head->group_id]) ? $insurance_groups[$family_head->group_id] : 'N/A' }}</td>
<td>{{ $family_head->phone }}</td>
<td>
@if($insurance_subscriptions_details[0] == 1)
<span style="color:green "><strong>{{ __('heads_of_family.active') }}</strong></span>
@else
<span style="color:red "><strong>{{ __('heads_of_family.inactive') }}</strong></span>
@endif
</td>
<td>
<a href="/insurance_members/{{ get_name($family_head->patient_id, 'patient_id', 'id', 'insurance_members') }}/edit/" class="btn btn-rounded btn-info btn-sm"><i class="fa fa-pencil"></i> {{ __('insurance_members.edit') }}</a>
</td>
<td>
<a href="#view_family_members" data-toggle="modal" id="view_chi_family_{{$family_head->id}}">View members</a>
</td>
<td>
@if (empty($family_head->family_members_ids))
{{ Form::model($family_head->id ,['method' => 'DELETE', 'route' => ['heads_of_family.destroy', $family_head->id]]) }}
<button type="submit" class="btn btn-rounded btn-danger" onclick="return confirm('<?php echo ( __('insurance_groups.delete_family'))?>')"><i class="fa fa-trash"></i> {{ __('drugs.delete') }}</button>
{{ Form::close() }}
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
{{ $family_heads->links() }}
</div>
</div>
</div>
{{-- modal --}}
<div class="modal fade" id="view_family_members" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="exampleModalLabel1">{{ __('insurance.family_members') }}</h4>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row">
<div class="col-md-12" id="family_members_table">
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('insurance.cancel') }}</button>
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/typeahead.js-master/dist/typeahead.bundle.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 src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script>
$('#table').DataTable({
dom: 'Bfrtip',
pageLength: 100,
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
],
aaSorting: [],
columnDefs: [{
targets: [5, 6, 7], /* column index */
orderable: false, /* true or false */
}],
});
$("#table").on('click', "[id^=view_chi_family_]", function () {
var id = /\d+(?=\D*$)/.exec($(this).attr('id'));
var id_string = id.toString();
//console.log(id_string);
//console.log(family_head_and_group_id_array);
var family_head_id = id.toString();
$.ajax({
method: 'GET',
url: '/view_family_members_of_head/' + family_head_id,
success: function(response){
$('#family_members_table').html(response);
},
error: function () {
//
}
});
});
var substringMatcher = function (strs) {
return function findMatches(q, cb) {
var matches, substringRegex;
// an array that will be populated with substring matches
matches = [];
// regex used to determine if a string contains the substring `q`
substrRegex = new RegExp(q, 'i');
// iterate through the pool of strings and for any string that
// contains the substring `q`, add it to the `matches` array
$.each(strs, function (i, str) {
if (substrRegex.test(str)) {
matches.push(str);
}
});
cb(matches);
};
};
$('#full_names .typeahead').typeahead(
{
hint: true,
highlight: true,
minLength: 1
},
{
name: 'full_names',
source: substringMatcher(<?php echo json_encode($full_names); ?>)
}
);
</script>
@endpush
@@ -0,0 +1,6 @@
<div class="panel panel-default">
<div class="panel-body">
<a href="/heads_of_family/" class="nav-item btn btn-info" style="border-radius: 5px;"><i class="fa fa-eye"></i> <span style="margin-left: 10px">{{ __('heads_of_family.view_head_of_family') }}</span></a>
<a href="/heads_of_family/inactive" class="nav-item btn btn-danger" style="border-radius: 5px;"><i class="fa fa-trash"></i> <span style="margin-left: 10px">{{ __('heads_of_family.inactive_head_of_family') }}</span></a>
</div>
</div>
@@ -0,0 +1,80 @@
@extends('layouts.main')
@section('content')
<div class="row bg-title">
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
<h5 class="page-title">{{ __('insurance.insurance_reports') }}</h5>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance.dashboard') }}</a></li>
<li><a class="active">{{ __('insurance.insurance_reports') }}</a></li>
</ol>
</div>
</div>
<div class="white-box">
<div class="row">
<div class="col-md-4">
<h3 class="box-title">{{ __('insurance.insurance_reports') }}</h3>
<ul class="feeds">
<a href="{{ route('insurance_reports.view_expiry_status') }}">
<li>
<div class="bg-info"><i class="icon-user-follow text-white"></i></div> {{ __('insurance.insurance_expiring') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
<a href="{{ route('insurance_reports.expired_insurance') }}">
<li>
<div class="bg-info"><i class="icon-user-unfollow text-white"></i></div> {{ __('insurance.expired_insurance') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
<a href="{{ route('insurance_reports.insurance_transactions') }}">
<li>
<div class="bg-info"><i class="icon-user-follow text-white"></i></div> {{ __('insurance.premiums_report') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
<!-- <a href="{{ route('insurance_reports.cumulative_premiums_report') }}">
<li>
<div class="bg-info"><i class="fa fa-eye text-white"></i></div> {{ __('insurance.cumulative_premiums_report') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
<a href="{{ route('insurance_reports.insurance_income_received') }}">
<li>
<div class="bg-info"><i class="icon-user-unfollow text-white"></i></div> {{ __('insurance.income_received') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>-->
</ul>
</div>
<div class="col-md-4">
<h3 class="box-title">{{ __('insurance.insurance_reports') }}</h3>
<ul class="feeds">
@if( Auth::user()->can('members-with-pre-existing-premiums-report'))
<a href="{{ route('insurance_members.pre_existing_premiums_report') }}">
<li>
<div class="bg-info"><i class="fa fa-book text-white"></i></div> {{ __('insurance.members_with_pre_existing_premiums') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
@endif
</ul>
</div>
<div class="col-md-4">
<h3 class="box-title">{{ __('insurance.expenditure_reports') }}</h3>
<ul class="feeds">
<a href="{{ route('insurance_reports.insurance_income_received') }}">
<li>
<div class="bg-info"><i class="icon-user-follow text-white"></i></div> {{ __('insurance.income_v_expend') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
<a href="{{ route('insurance_reports.insurance_expenditure') }}">
<li>
<div class="bg-info"><i class="fa fa-eye text-white"></i></div> {{ __('insurance.insurance_expenditure') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
</ul>
</div>
</div>
</div>
@endsection
@@ -0,0 +1,85 @@
@extends('layouts.main')
@push('styles')
<style type="text/css">
.list-group-item{
color: #337ab7 !important;
}
</style>
@endpush
@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">{{ __('risks.insurance_scheme_admin') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">Home</a></li>
<li class="active">{{ __('risks.dashboard') }}</li>
</ol>
</div>
</div>
<div class="white-box">
<div class="card-deck">
<div class="card border-0">
<div class="card-header">{{ __('insurance.product_set_up') }}</div>
<div class="card-body list-group list-group-flush">
<ul class="feeds">
<a href="{{ url('community_health_insurance_plan') }}">
<li>
<div class="bg-success"><i class="fa fa-eye text-white"></i></div> {{ __('insurance.plans') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
@if(Auth::user()->can('insurance-benefits-view'))
<a href="/insurance_benefits">
<li>
<div class="bg-success"><i class="fa fa-eye text-white"></i></div> {{ __('insurance.benefits') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
@endif
@if(Auth::user()->can('insurance-disease-groups-view'))
<a href="/insurance_disease_groups/index/">
<li>
<div class="bg-success"><i class="fa fa-eye text-white"></i></div> {{ __('insurance_disease_groups.insurance_disease_groups') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
@endif
@if(Auth::user()->can('insurance-tariffs-view'))
<a href="/insurance_tariffs/view_tariffs">
<li>
<div class="bg-success"><i class="fa fa-eye text-white"></i></div> {{ __('insurance.tariffs') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
@endif
<a href="{{ route('risks.index') }}">
<li>
<div class="bg-success"><i class="fa fa-eye text-white"></i></div> {{ __('insurance.risks') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
</ul>
</div>
</div>
<div class="card border-0">
<div class="card-header">{{ __('insurance.insurance_title') }}</div>
<div class="card-body list-group list-group-flush">
<ul class="feeds">
<a href="javascript:void(0);">
<li>
<div class="bg-success"><i class="fa fa-eye text-white"></i></div> {{ __('insurance.setup_reinsurance') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
<a href="javascript:void(0);">
<li>
<div class="bg-success"><i class="fa fa-eye text-white"></i></div> {{ __('insurance.setup_quota_shares') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
</ul>
</div>
</div>
</div>
</div>
@endsection
@@ -0,0 +1,202 @@
@extends('layouts.main')
@push('styles')
<style type="text/css">
.list-group-item{
color: #337ab7 !important;
}
</style>
@endpush
@section('content')
<div class="row bg-title">
<div class="col-md-4">
<h4 class="page-title">{{ __('risks.insurance_scheme_admin') }}</h4>
</div>
<div class="col-md-8">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">Home</a></li>
<li class="active">{{ __('risks.insurance_scheme_admin') }}</li>
</ol>
</div>
</div>
<div class="white-box">
<div class="card-deck">
<div class="card border-0">
<div class="card-header">{{ __('insurance.insurance_members') }}</div>
<div class="card-body list-group list-group-flush">
<ul class="feeds">
@if( Auth::user()->can('insurance-member-create'))
<a href="{{ route('insurance_members.create') }}">
<li>
<div class="bg-success"><i class="icon-user-follow text-white"></i></div> {{ __('insurance.new_insurance_member') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
<a href="{{ route('insurance_members.add_existing_patient_to_insurance') }}">
<li>
<div class="bg-success"><i class="icon-user-follow text-white"></i></div> {{ __('insurance.add_existing_patient') }} <i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
@endif
@if( Auth::user()->can('insurance-member-list'))
<a href="{{ route('insurance_members.index') }}">
<li>
<div class="bg-success"><i class="fa fa-eye text-white"></i></div> {{ __('insurance.view_insurance_members') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
@endif
<a href="{{ route('insurance_members.inactive') }}">
<li>
<div class="bg-danger"><i class="icon-user-unfollow text-white"></i></div> {{ __('insurance.inactive_insurance_members') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
</ul>
</div>
</div>
<div class="card border-0">
<div class="card-header">{{ __('insurance.insurance_groups') }}</div>
<div class="card-body">
<div class="list-group list-group-flush">
<ul class="feeds">
@if( Auth::user()->can('insurance-group-create'))
<a href="{{ route('insurance_groups.create') }}">
<li>
<div class="bg-success"><i class="icon-people text-white"></i></div> {{ __('insurance.new_insurance_group') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
@endif
@if( Auth::user()->can('insurance-group-list'))
<a href="{{ route('insurance_groups.index') }}">
<li>
<div class="bg-success"><i class="fa fa-eye text-white"></i></div> {{ __('insurance.view_insurance_groups') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
@endif
<a href="{{ route('insurance_groups.inactive') }}">
<li>
<div class="bg-danger"><i class="fa fa-eye-slash text-white"></i></div> {{ __('insurance.inactive_insurance_groups') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
</ul>
</div>
</div>
</div>
<div class="card border-0">
<div class="card-header">{{ __('insurance.heads_of_family') }}</div>
<div class="card-body list-group list-group-flush">
<ul class="feeds">
@if( Auth::user()->can('family-head-list'))
<a href="{{ route('heads_of_family.index') }}">
<li>
<div class="bg-success"><i class="fa fa-eye text-white"></i></div> {{ __('insurance.view_family_heads') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
@endif
<a href="{{ route('heads_of_family.inactive') }}">
<li>
<div class="bg-danger"><i class="icon-user-unfollow text-white"></i></div> {{ __('insurance.inactive_family_heads') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
</ul>
</div>
</div>
</div>
<div class="card-deck">
<div class="card border-0">
<div class="card-header">{{ __('insurance.premiums') }}</div>
<div class="card-body list-group list-group-flush">
<ul class="feeds">
@if( Auth::user()->can('premium-create'))
<a href="{{ route('insurance_premiums.create') }}">
<li>
<div class="bg-success"><i class="fa fa-money text-white"></i></div> {{ __('insurance.new_premium') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
@endif
@if( Auth::user()->can('premium-receipt-list'))
<a href="{{ route('insurance_premiums.insurance_receipts') }}">
<li>
<div class="bg-success"><i class="fa fa-eye text-white"></i></div> {{ __('insurance.premium_receipts') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
@endif
@if( Auth::user()->can('premium-renew'))
<!-- <a href="{{ route('insurance_premiums.renew_premium') }}">
<li>
<div class="bg-success"><i class="icon-refresh text-white"></i></div> {{ __('insurance.renew_premium') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>-->
@endif
@if( Auth::user()->can('cancel-insurance-member-premiums'))
<a href="{{ url('cancel_insurance_premiums') }}">
<li>
<div class="bg-info"><i class="fa fa-pencil text-white"></i></div> {{ __('insurance.cancel_insurance_premiums') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
@endif
</ul>
</div>
</div>
<div class="card border-0">
<div class="card-header">Claims Processing</div>
<div class="card-body">
<div class="list-group list-group-flush">
<ul class="feeds">
<a href="javascript:void(0);">
<li>
<div class="bg-success"><i class="fa fa-eye text-white"></i></div> Register Claim Batches<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
@if(Auth::user()->can('override-claim-adjudication-errors'))
<a href="/insurance_claims/incoming_claim_adjudication_errors">
<li>
<div class="bg-success"><i class="fa fa-eye text-white"></i></div> {{ __('insurance.incoming_claim_adjudication_errors') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
@endif
@if(Auth::user()->can('authorise-insurance-claims'))
<a href="/insurance_claims/view_incoming_authorisations">
<li>
<div class="bg-success"><i class="fa fa-eye text-white"></i></div> {{ __('insurance.incoming_claim_authorizations') }}<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
@endif
</ul>
</div>
</div>
</div>
<div class="card border-0">
<div class="card-header">Membership</div>
<div class="card-body list-group list-group-flush">
<ul class="feeds">
<a href="javascript:void(0);">
<li>
<div class="bg-success"><i class="fa fa-eye text-white"></i></div> Group Premium Loading<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
<a href="javascript:void(0);">
<li>
<div class="bg-success"><i class="fa fa-eye text-white"></i></div> Rollover Processing<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
<a href="javascript:void(0);">
<li>
<div class="bg-success"><i class="fa fa-eye text-white"></i></div> Import Members<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
<a href="/insurance_card_print_index">
<li>
<div class="bg-success"><i class="fa fa-eye text-white"></i></div>Print Member Cards<i class="fa fa-angle-right float-right" style="padding-top: 12.5px;"></i>
</li>
</a>
</ul>
</div>
</div>
</div>
</div>
@endsection
@@ -0,0 +1,251 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
@endpush
@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">{{ __('insurance_benefits.inpatient_accommodation') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_benefits/">{{ __('insurance_benefits.insurance_benefits') }}</a></li>
<li><a href="/insurance_benefits/details/{{ $benefit->id }}">{{ __('insurance_benefits.insurance_benefits_details') }}</a></li>
<li class="active">{{ __('insurance_benefits.create') }}</li>
</ol>
</div>
</div>
@include('insurance::insurance_benefits.menu')
<div class="white-box">
@include('flash::message')
<h3>{{ __('insurance_benefits.insurance_benefit') }}: {{ $benefit->name }}</h3>
<hr>
{{ Form::open(['route' => ['insurance_benefits.add_inpatient_accommodation', $benefit->id], 'method' => 'ANY', 'role' => 'search']) }}
<div class="row">
<div class="col-md-10">
<div class="form-group">
{{ Form::select('bed_category', $bed_categories, '', ['class' => 'form-control', 'id' => 'bed_category']) }}
</div>
</div>
<div class="col-md-2">
<button type="submit" name="submit" class="btn btn-info"> {{ __('insurance_benefits.select_bed_category') }}</button>
</div>
</div>
{{ Form::close() }}
<hr>
@if($selected_bed_category)
{{ Form::open(['route' => 'insurance_benefits.save_inpatient_accommodation']) }}
{{ Form::hidden('benefit_id', $benefit->id) }}
{{ Form::hidden('plan_id', $benefit->plan_id) }}
{{ Form::hidden('bed_category_id', $selected_bed_category->id) }}
{{ Form::hidden('cost_type', $selected_bed_category->cost_type) }}
<div class="row">
<div class="col-md-3">
<div class="form-group">
{{ Form::label('name', __('insurance_benefits.bed_category_name')) }}
{{ Form::text('name', $selected_bed_category->name, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="form-group">
{{ Form::label('name', __('bed_categories.type_of_pricing')) }}
{{ Form::text('name', $selected_bed_category->cost_type == 1 ? 'Static' : 'Structured', ['class' => 'form-control', 'readonly']) }}
</div>
@if($selected_bed_category->cost_type == 1)
<div class="form-group">
{{ Form::label('cost_per_night', __('bed_categories.cost_per_night')) }}
{{ Form::number('cost_per_night', $selected_bed_category->cost_per_night, ['class' => 'form-control', 'readonly']) }}
</div>
@else
<div class="form-group">
{{ Form::label('cost_first_night', __('bed_categories.cost_of_first_night')) }}
{{ Form::number('cost_first_night', $selected_bed_category->cost_first_night, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label>{{ __('bed_categories.from_night')}}</label>
{{ Form::number('from_night', 2, ['class' => 'form-control', 'readonly']) }}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>{{ __('bed_categories.to_night')}}</label>
{{ Form::number('to_night', $selected_bed_category->to_night, ['class' => 'form-control', 'readonly']) }}
</div>
</div>
</div>
<div class="form-group">
{{ Form::label('cost_range', __('bed_categories.range_cost')) }}
{{ Form::number('cost_range', $selected_bed_category->cost_range, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="form-group">
{{ Form::label('cost_after', __('bed_categories.cost_for_nights_thereafter')) }}
{{ Form::number('cost_after', $selected_bed_category->cost_after, ['class' => 'form-control', 'readonly']) }}
</div>
@endif
</div>
<div class="col-md-1"></div>
<div class="col-md-8">
<div class="row" @if($selected_bed_category->cost_type != 1) style="display: none" @endif>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('cost_per_night', __('insurance_benefits.co_payment_cost_per_night')) }}
{{ Form::number('cost_per_night', '', ['class' => 'form-control compulsory']) }}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('chi_cost_per_night', __('insurance_benefits.chi_cost_per_night')) }}
{{ Form::number('chi_cost_per_night', '', ['class' => 'form-control compulsory']) }}
</div>
</div>
</div>
<div @if($selected_bed_category->cost_type == 1) style="display: none" @endif>
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('cost_first_night', __('insurance_benefits.co_payment_cost_of_first_night')) }}
{{ Form::number('cost_first_night', '', ['class' => 'form-control compulsory']) }}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('chi_cost_first_night', __('insurance_benefits.chi_cost_of_first_night')) }}
{{ Form::number('chi_cost_first_night', '', ['class' => 'form-control compulsory']) }}
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('cost_range', __('insurance_benefits.co_payment_range_cost')) }}
{{ Form::number('cost_range', '', ['class' => 'form-control compulsory']) }}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('chi_cost_range', __('insurance_benefits.chi_range_cost')) }}
{{ Form::number('chi_cost_range', '', ['class' => 'form-control compulsory']) }}
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('cost_after', __('insurance_benefits.co_payment_cost_for_nights_thereafter')) }}
{{ Form::number('cost_after', '', ['class' => 'form-control compulsory']) }}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('chi_cost_after', __('insurance_benefits.chi_cost_for_nights_thereafter')) }}
{{ Form::number('chi_cost_after', '', ['class' => 'form-control compulsory']) }}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('annual_member_limit', __('insurance_benefits.annual_member_limit')) }}
{{ Form::number('annual_member_limit', 0, ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('gender', __('insurance_benefits.gender')) }}
{{ Form::select('gender', [0 => 'All', 1 => 'Male', 2 => 'Female'], 0, ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('age_limit', __('insurance_benefits.age_limit')) }}
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('age_limit_start',__('insurance_benefits.start')) }}
{{ Form::number('age_limit_start','',['class' => 'form-control compulsory']) }}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('age_limit_end',__('insurance_benefits.end')) }}
{{ Form::number('age_limit_end','',['class' => 'form-control compulsory']) }}
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('annual_family_limit', __('insurance_benefits.annual_family_limit')) }}
{{ Form::number('annual_family_limit', 0, ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('authorisation', __('insurance_benefits.authorisation')) }}
<br><br>
{{ Form::radio('authorisation', 1, false, ['required']) }} Yes &nbsp;&nbsp;
{{ Form::radio('authorisation', 0, false, ['required']) }} No
</div>
<div class="form-group">
{{ Form::label('age_type', __('insurance_benefits.age_type')) }}
{{ Form::select('age_type', [0 => 'Days', 1 => 'Months', 2 => 'Years'], 2, ['class' => 'form-control compulsory', 'required']) }}
</div>
</div>
</div>
</div>
</div>
{{ Form::button(__('bed_categories.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('bed_categories.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
@else
<h4 class="text-center"><code>{{ __('insurance_benefits.please_select_bed_category') }}</code></h4>
@endif
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script>
function set_authorisation(id, value) {
$('#authorisation_value_' + id).val(value);
}
$('#bed_category').select2({
placeholder: "Select"
});
</script>
@endpush
@@ -0,0 +1,240 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
@endpush
@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">{{ __('insurance_benefits.add_item_insurance_benefit') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_benefits/">{{ __('insurance_benefits.insurance_benefits') }}</a></li>
<li><a href="/insurance_benefits/details/{{ $benefit->id }}">{{ __('insurance_benefits.insurance_benefits_details') }}</a></li>
<li class="active">{{ __('insurance_benefits.create') }}</li>
</ol>
</div>
</div>
@include('insurance::insurance_benefits.menu')
<div class="white-box">
@include('flash::message')
<h3>{{ __('insurance_benefits.insurance_benefit') }}: {{ $benefit->name }}</h3>
<h4>{{ __('insurance_benefits.item_type') }}: {{ [1 => 'Services', 2 => 'Procedures', 3 => 'Investigations', 4 => 'Drugs', 5 => 'Sundries'][$item_type] }}</h4>
<hr>
{{ Form::open(['route' => ['insurance_benefits.add_items', $benefit->id, $item_type], 'method' => 'ANY', 'role' => 'search']) }}
<div class="row">
<div class="col-md-8">
<div class="form-group">
{{ Form::select('items_ids[]', $items, '', ['id' => 'items_ids', 'multiple', 'class' => 'form-control']) }}
</div>
</div>
<div class="col-md-2">
<button type="submit" name="submit" value="use_selection" class="btn btn-success"><span class="glyphicon glyphicon-search"></span> {{ __('insurance_benefits.select_items_for_benefit') }}</button>
</div>
<div class="col-md-2">
<button type="submit" name="submit" value="select_all_items" class="btn btn-info"> {{ __('insurance_benefits.select_all_items') }}</button>
</div>
</div>
{{ Form::close() }}
<hr>
@if(!is_null($benefit->opd_percentage))
{{ Form::checkbox('apply_opd_percentage_all', 'OPD All', false, ['id' => "apply_opd_percentage_all"]) }} {{ __('insurance_benefits.apply_opd_percentage_all') }}
&nbsp;&nbsp;
@endif
@if(!is_null($benefit->ipd_percentage))
{{ Form::checkbox('apply_ipd_percentage_all', 'IPD All', false, ['id' => "apply_ipd_percentage_all"]) }} {{ __('insurance_benefits.apply_ipd_percentage_all') }}
@endif
<br><br>
{{ Form::open(['route' => 'insurance_benefits.save_items']) }}
{{ Form::hidden('benefit_id', $benefit->id) }}
{{ Form::hidden('item_type', $item_type) }}
<div class="table-responsive">
<table class="table success-bordered-table color-bordered-table">
<thead>
<tr>
<th><input type="checkbox" id="check_all" /></th>
<th>{{ __('insurance_benefits.name') }}</th>
<th>{{ __('insurance_benefits.cash_price') }}</th>
<th>{{ __('insurance_benefits.opd_co_payment') }} <span data-toggle="tooltip" rel="tooltip" data-placement="top" title="{{ __('insurance_benefits.amount_paid_opd') }}"> <i class="fa fa-info-circle"></i></span></th>
<th>{{ __('insurance_benefits.ipd_co_payment') }} <span data-toggle="tooltip" rel="tooltip" data-placement="top" title="{{ __('insurance_benefits.amount_paid_ipd') }}"> <i class="fa fa-info-circle"></i></span></th>
<th>{{ __('insurance_benefits.capitation_fee') }}</th>
<th>{{ __('insurance_benefits.annual_member_limit') }} <span data-toggle="tooltip" rel="tooltip" data-placement="top" title="{{ __('insurance_claims.no_limit_applicable') }}"> <i class="fa fa-info-circle"></i></span></th>
<th>{{ __('insurance_benefits.annual_family_limit') }} <span data-toggle="tooltip" rel="tooltip" data-placement="top" title="{{ __('insurance_claims.no_limit_applicable') }}"> <i class="fa fa-info-circle"></i></span></th>
<th>{{ __('insurance_benefits.authorisation') }}</th>
</tr>
</thead>
<tbody>
@if(count($selected_items) > 0)
@foreach($selected_items as $item)
<tr id="row_{{ $item->id }}" class="to_remove">
<td>
<input type="checkbox" id="chk" class="item_check" value="{{ $item->id }}" />
{{ Form::hidden('item_id[]', $item->id) }}
</td>
<td>{{ $item->name }}</td>
<td>{{ ugandan_shillings($item->non_insured_price) }}</td>
<td>
{{ Form::number('co_payment[]', '', ['class' => 'form-control compulsory', 'required', 'min' => '0', 'id' => "co_payment_$item->id"]) }}
@if(!is_null($benefit->opd_percentage))
<br>
{{ Form::checkbox('apply_opd_percentage[]', $item->id, false, ['id' => "apply_opd_percentage_$item->id", 'class' => 'apply_opd_percentage']) }} {{ __('insurance_benefits.apply_opd_percentage') }}
@endif
</td>
<td>
{{ Form::number('ipd_co_payment[]', '', ['class' => 'form-control compulsory', 'required', 'min' => '0', 'id' => "ipd_co_payment_$item->id"]) }}
@if(!is_null($benefit->ipd_percentage))
<br>
{{ Form::checkbox('apply_ipd_percentage[]', $item->id, false, ['id' => "apply_ipd_percentage_$item->id", 'class' => 'apply_ipd_percentage']) }} {{ __('insurance_benefits.apply_ipd_percentage') }}
@endif
</td>
<td>{{ Form::number('capitation_fee[]', 0, ['class' => 'form-control compulsory', 'required', 'min' => '0']) }}</td>
<td>{{ Form::number('annual_member_limit[]', 0, ['class' => 'form-control', 'min' => '0']) }}</td>
<td>{{ Form::number('annual_family_limit[]', 0, ['class' => 'form-control', 'min' => '0']) }}</td>
<td>
{{ Form::hidden('authorisation[]', 0, ['id' => 'authorisation_value_' . $item->id]) }}
{{ Form::radio('authorisation_' . $item->id, 1, false, ['onclick' => 'set_authorisation(' . $item->id . ', 1)', 'required']) }} Yes &nbsp;&nbsp;
{{ Form::radio('authorisation_' . $item->id, 0, false, ['onclick' => 'set_authorisation(' . $item->id . ', 0)', 'required']) }} No
</td>
</tr>
@endforeach
@else
<tr class="text-center"><td colspan="8"><code>{{ __('insurance_claims.select_items_first') }}</code></td></tr>
@endif
</tbody>
</table>
</div>
<input type="button" id="confirm_selection_btn" class="btn btn-success btn-rounded pull-right" value="{{ __('payroll.confirm_selection') }}" />
<button class="btn btn-success btn-rounded pull-right" style="display: none;" id="submit_selection_btn">{{ __('payroll.submit') }}</button>
<hr>
{{ Form::close() }}
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script>
$(".table").on('change', "[id^=apply_opd_percentage_]", function () {
let id = /\d+(?=\D*$)/.exec($(this).attr('id'));
if($(this).is(":checked")) {
$('#co_payment_' + id).val(0).prop('readonly', true);
} else {
$('#co_payment_' + id).prop('readonly', false);
}
}).on('change', "[id^=apply_ipd_percentage_]", function () {
let id = /\d+(?=\D*$)/.exec($(this).attr('id'));
if($(this).is(":checked")) {
$('#ipd_co_payment_' + id).val(0).prop('readonly', true);
} else {
$('#ipd_co_payment_' + id).prop('readonly', false);
}
});
$('#apply_opd_percentage_all').change(function () {
if($(this).is(":checked")) {
$(".apply_opd_percentage").each(function() {
if(!$(this).is(":checked")) {
$(this).click();
}
});
} else {
$(".apply_opd_percentage").each(function() {
if($(this).is(":checked")) {
$(this).click();
}
});
}
});
$('#apply_ipd_percentage_all').change(function () {
if($(this).is(":checked")) {
$(".apply_ipd_percentage").each(function() {
if(!$(this).is(":checked")) {
$(this).click();
}
});
} else {
$(".apply_ipd_percentage").each(function() {
if($(this).is(":checked")) {
$(this).click();
}
});
}
});
$('.item_check').click(function() {
if($(this).is(':checked')){
$(this).parent().parent().css({'background-color': '#FFFF99'});
$('#row_' + $(this).val()).removeClass('to_remove');
} else {
$(this).parent().parent().css({'background-color': '#fff'});
$('#row_' + $(this).val()).addClass('to_remove');
}
});
$('#check_all').click(function() {
if($(this).is(':checked')){
$('.item_check').each(function() {
if(!$(this).is(':checked')){
$(this).trigger('click');
}
});
} else {
$('.item_check').each(function() {
if($(this).is(':checked')){
$(this).trigger('click');
}
});
}
});
$("#confirm_selection_btn").click(function (e) {
let is_item_selected = $('input:checkbox').is(':checked');
if (is_item_selected) {
$(".to_remove").remove();
$(".item_check").attr("disabled", "disabled");
$('#submit_selection_btn').show();
$('#confirm_selection_btn').hide();
} else {
e.preventDefault();
alert("Please select an item before continuing");
return false;
}
});
function set_authorisation(id, value) {
$('#authorisation_value_' + id).val(value);
}
$('#items_ids').select2({
placeholder: "Select"
});
</script>
@endpush
@@ -0,0 +1,95 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
@endpush
@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">{{ __('insurance_benefits.create_insurance_benefit') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_benefits/">{{ __('insurance_benefits.insurance_benefits') }}</a></li>
<li class="active">{{ __('insurance_benefits.create') }}</li>
</ol>
</div>
</div>
@include('insurance::insurance_benefits.menu')
<div class="white-box">
@include('flash::message')
{{ Form::open(['route' => 'insurance_benefits.store','data-toggle'=>'validator']) }}
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('name', __('insurance_benefits.benefit_name')) }}
{{ Form::text('name', '', ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('waiting_period', __('insurance_benefits.waiting_period_days')) }}
{{ Form::number('waiting_period', '', ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('annual_member_limit', __('insurance_benefits.annual_member_limit') . ' (' . __('insurance_claims.no_limit_applicable') . ')') }}
{{ Form::number('annual_member_limit', '', ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('opd_percentage', __('insurance_benefits.opd_percentage') . ' (' . __('insurance_benefits.applied_to_cash_amount') . ')') }}
{{ Form::number('opd_percentage', '', ['class' => 'form-control', 'step' => '0.01']) }}
</div>
<div class="form-group">
{{ Form::label('ward_id', __('insurance_benefits.wards_benefit_will_be_applied_to')) }}
{{ Form::select('ward_id[]', $wards, 0,['class' => 'form-control ward_id', 'data-error'=>'Select the ward', 'multiple']) }}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('plan_id', __('insurance_benefits.plan')) }}
{{ Form::select('plan_id', $insurance_plans, '', ['class' => 'form-control compulsory', 'required', 'id' => 'plan_id']) }}
</div>
<div class="form-group">
{{ Form::label('fee', __('insurance_benefits.fee')) }}
{{ Form::number('fee', 0, ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('annual_family_limit', __('insurance_benefits.annual_family_limit') . ' (' . __('insurance_claims.no_limit_applicable') . ')') }}
{{ Form::number('annual_family_limit', '', ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('ipd_percentage', __('insurance_benefits.ipd_percentage') . ' (' . __('insurance_benefits.applied_to_cash_amount') . ')') }}
{{ Form::number('ipd_percentage', '', ['class' => 'form-control', 'step' => '0.01']) }}
</div>
</div>
</div>
{{ Form::button(__('insurance_groups.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('insurance_groups.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script>
$('#plan_id, .ward_id').select2({
placeholder: "Select"
});
</script>
@endpush
@@ -0,0 +1,437 @@
@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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance_benefits.insurance_benefits_details') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_benefits/">{{ __('insurance_benefits.insurance_benefits') }}</a></li>
<li class="active">{{ __('insurance_benefits.details') }}</li>
</ol>
</div>
</div>
@include('insurance::insurance_benefits.menu')
<div class="white-box">
@include('flash::message')
<h3 class="text-center">{{ $benefit->name . ' ' . __('insurance_benefits.items') }} ({{ get_name($benefit->plan_id, 'id', 'name', 'community_health_insurance_plans') }} {{ __('insurance_benefits.plan') }})</h3>
<h4>{{ __('insurance_benefits.procedures') }}</h4>
<table class="table color-bordered-table success-bordered-table">
<thead>
<tr>
<th>{{ __('insurance_benefits.name') }}</th>
<th>{{ __('insurance_benefits.authorisation') }}</th>
<th>{{ __('insurance_benefits.cash_price') }}</th>
<th>{{ __('insurance_benefits.opd_co_payment') }}</th>
<th>{{ __('insurance_benefits.ipd_co_payment') }}</th>
<th>{{ __('insurance_benefits.capitation_fee') }}</th>
<th>{{ __('insurance_benefits.annual_member_limit') }}</th>
<th>{{ __('insurance_benefits.annual_family_limit') }}</th>
</tr>
</thead>
<tbody>
@foreach($benefit_procedures as $record)
@php $items_array = explode(",", $record->item_id); $count = 0; @endphp
@foreach($items_array as $item_id)
@php
$item_details = get_item_insurance_details($item_id, 2, $benefit->id);
if (!$item_details) {
continue;
}
if ($count > 4) {break;}
$count++;
@endphp
<tr>
<td>{{ $procedures[$item_id] ?? '' }}</td>
<td>{{ $item_details['authorisation'] == 1 ? 'Yes' : 'No' }}</td>
<td>{{ ugandan_shillings($item_details['cash_price']) }}</td>
<td>
@if(isset($item_details['apply_opd_percentage']) && $item_details['apply_opd_percentage'] == 1)
{{ ugandan_shillings(($benefit->opd_percentage / 100) * $item_details['cash_price']) }}
<br><br>
<i style="color: #990055">{{ $benefit->opd_percentage . '% ' . __('insurance_benefits.of_cash_price') }}</i>
@else
{{ ugandan_shillings($item_details['co_payment']) }}
@endif
</td>
<td>
@if(isset($item_details['apply_ipd_percentage']) && $item_details['apply_ipd_percentage'] == 1)
{{ ugandan_shillings(($benefit->ipd_percentage / 100) * $item_details['cash_price']) }}
<br><br>
<i style="color: #990055">{{ $benefit->ipd_percentage . '% ' . __('insurance_benefits.of_cash_price') }}</i>
@else
{{ ugandan_shillings($item_details['ipd_co_payment'] ?? 0) }}
@endif
</td>
<td>{{ ugandan_shillings($item_details['capitation_fee']) }}</td>
<td>{{ ugandan_shillings($item_details['annual_member_limit']) }}</td>
<td>{{ ugandan_shillings($item_details['annual_family_limit']) }}</td>
</tr>
@endforeach
@endforeach
</tbody>
</table>
@if(Auth::user()->can('insurance-items-view'))<a href="/insurance_benefits/view_items/{{ $benefit->id }}/2" class="btn btn-primary btn-sm">{{ __('insurance_benefits.view_all_procedures') }}</a>@endif
@if(Auth::user()->can('insurance-items-create'))<a href="/insurance_benefits/add_items/{{ $benefit->id }}/2" class="btn btn-success btn-sm">{{ __('insurance_benefits.add_procedures') }}</a>@endif
<hr>
<h4>{{ __('insurance_benefits.services') }}</h4>
<table class="table color-bordered-table success-bordered-table">
<thead>
<tr>
<th>{{ __('insurance_benefits.name') }}</th>
<th>{{ __('insurance_benefits.authorisation') }}</th>
<th>{{ __('insurance_benefits.cash_price') }}</th>
<th>{{ __('insurance_benefits.opd_co_payment') }}</th>
<th>{{ __('insurance_benefits.ipd_co_payment') }}</th>
<th>{{ __('insurance_benefits.capitation_fee') }}</th>
<th>{{ __('insurance_benefits.annual_member_limit') }}</th>
<th>{{ __('insurance_benefits.annual_family_limit') }}</th>
</tr>
</thead>
<tbody>
@foreach($benefit_services as $record)
@php $items_array = explode(",", $record->item_id); $count = 0; @endphp
@foreach($items_array as $item_id)
@php
$item_details = get_item_insurance_details($item_id, 1, $benefit->id);
if (!$item_details) {
continue;
}
if ($count > 4) {break;}
$count++;
@endphp
<tr>
<td>{{ $services[$item_id] ?? '' }}</td>
<td>{{ $item_details['authorisation'] == 1 ? 'Yes' : 'No' }}</td>
<td>{{ ugandan_shillings($item_details['cash_price']) }}</td>
<td>
@if(isset($item_details['apply_opd_percentage']) && $item_details['apply_opd_percentage'] == 1)
{{ ugandan_shillings(($benefit->opd_percentage / 100) * $item_details['cash_price']) }}
<br><br>
<i style="color: #990055">{{ $benefit->opd_percentage . '% ' . __('insurance_benefits.of_cash_price') }}</i>
@else
{{ ugandan_shillings($item_details['co_payment']) }}
@endif
</td>
<td>
@if(isset($item_details['apply_ipd_percentage']) && $item_details['apply_ipd_percentage'] == 1)
{{ ugandan_shillings(($benefit->ipd_percentage / 100) * $item_details['cash_price']) }}
<br><br>
<i style="color: #990055">{{ $benefit->ipd_percentage . '% ' . __('insurance_benefits.of_cash_price') }}</i>
@else
{{ ugandan_shillings($item_details['ipd_co_payment'] ?? 0) }}
@endif
</td>
<td>{{ ugandan_shillings($item_details['capitation_fee']) }}</td>
<td>{{ ugandan_shillings($item_details['annual_member_limit']) }}</td>
<td>{{ ugandan_shillings($item_details['annual_family_limit']) }}</td>
</tr>
@endforeach
@endforeach
</tbody>
</table>
@if(Auth::user()->can('insurance-items-view'))<a href="/insurance_benefits/view_items/{{ $benefit->id }}/1" class="btn btn-primary btn-sm">{{ __('insurance_benefits.view_all_services') }}</a>@endif
@if(Auth::user()->can('insurance-items-create'))<a href="/insurance_benefits/add_items/{{ $benefit->id }}/1" class="btn btn-success btn-sm">{{ __('insurance_benefits.add_services') }}</a>@endif
<hr>
<h4>{{ __('insurance_benefits.investigations') }}</h4>
<table class="table color-bordered-table success-bordered-table">
<thead>
<tr>
<th>{{ __('insurance_benefits.name') }}</th>
<th>{{ __('insurance_benefits.authorisation') }}</th>
<th>{{ __('insurance_benefits.cash_price') }}</th>
<th>{{ __('insurance_benefits.opd_co_payment') }}</th>
<th>{{ __('insurance_benefits.ipd_co_payment') }}</th>
<th>{{ __('insurance_benefits.capitation_fee') }}</th>
<th>{{ __('insurance_benefits.annual_member_limit') }}</th>
<th>{{ __('insurance_benefits.annual_family_limit') }}</th>
</tr>
</thead>
<tbody>
@foreach($benefit_invs as $record)
@php $items_array = explode(",", $record->item_id); $count = 0; @endphp
@foreach($items_array as $item_id)
@php
$item_details = get_item_insurance_details($item_id, 3, $benefit->id);
if (!$item_details) {
continue;
}
if ($count > 4) {break;}
$count++;
@endphp
<tr>
<td>{{ $investigations[$item_id] ?? '' }}</td>
<td>{{ $item_details['authorisation'] == 1 ? 'Yes' : 'No' }}</td>
<td>{{ ugandan_shillings($item_details['cash_price']) }}</td>
<td>
@if(isset($item_details['apply_opd_percentage']) && $item_details['apply_opd_percentage'] == 1)
{{ ugandan_shillings(($benefit->opd_percentage / 100) * $item_details['cash_price']) }}
<br><br>
<i style="color: #990055">{{ $benefit->opd_percentage . '% ' . __('insurance_benefits.of_cash_price') }}</i>
@else
{{ ugandan_shillings($item_details['co_payment']) }}
@endif
</td>
<td>
@if(isset($item_details['apply_ipd_percentage']) && $item_details['apply_ipd_percentage'] == 1)
{{ ugandan_shillings(($benefit->ipd_percentage / 100) * $item_details['cash_price']) }}
<br><br>
<i style="color: #990055">{{ $benefit->ipd_percentage . '% ' . __('insurance_benefits.of_cash_price') }}</i>
@else
{{ ugandan_shillings($item_details['ipd_co_payment'] ?? 0) }}
@endif
</td>
<td>{{ ugandan_shillings($item_details['capitation_fee']) }}</td>
<td>{{ ugandan_shillings($item_details['annual_member_limit']) }}</td>
<td>{{ ugandan_shillings($item_details['annual_family_limit']) }}</td>
</tr>
@endforeach
@endforeach
</tbody>
</table>
@if(Auth::user()->can('insurance-items-view'))<a href="/insurance_benefits/view_items/{{ $benefit->id }}/3" class="btn btn-primary btn-sm">{{ __('insurance_benefits.view_all_investigations') }}</a>@endif
@if(Auth::user()->can('insurance-items-create'))<a href="/insurance_benefits/add_items/{{ $benefit->id }}/3" class="btn btn-success btn-sm">{{ __('insurance_benefits.add_investigations') }}</a>@endif
<hr>
<h4>{{ __('insurance_benefits.drugs') }}</h4>
<table class="table color-bordered-table success-bordered-table">
<thead>
<tr>
<th>{{ __('insurance_benefits.name') }}</th>
<th>{{ __('insurance_benefits.authorisation') }}</th>
<th>{{ __('insurance_benefits.cash_price') }}</th>
<th>{{ __('insurance_benefits.opd_co_payment') }}</th>
<th>{{ __('insurance_benefits.ipd_co_payment') }}</th>
<th>{{ __('insurance_benefits.capitation_fee') }}</th>
<th>{{ __('insurance_benefits.annual_member_limit') }}</th>
<th>{{ __('insurance_benefits.annual_family_limit') }}</th>
</tr>
</thead>
<tbody>
@foreach($benefit_drugs as $record)
@php $items_array = explode(",", $record->item_id); $count = 0; @endphp
@foreach($items_array as $item_id)
@php
$item_details = get_item_insurance_details($item_id, 4, $benefit->id);
if (!$item_details) {
continue;
}
if ($count > 4) {break;}
$count++;
@endphp
<tr>
<td>{{ $drugs[$item_id] ?? '' }}</td>
<td>{{ $item_details['authorisation'] == 1 ? 'Yes' : 'No' }}</td>
<td>{{ ugandan_shillings($item_details['cash_price']) }}</td>
<td>
@if(isset($item_details['apply_opd_percentage']) && $item_details['apply_opd_percentage'] == 1)
{{ ugandan_shillings(($benefit->opd_percentage / 100) * $item_details['cash_price']) }}
<br><br>
<i style="color: #990055">{{ $benefit->opd_percentage . '% ' . __('insurance_benefits.of_cash_price') }}</i>
@else
{{ ugandan_shillings($item_details['co_payment']) }}
@endif
</td>
<td>
@if(isset($item_details['apply_ipd_percentage']) && $item_details['apply_ipd_percentage'] == 1)
{{ ugandan_shillings(($benefit->ipd_percentage / 100) * $item_details['cash_price']) }}
<br><br>
<i style="color: #990055">{{ $benefit->ipd_percentage . '% ' . __('insurance_benefits.of_cash_price') }}</i>
@else
{{ ugandan_shillings($item_details['ipd_co_payment'] ?? 0) }}
@endif
</td>
<td>{{ ugandan_shillings($item_details['capitation_fee']) }}</td>
<td>{{ ugandan_shillings($item_details['annual_member_limit']) }}</td>
<td>{{ ugandan_shillings($item_details['annual_family_limit']) }}</td>
</tr>
@endforeach
@endforeach
</tbody>
</table>
@if(Auth::user()->can('insurance-items-view'))<a href="/insurance_benefits/view_items/{{ $benefit->id }}/4" class="btn btn-primary btn-sm">{{ __('insurance_benefits.view_all_drugs') }}</a>@endif
@if(Auth::user()->can('insurance-items-create'))<a href="/insurance_benefits/add_items/{{ $benefit->id }}/4" class="btn btn-success btn-sm">{{ __('insurance_benefits.add_drugs') }}</a>@endif
<hr>
<h4>{{ __('insurance_benefits.sundries') }}</h4>
<table class="table color-bordered-table success-bordered-table">
<thead>
<tr>
<th>{{ __('insurance_benefits.name') }}</th>
<th>{{ __('insurance_benefits.authorisation') }}</th>
<th>{{ __('insurance_benefits.cash_price') }}</th>
<th>{{ __('insurance_benefits.opd_co_payment') }}</th>
<th>{{ __('insurance_benefits.ipd_co_payment') }}</th>
<th>{{ __('insurance_benefits.capitation_fee') }}</th>
<th>{{ __('insurance_benefits.annual_member_limit') }}</th>
<th>{{ __('insurance_benefits.annual_family_limit') }}</th>
</tr>
</thead>
<tbody>
@foreach($benefit_sundries as $record)
@php $items_array = explode(",", $record->item_id); $count = 0; @endphp
@foreach($items_array as $item_id)
@php
$item_details = get_item_insurance_details($item_id, 5, $benefit->id);
if (!$item_details) {
continue;
}
if ($count > 4) {break;}
$count++;
@endphp
<tr>
<td>{{ $sundries[$item_id] ?? '' }}</td>
<td>{{ $item_details['authorisation'] == 1 ? 'Yes' : 'No' }}</td>
<td>{{ ugandan_shillings($item_details['cash_price']) }}</td>
<td>
@if(isset($item_details['apply_opd_percentage']) && $item_details['apply_opd_percentage'] == 1)
{{ ugandan_shillings(($benefit->opd_percentage / 100) * $item_details['cash_price']) }}
<br><br>
<i style="color: #990055">{{ $benefit->opd_percentage . '% ' . __('insurance_benefits.of_cash_price') }}</i>
@else
{{ ugandan_shillings($item_details['co_payment']) }}
@endif
</td>
<td>
@if(isset($item_details['apply_ipd_percentage']) && $item_details['apply_ipd_percentage'] == 1)
{{ ugandan_shillings(($benefit->ipd_percentage / 100) * $item_details['cash_price']) }}
<br><br>
<i style="color: #990055">{{ $benefit->ipd_percentage . '% ' . __('insurance_benefits.of_cash_price') }}</i>
@else
{{ ugandan_shillings($item_details['ipd_co_payment'] ?? 0) }}
@endif
</td>
<td>{{ ugandan_shillings($item_details['capitation_fee']) }}</td>
<td>{{ ugandan_shillings($item_details['annual_member_limit']) }}</td>
<td>{{ ugandan_shillings($item_details['annual_family_limit']) }}</td>
</tr>
@endforeach
@endforeach
</tbody>
</table>
@if(Auth::user()->can('insurance-items-view'))<a href="/insurance_benefits/view_items/{{ $benefit->id }}/5" class="btn btn-primary btn-sm">{{ __('insurance_benefits.view_all_sundries') }}</a>@endif
@if(Auth::user()->can('insurance-items-create'))<a href="/insurance_benefits/add_items/{{ $benefit->id }}/5" class="btn btn-success btn-sm">{{ __('insurance_benefits.add_sundries') }}</a>@endif
<hr>
<h4>{{ __('insurance_benefits.inpatient_accommodation') }}</h4>
<table class="table color-bordered-table success-bordered-table">
<thead>
<tr>
<th>{{ __('insurance_benefits.bed_category') }}</th>
<th>{{ __('insurance_benefits.authorisation') }}</th>
<th>{{ __('insurance_benefits.type_of_pricing') }}</th>
<th>{{ __('insurance_benefits.co_payment') }}</th>
<th>{{ __('insurance_benefits.chi_amount') }}</th>
<th>{{ __('insurance_benefits.gender') }}</th>
<th>{{ __('insurance_benefits.age_limit') }}</th>
<th>{{ __('insurance_benefits.annual_member_limit') }}</th>
<th>{{ __('insurance_benefits.annual_family_limit') }}</th>
</tr>
</thead>
<tbody>
@php
$time_periods = [0 => 'Days', 1 => 'Months', 2 => 'Years'];
$genders = [0 => 'All', 1 => 'Male', 2 => 'Female'];
@endphp
@foreach($benefit_bed_categories as $record)
@php $age_limits = explode(",", $record->age_limit); @endphp
<tr>
<td>{{ $bed_categories[$record->bed_category_id] ?? '' }}</td>
<td>{{ $record->authorisation_required == 1 ? 'Yes' : 'No' }}</td>
<td>{{ $record->cost_type == 1 ? 'Static' : 'Structured' }}</td>
<td>{{ ugandan_shillings($record->cost_per_night ?? $record->cost_first_night) }}</td>
<td>{{ ugandan_shillings($record->chi_cost_per_night ?? $record->chi_cost_first_night) }}</td>
<td>{{ ($genders[$record->gender] ?? 'All') }}</td>
<td>{{ ($age_limits[0] ?? "0") . ' to ' . ($age_limits[1] ?? "0") . ' ' . $time_periods[$record->age_type] ?? 'years' }}</td>
<td>{{ ugandan_shillings($record->annual_member_limit) }}</td>
<td>{{ ugandan_shillings($record->annual_family_limit) }}</td>
</tr>
@endforeach
</tbody>
</table>
@if(Auth::user()->can('insurance-items-view'))<a href="/insurance_benefits/view_inpatient_accommodation/{{ $benefit->id }}" class="btn btn-primary btn-sm">{{ __('insurance_benefits.view_all_items') }}</a>@endif
@if(Auth::user()->can('insurance-items-create'))<a href="/insurance_benefits/add_inpatient_accommodation/{{ $benefit->id }}" class="btn btn-success btn-sm">{{ __('insurance_benefits.add_items') }}</a>@endif
</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>
<script>
$('.table').DataTable({
dom: 'Bfrtip',
bInfo: false,
bPaginate: true,
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
</script>
@endpush
@@ -0,0 +1,95 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
@endpush
@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">{{ __('insurance_benefits.create_insurance_benefit') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_benefits/">{{ __('insurance_benefits.insurance_benefits') }}</a></li>
<li class="active">{{ __('insurance_benefits.create') }}</li>
</ol>
</div>
</div>
@include('insurance::insurance_benefits.menu')
<div class="white-box">
@include('flash::message')
{{ Form::model($benefit, ['method' => 'PUT', 'route' => ['insurance_benefits.update',$benefit], 'data-toggle' => 'validator']) }}
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('name', __('insurance_benefits.benefit_name')) }}
{{ Form::text('name', $benefit->name, ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('waiting_period', __('insurance_benefits.waiting_period_days')) }}
{{ Form::number('waiting_period', $benefit->waiting_period, ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('annual_member_limit', __('insurance_benefits.annual_member_limit') . ' (' . __('insurance_claims.no_limit_applicable') . ')') }}
{{ Form::number('annual_member_limit', $benefit->annual_member_limit, ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('opd_percentage', __('insurance_benefits.opd_percentage') . ' (' . __('insurance_benefits.applied_to_cash_amount') . ')') }}
{{ Form::number('opd_percentage', $benefit->opd_percentage, ['class' => 'form-control', 'step' => '0.01']) }}
</div>
<div class="form-group">
{{ Form::label('ward_id', __('insurance_benefits.wards_benefit_will_be_applied_to')) }}
{{ Form::select('ward_id[]', $wards, explode(",", $benefit->wards),['class' => 'form-control ward_id', 'data-error'=>'Select the ward', 'multiple']) }}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('plan_id', __('insurance_benefits.plan')) }}
{{ Form::select('plan_id', $insurance_plans, $benefit->plan_id, ['class' => 'form-control compulsory', 'required', 'id' => 'plan_id']) }}
</div>
<div class="form-group">
{{ Form::label('fee', __('insurance_benefits.fee')) }}
{{ Form::number('fee', $benefit->fee, ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('annual_family_limit', __('insurance_benefits.annual_family_limit') . ' (' . __('insurance_claims.no_limit_applicable') . ')') }}
{{ Form::number('annual_family_limit', $benefit->annual_family_limit, ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('ipd_percentage', __('insurance_benefits.ipd_percentage') . ' (' . __('insurance_benefits.applied_to_cash_amount') . ')') }}
{{ Form::number('ipd_percentage', $benefit->ipd_percentage, ['class' => 'form-control', 'step' => '0.01']) }}
</div>
</div>
</div>
{{ Form::button(__('insurance_groups.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('insurance_groups.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script>
$('#plan_id, .ward_id').select2({
placeholder: "Select"
});
</script>
@endpush
@@ -0,0 +1,229 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
@endpush
@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">{{ __('insurance_benefits.inpatient_accommodation') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_benefits/">{{ __('insurance_benefits.insurance_benefits') }}</a></li>
<li><a href="/insurance_benefits/details/{{ $benefit->id }}">{{ __('insurance_benefits.insurance_benefits_details') }}</a></li>
<li class="active">{{ __('insurance_benefits.create') }}</li>
</ol>
</div>
</div>
@include('insurance::insurance_benefits.menu')
<div class="white-box">
@include('flash::message')
<h3>{{ __('insurance_benefits.insurance_benefit') }}: {{ $benefit->name }}</h3>
<hr>
{{ Form::open(['route' => 'insurance_benefits.update_inpatient_accommodation']) }}
{{ Form::hidden('benefit_id', $benefit->id) }}
{{ Form::hidden('rate_id', $rate->id) }}
<div class="row">
<div class="col-md-3">
<div class="form-group">
{{ Form::label('name', __('insurance_benefits.bed_category_name')) }}
{{ Form::text('name', $bed_category->name, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="form-group">
{{ Form::label('name', __('bed_categories.type_of_pricing')) }}
{{ Form::text('name', $bed_category->cost_type == 1 ? 'Static' : 'Structured', ['class' => 'form-control', 'readonly']) }}
</div>
@if($bed_category->cost_type == 1)
<div class="form-group">
{{ Form::label('cost_per_night', __('bed_categories.cost_per_night')) }}
{{ Form::number('cost_per_night', $bed_category->cost_per_night, ['class' => 'form-control', 'readonly']) }}
</div>
@else
<div class="form-group">
{{ Form::label('cost_first_night', __('bed_categories.cost_of_first_night')) }}
{{ Form::number('cost_first_night', $bed_category->cost_first_night, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label>{{ __('bed_categories.from_night')}}</label>
{{ Form::number('from_night', 2, ['class' => 'form-control', 'readonly']) }}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>{{ __('bed_categories.to_night')}}</label>
{{ Form::number('to_night', $bed_category->to_night, ['class' => 'form-control', 'readonly']) }}
</div>
</div>
</div>
<div class="form-group">
{{ Form::label('cost_range', __('bed_categories.range_cost')) }}
{{ Form::number('cost_range', $bed_category->cost_range, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="form-group">
{{ Form::label('cost_after', __('bed_categories.cost_for_nights_thereafter')) }}
{{ Form::number('cost_after', $bed_category->cost_after, ['class' => 'form-control', 'readonly']) }}
</div>
@endif
</div>
<div class="col-md-1"></div>
<div class="col-md-8">
<div class="row" @if($bed_category->cost_type != 1) style="display: none" @endif>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('cost_per_night', __('insurance_benefits.co_payment_cost_per_night')) }}
{{ Form::number('cost_per_night', $rate->cost_per_night, ['class' => 'form-control compulsory']) }}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('chi_cost_per_night', __('insurance_benefits.chi_cost_per_night')) }}
{{ Form::number('chi_cost_per_night', $rate->chi_cost_per_night, ['class' => 'form-control compulsory']) }}
</div>
</div>
</div>
<div @if($bed_category->cost_type == 1) style="display: none" @endif>
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('cost_first_night', __('insurance_benefits.co_payment_cost_of_first_night')) }}
{{ Form::number('cost_first_night', $rate->cost_first_night, ['class' => 'form-control compulsory']) }}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('chi_cost_first_night', __('insurance_benefits.chi_cost_of_first_night')) }}
{{ Form::number('chi_cost_first_night', $rate->chi_cost_first_night, ['class' => 'form-control compulsory']) }}
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('cost_range', __('insurance_benefits.co_payment_range_cost')) }}
{{ Form::number('cost_range', $rate->cost_range, ['class' => 'form-control compulsory']) }}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('chi_cost_range', __('insurance_benefits.chi_range_cost')) }}
{{ Form::number('chi_cost_range', $rate->chi_cost_range, ['class' => 'form-control compulsory']) }}
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('cost_after', __('insurance_benefits.co_payment_cost_for_nights_thereafter')) }}
{{ Form::number('cost_after', $rate->cost_after, ['class' => 'form-control compulsory']) }}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('chi_cost_after', __('insurance_benefits.chi_cost_for_nights_thereafter')) }}
{{ Form::number('chi_cost_after', $rate->chi_cost_after, ['class' => 'form-control compulsory']) }}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('annual_member_limit', __('insurance_benefits.annual_member_limit')) }}
{{ Form::number('annual_member_limit', $rate->annual_member_limit, ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('gender', __('insurance_benefits.gender')) }}
{{ Form::select('gender', [0 => 'All', 1 => 'Male', 2 => 'Female'], $rate->gender, ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('age_limit', __('insurance_benefits.age_limit')) }}
@php $age_limits = explode(",", $rate->age_limit); @endphp
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('age_limit_start',__('insurance_benefits.start')) }}
{{ Form::number('age_limit_start',$age_limits[0],['class' => 'form-control compulsory']) }}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('age_limit_end',__('insurance_benefits.end')) }}
{{ Form::number('age_limit_end',$age_limits[1],['class' => 'form-control compulsory']) }}
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('annual_family_limit', __('insurance_benefits.annual_family_limit')) }}
{{ Form::number('annual_family_limit', $rate->annual_family_limit, ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('authorisation', __('insurance_benefits.authorisation')) }}
<br><br>
{{ Form::radio('authorisation', 1, $rate->authorisation == 1, ['required']) }} Yes &nbsp;&nbsp;
{{ Form::radio('authorisation', 0, $rate->authorisation == 0, ['required']) }} No
</div>
<div class="form-group">
{{ Form::label('age_type', __('insurance_benefits.age_type')) }}
{{ Form::select('age_type', [0 => 'Days', 1 => 'Months', 2 => 'Years'], $rate->age_type, ['class' => 'form-control compulsory', 'required']) }}
</div>
</div>
</div>
</div>
</div>
{{ Form::button(__('bed_categories.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('bed_categories.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script>
function set_authorisation(id, value) {
$('#authorisation_value_' + id).val(value);
}
$('#bed_category').select2({
placeholder: "Select"
});
</script>
@endpush
@@ -0,0 +1,185 @@
@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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance_benefits.insurance_benefit') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_benefits/">{{ __('insurance_benefits.insurance_benefits') }}</a></li>
<li><a href="/insurance_benefits/details/{{ $benefit->id }}">{{ __('insurance_benefits.insurance_benefits_details') }}</a></li>
<li class="active">{{ __('insurance_benefits.view') }}</li>
</ol>
</div>
</div>
@include('insurance::insurance_benefits.menu')
<div class="white-box">
@include('flash::message')
<h3>{{ __('insurance_benefits.insurance_benefit') }}: {{ $benefit->name }}</h3>
<h4>{{ __('insurance_benefits.item_type') }}: {{ [1 => 'Services', 2 => 'Procedures', 3 => 'Investigations', 4 => 'Drugs', 5 => 'Sundries'][$item_type] }}</h4>
<hr>
@if(!is_null($benefit->opd_percentage))
{{ Form::checkbox('apply_opd_percentage_all', 'OPD All', false, ['id' => "apply_opd_percentage_all"]) }} {{ __('insurance_benefits.apply_opd_percentage_all') }}
&nbsp;&nbsp;
@endif
@if(!is_null($benefit->ipd_percentage))
{{ Form::checkbox('apply_ipd_percentage_all', 'IPD All', false, ['id' => "apply_ipd_percentage_all"]) }} {{ __('insurance_benefits.apply_ipd_percentage_all') }}
@endif
<br><br>
{{ Form::open(['route' => 'insurance_benefits.update_items']) }}
{{ Form::hidden('benefit_id', $benefit->id) }}
{{ Form::hidden('item_type', $item_type) }}
<div class="table-responsive">
<table class="table color-bordered-table success-bordered-table">
<thead>
<tr>
<th>{{ __('insurance_benefits.name') }}</th>
<th>{{ __('insurance_benefits.authorisation') }}</th>
<th>{{ __('insurance_benefits.cash_price') }}</th>
<th>{{ __('insurance_benefits.opd_co_payment') }}</th>
<th>{{ __('insurance_benefits.ipd_co_payment') }}</th>
<th>{{ __('insurance_benefits.capitation_fee') }}</th>
<th>{{ __('insurance_benefits.annual_member_limit') }} <span data-toggle="tooltip" rel="tooltip" data-placement="top" title="{{ __('insurance_claims.no_limit_applicable') }}"> <i class="fa fa-info-circle"></i></span></th>
<th>{{ __('insurance_benefits.annual_family_limit') }} <span data-toggle="tooltip" rel="tooltip" data-placement="top" title="{{ __('insurance_claims.no_limit_applicable') }}"> <i class="fa fa-info-circle"></i></span></th>
</tr>
</thead>
<tbody>
@foreach($benefit_items as $record)
@php $items_array = explode(",", $record->item_id); @endphp
@foreach($items_array as $item_id)
@php
$item_details = get_item_insurance_details($item_id, $item_type, $benefit->id);
if (!$item_details) {continue;}
@endphp
<tr>
{{ Form::hidden('item_id[]', $item_id) }}
<td>{{ $items[$item_id] }}</td>
<td>
{{ Form::hidden('authorisation[]', $item_details['authorisation'], ['id' => 'authorisation_value_' . $item_id]) }}
{{ Form::radio('authorisation_' . $item_id, 1, $item_details['authorisation'] == 1, ['onclick' => 'set_authorisation(' . $item_id . ', 1)']) }} Yes &nbsp;&nbsp;
{{ Form::radio('authorisation_' . $item_id, 0, $item_details['authorisation'] == 0, ['onclick' => 'set_authorisation(' . $item_id . ', 0)']) }} No
</td>
<td>{{ ugandan_shillings($item_details['cash_price']) }}</td>
<td>
@php $apply_opd_percentage_state = isset($item_details['apply_opd_percentage']) && ($item_details['apply_opd_percentage'] == 1) @endphp
{{ Form::number('co_payment[]', $item_details['co_payment'], ['class' => 'form-control compulsory', 'required', 'min' => '0', 'id' => "co_payment_$item_id", ($apply_opd_percentage_state ? 'readonly' : '')]) }}
@if(!is_null($benefit->opd_percentage))
<br>
{{ Form::checkbox('apply_opd_percentage[]', $item_id, $apply_opd_percentage_state, ['id' => "apply_opd_percentage_$item_id", 'class' => 'apply_opd_percentage']) }} {{ __('insurance_benefits.apply_opd_percentage') }}
@endif
</td>
<td>
@php $apply_ipd_percentage_state = isset($item_details['apply_ipd_percentage']) && ($item_details['apply_ipd_percentage'] == 1) @endphp
{{ Form::number('ipd_co_payment[]', $item_details['ipd_co_payment'] ?? 0, ['class' => 'form-control compulsory', 'required', 'min' => '0', 'id' => "ipd_co_payment_$item_id", ($apply_ipd_percentage_state ? 'readonly' : '')]) }}
@if(!is_null($benefit->ipd_percentage))
<br>
{{ Form::checkbox('apply_ipd_percentage[]', $item_id, $apply_ipd_percentage_state, ['id' => "apply_ipd_percentage_$item_id", 'class' => 'apply_ipd_percentage']) }} {{ __('insurance_benefits.apply_ipd_percentage') }}
@endif
</td>
<td>{{ Form::number('capitation_fee[]', $item_details['capitation_fee'], ['class' => 'form-control compulsory', 'required', 'min' => '0']) }}</td>
<td>{{ Form::number('annual_member_limit[]', $item_details['annual_member_limit'], ['class' => 'form-control compulsory', 'required', 'min' => '0']) }}</td>
<td>{{ Form::number('annual_family_limit[]', $item_details['annual_family_limit'], ['class' => 'form-control compulsory', 'required', 'min' => '0']) }}</td>
</tr>
@endforeach
@endforeach
</tbody>
</table>
</div>
<button class="btn btn-success btn-rounded pull-right">{{ __('payroll.submit') }}</button>
<hr>
{{ Form::close() }}
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
<script>
$('.table').DataTable({
dom: 'Bfrtip',
bInfo: false,
bPaginate: true,
buttons: []
});
$(".table").on('change', "[id^=apply_opd_percentage_]", function () {
let id = /\d+(?=\D*$)/.exec($(this).attr('id'));
if($(this).is(":checked")) {
$('#co_payment_' + id).val(0).prop('readonly', true);
} else {
$('#co_payment_' + id).prop('readonly', false);
}
}).on('change', "[id^=apply_ipd_percentage_]", function () {
let id = /\d+(?=\D*$)/.exec($(this).attr('id'));
if($(this).is(":checked")) {
$('#ipd_co_payment_' + id).val(0).prop('readonly', true);
} else {
$('#ipd_co_payment_' + id).prop('readonly', false);
}
});
$('#apply_opd_percentage_all').change(function () {
if($(this).is(":checked")) {
$(".apply_opd_percentage").each(function() {
if(!$(this).is(":checked")) {
$(this).click();
}
});
} else {
$(".apply_opd_percentage").each(function() {
if($(this).is(":checked")) {
$(this).click();
}
});
}
});
$('#apply_ipd_percentage_all').change(function () {
if($(this).is(":checked")) {
$(".apply_ipd_percentage").each(function() {
if(!$(this).is(":checked")) {
$(this).click();
}
});
} else {
$(".apply_ipd_percentage").each(function() {
if($(this).is(":checked")) {
$(this).click();
}
});
}
});
function set_authorisation(id, value) {
$('#authorisation_value_' + id).val(value);
}
</script>
@endpush
@@ -0,0 +1,90 @@
@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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance_benefits.insurance_benefits') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li class="active">{{ __('insurance_benefits.insurance_benefits') }}</li>
</ol>
</div>
</div>
@include('insurance::insurance_benefits.menu')
<div class="white-box">
@include('flash::message')
<div class="table-responsive">
<table id="table" class="table table-striped color-bordered-table success-bordered-table table-hover">
<thead>
<tr>
<th>{{ __('insurance_benefits.benefit_name') }}</th>
<th>{{ __('insurance_benefits.plan') }}</th>
<th>{{ __('insurance_benefits.waiting_period_days') }}</th>
<th>{{ __('insurance_benefits.fee') }}</th>
<th>{{ __('insurance_benefits.annual_member_limit') }}</th>
<th>{{ __('insurance_benefits.annual_family_limit') }}</th>
<th>{{ __('insurance_benefits.deactivated_at') }}</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($insurance_benefits as $insurance_benefit)
<tr>
<td>{{ $insurance_benefit->name }}</td>
<td>{{ $insurance_plans[$insurance_benefit->plan_id] }}</td>
<td>{{ $insurance_benefit->waiting_period }}</td>
<td>{{ ugandan_shillings($insurance_benefit->fee) }}</td>
<td>{{ ugandan_shillings($insurance_benefit->annual_member_limit) }}</td>
<td>{{ ugandan_shillings($insurance_benefit->annual_family_limit) }}</td>
<td>{{ streamline_date_time($insurance_benefit->deleted_at) }}</td>
<td>
@if(Auth::user()->can('insurance-benefits-inactive'))
{{ Form::model($insurance_benefit->id ,['method' => 'POST', 'route' => ['insurance_benefits.activate', $insurance_benefit->id]]) }}
<button type="submit" class="btn btn-rounded btn-warning" onclick="return confirm('<?php echo __('insurance_groups.are_you_sure')?>')"><i class="fa fa-check"></i> {{ __('insurance_groups.activate') }}</button>
{{ Form::close() }}
@endif
</td>
</tr>
@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>
<script>
$('#table').DataTable({
dom: 'Bfrtip',
bInfo: false,
bPaginate: false,
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
</script>
@endpush
@@ -0,0 +1,102 @@
@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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance_benefits.insurance_benefits') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li class="active">{{ __('insurance_benefits.insurance_benefits') }}</li>
</ol>
</div>
</div>
@include('insurance::insurance_benefits.menu')
<div class="white-box">
@include('flash::message')
<div class="table-responsive">
<table id="table" class="table table-striped color-bordered-table success-bordered-table table-hover">
<thead>
<tr>
<th>{{ __('insurance_benefits.benefit_name') }}</th>
<th>{{ __('insurance_benefits.plan') }}</th>
<th>{{ __('insurance_benefits.waiting_period_days') }}</th>
<th>{{ __('insurance_benefits.fee') }}</th>
<th>{{ __('insurance_benefits.annual_member_limit') }}</th>
<th>{{ __('insurance_benefits.annual_family_limit') }}</th>
<th>{{ __('insurance_benefits.opd_percentage') }}</th>
<th>{{ __('insurance_benefits.ipd_percentage') }}</th>
<th>{{ __('insurance_benefits.created_by') }}</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($insurance_benefits as $insurance_benefit)
<tr>
<td>{{ $insurance_benefit->name }}</td>
<td>{{ $insurance_plans[$insurance_benefit->plan_id] }}</td>
<td>{{ $insurance_benefit->waiting_period }}</td>
<td>{{ ugandan_shillings($insurance_benefit->fee) }}</td>
<td>{{ ugandan_shillings($insurance_benefit->annual_member_limit) }}</td>
<td>{{ ugandan_shillings($insurance_benefit->annual_family_limit) }}</td>
<td>{{ $insurance_benefit->opd_percentage ?? 'N/A' }}</td>
<td>{{ $insurance_benefit->ipd_percentage ?? 'N/A' }}</td>
<td>{{ get_full_name($insurance_benefit->created_by, 'id', 'first_name', 'last_name', 'users') }} at {{ streamline_date_time($insurance_benefit->created_at) }}</td>
<td>
@if(Auth::user()->can('insurance-benefits-view-details'))<a href="/insurance_benefits/details/{{ $insurance_benefit->id }}/" class="btn btn-rounded btn-success"><i class="fa fa-eye"></i> {{ __('insurance_benefits.view_items') }}</a>@endif
</td>
<td>
@if(Auth::user()->can('insurance-benefits-edit'))<a href="/insurance_benefits/{{ $insurance_benefit->id }}/edit/" class="btn btn-rounded btn-warning"><i class="fa fa-pencil"></i> {{ __('insurance_groups.edit') }}</a>@endif
</td>
<td>
@if(Auth::user()->can('insurance-benefits-inactive'))
{{ Form::model($insurance_benefit->id ,['method' => 'DELETE', 'route' => ['insurance_benefits.destroy', $insurance_benefit->id]]) }}
<button type="submit" class="btn btn-rounded btn-danger" onclick="return confirm('<?php echo __('clinics.are_you_sure');?>')"><i class="fa fa-trash"></i> {{ __('clinics.delete') }}</button>
{{ Form::close() }}
@endif
</td>
</tr>
@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>
<script>
$('#table').DataTable({
dom: 'Bfrtip',
bInfo: false,
bPaginate: false,
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
</script>
@endpush
@@ -0,0 +1,5 @@
<div class="white-box">
@if(Auth::user()->can('insurance-benefits-create'))<a href="/insurance_benefits/create" class="nav-item btn btn-success" style="border-radius: 5px;"><i class="fa fa-plus"></i> <span style="margin-left: 10px">{{ __('insurance_benefits.create_insurance_benefit') }}</span></a>@endif
@if(Auth::user()->can('insurance-benefits-view'))<a href="/insurance_benefits/" class="nav-item btn btn-info" style="border-radius: 5px;"><i class="fa fa-eye"></i> <span style="margin-left: 10px">{{ __('insurance_benefits.view_insurance_benefits') }}</span></a>@endif
@if(Auth::user()->can('insurance-benefits-inactive'))<a href="/insurance_benefits/inactive" class="nav-item btn btn-danger" style="border-radius: 5px;"><i class="fa fa-trash"></i> <span style="margin-left: 10px">{{ __('insurance_benefits.inactive_insurance_benefits') }}</span></a>@endif
</div>
@@ -0,0 +1,142 @@
@extends('layouts.main')
@push('styles')
@endpush
@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">{{ __('insurance_benefits.inpatient_accommodation_details') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_benefits/">{{ __('insurance_benefits.insurance_benefits') }}</a></li>
<li><a href="/insurance_benefits/details/{{ $benefit->id }}">{{ __('insurance_benefits.insurance_benefits_details') }}</a></li>
<li class="active">{{ __('insurance_benefits.create') }}</li>
</ol>
</div>
</div>
@include('insurance::insurance_benefits.menu')
@php
$time_periods = [0 => 'Days', 1 => 'Months', 2 => 'Years'];
$genders = [0 => 'All', 1 => 'Male', 2 => 'Female'];
$age_limits = explode(",", $rate->age_limit);
@endphp
<div class="white-box">
@include('flash::message')
<h3>{{ __('insurance_benefits.insurance_benefit') }}: {{ $benefit->name }}</h3>
<hr>
<div class="row">
<div class="col-md-3">
<div class="table-responsive">
<table class="table table-striped table-bordered">
<tr>
<td><b>{{ __('insurance_benefits.bed_category_name') }}</b></td>
<td>{{ $bed_category->name }}</td>
</tr>
<tr>
<td><b>{{ __('bed_categories.type_of_pricing') }}</b></td>
<td>{{ $bed_category->cost_type == 1 ? 'Static' : 'Structured' }}</td>
</tr>
@if($bed_category->cost_type == 1)
<tr>
<td><b>{{ __('bed_categories.cost_per_night') }}</b></td>
<td>{{ ugandan_shillings($bed_category->cost_per_night) }}</td>
</tr>
@else
<tr>
<td><b>{{ __('bed_categories.cost_of_first_night') }}</b></td>
<td>{{ ugandan_shillings($bed_category->cost_first_night) }}</td>
</tr>
<tr>
<td><b>{{ __('bed_categories.night_ranges') }}</b></td>
<td>2 - {{ $bed_category->to_night }}</td>
</tr>
<tr>
<td><b>{{ __('bed_categories.range_cost') }}</b></td>
<td>{{ ugandan_shillings($bed_category->cost_range) }}</td>
</tr>
<tr>
<td><b>{{ __('bed_categories.cost_for_nights_thereafter') }}</b></td>
<td>{{ ugandan_shillings($bed_category->cost_after) }}</td>
</tr>
@endif
</table>
</div>
</div>
<div class="col-md-1"></div>
<div class="col-md-8">
<div class="table-responsive">
<table class="table table-striped table-bordered">
@if($bed_category->cost_type == 1)
<tr>
<td><b>{{ __('insurance_benefits.co_payment_cost_per_night') }}</b></td>
<td>{{ ugandan_shillings($rate->cost_per_night) }}</td>
<td><b>{{ __('insurance_benefits.chi_cost_per_night') }}</b></td>
<td>{{ ugandan_shillings($rate->chi_cost_per_night) }}</td>
</tr>
@else
<tr>
<td><b>{{ __('insurance_benefits.co_payment_cost_of_first_night') }}</b></td>
<td>{{ ugandan_shillings($rate->cost_first_night) }}</td>
<td><b>{{ __('insurance_benefits.chi_cost_of_first_night') }}</b></td>
<td>{{ ugandan_shillings($rate->chi_cost_first_night) }}</td>
</tr>
<tr>
<td><b>{{ __('insurance_benefits.co_payment_range_cost') }}</b></td>
<td>{{ ugandan_shillings($rate->cost_range) }}</td>
<td><b>{{ __('insurance_benefits.chi_range_cost') }}</b></td>
<td>{{ ugandan_shillings($rate->chi_cost_range) }}</td>
</tr>
<tr>
<td><b>{{ __('insurance_benefits.co_payment_cost_for_nights_thereafter') }}</b></td>
<td>{{ ugandan_shillings($rate->cost_after) }}</td>
<td><b>{{ __('insurance_benefits.chi_cost_for_nights_thereafter') }}</b></td>
<td>{{ ugandan_shillings($rate->chi_cost_after) }}</td>
</tr>
@endif
<tr>
<td><b>{{ __('insurance_benefits.annual_member_limit') }}</b></td>
<td>{{ ugandan_shillings($rate->annual_member_limit) }}</td>
<td><b>{{ __('insurance_benefits.annual_family_limit') }}</b></td>
<td>{{ ugandan_shillings($rate->annual_family_limit) }}</td>
</tr>
<tr>
<td><b>{{ __('insurance_benefits.gender') }}</b></td>
<td>{{ ($genders[$rate->gender] ?? 'All') }}</td>
<td><b>{{ __('insurance_benefits.authorisation') }}</b></td>
<td>{{ $rate->authorisation_required == 1 ? 'Yes' : 'No' }}</td>
</tr>
<tr>
<td><b>{{ __('insurance_benefits.age_limit') }}</b></td>
<td colspan="3">{{ ($age_limits[0] ?? "0") . ' to ' . ($age_limits[1] ?? "0") . ' ' . $time_periods[$rate->age_type] ?? 'years' }}</td>
</tr>
</table>
</div>
</div>
</div>
<hr>
<a href="/insurance_benefits/edit_inpatient_accommodation/{{ $rate->id }}" class="btn btn-warning">{{ __('insurance_benefits.edit') }}</a>
<a href="/insurance_benefits/delete_inpatient_accommodation/{{ $rate->id }}" class="btn btn-danger">{{ __('insurance_benefits.delete') }}</a>
</div>
@endsection
@push('scripts')
<script></script>
@endpush
@@ -0,0 +1,97 @@
@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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance_benefits.inpatient_accommodation') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_benefits/">{{ __('insurance_benefits.insurance_benefits') }}</a></li>
<li><a href="/insurance_benefits/details/{{ $benefit->id }}">{{ __('insurance_benefits.insurance_benefits_details') }}</a></li>
<li class="active">{{ __('insurance_benefits.view') }}</li>
</ol>
</div>
</div>
@include('insurance::insurance_benefits.menu')
<div class="white-box">
@include('flash::message')
<h3>{{ __('insurance_benefits.insurance_benefit') }}: {{ $benefit->name }}</h3>
<div class="table-responsive">
<table class="table color-bordered-table success-bordered-table">
<thead>
<tr>
<th>{{ __('insurance_benefits.bed_category') }}</th>
<th>{{ __('insurance_benefits.authorisation') }}</th>
<th>{{ __('insurance_benefits.type_of_pricing') }}</th>
<th>{{ __('insurance_benefits.co_payment') }}</th>
<th>{{ __('insurance_benefits.chi_amount') }}</th>
<th>{{ __('insurance_benefits.gender') }}</th>
<th>{{ __('insurance_benefits.age_limit') }}</th>
<th>{{ __('insurance_benefits.annual_member_limit') }}</th>
<th>{{ __('insurance_benefits.annual_family_limit') }}</th>
<th></th>
</tr>
</thead>
<tbody>
@php
$time_periods = [0 => 'Days', 1 => 'Months', 2 => 'Years'];
$genders = [0 => 'All', 1 => 'Male', 2 => 'Female'];
@endphp
@foreach($rates as $record)
@php $age_limits = explode(",", $record->age_limit); @endphp
<tr>
<td>{{ $bed_categories[$record->bed_category_id] }}</td>
<td>{{ $record->authorisation_required == 1 ? 'Yes' : 'No' }}</td>
<td>{{ $record->cost_type == 1 ? 'Static' : 'Structured' }}</td>
<td>{{ ugandan_shillings($record->cost_per_night ?? $record->cost_first_night) }}</td>
<td>{{ ugandan_shillings($record->chi_cost_per_night ?? $record->chi_cost_first_night) }}</td>
<td>{{ ($genders[$record->gender] ?? 'All') }}</td>
<td>{{ ($age_limits[0] ?? "0") . ' to ' . ($age_limits[1] ?? "0") . ' ' . $time_periods[$record->age_type] ?? 'years' }}</td>
<td>{{ ugandan_shillings($record->annual_member_limit) }}</td>
<td>{{ ugandan_shillings($record->annual_family_limit) }}</td>
<td>
<a href="/insurance_benefits/view_accommodation_details/{{ $record->id }}" class="btn btn-success btn-sm">Details</a>
</td>
</tr>
@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>
<script>
$('.table').DataTable({
dom: 'Bfrtip',
bInfo: false,
bPaginate: true,
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
</script>
@endpush
@@ -0,0 +1,147 @@
@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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance_benefits.insurance_benefit') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_benefits/">{{ __('insurance_benefits.insurance_benefits') }}</a></li>
<li><a href="/insurance_benefits/details/{{ $benefit->id }}">{{ __('insurance_benefits.insurance_benefits_details') }}</a></li>
<li class="active">{{ __('insurance_benefits.view') }}</li>
</ol>
</div>
</div>
@include('insurance::insurance_benefits.menu')
<div class="white-box">
@include('flash::message')
<h3>{{ __('insurance_benefits.insurance_benefit') }}: {{ $benefit->name }}</h3>
{{ Form::hidden('benefit_id', $benefit->id, ['id' => 'benefit_id']) }}
{{ Form::hidden('item_type', $item_type, ['id' => 'item_type']) }}
<h4>{{ __('insurance_benefits.item_type') }}: {{ [1 => 'Services', 2 => 'Procedures', 3 => 'Investigations', 4 => 'Drugs', 5 => 'Sundries'][$item_type] }}</h4>
@if(Auth::user()->can('insurance-items-edit'))<a href="/insurance_benefits/edit_items/{{ $benefit->id }}/{{ $item_type }}" class="btn btn-success btn-rounded">Edit Items</a>@endif
<hr>
<div class="table-responsive">
<table class="table color-bordered-table success-bordered-table">
<thead>
<tr>
<th>{{ __('insurance_benefits.name') }}</th>
<th>{{ __('insurance_benefits.authorisation') }}</th>
<th>{{ __('insurance_benefits.cash_price') }}</th>
<th>{{ __('insurance_benefits.opd_co_payment') }}</th>
<th>{{ __('insurance_benefits.ipd_co_payment') }}</th>
<th>{{ __('insurance_benefits.capitation_fee') }}</th>
<th>{{ __('insurance_benefits.annual_member_limit') }}</th>
<th>{{ __('insurance_benefits.annual_family_limit') }}</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($benefit_items as $record)
@php $items_array = explode(",", $record->item_id); @endphp
@foreach($items_array as $item_id)
@php $item_details = get_item_insurance_details($item_id, $item_type, $benefit->id); if (!$item_details) {continue;} @endphp
<tr>
<td>{{ $items[$item_id] }}</td>
<td>{{ $item_details['authorisation'] == 1 ? 'Yes' : 'No' }}</td>
<td>{{ ugandan_shillings($item_details['cash_price']) }}</td>
<td>
@if(isset($item_details['apply_opd_percentage']) && $item_details['apply_opd_percentage'] == 1)
{{ ugandan_shillings(($benefit->opd_percentage / 100) * $item_details['cash_price']) }}
<br><br>
<i style="color: #990055">{{ $benefit->opd_percentage . '% ' . __('insurance_benefits.of_cash_price') }}</i>
@else
{{ ugandan_shillings($item_details['co_payment']) }}
@endif
</td>
<td>
@if(isset($item_details['apply_ipd_percentage']) && $item_details['apply_ipd_percentage'] == 1)
{{ ugandan_shillings(($benefit->ipd_percentage / 100) * $item_details['cash_price']) }}
<br><br>
<i style="color: #990055">{{ $benefit->ipd_percentage . '% ' . __('insurance_benefits.of_cash_price') }}</i>
@else
{{ ugandan_shillings($item_details['ipd_co_payment'] ?? 0) }}
@endif
</td>
<td>{{ ugandan_shillings($item_details['capitation_fee']) }}</td>
<td>{{ ugandan_shillings($item_details['annual_member_limit']) }}</td>
<td>{{ ugandan_shillings($item_details['annual_family_limit']) }}</td>
<td>@if(Auth::user()->can('insurance-tariffs-create'))<a href="javascript:void(0)" onclick="manage_tariffs({{ $item_id }})" class="btn btn-rounded btn-sm btn-success">Manage Tariffs</a>@endif</td>
<td>@if(Auth::user()->can('insurance-items-remove'))<a href="/insurance_benefits/remove_item/{{ $item_id }}/{{ $item_type }}/{{ $benefit->id }}" class="btn btn-rounded btn-sm btn-danger" onclick="return confirm('Are you sure?')">Remove</a>@endif</td>
</tr>
@endforeach
@endforeach
</tbody>
</table>
</div>
</div>
<div class="modal" id="modal_item_tariffs" tabindex="-1" role="dialog" aria-labelledby="debt_plan_modal_label" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Item Tariffs</h4>
</div>
<div class="modal-body" id="item_tariff_body"></div>
<div class="modal-footer">
<a class="btn btn-success btn-sm btn-rounded" href="#" id="item_tariff_link">Add Tariff to item</a>
</div>
</div>
</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>
<script>
$('.table').DataTable({
dom: 'Bfrtip',
bInfo: false,
bPaginate: true,
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
function manage_tariffs(id) {
let benefit_id = $('#benefit_id').val();
let item_type = $('#item_type').val();
$.ajax({
method: 'GET',
url: '/insurance_tariffs/get_item_tariffs/' + benefit_id + '/' + id + '/' + item_type,
success: function(response){
$('#item_tariff_body').html(response);
$("#item_tariff_link").attr("href", '/insurance_tariffs/add_tariff/' + benefit_id + '/' + id + '/' + item_type);
$('#modal_item_tariffs').modal('show');
}
});
}
</script>
@endpush
@@ -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
@@ -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
@@ -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
@@ -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
@@ -0,0 +1,70 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
@endpush
@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">{{ __('insurance_disease_groups.create_disease_groups') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_groups/">{{ __('insurance_disease_groups.insurance_disease_groups') }}</a></li>
<li class="active">{{ __('insurance_disease_groups.create') }}</li>
</ol>
</div>
</div>
@include('insurance::insurance_disease_groups.menu')
<div class="white-box">
@include('flash::message')
{{ Form::open(['route' => 'insurance_disease_groups.store','data-toggle'=>'validator']) }}
<div class="form-group">
{{ Form::label('name', 'Name') }}
{{ Form::text('name', '', ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('diagnoses', 'Diagnoses') }}
{{ Form::select('diagnoses[]', $diagnoses, '', ['class' => 'form-control compulsory', 'multiple', 'required', 'id' => 'diagnoses']) }}
</div>
<div class="form-group">
{{ Form::label('investigations', 'Investigations') }}
{{ Form::select('investigations[]', $investigations, '', ['class' => 'form-control', 'multiple', 'id' => 'investigations']) }}
</div>
<div class="form-group">
{{ Form::label('drugs', 'Drugs') }}
{{ Form::select('drugs[]', $drugs, '', ['class' => 'form-control', 'multiple', 'id' => 'drugs']) }}
</div>
<div class="form-group">
{{ Form::label('procedures', 'Procedures') }}
{{ Form::select('procedures[]', $procedures, '', ['class' => 'form-control', 'multiple', 'id' => 'procedures']) }}
</div>
{{ Form::button(__('insurance_groups.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('insurance_groups.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script>
$('#diagnoses, #investigations, #drugs, #procedures').select2({
placeholder: "Select"
});
</script>
@endpush
@@ -0,0 +1,92 @@
@extends('layouts.main')
@push('styles')
@endpush
@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">{{ __('insurance_disease_groups.insurance_disease_group_details') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_groups/">{{ __('insurance_disease_groups.insurance_disease_groups') }}</a></li>
<li class="active">{{ __('insurance_disease_groups.details') }}</li>
</ol>
</div>
</div>
@include('insurance::insurance_disease_groups.menu')
<div class="white-box">
@include('flash::message')
<h3>{{ $group->name }} - {{ __('insurance_disease_groups.details') }}</h3>
<div class="row">
<div class="col-md-6">
<h4>{{ __('insurance_disease_groups.diagnoses') }}</h4>
@php $group_diagnoses = explode(",", $group->diagnoses); @endphp
<table class="table table-striped table-bordered">
@foreach($group_diagnoses as $item)
<tr><td>{{ $diagnoses[$item] }}</td></tr>
@endforeach
</table>
</div>
<div class="col-md-6">
<h4>{{ __('insurance_disease_groups.drugs') }}</h4>
@php $group_treatments = explode(",", $group->treatments); @endphp
<table class="table table-striped table-bordered">
@foreach($group_treatments as $item)
<tr><td>{{ $drugs[$item] }}</td></tr>
@endforeach
</table>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-6">
<h4>{{ __('insurance_disease_groups.investigations') }}</h4>
@php $group_investigations = explode(",", $group->investigations); @endphp
<table class="table table-striped table-bordered">
@foreach($group_investigations as $item)
<tr><td>{{ $investigations[$item] }}</td></tr>
@endforeach
</table>
</div>
<div class="col-md-6">
<h4>{{ __('insurance_disease_groups.procedures') }}</h4>
@php $group_procedures = explode(",", $group->procedures); @endphp
<table class="table table-striped table-bordered">
@foreach($group_procedures as $item)
<tr><td>{{ $procedures[$item] }}</td></tr>
@endforeach
</table>
</div>
</div>
@if(Auth::user()->can('insurance-disease-groups-edit'))
<a href="/insurance_disease_groups/edit/{{ $group->id }}" class="btn btn-warning"><i class="fa fa-pencil"></i> {{ __('insurance_disease_groups.edit') }}</a>
@endif
@if(Auth::user()->can('insurance-disease-groups-delete'))
<a href="/insurance_disease_groups/delete/{{ $group->id }}" class="btn btn-danger" onclick="return confirm('Are you sure?')"><i class="fa fa-trash"></i> {{ __('insurance_disease_groups.delete') }}</a>
@endif
</div>
@endsection
@push('scripts')
<script></script>
@endpush
@@ -0,0 +1,72 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
@endpush
@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">{{ __('insurance_disease_groups.create_disease_groups') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_groups/">{{ __('insurance_disease_groups.insurance_disease_groups') }}</a></li>
<li class="active">{{ __('insurance_disease_groups.create') }}</li>
</ol>
</div>
</div>
@include('insurance::insurance_disease_groups.menu')
<div class="white-box">
@include('flash::message')
{{ Form::open(['route' => 'insurance_disease_groups.update','data-toggle'=>'validator']) }}
{{ Form::hidden('id', $group->id) }}
<div class="form-group">
{{ Form::label('name', 'Name') }}
{{ Form::text('name', $group->name, ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('diagnoses', 'Diagnoses') }}
{{ Form::select('diagnoses[]', $diagnoses, explode(",", $group->diagnoses), ['class' => 'form-control compulsory', 'multiple', 'required', 'id' => 'diagnoses']) }}
</div>
<div class="form-group">
{{ Form::label('investigations', 'Investigations') }}
{{ Form::select('investigations[]', $investigations, explode(",", $group->investigations), ['class' => 'form-control', 'multiple', 'id' => 'investigations']) }}
</div>
<div class="form-group">
{{ Form::label('drugs', 'Drugs') }}
{{ Form::select('drugs[]', $drugs, explode(",", $group->treatments), ['class' => 'form-control', 'multiple', 'id' => 'drugs']) }}
</div>
<div class="form-group">
{{ Form::label('procedures', 'Procedures') }}
{{ Form::select('procedures[]', $procedures, explode(",", $group->procedures), ['class' => 'form-control', 'multiple', 'id' => 'procedures']) }}
</div>
{{ Form::button(__('insurance_groups.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('insurance_groups.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script>
$('#diagnoses, #investigations, #drugs, #procedures').select2({
placeholder: "Select"
});
</script>
@endpush
@@ -0,0 +1,54 @@
@extends('layouts.main')
@push('styles')
@endpush
@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">{{ __('insurance_disease_groups.inactive_disease_groups') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_groups/">{{ __('insurance_disease_groups.insurance_disease_groups') }}</a></li>
<li class="active">{{ __('insurance_disease_groups.view') }}</li>
</ol>
</div>
</div>
@include('insurance::insurance_disease_groups.menu')
<div class="white-box">
@include('flash::message')
<div class="table-responsive">
<table id="table" class="table table-striped color-bordered-table success-bordered-table table-hover">
<thead>
<tr>
<th>{{ __('insurance_disease_groups.name') }}</th>
<th>{{ __('insurance_disease_groups.created') }}</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($groups as $group)
<tr>
<td>{{ $group->name }}</td>
<td>{{ __('insurance_disease_groups.by') }} {{ get_full_name($group->created_by, 'id', 'first_name', 'last_name', 'users') }} {{ __('insurance_disease_groups.at') }} {{ streamline_date_time($group->created_at) }}</td>
<td>
<a href="/insurance_disease_groups/restore/{{ $group->id }}" class="btn btn-rounded btn-sm btn-success" onclick="return confirm('Are you sure?')"><i class="fa fa-recycle"></i> {{ __('insurance_disease_groups.restore') }}</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
@endsection
@push('scripts')
<script></script>
@endpush
@@ -0,0 +1,70 @@
@extends('layouts.main')
@push('styles')
@endpush
@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">{{ __('insurance_disease_groups.view_disease_groups') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_groups/">{{ __('insurance_disease_groups.insurance_disease_groups') }}</a></li>
<li class="active">{{ __('insurance_disease_groups.view') }}</li>
</ol>
</div>
</div>
@include('insurance::insurance_disease_groups.menu')
<div class="white-box">
@include('flash::message')
<div class="table-responsive">
<table id="table" class="table table-striped color-bordered-table success-bordered-table table-hover">
<thead>
<tr>
<th class="text-center">{{ __('insurance_disease_groups.name') }}</th>
<th class="text-center">{{ __('insurance_disease_groups.diagnoses') }}</th>
<th class="text-center">{{ __('insurance_disease_groups.investigations') }}</th>
<th class="text-center">{{ __('insurance_disease_groups.drugs') }}</th>
<th class="text-center">{{ __('insurance_disease_groups.procedures') }}</th>
<th>{{ __('insurance_disease_groups.created') }}</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($groups as $group)
<tr>
<td>{{ $group->name }}</td>
<td class="text-center">{{ count(explode(",", $group->diagnoses)) }}</td>
<td class="text-center">{{ count(explode(",", $group->investigations)) }}</td>
<td class="text-center">{{ count(explode(",", $group->treatments)) }}</td>
<td class="text-center">{{ count(explode(",", $group->procedures)) }}</td>
<td>{{ __('insurance_disease_groups.by') }} {{ get_full_name($group->created_by, 'id', 'first_name', 'last_name', 'users') }} {{ __('insurance_disease_groups.at') }} {{ streamline_date_time($group->created_at) }}</td>
<td>
@if(Auth::user()->can('insurance-disease-groups-view'))<a href="/insurance_disease_groups/details/{{ $group->id }}" class="btn btn-rounded btn-sm btn-success"><i class="fa fa-info"></i> {{ __('insurance_disease_groups.details') }}</a>@endif
</td>
<td>
@if(Auth::user()->can('insurance-disease-groups-edit'))<a href="/insurance_disease_groups/edit/{{ $group->id }}" class="btn btn-rounded btn-sm btn-warning"><i class="fa fa-pencil"></i> {{ __('insurance_disease_groups.edit') }}</a>@endif
</td>
<td>
@if(Auth::user()->can('insurance-disease-groups-delete'))<a href="/insurance_disease_groups/delete/{{ $group->id }}" class="btn btn-rounded btn-sm btn-danger" onclick="return confirm('Are you sure?')"><i class="fa fa-trash"></i> {{ __('insurance_disease_groups.delete') }}</a>@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
@endsection
@push('scripts')
<script></script>
@endpush
@@ -0,0 +1,5 @@
<div class="white-box">
@if(Auth::user()->can('insurance-disease-groups-create'))<a href="/insurance_disease_groups/create" class="nav-item btn btn-success" style="border-radius: 5px;"><i class="fa fa-plus"></i> <span style="margin-left: 10px">{{ __('insurance_disease_groups.create_disease_groups') }}</span></a>@endif
@if(Auth::user()->can('insurance-disease-groups-view'))<a href="/insurance_disease_groups/index" class="nav-item btn btn-info" style="border-radius: 5px;"><i class="fa fa-eye"></i> <span style="margin-left: 10px">{{ __('insurance_disease_groups.view_disease_groups') }}</span></a>@endif
@if(Auth::user()->can('insurance-disease-groups-delete'))<a href="/insurance_disease_groups/inactive" class="nav-item btn btn-danger" style="border-radius: 5px;"><i class="fa fa-trash"></i> <span style="margin-left: 10px">{{ __('insurance_disease_groups.inactive_disease_groups') }}</span></a>@endif
</div>
@@ -0,0 +1,119 @@
@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" />
@endpush
@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">{{ __('insurance_groups.new_insurance_group') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance/scheme_administration">{{ __('insurance.scheme_administration') }}</a></li>
<li><a href="/insurance_groups/">{{ __('insurance_groups.insurance_groups') }}</a></li>
<li class="active">{{ __('insurance_groups.register') }}</li>
</ol>
</div>
</div>
@include('insurance::insurance_groups.menu')
@include('flash::message')
@include ('errors.list')
<div class="panel panel-default">
<div class="panel-body">
{{ Form::open(['route' => 'insurance_groups.store','data-toggle'=>'validator']) }}
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('name', __('insurance_groups.group_name')) }}
{{ Form::text('name', '', ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('contact_name', __('insurance_groups.contact_name')) }}
{{ Form::text('contact_name', '', ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('contact_number',__('insurance_groups.contact_phone_number')) }}
{{ Form::text('contact_number','',['class' => 'form-control compulsory','required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('group_email',__('insurance.email')) }}
{{ Form::email('group_email','',['class' => 'form-control compulsory']) }}
<div class="help-block with-errors"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('country_id',__('patients.country_of_origin')) }}
{{ Form::select('country_id', $countries, '',['class' => 'form-control', 'data-error'=>'Select the country', 'required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('last_fees_billing_date', __('insurance.date_of_last_fees_billing')) }}
<div class="input-group">
{{ Form::text('last_fees_billing_date','',['class' => 'form-control','readonly','id'=>'last_fees_billing_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('last_fees_payment_date', __('insurance.date_of_last_fees_payment')) }}
<div class="input-group">
{{ Form::text('last_fees_payment_date','',['class' => 'form-control','readonly','id'=>'last_fees_payment_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('risk_id',__('insurance.risk')) }}
{{ Form::select('risk_id[]', $chi_risks, '',['class' => 'form-control compulsory risk_id', 'data-error'=>'Select the risk', 'required', 'multiple']) }}
<div class="help-block with-errors"></div>
</div>
</div>
</div>
{{ Form::button(__('insurance_groups.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('insurance_groups.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/js/validator.js') }}"></script>
<script src="{{ asset('elite/js/mask.js') }}"></script>
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script type="text/javascript">
$('.risk_id').select2({
placeholder: "Select"
});
$('#last_fees_billing_date,#last_fees_payment_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
</script>
@endpush
@@ -0,0 +1,120 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
@endpush
@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">{{ __('insurance_groups.edit_insurance_group') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance/scheme_administration">{{ __('insurance.scheme_administration') }}</a></li>
<li><a href="/insurance_groups/">{{ __('insurance_groups.insurance_groups') }}</a></li>
<li class="active">{{ __('insurance_groups.edit') }}</li>
</ol>
</div>
</div>
@include('flash::message')
@include('insurance::insurance_groups.menu')
<div class="panel panel-default">
<div class="panel-body">
{{ Form::model($insurance_group, ['method' => 'PUT', 'route' => ['insurance_groups.update',$insurance_group]]) }}
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('name', __('insurance_groups.group_name')) }}
{{ Form::text('name', $insurance_group->name, ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('contact_name', __('insurance_groups.contact_name')) }}
{{ Form::text('contact_name', $insurance_group->contact_name, ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('contact_number', __('insurance_groups.contact_number')) }}
{{ Form::text('contact_number', $insurance_group->contact_number, ['class' => 'form-control compulsory','required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('group_email',__('insurance.email')) }}
{{ Form::email('group_email', $insurance_group->contact_email,['class' => 'form-control compulsory']) }}
<div class="help-block with-errors"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('country_id',__('patients.country_of_origin')) }}
{{ Form::select('country_id', $countries, $insurance_group->country_id, ['class' => 'form-control', 'data-error'=>'Select the country', 'required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('last_fees_billing_date', __('insurance.date_of_last_fees_billing')) }}
<div class="input-group">
{{ Form::text('last_fees_billing_date', is_null($insurance_group->last_fees_billing_date) ? '' : Carbon\Carbon::parse($insurance_group->last_fees_billing_date)->format('d-m-Y'), ['class' => 'form-control','readonly','id'=>'last_fees_billing_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('last_fees_payment_date', __('insurance.date_of_last_fees_payment')) }}
<div class="input-group">
{{ Form::text('last_fees_payment_date', is_null($insurance_group->last_fees_payment_date) ? '' : Carbon\Carbon::parse($insurance_group->last_fees_payment_date)->format('d-m-Y'), ['class' => 'form-control','readonly','id'=>'last_fees_payment_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
@php
$group_risks_array = is_null($insurance_group->risk_ids) ? [] : explode(",", $insurance_group->risk_ids);
@endphp
<div class="form-group">
{{ Form::label('risk_id',__('insurance.risk')) }}
{{ Form::select('risk_id[]', $chi_risks, $group_risks_array,['class' => 'form-control compulsory risk_id', 'data-error'=>'Select the risk', 'required', 'multiple']) }}
<div class="help-block with-errors"></div>
</div>
</div>
</div>
{{ Form::button(__('insurance_groups.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('insurance_groups.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/js/validator.js') }}"></script>
<script src="{{ asset('elite/js/mask.js') }}"></script>
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script type="text/javascript">
$('#last_fees_billing_date,#last_fees_payment_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
$('.risk_id').select2({
placeholder: "Select"
});
</script>
@endpush
@@ -0,0 +1,82 @@
@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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance_groups.inactive_insurance_groups') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_groups/">{{ __('insurance_groups.insurance_groups') }}</a></li>
<li class="active">{{ __('insurance_groups.activate') }}</li>
</ol>
</div>
</div>
@include('flash::message')
@include('insurance::insurance_groups.menu')
<div class="panel panel-default">
<div class="panel-body">
<p class="text-muted m-b-30">{{ __('insurance_groups.export_data_to_csv_and_excel') }}</p>
<div class="table-responsive">
<table id="table" class="table table-striped color-bordered-table success-bordered-table table-hover">
<thead>
<tr>
<th>{{ __('insurance_groups.group_name') }}</th>
<th>{{ __('insurance_groups.contact_name') }}</th>
<th>{{ __('insurance_groups.contact_number') }}</th>
<th>{{ __('insurance_groups.action') }}</th>
</tr>
</thead>
<tbody>
@foreach($insurance_groups as $insurance_group)
<tr>
<td>{{ $insurance_group->name }}</td>
<td>{{ $insurance_group->contact_name }}</td>
<td>{{ $insurance_group->contact_number }}</td>
<td>
{{ Form::model($insurance_group->id ,['method' => 'POST', 'route' => ['insurance_groups.activate', $insurance_group->id]]) }}
<button type="submit" class="btn btn-rounded btn-warning" onclick="return confirm('<?php echo __('insurance_groups.are_you_sure')?>')"><i class="fa fa-check"></i> {{ __('insurance_groups.activate') }}</button>
{{ Form::close() }}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</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>
<script>
$('#table').DataTable({
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
</script>
@endpush
@@ -0,0 +1,158 @@
@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/select2/select2.min.css') }}" rel="stylesheet" />
@endpush
@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">{{ __('insurance_groups.insurance_groups') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance/scheme_administration">{{ __('insurance.scheme_administration') }}</a></li>
<li class="active">{{ __('insurance_groups.insurance_groups') }}</li>
</ol>
</div>
</div>
@include('flash::message')
@include('insurance::insurance_groups.menu')
<div class="panel panel-default">
<div class="panel-body">
{{ Form::open(['route' => 'insurance_groups.search_by_group', 'method' => 'ANY', 'role' => 'search']) }}
<div class="row">
<div class="col-md-3">
<div class="form-group">
{{ Form::select('group_id',$insurance_groups_select,'',['class' => 'form-control', 'required']) }}
</div>
</div>
<div class="col-md-2">
<button type="submit" class="btn btn-success pull-right"><span class="glyphicon glyphicon-search"></span> View Group Details</button>
</div>
<div class="col-md-7"></div>
</div>
{{ Form::close() }}
<hr>
@if(isset($criteria))
<div class="row">
<div class="col">
<p>{{ __('insurance_members.search_criteria') }} : <code>{{ $criteria }}</code> &nbsp;&nbsp;&nbsp;<a href="{{ route('heads_of_family.index') }}">{{ __('insurance_members.clear_search') }}</a></p>
</div>
</div>
@endif
<p class="text-muted m-b-30">{{ __('insurance_groups.export_data_to_csv_and_excel') }}</p>
<div class="table-responsive">
<table id="table" class="table table-striped color-bordered-table success-bordered-table table-hover">
<thead>
<tr>
<th>{{ __('insurance_groups.group_name') }}</th>
<th>{{ __('insurance.risks') }}</th>
<th>{{ __('insurance_groups.contact_name') }}</th>
<th>{{ __('insurance_groups.contact_number') }}</th>
<th>{{ __('insurance_groups.start_date') }}</th>
<th>{{ __('insurance_groups.end_date') }}</th>
<th>{{ __('insurance.date_of_last_fees_billing') }}</th>
<th>{{ __('insurance.date_of_last_fees_payment') }}</th>
<th>{{ __('insurance_groups.insurance_status') }}</th>
<th>{{ __('insurance.email') }}</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($insurance_groups as $insurance_group)
@php
// get payment details for this group
$insurance_subscriptions_details = explode("/", check_insurance_group_status($insurance_group->id));
@endphp
<tr>
<td>{{ $insurance_group->name }}</td>
<td>
@php
$risk_ids_array = is_null($insurance_group->risk_ids) ? [] : explode(",", $insurance_group->risk_ids);
@endphp
@for ($i = 0; $i < count($risk_ids_array); $i++)
- {{ get_name($risk_ids_array[$i], "id", "name", "community_health_insurance_risks") }}
@endfor
</td>
<td>{{ $insurance_group->contact_name }}</td>
<td>{{ $insurance_group->contact_number }}</td>
<td>{{ (isset($insurance_subscriptions_details[1]) && $insurance_subscriptions_details[1] != "NA") ? streamline_date($insurance_subscriptions_details[1]) : "NA" }}</td>
<td>{{ (isset($insurance_subscriptions_details[2]) && $insurance_subscriptions_details[2] != "NA") ? streamline_date($insurance_subscriptions_details[2]) : "NA" }}</td>
<td>{{ is_null($insurance_group->last_fees_billing_date) ? '' : streamline_date($insurance_group->last_fees_billing_date) }}</td>
<td>{{ is_null($insurance_group->last_fees_payment_date) ? '' : streamline_date($insurance_group->last_fees_payment_date) }}</td>
<td>
@if($insurance_subscriptions_details[0] == 1)
<span style="color:green "><strong>{{ __('insurance_groups.active') }}</strong></span>
@else
<span style="color:red "><strong>{{ __('insurance_groups.inactive') }}</strong></span>
@endif
</td>
<td>{{ $insurance_group->group_email }}</td>
<td>
<a href="/insurance_groups/{{ $insurance_group->id }}/edit/" class="btn btn-rounded btn-warning btn-sm"><i class="fa fa-pencil"></i> {{ __('insurance_groups.edit') }}</a>
</td>
<td>
@if(!in_array($insurance_group->id, $used_groups))
{{ Form::model($insurance_group->id ,['method' => 'DELETE', 'route' => ['insurance_groups.destroy', $insurance_group->id]]) }}
<button type="submit" class="btn btn-rounded btn-danger btn-sm" onclick="return confirm('<?php echo __('insurance_groups.are_you_sure')?>')"><i class="fa fa-trash"></i> {{ __('insurance_groups.delete') }}</button>
{{ Form::close() }}
@endif
</td>
<td>
<a href="/insurance_groups/insurance_group_details/{{ $insurance_group->id }}" class="btn btn-rounded btn-info btn-sm"><i class="fa fa-info-circle"></i> {{ __('insurance_groups.details') }}</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
{{ $insurance_groups->links() }}
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
<script src="{{ asset('elite/bower_components/select2/select2.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>
$('#table').DataTable({
dom: 'Bfrtip',
bInfo: false,
bPaginate: false,
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
],
aaSorting:[],
columnDefs: [{
targets: [10,11, 12], /* column index */
orderable: false, /* true or false */
}],
});
$('#insurance_groups').select2();
</script>
@endpush
@@ -0,0 +1,99 @@
@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">{{ __('insurance_groups.insurance_group_details') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_groups/">{{ __('insurance_groups.insurance_groups') }}</a></li>
<li class="active">{{ __('insurance_groups.group_details') }}</li>
</ol>
</div>
</div>
@include('flash::message')
@include('insurance::insurance_groups.menu')
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="col-md-5">
<h4 class="text-center">{{ __('insurance_groups.group_details') }}</h4>
<table class="table table-striped table-bordered">
<tr>
<th>{{ __('insurance_groups.group_name') }}</th>
<td>{{ $group_name }}</td>
</tr>
<tr>
<th>{{ __('insurance_groups.number_of_members') }}</th>
<td>{{ $members_count }}</td>
</tr>
</table>
</div>
<div class="col-md-2"></div>
<div class="col-md-5">
<h4 class="text-center">{{ __('insurance_groups.insurance_details') }}</h4>
<table class="table table-striped table-bordered">
<tr>
<th>{{ __('insurance_groups.start_date') }}</th>
<td>{{ streamline_date($start_date) }}</td>
</tr>
<tr>
<th>{{ __('insurance_groups.end_date') }}</th>
<td>{{ streamline_date($end_date) }}</td>
</tr>
<tr>
<th>{{ __('insurance_groups.insurance_status') }}</th>
<td>{{ $insurance_status }}</td>
</tr>
</table>
</div>
</div>
<br>
<div class="row">
<div class="col-md-3"></div>
<div class="col-md-6">
<h4 class="text-center">{{ __('insurance_groups.group_members_details') }}</h4>
<table class="table table-striped table-bordered">
<thead>
<tr>
<td>#</td>
<td>{{ __('insurance_groups.patient_number') }}</td>
<td>{{ __('insurance_groups.full_names') }}</td>
<td>{{ __('insurance_groups.family_head') }}</td>
</tr>
</thead>
<tbody>
@if($members_count != 0)
@php $counter = 1 @endphp
@foreach($insurance_members as $insurance_member)
<tr>
<td>{{ $counter }}</td>
<td>{{ $insurance_member->number }}</td>
<td>{!! insurance_flag($insurance_member->id) !!}</td>
<td>{{ $insurance_member->name }}</td>
</tr>
@php $counter++ @endphp
@endforeach
@else
<td colspan='4' class="text-center">{{ __('insurance_groups.no_members_in_this_group') }}</td>
@endif
</tbody>
</table>
</div>
<div class="col-md-3"></div>
</div>
<hr>
<a href="/insurance_groups/{{ $id }}/edit/" class="btn btn-rounded btn-warning"><i class="fa fa-pencil"></i> {{ __('insurance_groups.edit') }}</a>
</div>
</div>
@endsection
@@ -0,0 +1,7 @@
<div class="panel panel-default">
<div class="panel-body">
<a href="/insurance_groups/create" class="nav-item btn btn-success" style="border-radius: 5px;"><i class="fa fa-plus"></i> <span style="margin-left: 10px">{{ __('insurance_groups.create_insurance_group') }}</span></a>
<a href="/insurance_groups/" class="nav-item btn btn-info" style="border-radius: 5px;"><i class="fa fa-eye"></i> <span style="margin-left: 10px">{{ __('insurance_groups.view_insurance_groups') }}</span></a>
<a href="/insurance_groups/inactive" class="nav-item btn btn-danger" style="border-radius: 5px;"><i class="fa fa-trash"></i> <span style="margin-left: 10px">{{ __('insurance_groups.view_inactive_groups') }}</span></a>
</div>
</div>
@@ -0,0 +1,319 @@
@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"/>
@endpush
@section('content')
<div class="row bg-title">
<div class="col-md-6">
<h4 class="page-title">{{ __('insurance_members.create_insurance_member') }}</h4>
</div>
<div class="col-md-6">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_members.dashboard') }}</a></li>
<li><a href="/insurance_members/">{{ __('insurance_members.insurance_members') }}</a></li>
<li class="active">{{ __('insurance_members.register') }}</li>
</ol>
</div>
</div>
@include('flash::message')
@include('insurance::insurance_members.menu')
<div class="row">
<div class="col-sm-6">
<div class="white-box">
<h3 class="box-title m-b-0">{{ __('insurance_members.patient_search') }}</h3>
<div class="form-group">
<select class="patient_full_name form-control" style="width:100%;" name="patient_full_name" id="patient_full_name"></select>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="white-box">
<h3 class="box-title m-b-0">{{ __('insurance_members.patient_information') }}</h3>
<div id="patient_information"></div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
{{ Form::open(['route' => 'insurance_members.create_insurance_patient', 'files' => 'required']) }}
{{ Form::hidden('patient_id', '', ['class' => 'patient_id', 'id' => 'patient_id']) }}
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('duplicate_research_id', __('insurance.research_id')) }}
{{ Form::text('duplicate_research_id', null, ['class' => 'form-control']) }}
@if (!empty($errors->get('duplicate_research_id')))
<div class="help-block with-errors alert alert-danger">
@foreach ($errors->get('duplicate_research_id') as $message)
{{ $message }}
@endforeach
</div>
@endif
</div>
<div class="form-group">
{{ Form::label('is_family_head',__('insurance_members.is_member_head_of_family')) }}
<br>
{{ Form::radio('is_family_head', 1, false, ["required",'onclick'=>'displayFamilies(1)']) }} Yes &nbsp;&nbsp;
{{ Form::radio('is_family_head', 0, false, ["required",'onclick'=>'displayFamilies(0)']) }} No
</div>
<div class="form-group family_div" style="display: none">
{{ Form::label('family_id', __('insurance_members.select_family')) }}
<select name="family_id" class="form-control compulsory family_id">
<option value="">{{ __('insurance_members.select') }}</option>
@foreach($families as $id)
<option value="{{ $id }}">{{ get_name($id, 'id', 'name', 'insurance_heads_of_family') }} ({{ get_name(get_name($id, 'id', 'group_id', 'insurance_heads_of_family'), 'id', 'name', 'insurance_groups') }})</option>
@endforeach
</select>
</div>
<div class="form-group family_risk_div" style="display: none">
<div class="form-group">
{{ Form::label('family_risk_id', __('insurance_members.family_insurance_risk')) }}
{{ Form::select('family_risk_id[]', $chi_risks, '',['class' => 'form-control compulsory risk_id', 'data-error'=>'Select the risk', 'multiple']) }}
<div class="help-block with-errors"></div>
</div>
</div>
<div class="form-group">
{{ Form::label('relationship_to_head', __('insurance_members.relationship_to_head')) }}
{{ Form::select('relationship_to_head', $relations, 1, ['class' => 'form-control compulsory']) }}
</div>
<div class="form-group">
{{ Form::label('group_id', __('insurance_members.insurance_group')) }}
{{ Form::select('group_id', $insurance_groups, null, ['class' => 'form-control compulsory', 'required', 'id' => 'group_id']) }}
</div>
<div class="form-group">
{{ Form::label('chi_plan', __('insurance.chi_plan')) }}
{{ Form::select('chi_plan', $chi_plans, null, ['class' => 'form-control compulsory', 'required', 'id' => 'chi_plan']) }}
</div>
{{-- <div class="form-group">
{{ Form::label('other_plan', __('insurance.other_plan')) }}
{{ Form::select('other_plan', $chi_plans, null, ['class' => 'form-control']) }}
</div> --}}
<div class="form-group">
{{ Form::label('risk_id',__('insurance.risk')) }}
{{ Form::select('risk_id[]', $chi_risks, '',['class' => 'form-control compulsory risk_id', 'data-error'=>'Select the risk', 'required', 'multiple']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('member_premium', __('insurance.member_premium')) }}
{{ Form::text('member_premium', null, ['class' => 'form-control compulsory', 'required']) }}
</div>
@if( Auth::user()->can('register-chi-members-with-pre-existing-premiums'))
<div class="form-group">
{{ Form::label('does_member_have_existing_premium',__('insurance_members.does_member_have_existing_premium')) }}
<br>
{{ Form::radio('does_member_have_existing_premium', 1, false, ["required",'onclick'=>'displayPremiumActiveDateDiv(1)']) }} {{ __('insurance_members.yes') }} &nbsp;&nbsp;
{{ Form::radio('does_member_have_existing_premium', 0, false, ["required",'onclick'=>'displayPremiumActiveDateDiv(0)']) }} {{ __('insurance_members.no') }}
</div>
<div class="existing_premiums_dates_div" style="display: none">
<div class="form-group">
{{ Form::label('existing_premium_start_date', __('insurance_members.existing_premium_start_date')) }}
<div class="input-group">
{{ Form::text('existing_premium_start_date','',['class' => 'form-control','readonly','id'=>'existing_premium_start_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('existing_premium_end_date', __('insurance_members.existing_premium_end_date')) }}
<div class="input-group">
{{ Form::text('existing_premium_end_date','',['class' => 'form-control','readonly','id'=>'existing_premium_end_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
</div>
@endif
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('title', __('insurance.title')) }}
{{ Form::select('title', $person_titles, null, ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('photo',__('insurance_members.photo')) }}
{{ Form::file('photo',['class' => 'form-control']) }}
</div>
<div class="form-group">
{{ Form::label('membership_start_date', __('insurance.membership_start_date')) }}
<div class="input-group">
{{ Form::text('membership_start_date','',['class' => 'form-control','readonly','id'=>'membership_start_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('membership_registration_date', __('insurance.membership_registration_date')) }}
<div class="input-group">
{{ Form::text('membership_registration_date','',['class' => 'form-control','readonly','id'=>'membership_registration_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('social_security_number', __('insurance.social_security_number')) }}
{{ Form::text('social_security_number', null, ['class' => 'form-control']) }}
</div>
<div class="form-group">
{{ Form::label('research_id', __('insurance.research_id')) }}
{{ Form::text('research_id', null, ['class' => 'form-control']) }}
@if (!empty($errors->get('research_id')))
<div class="help-block with-errors alert alert-danger">
@foreach ($errors->get('research_id') as $message)
{{ $message }}
@endforeach
</div>
@endif
</div>
<div class="form-group">
{{ Form::label('next_anniversary_date', __('insurance.next_anniversary_date_bracket_moved_with_rollover')) }}
<div class="input-group">
{{ Form::text('next_anniversary_date','',['class' => 'form-control','readonly','id'=>'next_anniversary_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
{{ Form::button(__('insurance_members.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('insurance_members.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
</div>
</div>
{{ Form::close() }}
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('js/insurance_members/create.js') }}"></script>
<script src="{{ asset('elite/js/validator.js') }}"></script>
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script type="text/javascript">
function displayFamilies(option){
if (option == 0){
document.querySelector(".family_div").style.display = "block";
document.querySelector(".family_risk_div").style.display = "none";
} else {
document.querySelector(".family_div").style.display = "none";
document.querySelector(".family_risk_div").style.display = "block";
}
}
function displayPremiumActiveDateDiv(option){
if (option == 0){
document.querySelector(".existing_premiums_dates_div").style.display = "none";
} else {
document.querySelector(".existing_premiums_dates_div").style.display = "block";
}
}
$('#membership_start_date,#membership_registration_date,#next_anniversary_date,#existing_premium_start_date,#existing_premium_end_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd/mm/yyyy',
});
$('.risk_id,.family_id, #group_id').select2({
placeholder: "Select",
width: "100%"
});
$('#chi_plan').change(function(){
let chi_plan = $(this).val();
$.ajax({
method: 'GET',
url: '/get_chi_plan_amount/' + chi_plan,
success: function(response){
$('#member_premium').val(response);
},
error: function (error) {
console.log(error);
}
});
});
$('.family_id').change(function(){
let family_id = $(this).val();
$.ajax({
method: 'GET',
url: '/get_family_group_id/' + family_id,
success: function(response){
$('#group_id').val(response).attr("selected","selected");
},
error: function (error) {
console.log(error);
}
});
});
$('.patient_full_name').change(function() {
let id = $('#patient_full_name').val();
$('#patient_id').val(id);
$.ajax({
method: 'GET',
url: "/insurance_members/update_patient_info/" + id,
success: function(response){
$('#patient_information').html(response).show();
},
error: function (error) {
console.log(error);
}
});
}).select2({
placeholder: "<?php echo "Search by patient name or 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 + ") " + item.phone,
id: item.id
}
})
};
},
cache: true
}
});
</script>
@endpush
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,102 @@
@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">{{ __('insurance_members.insurance_member_details') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_members.dashboard') }}</a></li>
<li><a href="/insurance_members/">{{ __('insurance_members.insurance_members') }}</a></li>
<li class="active">{{ __('insurance_members.member_details') }}</li>
</ol>
</div>
</div>
@include('flash::message')
@include('insurance::insurance_members.menu')
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="col-md-8">
<h3>{{ __('insurance_members.member_details_bio') }}</h3>
<table class="table table-striped table-bordered">
<tr>
<th>{{ __('insurance_members.patient_number') }}</th>
<td>{{ $patient_number }}</td>
</tr>
<tr>
<th>{{ __('insurance_members.full_names') }}</th>
<td>{!! insurance_flag($patient_id) !!}</td>
</tr>
<tr>
<th>{{ __('insurance_members.relationship_to_head_of_family') }}</th>
<td>{{ $patient_relationship }}</td>
</tr>
@if (!empty($research_id))
<tr>
<th>{{ __('insurance_members.research_id') }}</th>
<td>{{ $research_id }}</td>
</tr>
@endif
</table>
<hr>
<h3>{{ __('insurance_members.head_of_family_details') }}</h3>
<table class="table table-striped table-bordered">
<tr>
<th>{{ __('insurance_members.full_names') }}</th>
<td>{{ title_case($head_of_family) }}</td>
</tr>
</table>
<hr>
<h3>{{ __('insurance_members.group_details') }}</h3>
<table class="table table-striped table-bordered">
<tr>
<th>{{ __('insurance_members.group_name') }}</th>
<td>{{ $group_name }}</td>
</tr>
<tr>
<th>{{ __('insurance_members.start_of_insurance') }}</th>
<td>{{ streamline_date($start_date) }}</td>
</tr>
<tr>
<th>{{ __('insurance_members.end_of_insurance') }}</th>
<td>{{ streamline_date($end_date) }}</td>
</tr>
<tr>
<th>{{ __('insurance_members.insurance_status') }}</th>
<td>
@if (date('Y-m-d') < $end_date)
<font color="green" ><strong>{{ __('insurance_members.active') }}</strong></font>
@else
<font color="red"><strong>{{ __('insurance_members.inactive') }}</strong></font>
@endif
</td>
</tr>
</table>
</div>
<div class="col-md-4">
<div>
<h4>{{ __('insurance_members.member_picture') }}</h4>
<img style='height: 140px; width: 250px;' src="{{ asset($member_photo) }}">
</div>
<hr>
<div>
<h4>{{ __('insurance_members.head_of_family_picture') }}</h4>
<img style='height: 140px; width: 250px;' src="{{ asset($head_photo) }}">
</div>
</div>
</div>
</div>
</div>
@endsection
@@ -0,0 +1,235 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
<link href="{{ asset('elite/bower_components/icheck/skins/all.css') }}" rel="stylesheet">
<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-md-6">
<h4 class="page-title">{{ __('insurance_members.edit_insurance_details_for') }} ({!! insurance_flag($insurance_member->patient_id) !!})</h4>
</div>
<div class="col-md-6">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_members.dashboard') }}</a></li>
<li><a href="/insurance/scheme_administration">{{ __('insurance.scheme_administration') }}</a></li>
<li><a href="/insurance_members/">{{ __('insurance_members.insurance_members') }}</a></li>
<li class="active">{{ __('insurance_members.edit') }}</li>
</ol>
</div>
</div>
@include('flash::message')
@include('insurance::insurance_members.menu')
{{ Form::model($insurance_member, ['method' => 'PUT', 'route' => ['insurance_members.update',$insurance_member], 'files' => 'required']) }}
<div class="white-box">
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('duplicate_research_id', __('insurance.research_id')) }}
{{ Form::text('duplicate_research_id', $insurance_member->research_id, ['class' => 'form-control']) }}
@if (!empty($errors->get('duplicate_research_id')))
<div class="help-block with-errors alert alert-danger">
@foreach ($errors->get('duplicate_research_id') as $message)
{{ $message }}
@endforeach
</div>
@endif
</div>
<div class="form-group">
{{ Form::label('is_family_head',__('insurance_members.is_member_head_of_family')) }}
<br>
{{ Form::radio('is_family_head', 1, $insurance_member->is_family_head == 1, ["required",'onclick'=>'displayFamilies(1)']) }} Yes &nbsp;&nbsp;
{{ Form::radio('is_family_head', 0, $insurance_member->is_family_head == 0, ["required",'onclick'=>'displayFamilies(0)']) }} No
</div>
<div class="form-group family_div" @if($insurance_member->is_family_head == 1) style="display: none" @endif>
{{ Form::label('family_id', __('insurance_members.select_family')) }}
{{ Form::select('family_id', $families, $insurance_member->family_id, ['class' => 'form-control compulsory family_id']) }}
</div>
<div class="form-group">
{{ Form::label('relationship_to_head', __('insurance_members.relationship_to_head')) }}
{{ Form::select('relationship_to_head', $relations, $insurance_member->relationship_to_head, ['class' => 'form-control compulsory']) }}
</div>
<div class="form-group">
{{ Form::label('group_id', __('insurance_members.insurance_group')) }}
{{ Form::select('group_id', $insurance_groups, $insurance_member->group_id, ['class' => 'form-control compulsory', 'required', 'id' => 'group_id']) }}
</div>
<div class="form-group">
{{ Form::label('chi_plan', __('insurance.chi_plan')) }}
{{ Form::select('chi_plan', $chi_plans, $insurance_member->chi_plan, ['class' => 'form-control compulsory', 'required', 'id' => 'chi_plan']) }}
</div>
{{-- <div class="form-group">
{{ Form::label('other_plan', __('insurance.other_plan')) }}
{{ Form::select('other_plan', $chi_plans, $insurance_member->other_plan, ['class' => 'form-control']) }}
</div> --}}
<div class="form-group">
{{ Form::label('risk_id',__('insurance.risk')) }}
@php
$risk_ids_array = is_null($insurance_member->risk_ids) ? [] : explode(",", $insurance_member->risk_ids);
@endphp
{{ Form::select('risk_id[]', $chi_risks, $risk_ids_array,['class' => 'form-control compulsory risk_id', 'data-error'=>'Select the risk', 'required', 'multiple']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('member_premium', __('insurance.member_premium')) }}
{{ Form::text('member_premium', $insurance_member->premium, ['class' => 'form-control compulsory', 'required']) }}
</div>
@if( Auth::user()->can('register-chi-members-with-pre-existing-premiums'))
<div class="form-group">
{{ Form::label('does_member_have_existing_premium',__('insurance_members.does_member_have_existing_premium')) }}
<br>
{{ Form::radio('does_member_have_existing_premium', 1, false, ["required",'onclick'=>'displayPremiumActiveDateDiv(1)']) }} {{ __('insurance_members.yes') }} &nbsp;&nbsp;
{{ Form::radio('does_member_have_existing_premium', 0, true, ["required",'onclick'=>'displayPremiumActiveDateDiv(0)']) }} {{ __('insurance_members.no') }}
</div>
<div class="existing_premiums_dates_div" style="display: none">
<div class="form-group">
{{ Form::label('existing_premium_start_date', __('insurance_members.existing_premium_start_date')) }}
<div class="input-group">
{{ Form::text('existing_premium_start_date',$insurance_member->existing_premium_start_date,['class' => 'form-control','readonly','id'=>'existing_premium_start_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('existing_premium_end_date', __('insurance_members.existing_premium_end_date')) }}
<div class="input-group">
{{ Form::text('existing_premium_end_date', $insurance_member->existing_premium_end_date,['class' => 'form-control','readonly','id'=>'existing_premium_end_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
</div>
@endif
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('title', __('insurance.title')) }}
{{ Form::select('title', $person_titles, $insurance_member->title, ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('photo',__('insurance_members.photo')) }}
{{ Form::file('photo',['class' => 'form-control']) }}
</div>
<div class="form-group">
{{ Form::label('membership_start_date', __('insurance.membership_start_date')) }}
<div class="input-group">
{{ Form::text('membership_start_date',$insurance_member->membership_start_date,['class' => 'form-control','readonly','id'=>'membership_start_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('membership_registration_date', __('insurance.membership_registration_date')) }}
<div class="input-group">
{{ Form::text('membership_registration_date',$insurance_member->membership_registration_date,['class' => 'form-control','readonly','id'=>'membership_registration_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('social_security_number', __('insurance.social_security_number')) }}
{{ Form::text('social_security_number', $insurance_member->social_security_number, ['class' => 'form-control']) }}
</div>
<div class="form-group">
{{ Form::label('research_id', __('insurance.research_id')) }}
{{ Form::text('research_id', $insurance_member->research_id, ['class' => 'form-control']) }}
@if (!empty($errors->get('research_id')))
<div class="help-block with-errors alert alert-danger">
@foreach ($errors->get('research_id') as $message)
{{ $message }}
@endforeach
</div>
@endif
</div>
<div class="form-group">
{{ Form::label('next_anniversary_date', __('insurance.next_anniversary_date_bracket_moved_with_rollover')) }}
<div class="input-group">
{{ Form::text('next_anniversary_date', $insurance_member->next_anniversary_date,['class' => 'form-control','readonly','id'=>'next_anniversary_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
</div>
</div>
{{ Form::button(__('insurance_members.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('insurance_members.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
</div>
{{ Form::close() }}
@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>
$(document).ready(function() {
$('#membership_start_date,#membership_registration_date,#next_anniversary_date,#existing_premium_start_date,#existing_premium_end_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'yyyy-mm-dd',
});
$('.family_id').change(function(){
let family_id = $(this).val();
$.ajax({
method: 'GET',
url: '/get_family_group_id/' + family_id,
success: function(response){
$('#group_id').val(response).attr("selected","selected");
},
error: function (error) {
console.log(error);
}
});
});
$('.risk_id,.family_id').select2({
placeholder: "Select",
width: "100%"
});
});
function displayPremiumActiveDateDiv(option){
if (option == 0){
document.querySelector(".existing_premiums_dates_div").style.display = "none";
} else {
document.querySelector(".existing_premiums_dates_div").style.display = "block";
}
}
function displayFamilies(option){
if (option == 0) {
$('.family_div').show();
} else {
$('.family_div').hide();
}
}
</script>
@endpush
@@ -0,0 +1,164 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
<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/select2/select2.min.css') }}" rel="stylesheet" />
@endpush
@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">{{ __('insurance_members.inactive_insurance_members') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_members.dashboard') }}</a></li>
<li><a href="/insurance_members/">{{ __('insurance_members.insurance_members') }}</a></li>
<li class="active">{{ __('insurance_members.activate') }}</li>
</ol>
</div>
</div>
@include('flash::message')
@include('insurance::insurance_members.menu')
<div class="panel panel-default">
<div class="panel-body">
{{ Form::open(['route' => 'insurance_members.search_inactive', 'method' => 'ANY', 'role' => 'search']) }}
<div class="row">
<div class="col-md-4">
<div class="form-group">
<div class="form-group" id="full_names">
{{ Form::text('full_name', '', ['class' => 'form-control typeahead', 'placeholder' => 'Patient Name', 'autocomplete' => 'off', 'spellcheck' => false]) }}
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
{{ Form::select('group_id',$insurance_groups_select,'',['class' => 'form-control', 'id' => 'insurance_groups']) }}
</div>
</div>
<div class="col-md-4"></div>
</div>
<div class="row">
<div class="col-md-9">
@if(isset($criteria))
<p>{{ __('insurance_members.search_criteria') }} : <code>{{ $criteria }}</code> &nbsp;&nbsp;&nbsp;<a href="{{ route('insurance_members.inactive') }}">{{ __('insurance_members.clear_search') }}</a></p>
@endif
</div>
<div class="col-md-3">
<button type="submit" class="btn btn-success pull-right"><span class="glyphicon glyphicon-search"></span> {{ __('insurance_members.search') }}</button>
</div>
</div>
{{ Form::close() }}
<hr>
<p class="text-muted m-b-30">{{ __('insurance_members.export_data_to_csv_and_excel') }}</p>
<div class="table-responsive">
<table id="table" class="table table-striped color-bordered-table success-bordered-table table-hover">
<thead>
<tr>
<th>{{ __('insurance_members.patient_number') }}</th>
<th>{{ __('insurance_members.name') }}</th>
<th>{{ __('insurance_members.group_name') }}</th>
<th>{{ __('insurance_members.family') }}</th>
<th>{{ __('insurance_members.relationship_to_head') }}</th>
<th>{{ __('insurance_members.patient_category') }}</th>
<th>{{ __('insurance_members.action') }}</th>
</tr>
</thead>
<tbody>
@foreach($insurance_members as $insurance_member)
<tr>
<td>{{ $insurance_member->number }}</td>
<td>{!! insurance_flag($insurance_member->patient_id) !!}</td>
<td>{{ isset($insurance_groups[$insurance_member->group_id]) ? $insurance_groups[$insurance_member->group_id] : 'N/A' }}</td>
<td>{{ isset($insurance_family[$insurance_member->family_id]) ? $insurance_family[$insurance_member->family_id] : 'N/A' }}</td>
<td>{{ isset($relations[$insurance_member->relationship_to_head]) ? $relations[$insurance_member->relationship_to_head] : 'N/A' }}</td>
<td>{{ isset($patient_categories[$insurance_member->category_id]) ? $patient_categories[$insurance_member->category_id] : 'N/A' }}</td>
<td>
{{ Form::model($insurance_member->id ,['method' => 'POST', 'route' => ['insurance_members.activate', $insurance_member->id]]) }}
<button type="submit" class="btn btn-warning btn-rounded" onclick="return confirm('<?php echo __("insurance_members.are_you_sure")?>')"><i class="fa fa-check"></i> {{ __('insurance_members.activate') }}</button>
{{ Form::close() }}
</td>
</tr>
@endforeach
</tbody>
</table>
{{ $insurance_members->links() }}
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/typeahead.js-master/dist/typeahead.bundle.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 src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script>
$('#table').DataTable({
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
$('#insurance_groups').select2({
placeholder: "-- select group --"
});
var substringMatcher = function (strs) {
return function findMatches(q, cb) {
var matches, substringRegex;
// an array that will be populated with substring matches
matches = [];
// regex used to determine if a string contains the substring `q`
substrRegex = new RegExp(q, 'i');
// iterate through the pool of strings and for any string that
// contains the substring `q`, add it to the `matches` array
$.each(strs, function (i, str) {
if (substrRegex.test(str)) {
matches.push(str);
}
});
cb(matches);
};
};
$('#full_names .typeahead').typeahead(
{
hint: true,
highlight: true,
minLength: 1
},
{
name: 'full_names',
source: substringMatcher(<?php echo json_encode($full_names); ?>)
}
);
</script>
@endpush
@@ -0,0 +1,237 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
<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/select2/select2.min.css') }}" rel="stylesheet" />
@endpush
@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">{{ __('insurance_members.insurance_members') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_members.dashboard') }}</a></li>
<li><a href="/insurance/scheme_administration">{{ __('insurance.scheme_administration') }}</a></li>
<li><a href="/insurance_members/">{{ __('insurance_members.insurance_members') }}</a></li>
</ol>
</div>
</div>
@include('flash::message')
@include('insurance::insurance_members.menu')
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="col-md-4">
<table class="table table-striped table-bordered">
<tr>
<th><b>{{ __('insurance_members.currently_registered_members') }}</b></th>
<td>{{ $total_registered }}</td>
</tr>
<tr>
<th><b>{{ __('insurance_members.members_with_active_insurance') }}</b></th>
<td>{{ $total_active_insurance }}</td>
</tr>
<tr>
<th><b>{{ __('insurance_members.members_with_expired_insurance') }}</b></th>
<td>{{ $total_inactive_insurance }}</td>
</tr>
</table>
</div>
<div class="col-md-8">
{{ Form::open(['route' => 'insurance_members.search', 'method' => 'ANY', 'role' => 'search']) }}
<div class="row">
<div class="col-md-4">
<div class="form-group" id="full_names">
{{ Form::text('full_name', '', ['class' => 'form-control typeahead', 'placeholder' => 'Patient Name', 'autocomplete' => 'off', 'spellcheck' => false]) }}
</div>
</div>
<div class="col-md-4">
<div class="form-group">
{{ Form::select('group_id',$insurance_groups_select,'',['class' => 'form-control', 'id' => 'insurance_groups']) }}
</div>
</div>
<div class="col-md-4">
<div class="form-group">
{{ Form::select('member_type',[0 => 'All Members', 1 => __('insurance_members.members_with_active_insurance'), 2 => __('insurance_members.members_with_expired_insurance')],0,['class' => 'form-control']) }}
</div>
</div>
</div>
<div class="row">
<div class="col-md-9">
@if(isset($criteria))
<p>{{ __('insurance_members.search_criteria') }} : <code>{{ $criteria }}</code> &nbsp;&nbsp;&nbsp;<a href="{{ route('insurance_members.index') }}">{{ __('insurance_members.clear_search') }}</a></p>
@endif
</div>
<div class="col-md-3">
<button type="submit" class="btn btn-success pull-right"><span class="glyphicon glyphicon-search"></span> {{ __('insurance_members.search') }}</button>
</div>
</div>
{{ Form::close() }}
</div>
</div>
<hr>
<div class="table-responsive">
<table id="table" class="table table-striped color-bordered-table success-bordered-table table-hover">
<thead>
<tr>
<th>{{ __('insurance_members.patient_number') }}</th>
<th>{{ __('insurance_members.name') }}</th>
<th>{{ __('insurance.premium') }}</th>
<th>{{ __('insurance.plan') }}</th>
<th>{{ __('insurance_members.group_name') }}</th>
<th>{{ __('insurance_members.family') }}</th>
<th>{{ __('insurance_members.relationship_to_head') }}</th>
<th>{{ __('insurance_members.patient_category') }}</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($insurance_members as $insurance_member)
<tr>
<td>{{ $insurance_member->number }}</td>
<td>{!! insurance_flag($insurance_member->patient_id) !!}</td>
<td>{{ ugandan_shillings($insurance_member->premium) }}</td>
<td>{{ $plans[$insurance_member->chi_plan] ?? 'N/A' }}</td>
<td>{{ $insurance_groups[$insurance_member->group_id] ?? 'N/A' }}</td>
<td>{{ $insurance_family[$insurance_member->family_id] ?? 'N/A' }}</td>
<td>{{ $relations[$insurance_member->relationship_to_head] ?? 'N/A' }}</td>
<td>{{ $patient_categories[$insurance_member->category_id] ?? 'N/A' }}</td>
<td>
<a href="/insurance_members/{{ $insurance_member->id }}/edit/" class="btn btn-rounded btn-info btn-sm"><i class="fa fa-pencil"></i> {{ __('insurance_members.edit') }}</a>
</td>
<td>
{{ Form::model($insurance_member->id ,['method' => 'DELETE', 'route' => ['insurance_members.destroy', $insurance_member->id]]) }}
<button type="submit" class="btn btn-rounded btn-danger btn-sm" onclick="return confirm('<?php echo __("insurance_members.are_you_sure")?>')"><i class="fa fa-trash"></i> {{ __('insurance_members.delete') }}</button>
{{ Form::close() }}
</td>
<td>
<a href="/insurance_members/details/{{ $insurance_member->id }}" class="btn btn-rounded btn-info btn-sm">{{ __('insurance_members.details') }}</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/typeahead.js-master/dist/typeahead.bundle.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 src="{{ asset('elite/tables/js/buttons.colVis.min.js') }}"></script>
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script type="text/javascript">
$('#insurance_groups').select2({
placeholder: "-- select group --"
});
var substringMatcher = function (strs) {
return function findMatches(q, cb) {
var matches, substringRegex;
// an array that will be populated with substring matches
matches = [];
// regex used to determine if a string contains the substring `q`
substrRegex = new RegExp(q, 'i');
// iterate through the pool of strings and for any string that
// contains the substring `q`, add it to the `matches` array
$.each(strs, function (i, str) {
if (substrRegex.test(str)) {
matches.push(str);
}
});
cb(matches);
};
};
$('#full_names .typeahead').typeahead(
{
hint: true,
highlight: true,
minLength: 1
},
{
name: 'full_names',
source: substringMatcher(<?php echo json_encode($full_names); ?>)
}
);
$('.sorting').removeClass('sorting');//remove the sorting class
$('.sorting_asc').removeClass('sorting_asc');//remove the sorting class
$('#table').DataTable({
dom: 'Bfrtip',
pageLength:20,
buttons: [
'copy',
{extend: 'csv',
message: 'LIST OF INSURANCE MEMBERS'
},
{extend: 'excel',
message: 'LIST OF DRUGS',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5]
},
sheetName: 'LIST OF INSURANCE MEMBERS'
},
{extend: 'pdf',
message: 'LIST OF INSURANCE MEMBERS',
orientation: 'portrait',
pageSize: 'LETTER',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5]
},
customize: function (doc) {
doc.defaultStyle.fontSize = 10;
}
},
{extend: 'print',
message: 'LIST OF INSURANCE MEMBERS',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5]
},
customize: function (win) {
$(win.document.body)
.css('font-size', '10pt')
.css('background', '#fff')
.prepend(
'<img src="<?php echo asset('uploads/logo/logo-sm.png'); ?>" style="position:absolute; top:0; right:0;" />'
);
$(win.document.body).find('table')
.addClass('compact')
.css('font-size', 'inherit');
}
}
]
});
</script>
@endpush
@@ -0,0 +1,166 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
@endpush
@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">{{ __('insurance_members.insurance_members') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_members.dashboard') }}</a></li>
<li><a href="/insurance/scheme_administration">{{ __('insurance.scheme_administration') }}</a></li>
<li><a href="/insurance_members/">{{ __('insurance_members.insurance_members') }}</a></li>
</ol>
</div>
</div>
@include('flash::message')
@include('insurance::insurance_members.menu')
<div class="panel panel-default">
<div class="panel-body">
{{ Form::open(['route' => 'insurance_members.search', 'method' => 'ANY', 'role' => 'search']) }}
{{ Form::hidden('patient_id', 0, ['id' => 'patient_id']) }}
{{ Form::hidden('is_from_card_print', 1) }}
<div class="row">
<div class="col-md-4">
<div class="form-group">
<select class="patient_full_name form-control" style="width:100%;" name="patient_full_name" id="patient_full_name"></select>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
{{ Form::select('group_id',$insurance_groups_select,'',['class' => 'form-control', 'id' => 'insurance_groups']) }}
</div>
</div>
<div class="col-md-4">
<div class="form-group">
{{ Form::select('insurance_family', $insurance_family_select, '', ['class' => 'form-control', 'id' => 'insurance_family']) }}
</div>
</div>
</div>
<div class="row">
<div class="col-md-9">
@if(isset($criteria))
<p>{{ __('insurance_members.search_criteria') }} : <code>{{ $criteria }}</code> &nbsp;&nbsp;&nbsp;<a href="{{ route('insurance_card_print_index') }}">{{ __('insurance_members.clear_search') }}</a></p>
@endif
</div>
<div class="col-md-3">
<button type="submit" class="btn btn-success pull-right"><span class="glyphicon glyphicon-search"></span> {{ __('insurance_members.search') }}</button>
</div>
</div>
{{ Form::close() }}
<hr>
{{ Form::open(['method' => 'POST', 'route' => 'print_insurance_cards', 'target' => "_blank", 'id' =>'print_form']) }}
<div class="table-responsive">
<table id="table" class="table table-striped color-bordered-table success-bordered-table table-hover">
<thead>
<tr>
<th>#</th>
<th>{{ __('insurance_members.patient_number') }}</th>
<th>{{ __('insurance_members.name') }}</th>
<th>{{ __('insurance.premium') }}</th>
<th>{{ __('insurance_members.group_name') }}</th>
<th>{{ __('insurance_members.family') }}</th>
<th>{{ __('insurance_members.relationship_to_head') }}</th>
<th>{{ __('insurance_members.patient_category') }}</th>
<th>{{ __('insurance.plan') }}</th>
</tr>
</thead>
<tbody>
@foreach($insurance_members as $insurance_member)
<tr>
<td><input type="checkbox" name="checked_members[]" value="{{ $insurance_member->id }}" /></td>
<td>{{ $insurance_member->number }}</td>
<td>{!! insurance_flag($insurance_member->patient_id) !!}</td>
<td>{{ ugandan_shillings($insurance_member->premium) }}</td>
<td>{{ $insurance_groups[$insurance_member->group_id] ?? 'N/A' }}</td>
<td>{{ $insurance_family[$insurance_member->family_id] ?? 'N/A' }}</td>
<td>{{ $relations[$insurance_member->relationship_to_head] ?? 'N/A' }}</td>
<td>{{ $patient_categories[$insurance_member->category_id] ?? 'N/A' }}</td>
<td>{{ $plans[$insurance_member->chi_plan] ?? 'N/A' }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
{{ Form::submit('Print Selected Cards', ['class' => 'btn btn-rounded btn-success', 'id' => 'print_cards']) }}
{{ Form::close() }}
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/typeahead.js-master/dist/typeahead.bundle.min.js') }}"></script>
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script type="text/javascript">
$('#print_cards').hide();
$('#insurance_groups').select2({
placeholder: "-- Select Group --"
});
$('#insurance_family').select2({
placeholder: "-- Select Family --"
});
$('.patient_full_name').change(function() {
let id = $('#patient_full_name').val();
$('#patient_id').val(id);
}).select2({
placeholder: "<?php echo 'Search by patient name or number' ?>",
ajax: {
url: '/search_insured_patient_by_name_or_number',
dataType: 'json',
delay: 250,
processResults: function (data) {
return {
results: $.map(data, function (item) {
return {
text: item.first_name + " " + item.last_name + " ("+ item.number + ") " + item.phone,
id: item.id
}
})
};
},
cache: true
}
});
$("input[type=checkbox]").on("click", function () {
var count = $("input[type=checkbox]:checked").length;
if (count < 5) { // we only want to allow 10 to be checked here.
$("input[type=checkbox]").removeAttr("disabled");
} else {
$("input[type=checkbox]").prop("disabled","disabled");
// disable all checkboxes
$("input[type=checkbox]:checked").removeAttr("disabled");
}
if(count > 0) {
$('#print_cards').show();
} else {
$('#print_cards').hide();
}
});
</script>
@endpush
@@ -0,0 +1,150 @@
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('public/uploads/streamline/color/streamline_icon-02.png') }}">
<title>{{ config('app.name', 'CHI Membership Card - Stre@mline') }}</title>
<!-- Bootstrap Core CSS -->
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
<style>
th{
font-weight: bolder;
position: absolute;
/* color: #fff; */
}
td{
padding-top: 5px;
/* color: #fff; */
white-space: nowrap;
}
.front_card{
/* background: url("{{ asset('uploads/insurance_members/card-background.png') }}") no-repeat center; */
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
height: 280px;
width: 450px;
border-radius: 3.5%;
border-color: #0A0A0A;
border: solid;
line-height: 1.7 !important;
}
.back_card{
/* background-color: rgb(43, 116, 91); */
padding: 10px;
height: 280px;
width: 450px;
border-radius: 3.5%;
border-color: #0A0A0A;
border: solid;
line-height: 1.2 !important;
}
.logo {
height: 75px;
width: 100px;
}
table
{
table-layout:fixed;
width:95%;
height: 95%;
max-height: inherit;
position:relative;
overflow-y:auto;
}
</style>
</head>
<body style="padding: 80px">
<div class="front_card">
<div class="row">
<div class="col-4" style="margin-top: -15px;margin-left: 20px">
<img class='logo' src="{{ asset("uploads/logo/logo-sm.png") }}" style='object-fit: contain; float:left;' alt="Stre@mine Logo">
</div>
<div class="col-7 text-right" style="font-size: 12px; line-height: 1.1 !important;">
<b style="font-size: 20px !important">HEALTH CARE</b><br>ACCESS CARD
</div>
</div>
<div class="row" style="padding: 0px 20px 10px;">
<div class="col-12">
<table>
<tr>
<td colspan="3"><b>NAME: </b>{{ strtoupper(get_full_name($insurance_member->patient_id, "id", "first_name", "last_name", "patients")) }} </td>
</tr>
<tr>
<td colspan="3"><b>STRE@MLINE NUMBER: </b>{{ $insurance_member->number }}</td>
</tr>
<tr>
<td><b>D.O.B: </b> {{ date('d/m/Y', strtotime($insurance_member->date_of_birth)) }}</td>
<td>&nbsp; &nbsp;<b>GENDER: </b> {{ ($insurance_member->gender == 1) ? "M" : "F" }}</td>
<td><b>NIN:</b>{{ $insurance_member->national_id }}</td>
</tr>
<tr>
<td colspan="3"><b>SIGNATURE:</b> </td>
</tr>
</table>
</div>
</div>
<div class="row float-right">
<div class="col-6"></div>
<div class="col-5">
<img class='logo' src="{{ asset("uploads/logo/logo-sm.png") }}" style='object-fit: contain; float:right; bottom: 0px;' alt="Stre@mine Logo">
</div>
</div>
</div>
<br><br><br>
<div class="back_card">
<table align="center">
<tr>
<td colspan="2" style="white-space: unset;"><b>GROUP NAME: </b>
{{-- I excel in all things, at all times, with all people, under every circumstance. He that is in me is greater than he who is in the world. --}}
{{ get_name($insurance_member->group_id, "id", "name", "insurance_groups") }}
</td>
{{-- <td style="white-space: unset; ">{{ get_name($insurance_member->group_id, "id", "name", "insurance_groups") }}</td> --}}
</tr>
<tr>
<td colspan="2"><b>HOST HEALTH FACILITY:</b> {{ $hospitalInfo->name }}</td>
</tr>
<tr>
<td colspan="2">
<b>DISTRICT: </b>{{ ucwords(get_name($insurance_member->district_id, "id", "name", "districts")) }}
&nbsp;
<b>VILLAGE: </b>{{ ucwords(get_name($insurance_member->village_id, "id", "name", "villages")) }}
</td>
</tr>
<tr>
<td colspan="2" style="padding: 15px">
{{ getDNS1DBarcodePNGOtherOption(sprintf("%04u", $insurance_member->patient_id)) }}
</td>
</tr>
<tr>
<td colspan="2" style="white-space: unset;"><p class="text-center">This card should only be used for identification at a Stre@mline network hospital.</p></td>
</tr>
<tr>
<td colspan="2">
<img class='logo' src="{{ asset("uploads/logo/logo-sm.png") }}" style='object-fit: contain; float:right; bottom: 0px;' alt="Stre@mine Logo">
</td>
</tr>
</table>
</div>
</body>
</html>
@@ -0,0 +1,8 @@
<div class="panel panel-default">
<div class="panel-body">
<a href="/insurance_members/create" class="nav-item btn btn-success ti-plus"> {{ __('insurance_members.create_insurance_member') }}</a>
<a href="/insurance_members/add_existing_patient_to_insurance" class="nav-item btn btn-success ti-plus"> {{ __('insurance_members.add_exisitng_patient') }}</a>
<a href="/insurance_members/" class="nav-item btn btn-primary ti-eye"> {{ __('insurance_members.view_active_members') }}</a>
<a href="/insurance_members/inactive" class="nav-item btn btn-danger ti-eye"> {{ __('insurance_members.view_inactive_members') }}</a>
</div>
</div>
@@ -0,0 +1,130 @@
@extends('layouts.main')
@push('styles')
<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-lg-4 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance.members_with_pre_existing_premiums') }}</h4>
</div>
<div class="col-lg-8 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_reports.dashboard') }}</a></li>
<li class="active">{{ __('insurance.members_with_pre_existing_premiums') }}</li>
</ol>
</div>
</div>
@include('flash::message')
@include('errors.list')
<div class="row">
<div class="panel panel-default col-md-3">
<div class="panel-body">
{{ Form::open(['route' => 'insurance_members.pre_existing_premiums_report']) }}
<div class="form-group">
{{ Form::label('start_date', __('insurance_reports.start_date')) }}
<div class="input-group">
{{ Form::text('start_date', '', ['class'=>'form-control', 'readonly', 'id'=>'start_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
<div class="form-group">
{{ Form::label('end_date', __('insurance_reports.end_date')) }}
<div class="input-group">
{{ Form::text('end_date', '', ['class'=>'form-control', 'readonly', 'id'=>'end_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
<div class="form-group">
{{ Form::submit(__('insurance_reports.submit'), ['class'=>'btn btn-success pull-right']) }}
</div>
{{ Form::close() }}
</div>
</div>
<div class="col-md-9">
<div class="panel panel-default">
<div class="panel-body">
<h4><label class="label label-info">{{ $search_text }}</label></h4>
<h4>Report of members with cover cover whose premiums was not received through Stre@mline</h4>
<br><br>
<div class="table-responsive">
<table id="table" class="table table-striped table-bordered">
<thead>
<tr>
<th>#</th>
<th>{{ __('insurance_members.name') }}</th>
<th>{{ __('insurance_members.premium_amount') }}</th>
<th>{{ __('insurance_reports.start_date') }}</th>
<th>{{ __('insurance_reports.end_date') }}</th>
<th>{{ __('insurance_members.created_at') }}</th>
<th>{{ __('insurance_members.created_by') }}</th>
</tr>
</thead>
<tbody>
@php $counter = 1 @endphp
@foreach($pre_insurance_members as $member)
<tr>
<td>{{ $counter }}</td>
<td>{{ get_full_name($member->patient_id,"id", "first_name", "last_name", "patients") }} ({{get_name($member->patient_id,"id", "number", "patients")}})</td>
<td>{{ ugandan_shillings($member->premium) }}</td>
<td>{{ streamline_date($member->existing_premium_start_date) }}</td>
<td>{{ streamline_date($member->existing_premium_end_date) }}</td>
<td>{{ streamline_date($member->created_at) }}</td>
<td>{{ get_full_name($member->created_by, "id", "first_name", "last_name", "users") }}</td>
</tr>
@php $counter++ @endphp
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
<!-- Date Picker Plugin JavaScript -->
<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 src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
<script type="text/javascript">
$('#table').DataTable({
dom: 'Bfrtip',
pageLength: 100,
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
$('#end_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd/mm/yyyy'
});
$('#start_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd/mm/yyyy'
});
</script>
@endpush
@@ -0,0 +1,163 @@
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('public/uploads/streamline/color/streamline_icon-02.png') }}">
<title>{{ config('app.name', 'CHI Membership Card - Stre@mline') }}</title>
<!-- Bootstrap Core CSS -->
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
<style>
body {
padding-top: 0px;
padding-right: 10px;
padding-bottom: 0px;
padding-left: 10px;
}
.card {
padding: 10px;
height: 66.447mm;
width: 105.348mm;
border-radius: 3.5%;
border-color: #0A0A0A;
border: solid;
line-height: 1.0 !important;
font-size: 14px;
margin-left: 14px;
}
.container {
display: flex;
justify-content: center;
align-items: center;
}
.bar-code img {
object-fit: contain;
}
</style>
</head>
<body>
@php $count = 1; @endphp
@foreach ($insurance_members as $insurance_member)
<div class="row">
<div class="col-6">
<div class="container">
<div class="card">
<div class="row">
<div class="col-4" style="margin-top: -12px;margin-left: 10px">
<img style="margin-top: 10px; height: 50px; width: 100px;"
src="{{ asset('uploads/logo/logo-sm.png') }}" alt="Stre@mine Logo">
</div>
<div class="col-7 text-right" style="font-size: 12px;line-height: 1.1 !important;">
<b style="font-size: 25px !important">HEALTH CARE</b><br>ACCESS CARD
</div>
</div>
<hr style="margin-top:3px; border-color:black;">
<table class="col table-sm">
<tr>
<td colspan="2"><b>NAME: </b>{{ strtoupper(get_full_name($insurance_member->patient_id, "id", "first_name", "last_name", "patients")) }} </td>
</tr>
<tr>
<td colspan="2"><b>STRE@MLINE NUMBER: </b>{{ $insurance_member->number }}</td>
</tr>
<tr>
<td><b>D.O.B: </b> {{ date('d-M-Y', strtotime($insurance_member->date_of_birth)) }}</td>
<td>&nbsp; &nbsp;<b>GENDER: </b> {{ ($insurance_member->gender == 1) ? "M" : "F" }}</td>
</tr>
<tr>
<td colspan="2"><b>NIN:</b> {{ $insurance_member->national_id }}</td>
</tr>
<tr>
@if (str_contains($insurance_member->category_name, 'CO-PAYMENT'))
@php
$words = explode(' ', $insurance_member->category_name);
$last = array_slice($words,4);
@endphp
@if ($words[2] == '0')
<td colspan="2"><b>OUTPATIENT CO-PAYMENT: {{ $words[2].' '.$words[3] }}</b> <br>{{ implode(' ', $last) }}, 5000 UGX after 10 visits.</td>
@else
<td colspan="2"><b>OUTPATIENT CO-PAYMENT: {{ $words[2].' '.$words[3] }}</b> <br>{{ implode(' ', $last) }}</td>
@endif
@else
<td colspan="2"><b>Category:</b> {{ $insurance_member->category_name }}</td>
@endif
</tr>
<tr>
<td colspan="2">
<img src="{{ asset($hospitalInfo->logo) }}" style='float:right; margin-bottom: 20px; max-height: 25px; max-width: 80px;'>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="col-6">
<div class="container">
<div class="card" style="font-size: 13px;">
<table class="col-md-12">
<tr>
<td><b>GROUP NAME: </b>
{{ get_name($insurance_member->group_id, "id", "name", "insurance_groups") }}
</td>
</tr>
<tr>
<td style="padding-top: 8px;"><b>HOST HEALTH FACILITY:</b> {{ $hospitalInfo->name }}</td>
</tr>
<tr>
<td style="padding-top: 8px;">
<b>DISTRICT: </b>{{ ucwords(get_name($insurance_member->district_id, "id", "name",
"districts")) }}
&nbsp;
<b>VILLAGE: </b>{{ ucwords(get_name($insurance_member->village_id, "id", "name",
"villages")) }}
</td>
</tr>
<tr>
<td class="text-center" style="padding-top: 15px;">
<div class="bar-code">
{{ insuranceCardBarcode(sprintf("%04u", $insurance_member->patient_id)) }}
</div>
</td>
</tr>
<tr>
<td style="padding-top: 15px;">
<p class="text-center">This card should only be used for identification at a Stre@mline
network hospital.</p>
</td>
</tr>
<tr>
<td>
<img src="{{ asset('uploads/logo/logo-sm.png') }}"
style='float:right; margin-bottom: 20px; height: 25px; width: 80px;'
alt="Stre@mine Logo">
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
@if($count != count($insurance_members))
<br>
@endif
@php $count++; @endphp
@endforeach
</body>
</html>
@@ -0,0 +1,204 @@
<div class="modal fade" id="new_family_member_modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable modal-lg modal-dialog-centered" role="document" style="padding-top: 200px;">
<div class="modal-content">
<div class="modal-header">
<span class="modal-title" id="exampleModalLongTitle" style="font-weight: 900">Add New Family Member</span>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-3">
{{ Form::hidden('new_member_family_head_id','', ['id' => 'new_member_family_head_id']) }}
<div class="form-group">
{{ Form::label('first_name',__('insurance_members.first_name')) }}
{{ Form::text('first_name','',['class' => 'form-control compulsory', 'data-error'=>'','placeholder'=>'Christian name eg Fred', 'id' => 'new_member_first_name']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('last_name',__('insurance_members.last_name')) }}
{{ Form::text('last_name','',['class' => 'form-control compulsory','placeholder'=>'Surname eg Asiimwe', 'id' => 'new_member_last_name']) }}
<div class="help-block with-errors"></div>
</div>
<label class="alert alert-danger" id="similar_patients_names" style="display: none;"></label>
<div class="form-group">
{{ Form::label('gender',__('insurance_members.gender')) }}
<br>
{{ Form::radio('gender', 1, false, ['id' => 'new_member_male']) }} {{ __('insurance_members.male') }} &nbsp;&nbsp;
{{ Form::radio('gender', 2, false, ['id' => 'new_member_female']) }} {{ __('insurance_members.female') }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('national_id',__('insurance_members.national_id_number')) }}
{{ Form::text('national_id','',['class' => 'form-control','maxlength'=>15, 'id' => 'new_member_national_id']) }}
</div>
<div class="form-group">
{{ Form::label('date_of_birth',__('insurance_members.date_of_birth')) }}
<div class="input-group">
{{ Form::text('date_of_birth','',['class' => 'form-control compulsory','readonly','id'=>'new_member_date_of_birth']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
{{ Form::label('age',__('insurance_members.years')) }}
{{ Form::number('age_in_years','',['class' => 'form-control compulsory','id'=>'new_member_age_in_years','min'=>'0']) }}
</div>
</div>
<div class="col-xs-6 col-sm-6 col-md-6">
<div class="form-group">
{{ Form::label('age',__('insurance_members.months')) }}
{{ Form::number('age_in_months','',['class' => 'form-control','id'=>'new_member_age_in_months','readonly','min'=>'0']) }}
</div>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
{{ Form::label('marital_status',__('insurance_members.marital_status')) }}
<br>
@foreach($marital_statuses as $key=>$value)
{{ Form::radio('marital_status', $key,false) }} {{ $value }} &nbsp;&nbsp;
@endforeach
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('religion',__('insurance_members.religion')) }}
{{ Form::select('religion',$religions,'',['class' => 'form-control compulsory', 'id' => 'new_member_religion']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('occupation',__('insurance_members.occupation')) }}
{{ Form::select('occupation',$occupations,'',['class' => 'form-control compulsory occupation', 'id' => 'new_member_occupation']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('next_of_kin',__('insurance_members.next_of_kin')) }}
{{ Form::text('next_of_kin','',['class' => 'form-control', 'id' => 'new_member_next_of_kin']) }}
</div>
<div class="form-group" id="kin_div" style="display: none;">
<div class="row">
<div class="col-sm-6">
{{ Form::label('next_of_kin_relationship',__('insurance_members.relationship_to_next_of_kin')) }}
{{ Form::select('next_of_kin_relationship',$relationships,'',['class' => 'form-control compulsory', 'id' => 'new_member_next_of_kin_relationship']) }}
</div>
<div class="col-sm-6">
{{ Form::label('next_of_kin_phone',__('insurance_members.next_of_kins_phone')) }}
{{ Form::text('next_of_kin_phone','',['class' => 'form-control','data-mask'=>"0799 999 999", 'id' => 'new_member_next_of_kin_phone']) }}
</div>
</div>
</div>
<div class="form-group">
{{ Form::label('phone',__('insurance_members.phone_number')) }}
{{ Form::text('phone','',['class' => 'form-control','data-mask'=>"0799 999 999", 'id' => 'new_member_phone']) }}
<span class="font-13 text-muted">(07xx) 123-456</span>
</div>
<label class="alert alert-danger" id="similar_phone_number" style="display: none"></label>
<div class="form-group">
{{ Form::label('phone_owner',__('insurance_members.phone_owner')) }}
<br>
{{ Form::radio('phone_owner','self',false,['id'=>'new_member_owned']) }} {{ __('insurance_members.self') }} &nbsp;&nbsp;
{{ Form::radio('phone_owner','other',false,['id'=>'new_member_non_owned']) }} {{ __('insurance_members.other') }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group owner_name" style="display: none;">
{{ Form::label("owner_name",__('insurance_members.phone_owners_name')) }}
{{ Form::text('owner_name','',['id'=>'new_member_owner_name','class' => 'form-control compulsory']) }}
</div>
</div>
<div class="col-md-3">
<div class="form-group">
{{ Form::label('lc_one', __('insurance_members.name_of_lc1_chairman')) }}
{{ Form::text('lc_one','',['class' => 'form-control compulsory', 'data-error'=>'LC 1 chairman\'s name', 'id' => 'new_member_lc_one']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('contact',__('insurance_members.any_hospital_contact')) }}
<br>
{{ Form::radio('contact','yes',false,['id'=>'new_member_contact_yes']) }} {{ __('insurance_members.yes') }} &nbsp;&nbsp;
{{ Form::radio('contact','no',false,['id'=>'new_member_contact_no']) }} {{ __('insurance_members.no') }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group hosp_contact_div" style="display: none;">
<div class="form-group">
{{ Form::label('hospital_contact',__('insurance_members.name_of_contact_in').$hospital_information->name) }}
{{ Form::text('hospital_contact','',['class' => 'form-control compulsory', 'id'=>'new_member_hospital_contact']) }}
</div>
</div>
<div class="form-group">
{{ Form::label('patient_category',__('insurance_members.patient_category'))}}
{{ Form::select('patient_category',$patient_categories,'5',['class' => 'form-control compulsory', 'data-error'=>'', 'id'=>'new_member_patient_category']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('language',__('insurance_members.preferred_language')) }}
{{ Form::select('language',['vern'=>'Vernacular','eng'=>'English',],'vern',['class' => 'form-control compulsory', 'data-error'=>'Select the language', 'id'=>'new_member_language']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group" id="div_district">
{{ Form::label('district_id',__('insurance_members.district')) }}
{{ Form::select('district_id',$districts,'',['class' => 'form-control compulsory district', 'data-error'=>'', 'id'=>'new_member_district_id']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group" id="div_county">
<label for='county_id'>{{ __('insurance_members.county') }}</label>
{{ Form::select('county_id',$dynamic_counties,'',['class' => 'form-control compulsory district', 'data-error'=>'', 'id'=>'new_member_county_id']) }}
<div class="help-block with-errors"></div>
</div>
</div>
<div class="col-sm-3">
<div class="form-group" id="div_subcounty">
<label for='subcounty_id'>{{ __('insurance_members.subcounty') }}</label>
{{ Form::select('subcounty_id',$dynamic_sub_counties,'',['class' => 'form-control compulsory district', 'data-error'=>'', 'id'=>'new_member_subcounty_id']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group" id="div_parish">
<label for='parish'>{{ __('insurance_members.parish') }}</label>
{{ Form::select('parish',$dynamic_parishes,'',['class' => 'form-control compulsory parish', 'data-error'=>'', 'id'=>'new_member_parish']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group" id="div_village">
<label for='village'>{{ __('insurance_members.village') }}</label>
{{ Form::select('village',$villages,'',['class' => 'form-control compulsory village', 'data-error'=>'', 'id'=>'new_member_village']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('relationship_to_head', __('insurance_members.relationship_to_head')) }}
{{ Form::select('relationship_to_head', $relations, 1, ['class' => 'form-control compulsory', 'id'=>'new_member_relationship_to_head']) }}
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<input type="button" class="btn btn-success" id="submitFamilyNewMember" value="Save"/>
</div>
</div>
</div>
</div>
@@ -0,0 +1,310 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-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" />
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
@endpush
@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">{{ __('insurance.cancel_insurance_premiums') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_members.dashboard') }}</a></li>
<li><a href="/insurance/scheme_administration">{{ __('insurance.scheme_administration') }}</a></li>
<li><a href="/insurance_members/">{{ __('insurance.cancel_insurance_premiums') }}</a></li>
</ol>
</div>
</div>
@include('flash::message')
@include('insurance::insurance_members.menu')
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="col-md-12">
{{ Form::open(['method'=>'post','route' => 'insurance_premiums.cancel_insurance_premiums']) }}
<div class="row">
<div class="col-md-2">
<div class="form-group">
<label>{{ __('insurance.search_option') }}</label>
{{ Form::select('search_option', ['members' => 'Members', 'families' => 'Families'], null, ['class' => 'form-control compulsory required']) }}
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label>{{ __('banking.select_date') }}</label>
<select class="form-control compulsory required" name="dates" id="dates" required>
<option value="">{{ __('banking.select') }}</option>
<option value="today">{{ __('banking.today') }}</option>
<option value="yesterday">{{ __('banking.yesterday') }}</option>
<option value="custom_date">{{ __('banking.custom_date') }}</option>
<option value="custom_date_range">{{ __('banking.date_range') }}</option>
</select>
</div>
</div>
<div class="col-md-2">
<div id="sDate" style="display: none;">
<div class="form-group">
<label>{{ __('banking.date_on') }}</label>
<div class="input-group">
{{ Form::text('start_date', '', ['class'=>'form-control required compulsory', 'readonly', 'id'=>'start_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
</div>
</div>
<div class="col-md-2">
<div id="eDate" style="display: none;">
<div class="form-group">
<label for="end_date">{{ __('banking.end_date') }}</label>
<div class="input-group">
{{ Form::text('end_date', '', ['class'=>'form-control required compulsory', 'readonly', 'id'=>'end_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
</div>
</div>
<div class="col-md-2">
<div class="form-group" style="margin-top: 25px;">
{{ Form::submit('Submit', ['class'=>'btn btn-success btn-rounded btn-block pull-right']) }}
</div>
</div>
</div>
{{ Form::close() }}
</div>
</div>
<hr>
@if(isset($display))
<h3 class="label label-info label-rounded"> {!! isset($display) ? $display : '' !!}</h3>
@endif
<div class="table-responsive">
<table id="table" class="table table-striped color-bordered-table success-bordered-table table-hover">
<thead>
<tr>
<th>#</th>
<th>{{ __('insurance_members.name') }}</th>
<th>{{ __('insurance.premium') }}</th>
<th>{{ __('insurance_members.group_name') }}</th>
<th>@if($search_option == "families") {{ __('insurance.family_members') }} @else {{ __('insurance_members.family') }} @endif</th>
<th><span @if($search_option == "families") style='display: none' @endif>{{ __('insurance_members.relationship_to_head') }}</span></th>
<th>{{ __('insurance.start_date') }}</th>
<th>{{ __('insurance.end_date') }}</th>
<th><span @if($search_option == "families") style='display: none' @endif>{{ __('insurance.plan') }}<span></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@php
$counter = 0;
@endphp
@if (count($premiums) > 0)
@foreach($premiums as $premium_record)
@php
$family_heads_array = explode(",",$premium_record->family_heads);
$family_amounts_array = explode(",",$premium_record->family_amount);
$covered_member_ids = explode(",",$premium_record->covered_member_ids);
$insurance_paid_premiums = explode(",",$premium_record->covered_member_premiums_paid);
@endphp
@if ($search_option == "families")
@for ($i = 0; $i < count($family_heads_array); $i++)
@php
$this_family_members = \Streamline\Models\InsuranceMember::where('family_id', $family_heads_array)->get();
$this_family_total_premium = 0; $covered_family_members = [];
if (count($this_family_members) > 0) {
foreach ($this_family_members as $fam_member) {
if (in_array($fam_member->id, $covered_member_ids)) {
$member_key = array_search($fam_member->id, $covered_member_ids);
$this_family_total_premium += $insurance_paid_premiums[$member_key];
$covered_family_members[] = $fam_member->id;
}
}
}
$counter++;
@endphp
<tr>
<td>{{ $counter }}</td>
<td>{!! insurance_flag(get_name($family_heads_array[$i], "id", "patient_id", "insurance_heads_of_family")) !!}( {{ get_name(get_name($family_heads_array[$i], "id", "patient_id", "insurance_heads_of_family"), "id", "number", "patients") }} )</td>
<td>{{ ugandan_shillings($this_family_total_premium) }}</td>
<td>{{ get_name(get_name($family_heads_array[$i], "id", "group_id", "insurance_heads_of_family"), "id", "name", "insurance_groups") }}</td>
<td>
@for ($j = 0; $j < count($covered_family_members); $j++)
- {!! insurance_flag(get_name($covered_family_members[$j], "id", "patient_id", "insurance_members")) !!}<br>
@endfor
</td>
<td></td>
<td>{{ streamline_date($premium_record->start_date) }}</td>
<td>{{ streamline_date($premium_record->end_date) }}</td>
<td>{{-- {{ get_name($insurance_member->chi_plan, "id", "name", "community_health_insurance_plans") }} --}}</td>
<td>
{{-- <a href="/insurance_members/details/{{ $insurance_member->id }}" class="btn btn-rounded btn-info btn-sm">{{ __('insurance_members.details') }}</a> --}}
</td>
<td>
@if( Auth::user()->can('cancel-insurance-member-premiums'))
<a href="/insurance_members/cancel_family_premium/{{ $family_heads_array[$i] }}" class="btn btn-rounded btn-danger btn-sm" onclick="return confirm('<?php echo __('insurance_groups.are_you_sure')?>')">{{ __('insurance.cancel_premium') }}</a>
@endif
</td>
</tr>
@endfor
@else
@for ($i = 0; $i < count($covered_member_ids); $i++)
@php
$insurance_member = \Streamline\Models\InsuranceMember::withTrashed()->find($covered_member_ids[$i]);
$counter++;
if (!$insurance_member) {
continue;
}
@endphp
<tr>
<td>{{ $counter }}</td>
<td>{!! insurance_flag($insurance_member->patient_id) !!}( {{ get_name($insurance_member->patient_id, "id", "number", "patients") }} )</td>
<td>{{ ugandan_shillings($insurance_member->premium) }}</td>
<td>{{ isset($insurance_groups[$insurance_member->group_id]) ? $insurance_groups[$insurance_member->group_id] : 'N/A' }}</td>
<td>{{ isset($insurance_family[$insurance_member->family_id]) ? $insurance_family[$insurance_member->family_id] : 'N/A' }}</td>
<td>{{ isset($relations[$insurance_member->relationship_to_head]) ? $relations[$insurance_member->relationship_to_head] : 'N/A' }}</td>
<td>{{ streamline_date($premium_record->start_date) }}</td>
<td>{{ streamline_date($premium_record->end_date) }}</td>
<td>{{ get_name($insurance_member->chi_plan, "id", "name", "community_health_insurance_plans") }}</td>
<td>
<a href="/insurance_members/details/{{ $insurance_member->id }}" class="btn btn-rounded btn-info btn-sm">{{ __('insurance_members.details') }}</a>
</td>
<td>
@if( Auth::user()->can('cancel-insurance-member-premiums'))
<a href="/insurance_members/cancel_premium/{{ $insurance_member->id }}/{{ $premium_record->id }}" class="btn btn-rounded btn-danger btn-sm" onclick="return confirm('<?php echo __('insurance_groups.are_you_sure')?>')">{{ __('insurance.cancel_premium') }}</a>
@endif
</td>
</tr>
@endfor
@endif
@endforeach
@endif
</tbody>
</table>
{{ $premiums->links() }}
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/typeahead.js-master/dist/typeahead.bundle.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 src="{{ asset('elite/tables/js/buttons.colVis.min.js') }}"></script>
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<!-- Date Picker Plugin JavaScript -->
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
<script type="text/javascript">
$('#end_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
$('#start_date ,#deposit_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
$('#dates').change(function (e) {
if($(this).val() === "custom_date"){
$("#eDate").hide();
$("#sDate").show();
}else if($(this).val() === "custom_date_range"){
$("#sDate").show();
$("#eDate").show();
}else{
$("#eDate").hide();
$("#sDate").hide();
}
});
$('#insurance_groups').select2({
placeholder: "-- select group --"
});
$('.sorting').removeClass('sorting');//remove the sorting class
$('.sorting_asc').removeClass('sorting_asc');//remove the sorting class
$('#table').DataTable({
dom: 'Bfrtip',
bInfo: false,
bPaginate: false,
buttons: [
'copy',
{extend: 'csv',
message: 'LIST OF INSURANCE MEMBERS'
},
{extend: 'excel',
message: 'LIST OF DRUGS',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5]
},
sheetName: 'LIST OF INSURANCE MEMBERS'
},
{extend: 'pdf',
message: 'LIST OF INSURANCE MEMBERS',
orientation: 'portrait',
pageSize: 'LETTER',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5]
},
customize: function (doc) {
doc.defaultStyle.fontSize = 10;
// doc.styles.tableHeader.alignment = 'left';
}
},
{extend: 'print',
message: 'LIST OF INSURANCE MEMBERS',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5]
},
customize: function (win) {
$(win.document.body)
.css('font-size', '10pt')
.css('background', '#fff')
.prepend(
'<img src="<?php echo asset('uploads/logo/logo-sm.png'); ?>" style="position:absolute; top:0; right:0;" />'
);
$(win.document.body).find('table')
.addClass('compact')
.css('font-size', 'inherit');
}
}
]
});
</script>
@endpush
@@ -0,0 +1,438 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet"/>
@endpush
@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">{{ __('insurance.new_premium') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance.dashboard') }}</a></li>
<li><a href="/insurance/scheme_administration">{{ __('insurance.scheme_administration') }}</a></li>
<li class="active">{{ __('insurance.new_premium') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-sm-12">
@include('insurance::insurance_premiums.menu')
</div>
</div>
@include('flash::message')
@include ('errors.list')
@php
$back_date = \Streamline\Models\HospitalInformation::first()->pluck('back_date');
@endphp
<div class="white-box">
{{ Form::open(['route' => 'insurance_premiums.store','data-toggle'=>'validator']) }}
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('group_id', __('insurance.insurance_groups_lc')) }}
{{ Form::select('group_id', $insurance_groups, null, ['class' => 'form-control compulsory', 'required', 'id' => 'group_id']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('amount', __('insurance.amount')) }}
{{ Form::number('amount', '', ['class' => 'form-control compulsory', 'readonly', 'id' => 'amount']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('start_date', __('insurance.insurance_start_date')) }}
<div class="input-group">
{{ Form::text('start_date', '', ['class'=>'form-control compulsory', 'readonly', 'required', 'id'=>'start_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('end_date', __('insurance.insurance_end_date')) }}
<div class="input-group">
{{ Form::text('end_date', '', ['class'=>'form-control compulsory', 'readonly', 'required', 'id'=>'end_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('payment_date', __('insurance.payment_date')) }}
<div class="input-group">
{{ Form::text('payment_date', '', ['class'=>'form-control compulsory', 'readonly', 'required', 'id'=>'payment_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<a class="btn btn-success" id="proceed_button">{{ __('insurance.proceed') }}</a>
<div id="submit_buttons" style="display: none">
{{ Form::button(__('insurance.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('insurance.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light', 'id'=>'reset_button']) }}
</div>
{{ Form::hidden('is_submit_visible', 0, ['id' => 'is_submit_visible']) }}
</div>
<div class="col-md-6">
<div id="family_details"></div>
</div>
</div>
{{ Form::close() }}
</div>
{{-- modal --}}
<div class="modal fade" id="view_family_members" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="exampleModalLabel1">{{ __('insurance.family_members') }}</h4>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row">
<div class="col-md-12" id="family_members_table">
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('insurance.cancel') }}</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="saved_member_info" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<h3>{{ __('insurance.new_fam_saved') }}</h3>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('insurance.cancel') }}</button>
</div>
</div>
</div>
</div>
@include('insurance::insurance_premiums.add_new_family_member_modal')
@endsection
@push('scripts')
<script src="{{ asset('elite/js/validator.js') }}"></script>
<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 type="text/javascript">
$('#proceed_button').click(function () {
// calculate total cost for the group
let total_amount = 0;
$('.family_amount').each(function () {
total_amount += parseInt(this.value);
});
if (total_amount > 0) {
$('#amount').val(total_amount);
// display the submit buttons
$('#submit_buttons').show();
// hide the proceed button
$('#proceed_button').hide();
$('#is_submit_visible').val(1);
} else {
alert("Amount to pay is 0");
}
});
$('#reset_button').click(function () {
// hide the submit buttons
$('#submit_buttons').hide();
// display the proceed button
$('#proceed_button').show();
$('#is_submit_visible').val(0);
$('#family_details').html('');
});
$('#group_id').select2({
placeholder: "-- select group --"
}).change(function() {
let group_id = $('#group_id').val();
$.ajax({
method: 'GET',
url: '/insurance_premiums/group_details/' + group_id,
success: function(response){
$('#family_details').html(response);
},
error: function () {
//
}
});
});
$('#start_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
$('#end_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
let min_days = <?php echo $back_date[0]; ?>;
var min_date = new Date();
min_date.setDate(min_date.getDate()-min_days);
$('#payment_date').datepicker({
autoclose: true,
todayHighlight: true,
endDate: new Date(),
startDate: min_date,
format: 'dd-mm-yyyy'
});
function get_family_details(family_head_id) {
$('.families_table').each(function () {
$(this).hide();
});
$('#family_' + family_head_id).show();
}
function exclude_member(id, family_id) {
if ($('#is_submit_visible').val() == 1) {
alert("Please click the cancel button to process with the exclusion");
return false;
}
if (confirm("Are you sure?")) {
$('#member_' + id).remove();
let family_amount = 0;
$('.family_member_amount_' + family_id).each(function () {
family_amount += parseInt($(this).val());
});
$('#family_amount_' + family_id).val(family_amount);
}
}
function exclude_family(family_id) {
if ($('#is_submit_visible').val() == 1) {
alert("Please click the cancel button to process with the exclusion");
return false;
}
if (confirm("Are you sure?")) {
$('#family_details_div_' + family_id).remove();
}
}
$('#new_member_district_id,#new_member_county_id,#new_member_subcounty_id,#new_member_parish,#new_member_village').select2({
placeholder: "Select",
width: "100%",
dropdownParent: $('#new_family_member_modal')
});
$('#new_member_date_of_birth').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd/mm/yyyy',
endDate: new Date()
});
$('#new_member_age_in_years').on('change', function () {
let years = parseInt($(this).val());
let possibleBirthday = new Date();
if (!isNaN(years)) {
possibleBirthday.setMonth(possibleBirthday.getMonth() - (years * 12));
$('#new_member_date_of_birth').val(format_date(possibleBirthday));
} else {
alert("<?php echo __('patients.valid_number_years')?>")
}
});
function format_date(date) {
let d = new Date(date),
month = '' + (d.getMonth() + 1),
day = '' + d.getDate(),
year = d.getFullYear();
if (month.length < 2) {
month = '0' + month;
}
if (day.length < 2) {
day = '0' + day;
}
return [day, month, year].join('/');
}
$("#new_member_date_of_birth").on('change', function () {
var today = new Date();
var birthDate = $(this).val();
var temp_date = birthDate.split("/");
birthDate = new Date(temp_date[2], (temp_date[1] - 1), temp_date[0]);
//calculate years
var age = today.getFullYear() - birthDate.getFullYear();
age = parseInt(age);
var m = today.getMonth() - birthDate.getMonth();
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
age--;
}
//calculate months
var monthBirth = birthDate.getMonth() + 1;
var monthToday = today.getMonth() + 1;
if (monthToday > monthBirth) {
var months = monthToday - monthBirth;
} else if (monthToday == monthBirth) {
var months = 0;
} else if (monthToday < monthBirth) {
var months = monthToday - monthBirth;
months = months + 12;
}
if (months < 10) {
months = '0' + months
}
//set the values
$('#new_member_age_in_years').val(age);
$('#new_member_age_in_months').val(months);
});
$("#family_members_table").on('click', ".addMemberBtn", function () {
$("#view_family_members").modal("hide");
$("#new_family_member_modal").modal("show");
var id = $(this).attr('id');
$("#new_member_family_head_id").val(id);
});
$("#submitFamilyNewMember").click(function (e) {
let group_id = $('#group_id').val();
let new_member_family_head_id = $('#new_member_family_head_id').val();
let new_member_first_name = $('#new_member_first_name').val();
let new_member_last_name = $('#new_member_last_name').val();
let new_member_national_id = $('#new_member_national_id').val();
let new_member_religion = $('#new_member_religion').val();
let new_member_lc_one = $('#new_member_lc_one').val();
let new_member_subcounty_id = $('#new_member_subcounty_id').val();
let new_member_parish = $('#new_member_parish').val();
let new_member_patient_category = $('#new_member_patient_category').val();
let new_member_occupation = $('#new_member_occupation').val();
let new_member_village = $('#new_member_village').val();
let new_member_district_id = $('#new_member_district_id').val();
let new_member_language = $('#new_member_language').val();
let new_member_next_of_kin = $('#new_member_next_of_kin').val();
let new_member_phone = $('#new_member_phone').val();
let new_member_relationship_to_head = $('#new_member_relationship_to_head').val();
let new_member_gender = $("input[name='gender']" ).val();
let new_member_marital_status = $("input[name='marital_status']" ).val();
let new_member_phone_owner = $("input[name='phone_owner']" ).val();//contact
let new_member_date_of_birth = $('#new_member_date_of_birth').val();
let new_member_county_id = $('#new_member_county_id').val();
let data = {'group_id': group_id,'new_member_first_name': new_member_first_name,'new_member_last_name': new_member_last_name,'new_member_national_id':new_member_national_id,'new_member_religion':new_member_religion,'new_member_lc_one':new_member_lc_one,'new_member_subcounty_id':new_member_subcounty_id,'new_member_parish':new_member_parish,'new_member_patient_category':new_member_patient_category,'new_member_occupation':new_member_occupation,'new_member_village':new_member_village,'new_member_district_id':new_member_district_id,'new_member_language':new_member_language,'new_member_next_of_kin':new_member_next_of_kin,'new_member_phone':new_member_phone,'new_member_relationship_to_head':new_member_relationship_to_head,'new_member_gender': new_member_gender,'new_member_marital_status':new_member_marital_status,'new_member_phone_owner':new_member_phone_owner,'new_member_date_of_birth':new_member_date_of_birth,'new_member_family_head_id':new_member_family_head_id,'new_member_county_id': new_member_county_id};
$.ajax({
method: 'POST',
url: '/add_new_family_members_dynamically',
dataType: 'json',
data: data,
success: function(response){
$("#new_family_member_modal").modal("hide");
$(".dynamicFamilyMembers").append(response["html"]);
$("#saved_member_info").modal("show");
},
error: function(jqXHR, textStatus, errorThrown) {
alert(JSON.stringify(jqXHR));
console.log(JSON.stringify(jqXHR));
}
});
});
$('#new_member_first_name, #new_member_last_name').change(function () {
let first_name = $('#new_member_first_name').val();
let last_name = $('#new_member_last_name').val();
if (first_name !== "" && last_name !== "") {
$.ajax({
method: 'POST',
url: '/patients/check_duplicate_patients',
data: {'first_name': first_name, 'last_name': last_name},
success: function(response){
let responseArray = JSON.parse(response);
if (responseArray["results_count"] > 0) {
$("#similar_patients_names").text(responseArray["results_count"] + " patient(s) with similar names were found. Click here to view them and avoid duplicate patient records");
$("#similar_patients_names").show();
$("#modal_table").html(responseArray["html"]);
} else {
$("#similar_patients_names").hide();
}
}
});
}
});
$('#new_member_phone').change(function () {
let phone = $('#new_member_phone').val();
$.ajax({
method: 'POST',
url: '/patients/check_duplicate_patients',
data: {'phone': phone},
success: function(response){
let responseArray = JSON.parse(response);
if (responseArray["results_count"] > 0) {
$("#similar_phone_number").text(responseArray["results_count"] + " patient(s) with similar phone numbers were found. Click to view them");
$("#similar_phone_number").show();
$("#modal_table").html(responseArray["html"]);
} else {
$("#similar_phone_number").hide();
}
}
});
});
$('#similar_patients_names, #similar_phone_number').click(function () {
$('#modal_similar_patients').modal('show');
});
</script>
@endpush
@@ -0,0 +1,446 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet"/>
@endpush
@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">{{ __('insurance.new_premium') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance.dashboard') }}</a></li>
<li class="active">{{ __('insurance.new_premium') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-sm-12">
@include('insurance::insurance_premiums.menu')
</div>
</div>
@include('flash::message')
@include ('errors.list')
@php
$back_date = \Streamline\Models\HospitalInformation::first()->pluck('back_date');
@endphp
<div class="white-box">
{{ Form::open(['route' => 'insurance_premiums.store','data-toggle'=>'validator']) }}
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('group_id', __('insurance.insurance_groups_lc')) }}
{{ Form::select('group_id', $insurance_groups, $group_id, ['class' => 'form-control compulsory', 'required', 'id' => 'group_id']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('amount', __('insurance.amount')) }}
{{ Form::number('amount', '', ['class' => 'form-control compulsory', 'readonly', 'id' => 'amount']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('start_date', __('insurance.insurance_start_date')) }}
<div class="input-group">
{{ Form::text('start_date', '', ['class'=>'form-control compulsory', 'readonly', 'required', 'id'=>'start_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('end_date', __('insurance.insurance_end_date')) }}
<div class="input-group">
{{ Form::text('end_date', '', ['class'=>'form-control compulsory', 'readonly', 'required', 'id'=>'end_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('payment_date', __('insurance.payment_date')) }}
<div class="input-group">
{{ Form::text('payment_date', '', ['class'=>'form-control compulsory', 'readonly', 'required', 'id'=>'payment_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<a class="btn btn-success" id="proceed_button">{{ __('insurance.proceed') }}</a>
<div id="submit_buttons" style="display: none">
{{ Form::button(__('insurance.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('insurance.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light', 'id'=>'reset_button']) }}
</div>
</div>
<div class="col-md-6">
<div id="family_details"></div>
</div>
</div>
{{ Form::close() }}
</div>
{{-- modal --}}
<div class="modal fade" id="view_family_members" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="exampleModalLabel1">{{ __('insurance.family_members') }}</h4>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row">
<div class="col-md-12" id="family_members_table">
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('insurance.cancel') }}</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="saved_member_info" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<h3>{{ __('insurance.new_fam_saved') }}</h3>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('insurance.cancel') }}</button>
</div>
</div>
</div>
</div>
@include('insurance::insurance_premiums.add_new_family_member_modal')
@endsection
@push('scripts')
<script src="{{ asset('elite/js/validator.js') }}"></script>
<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 type="text/javascript">
let group_id = <?php echo $group_id; ?>;
$.ajax({
method: 'GET',
url: '/insurance_premiums/group_details/' + group_id,
success: function(response){
$('#family_details').html(response);
},
error: function () {
//
}
});
$('#proceed_button').click(function () {
// calculate total cost for the group
let total_amount = 0;
let submit_btn_state = true;
$('.family_amount').each(function () {
var elementIdString = $(this).attr('id'); // e.g family_id_3
var family_id = elementIdString.substring(10); // e.g get the actual family id from string above
var family_total_premium = this.value;
$.ajax({
method: 'GET',
url: '/validate_family_premium/' + family_id + '/' + family_total_premium,
success: function(response){
if (isNaN(response) == true) {
$(this).css('border','1px solid #F08080');
alert(response);
submit_btn_state = false;
console.log("submit btn state ==>> "+submit_btn_state);
// hide the submit button
$('#submit_buttons').hide();
// show the proceed button
$('#proceed_button').show();
return false;
}
},
error: function (error) {
console.log(error);
}
});
total_amount += parseInt(this.value);
});
console.log("submit btn state outside the loop ==>> "+submit_btn_state);
$('#amount').val(total_amount);
// display the submit buttons
$('#submit_buttons').show();
// hide the proceed button
$('#proceed_button').hide();
});
$('#reset_button').click(function () {
// hide the submit buttons
$('#submit_buttons').hide();
// display the proceed button
$('#proceed_button').show();
});
$('#group_id').change(function() {
let group_id = $('#group_id').val();
$.ajax({
method: 'GET',
url: '/insurance_premiums/group_details/' + group_id,
success: function(response){
$('#family_details').html(response);
},
error: function () {
//
}
});
});
$('#start_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
$('#end_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
let min_days = <?php echo $back_date[0]; ?>;
var min_date = new Date();
min_date.setDate(min_date.getDate()-min_days);
$('#payment_date').datepicker({
autoclose: true,
todayHighlight: true,
endDate: new Date(),
startDate: min_date,
format: 'dd-mm-yyyy'
});
$("#family_details").on('click', "[id^=view_chi_family_]", function () {
var id = /\d+(?=\D*$)/.exec($(this).attr('id'));
var id_string = id.toString();
//console.log(id_string);
var family_head_and_group_id_array = id_string.split("000000000000000");
//console.log(family_head_and_group_id_array);
var family_head_id = family_head_and_group_id_array[0];
var group_id = family_head_and_group_id_array[1];
$.ajax({
method: 'GET',
url: '/view_chi_family_members/' + group_id + '/' + family_head_id,
success: function(response){
$('#family_members_table').html(response);
},
error: function () {
//
}
});
});
$('#new_member_district_id,#new_member_county_id,#new_member_subcounty_id,#new_member_parish,#new_member_village').select2({
placeholder: "Select",
width: "100%",
dropdownParent: $('#new_family_member_modal')
});
$('#new_member_date_of_birth').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd/mm/yyyy',
endDate: new Date()
});
$('#new_member_age_in_years').on('change', function () {
let years = parseInt($(this).val());
let possibleBirthday = new Date();
if (!isNaN(years)) {
possibleBirthday.setMonth(possibleBirthday.getMonth() - (years * 12));
$('#new_member_date_of_birth').val(format_date(possibleBirthday));
} else {
alert("<?php echo __('patients.valid_number_years')?>")
}
});
function format_date(date) {
let d = new Date(date),
month = '' + (d.getMonth() + 1),
day = '' + d.getDate(),
year = d.getFullYear();
if (month.length < 2) {
month = '0' + month;
}
if (day.length < 2) {
day = '0' + day;
}
return [day, month, year].join('/');
}
$("#new_member_date_of_birth").on('change', function () {
var today = new Date();
var birthDate = $(this).val();
var temp_date = birthDate.split("/");
birthDate = new Date(temp_date[2], (temp_date[1] - 1), temp_date[0]);
//calculate years
var age = today.getFullYear() - birthDate.getFullYear();
age = parseInt(age);
var m = today.getMonth() - birthDate.getMonth();
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
age--;
}
//calculate months
var monthBirth = birthDate.getMonth() + 1;
var monthToday = today.getMonth() + 1;
if (monthToday > monthBirth) {
var months = monthToday - monthBirth;
} else if (monthToday == monthBirth) {
var months = 0;
} else if (monthToday < monthBirth) {
var months = monthToday - monthBirth;
months = months + 12;
}
if (months < 10) {
months = '0' + months
}
//set the values
$('#new_member_age_in_years').val(age);
$('#new_member_age_in_months').val(months);
});
$("#family_members_table").on('click', ".addMemberBtn", function () {
$("#view_family_members").modal("hide");
$("#new_family_member_modal").modal("show");
var id = $(this).attr('id');
$("#new_member_family_head_id").val(id);
});
$("#submitFamilyNewMember").click(function (e) {
let group_id = $('#group_id').val();
let new_member_family_head_id = $('#new_member_family_head_id').val();
let new_member_first_name = $('#new_member_first_name').val();
let new_member_last_name = $('#new_member_last_name').val();
let new_member_national_id = $('#new_member_national_id').val();
let new_member_religion = $('#new_member_religion').val();
let new_member_lc_one = $('#new_member_lc_one').val();
let new_member_subcounty_id = $('#new_member_subcounty_id').val();
let new_member_parish = $('#new_member_parish').val();
let new_member_patient_category = $('#new_member_patient_category').val();
let new_member_occupation = $('#new_member_occupation').val();
let new_member_village = $('#new_member_village').val();
let new_member_district_id = $('#new_member_district_id').val();
let new_member_language = $('#new_member_language').val();
let new_member_next_of_kin = $('#new_member_next_of_kin').val();
let new_member_phone = $('#new_member_phone').val();
let new_member_relationship_to_head = $('#new_member_relationship_to_head').val();
let new_member_gender = $("input[name='gender']" ).val();
let new_member_marital_status = $("input[name='marital_status']" ).val();
let new_member_phone_owner = $("input[name='phone_owner']" ).val();//contact
let new_member_date_of_birth = $('#new_member_date_of_birth').val();
let new_member_county_id = $('#new_member_county_id').val();
let data = {'group_id': group_id,'new_member_first_name': new_member_first_name,'new_member_last_name': new_member_last_name,'new_member_national_id':new_member_national_id,'new_member_religion':new_member_religion,'new_member_lc_one':new_member_lc_one,'new_member_subcounty_id':new_member_subcounty_id,'new_member_parish':new_member_parish,'new_member_patient_category':new_member_patient_category,'new_member_occupation':new_member_occupation,'new_member_village':new_member_village,'new_member_district_id':new_member_district_id,'new_member_language':new_member_language,'new_member_next_of_kin':new_member_next_of_kin,'new_member_phone':new_member_phone,'new_member_relationship_to_head':new_member_relationship_to_head,'new_member_gender': new_member_gender,'new_member_marital_status':new_member_marital_status,'new_member_phone_owner':new_member_phone_owner,'new_member_date_of_birth':new_member_date_of_birth,'new_member_family_head_id':new_member_family_head_id,'new_member_county_id': new_member_county_id};
$.ajax({
method: 'POST',
url: '/add_new_family_members_dynamically',
dataType: 'json',
data: data,
success: function(response){
$("#new_family_member_modal").modal("hide");
$(".dynamicFamilyMembers").append(response["html"]);
$("#saved_member_info").modal("show");
},
error: function(jqXHR, textStatus, errorThrown) {
alert(JSON.stringify(jqXHR));
console.log(JSON.stringify(jqXHR));
}
});
});
$('#new_member_first_name, #new_member_last_name').change(function () {
let first_name = $('#new_member_first_name').val();
let last_name = $('#new_member_last_name').val();
if (first_name !== "" && last_name !== "") {
$.ajax({
method: 'POST',
url: '/patients/check_duplicate_patients',
data: {'first_name': first_name, 'last_name': last_name},
success: function(response){
let responseArray = JSON.parse(response);
if (responseArray["results_count"] > 0) {
$("#similar_patients_names").text(responseArray["results_count"] + " patient(s) with similar names were found. Click here to view them and avoid duplicate patient records");
$("#similar_patients_names").show();
$("#modal_table").html(responseArray["html"]);
} else {
$("#similar_patients_names").hide();
}
}
});
}
});
$('#new_member_phone').change(function () {
let phone = $('#new_member_phone').val();
$.ajax({
method: 'POST',
url: '/patients/check_duplicate_patients',
data: {'phone': phone},
success: function(response){
let responseArray = JSON.parse(response);
if (responseArray["results_count"] > 0) {
$("#similar_phone_number").text(responseArray["results_count"] + " patient(s) with similar phone numbers were found. Click to view them");
$("#similar_phone_number").show();
$("#modal_table").html(responseArray["html"]);
} else {
$("#similar_phone_number").hide();
}
}
});
});
$('#similar_patients_names, #similar_phone_number').click(function () {
$('#modal_similar_patients').modal('show');
});
</script>
@endpush
@@ -0,0 +1,152 @@
@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/select2/select2.min.css') }}" rel="stylesheet"/>
@endpush
@section('content')
<div class="row bg-title">
<div class="col-lg-6 col-md-6 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance.income_received_from_premiums') }}</h4>
</div>
<div class="col-lg-6 col-sm-8 col-md-6 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance.dashboard') }}</a></li>
<li><a href="/insurance/scheme_administration">{{ __('insurance.scheme_administration') }}</a></li>
<li class="active">{{ __('insurance.income_received_from_premiums') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-sm-12">
@include('insurance::insurance_premiums.menu')
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<div class="col-md-4">
{{ Form::open(['route' => 'insurance_premiums.insurance_receipts']) }}
<div class="form-group">
{{ Form::label('id', __('insurance.search_for_group_receipts')) }}
{{ Form::select('id', $insurance_groups, null, ['class' => 'form-control group_id']) }}
</div>
{{ Form::button(__('insurance.search'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::close() }}
<br>
</div>
<div class="table-responsive">
<table id="table" class="table table-striped color-bordered-table success-bordered-table table-hover">
<thead>
<tr>
<th>{{ __('insurance.group_name') }}</th>
<th>{{ __('insurance.family_name') }}</th>
<th>{{ __('insurance.amount_paid') }}</th>
<th>{{ __('insurance.start_date') }}</th>
<th>{{ __('insurance.end_date') }}</th>
<th>{{ __('insurance.received_by') }}</th>
<th>{{ __('insurance.print_receipts') }}</th>
</tr>
</thead>
<tbody>
@foreach($receipts as $receipt)
@php
$explodeFamilyId = explode(",", $receipt->family_heads);
$explodeFamilyAmount = explode(",", $receipt->family_amount);
$count = count($explodeFamilyId);
$explodeMemberId = explode(",", $receipt->covered_member_ids);
$explodeMemberAmount = explode(",", $receipt->covered_member_premiums_paid);
@endphp
@for($i = 0; $i < count($explodeFamilyId); $i++)
@php
$record_members_array = is_null($receipt->covered_member_ids) ? [] : explode(",",$receipt->covered_member_ids);
$record_premiums_array = is_null($receipt->covered_member_premiums_paid) ? [] : explode(",",$receipt->covered_member_premiums_paid);
$this_family_members_array = \Streamline\Models\InsuranceMember::where('family_id', $explodeFamilyId[$i])->pluck('id')->toArray();
$this_family_premiums = $this_family_members_number = 0;
for ($w=0; $w < count($record_members_array) ; $w++) {
if (in_array($record_members_array[$w], $this_family_members_array)) {
$this_family_premiums += $record_premiums_array[$w];
$this_family_members_number++;
}
}
@endphp
<tr>
@if($i == 0)
<td rowspan="{{ $count }}">
{{ $insurance_groups[$receipt->group_id] }}
<br><br>
<a href="/insurance_premiums/print_group_receipt/{{ $receipt->id }}">{{ __('insurance.print_group_receipt') }}</a>
</td>
@endif
<td>{{ get_name($explodeFamilyId[$i], 'id', 'name', 'insurance_heads_of_family') }} ({{ $this_family_members_number . ' ' . __('insurance_members.family_members') }})</td>
<td>
{{ ugandan_shillings($this_family_premiums) }}
</td>
<td>{{ streamline_date($receipt->start_date) }}</td>
<td>{{ streamline_date($receipt->end_date) }}</td>
<td>{{ get_full_name($receipt->created_by, "id", "first_name", "last_name", "users") }}</td>
<td>
{{ Form::open(['route' => 'insurance_premiums.print_receipt']) }}
{{ Form::hidden('subscription_id', $receipt->id) }}
{{ Form::hidden('start_date', $receipt->start_date) }}
{{ Form::hidden('end_date', $receipt->end_date) }}
{{ Form::hidden('payment_date', $receipt->payment_date) }}
{{ Form::hidden('receipt_number', $receipt->receipt_number) }}
{{ Form::hidden('group_id', $receipt->group_id) }}
{{ Form::hidden('family_id', $explodeFamilyId[$i]) }}
{{ Form::hidden('family_amount', $this_family_premiums) }}
<button type="submit" class="btn btn-rounded" style="background-color: #03C03C; color: white"><i class="fa fa-print"></i><span style="margin-left: 10px;">{{ __('insurance.print_receipt') }}</span></button>
{{ Form::close() }}
</td>
</tr>
@endfor
@endforeach
</tbody>
</table>
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/select2/select2.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 src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
<script>
$('.group_id').select2({
placeholder: "Select",
width: "100%",
});
$('#table').DataTable({
dom: 'Bfrtip',
pageLength: 100,
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
</script>
@endpush
@@ -0,0 +1,9 @@
<div class="panel panel-default">
<div class="panel-body">
<a href="/insurance_premiums/create" class="nav-item btn btn-success" style="border-radius: 5px;"><i class="fa fa-plus"></i> <span style="margin-left: 10px">{{ __('insurance.new_premium') }}</span></a>
<!-- <a href="/insurance_premiums/renew_premium" class="nav-item btn btn-warning" style="border-radius: 5px;"><i class="fa fa-refresh"></i> <span style="margin-left: 10px">{{ __('insurance.renew_premium') }}</span></a>-->
<a href="/insurance_premiums/insurance_receipts" class="nav-item btn btn-info" style="border-radius: 5px;"><i class="fa fa-eye"></i> <span style="margin-left: 10px">{{ __('insurance.premium_receipts') }}</span></a>
<a href="/insurance_premiums/single_group_receipt" class="nav-item btn btn-success" style="border-radius: 5px;"><i class="fa fa-plus"></i> <span style="margin-left: 10px">{{ __('insurance.single_group_premium_payment') }}</span></a>
<a href="/insurance_premiums/single_group_receipt_history" class="nav-item btn btn-info" style="border-radius: 5px;"><i class="fa fa-eye"></i> <span style="margin-left: 10px">{{ __('insurance.single_group_receipt_history') }}</span></a>
</div>
</div>
@@ -0,0 +1,147 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
<style type="text/css">
#divToPrint{
font-size: 13px;
color: #7c7c7c;
}
#receipt_table{
font-size: 1em;
font-weight: normal;
font-family: monospace
}
#receipt_table th{
border: 1px solid #dddddd;
}
#receipt_table td{
border: 1px solid #dddddd;
}
.receipt-label{
margin-top: 10px;
padding: 10px;
}
.receipt-title{
font-weight: bolder;
text-decoration: underline;
display: block; font-family:
monospace
}
</style>
@endpush
@section('content')
<div class="row bg-title">
<div class="col-md-7">
<h4>{{ __('insurance.premium_receipt') }}</h4>
</div>
<div class="col-md-5">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance.dashboard') }}</a></li>
<li class="active">{{ __('insurance.premium_receipt') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-sm-12">
@include('insurance::insurance_premiums.menu')
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="white-box">
<div class="row" style="float:right;">
<button class="btn btn-success glyphicon glyphicon-print" onclick="print_receipt()"> {{ __('insurance.print') }}</button>
&nbsp; &nbsp;
@php
$print_array = [$start_date, $end_date, $amount, $group_name, $family_name, $receipt_date, $receipt_number, $family_id, $group_id, $subscription_record->id, $subscription_record->created_by];
$seralized_data = serialize($print_array);
@endphp
<a href="/insurance_premiums_family_receipt_snappy/{{ $seralized_data }}" target="_blank" class="btn btn-success glyphicon glyphicon-print">{{ __('insurance.pdf_print') }}</a>
</div>
<div class="row" id="divToPrint">
<div class="col-sm-3"></div>
<div class="col-sm-6" style="text-align: center;">
<p style="text-align: center; font-size: 1em">
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace"><b>{{ $hospital_information->name }}</b></span>
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace">{{ $hospital_information->address }}</span>
<span class="receipt-label"><b>{{ __('insurance.tel') }}:</b> {{ $hospital_information->phone_number }}</span><br>
<span class="receipt-label"><b>{{ __('insurance.email') }}:</b> {{ $hospital_information->email }}</span><br>
<span class="receipt-label"><b>{{ __('insurance.cashier') }}:</b> {{ get_full_name($subscription_record->created_by, "id", "first_name", "last_name", "users") }}</span><br>
<span class="receipt-label"><b>{{ __('insurance.date') }}:</b> {{ streamline_date_time_short($receipt_date) }}</span><br>
<span class="receipt-label"><b>{{ __('insurance.receipt_number') }}</b> {{ $receipt_number }}</span><br>
</p>
<div>
<table class="table" id="receipt_table">
<tbody>
<tr>
<td><b>{{ __('insurance.start_of_cover_date') }}</b></td>
<td><b>{{ streamline_date($start_date) }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.end_of_cover_date') }}</b></td>
<td><b>{{ streamline_date($end_date) }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.amount_paid') }}</b></td>
<td><b>{{ ugandan_shillings($amount) }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.insurance_group_name') }}</b></td>
<td><b>{{ $group_name }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.insurance_family_head') }}</b></td>
<td><b>{{ $family_name }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.number_of_people_covered') }}</b></td>
<td>
<b>{{ $covered_family_members }} {{ __('insurance.members') }}</b>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-sm-3">
</div>
<i style="font-size: 0.8em; margin-left: 50%;">&copy; Stre@mline</i>
</div>
</div>
</div>
</div>
@endsection
@push('styles')
<script type="text/javascript">
function print_receipt() {
let myDiv = document.getElementById('divToPrint');
let newWindow = window.open('', 'SecondWindow', 'toolbar=0,stat=0');
newWindow.document.write("<html><body " +
"class='' " +
" onload='window.print()'>" +
myDiv.innerHTML +
"</body></html>");
newWindow.document.close();
return false;
}
</script>
@endpush
@@ -0,0 +1,140 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
<style type="text/css">
#divToPrint{
font-size: 13px;
color: #7c7c7c;
}
#receipt_table{
font-size: 1em;
font-weight: normal;
font-family: monospace
}
#receipt_table th{
border: 1px solid #dddddd;
}
#receipt_table td{
border: 1px solid #dddddd;
}
.receipt-label{
margin-top: 10px;
padding: 10px;
}
.receipt-title{
font-weight: bolder;
text-decoration: underline;
display: block; font-family:
monospace
}
</style>
@endpush
@section('content')
<div class="row bg-title">
<div class="col-md-7">
<h4>{{ __('insurance.premium_receipt') }}</h4>
</div>
<div class="col-md-5">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance.dashboard') }}</a></li>
<li class="active">{{ __('insurance.premium_receipt') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-sm-12">
@include('insurance::insurance_premiums.menu')
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="white-box">
<div class="row" style="float:right;">
<button class="btn btn-success glyphicon glyphicon-print" onclick="print_receipt()"> {{ __('insurance.print') }}</button>
&nbsp; &nbsp;
@php
$print_array = [$start_date, $end_date, $amount, $group_name, $contact_name, $receipt_date, $receipt_number];
$seralized_data = serialize($print_array);
@endphp
<a href="/insurance_premiums_receipt_snappy/{{ $seralized_data }}" target="_blank" class="btn btn-success glyphicon glyphicon-print">PDF Print</a>
</div>
<div class="row" id="divToPrint">
<div class="col-sm-3"></div>
<div class="col-sm-6" style="text-align: center;">
<p style="text-align: center; font-size: 1em">
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace"><b>{{ $hospital_information->name }}</b></span>
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace">{{ $hospital_information->address }}</span>
<span class="receipt-label"><b>{{ __('insurance.tel') }}:</b> {{ $hospital_information->phone_number }}</span><br>
<span class="receipt-label"><b>{{ __('insurance.email') }}:</b> {{ $hospital_information->email }}</span><br>
<span class="receipt-label"><b>{{ __('insurance.cashier') }}:</b> {{ auth()->user()->first_name }} {{ auth()->user()->last_name }}</span><br>
<span class="receipt-label"><b>{{ __('insurance.date') }}:</b> {{ streamline_date_time_short($receipt_date) }}</span><br>
<span class="receipt-label"><b>{{ __('insurance.receipt_number') }}</b> {{ $receipt_number }}</span><br>
</p>
<div>
<table class="table" id="receipt_table">
<tbody>
<tr>
<td><b>{{ __('insurance.start_of_cover_date') }}</b></td>
<td><b>{{ streamline_date($start_date) }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.end_of_cover_date') }}</b></td>
<td><b>{{ streamline_date($end_date) }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.amount_paid') }}</b></td>
<td><b>{{ ugandan_shillings($amount) }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.insurance_group_name') }}</b></td>
<td><b>{{ $group_name }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.client_name') }}</b></td>
<td><b>{{ $contact_name }}</b></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-sm-3">
</div>
<i style="font-size: 0.8em; margin-left: 50%;">&copy; Stre@mline</i>
</div>
</div>
</div>
</div>
@endsection
@push('styles')
<script type="text/javascript">
function print_receipt() {
let myDiv = document.getElementById('divToPrint');
let newWindow = window.open('', 'SecondWindow', 'toolbar=0,stat=0');
newWindow.document.write("<html><body " +
"class='' " +
" onload='window.print()'>" +
myDiv.innerHTML +
"</body></html>");
newWindow.document.close();
return false;
}
</script>
@endpush
@@ -0,0 +1,145 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
<style type="text/css">
#divToPrint{
font-size: 13px;
color: #7c7c7c;
}
#receipt_table{
font-size: 1em;
font-weight: normal;
font-family: monospace
}
#receipt_table th{
border: 1px solid #dddddd;
}
#receipt_table td{
border: 1px solid #dddddd;
}
.receipt-label{
margin-top: 10px;
padding: 10px;
}
.receipt-title{
font-weight: bolder;
text-decoration: underline;
display: block; font-family:
monospace
}
</style>
@endpush
@section('content')
<div class="row bg-title">
<div class="col-md-7">
<h4>{{ __('insurance.premium_receipt') }}</h4>
</div>
<div class="col-md-5">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance.dashboard') }}</a></li>
<li class="active">{{ __('insurance.premium_receipt') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-sm-12">
@include('insurance::insurance_premiums.menu')
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="white-box">
<div class="row" style="float:right;">
<button class="btn btn-success glyphicon glyphicon-print" onclick="print_receipt()"> {{ __('insurance.print') }}</button>
&nbsp; &nbsp;
@php
$print_array = [$start_date, $end_date, $amount, $receipt_date, $receipt_number, $group_name, $group_id, $paid_by_name, $paid_by_contact, $cashier_id];
$seralized_data = serialize($print_array);
@endphp
<a href="/print_single_group_receipt_snappy/{{ $seralized_data }}" target="_blank" class="btn btn-success glyphicon glyphicon-print">PDF Print</a>
</div>
<div class="row" id="divToPrint">
<div class="col-sm-3"></div>
<div class="col-sm-6" style="text-align: center;">
<p style="text-align: center; font-size: 1em">
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace"><b>{{ $hospital_information->name }}</b></span>
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace">{{ $hospital_information->address }}</span>
<span class="receipt-label"><b>{{ __('insurance.tel') }}:</b> {{ $hospital_information->phone_number }}</span><br>
<span class="receipt-label"><b>{{ __('insurance.email') }}:</b> {{ $hospital_information->email }}</span><br>
<span class="receipt-label"><b>{{ __('insurance.cashier') }}:</b> {{ auth()->user()->first_name }} {{ auth()->user()->last_name }}</span><br>
<span class="receipt-label"><b>{{ __('insurance.date') }}:</b> {{ streamline_date_time_short($receipt_date) }}</span><br>
<span class="receipt-label"><b>{{ __('insurance.receipt_number') }}</b> {{ $receipt_number }}</span><br>
</p>
<div>
<table class="table" id="receipt_table">
<tbody>
<tr>
<td><b>{{ __('insurance.start_of_cover_date') }}</b></td>
<td><b>{{ streamline_date($start_date) }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.end_of_cover_date') }}</b></td>
<td><b>{{ streamline_date($end_date) }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.amount_paid') }}</b></td>
<td><b>{{ ugandan_shillings($amount) }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.insurance_group_name') }}</b></td>
<td><b>{{ $group_name }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.paid_by') }}</b></td>
<td><b>{{ $paid_by_name }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.paid_by_contact') }}</b></td>
<td><b>{{ $paid_by_contact }}</b></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-sm-3">
</div>
<i style="font-size: 0.8em; margin-left: 50%;">&copy; Stre@mline</i>
</div>
</div>
</div>
</div>
@endsection
@push('styles')
<script type="text/javascript">
function print_receipt() {
let myDiv = document.getElementById('divToPrint');
let newWindow = window.open('', 'SecondWindow', 'toolbar=0,stat=0');
newWindow.document.write("<html><body " +
"class='' " +
" onload='window.print()'>" +
myDiv.innerHTML +
"</body></html>");
newWindow.document.close();
return false;
}
</script>
@endpush
@@ -0,0 +1,364 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet"/>
@endpush
@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">{{ __('insurance.renew_premium') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance.dashboard') }}</a></li>
<li class="active">{{ __('insurance.renew_premium') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-sm-12">
@include('insurance::insurance_premiums.menu')
</div>
</div>
@php
$back_date = \Streamline\Models\HospitalInformation::first()->pluck('back_date');
@endphp
@include('flash::message')
@include ('errors.list')
<div class="white-box">
{{ Form::open(['route' => 'insurance_premiums.renew_premium_store','data-toggle'=>'validator']) }}
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('group_id', __('insurance.insurance_groups_lc')) }}
{{ Form::select('group_id', $insurance_groups, null, ['class' => 'form-control compulsory', 'required', 'id' => 'group_id']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('amount', __('insurance.amount')) }}
{{ Form::number('amount', '', ['class' => 'form-control compulsory', 'readonly', 'required', 'id' => 'amount']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('start_date', __('insurance.start_date')) }}
<div class="input-group">
{{ Form::text('start_date', '', ['class'=>'form-control compulsory', 'readonly', 'required', 'id'=>'start_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('end_date', __('insurance.insurance_end_date')) }}
<div class="input-group">
{{ Form::text('end_date', '', ['class'=>'form-control compulsory', 'readonly', 'required', 'id'=>'end_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('payment_date', __('insurance.payment_date')) }}
<div class="input-group">
{{ Form::text('payment_date', '', ['class'=>'form-control compulsory', 'readonly', 'required', 'id'=>'payment_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
</div>
<div class="col-md-6">
<div id="family_details"></div>
</div>
</div>
<a class="btn btn-success" id="proceed_button">{{ __('insurance.proceed') }}</a>
<div id="submit_buttons" style="display: none">
{{ Form::button(__('insurance.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('insurance.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light', 'id'=>'reset_button']) }}
</div>
{{ Form::close() }}
</div>
{{-- modal --}}
<div class="modal fade" id="view_family_members" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="exampleModalLabel1">{{ __('insurance.family_members') }}</h4>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row">
<div class="col-md-12" id="family_members_table">
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('insurance.cancel') }}</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="saved_member_info" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<h3>{{ __('insurance.new_fam_saved') }}</h3>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('insurance.cancel') }}</button>
</div>
</div>
</div>
</div>
@include('insurance::insurance_premiums.add_new_family_member_modal')
@endsection
@push('scripts')
<script src="{{ asset('elite/js/validator.js') }}"></script>
<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 type="text/javascript">
$('#proceed_button').click(function () {
// calculate total cost for the group
let total_amount = 0;
$('.family_amount').each(function () {
total_amount += parseInt(this.value);
});
$('#amount').val(total_amount);
// display the submit buttons
$('#submit_buttons').show();
// hide the proceed button
$('#proceed_button').hide();
});
$('#reset_button').click(function () {
// hide the submit buttons
$('#submit_buttons').hide();
// display the proceed button
$('#proceed_button').show();
});
$('#group_id').change(function() {
let group_id = $('#group_id').val();
$.ajax({
method: 'GET',
url: '/insurance_premiums/group_details/' + group_id,
success: function(response){
$('#family_details').html(response);
},
error: function () {
//
}
});
});
$('#start_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
$('#end_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
let min_days = <?php echo $back_date[0]; ?>;
var min_date = new Date();
min_date.setDate(min_date.getDate()-min_days);
$('#payment_date').datepicker({
autoclose: true,
todayHighlight: true,
endDate: new Date(),
startDate: min_date,
format: 'dd-mm-yyyy'
});
$("#family_details").on('click', "[id^=view_chi_family_]", function () {
var id = /\d+(?=\D*$)/.exec($(this).attr('id'));
var id_string = id.toString();
//console.log(id_string);
var family_head_and_group_id_array = id_string.split("000000000000000");
//console.log(family_head_and_group_id_array);
var family_head_id = family_head_and_group_id_array[0];
var group_id = family_head_and_group_id_array[1];
$.ajax({
method: 'GET',
url: '/view_chi_family_members/' + group_id + '/' + family_head_id,
success: function(response){
$('#family_members_table').html(response);
},
error: function () {
//
}
});
});
$('#new_member_district_id,#new_member_county_id,#new_member_subcounty_id,#new_member_parish,#new_member_village').select2({
placeholder: "Select",
width: "100%",
dropdownParent: $('#new_family_member_modal')
});
$('#new_member_date_of_birth').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd/mm/yyyy',
endDate: new Date()
});
$('#new_member_age_in_years').on('change', function () {
let years = parseInt($(this).val());
let possibleBirthday = new Date();
if (!isNaN(years)) {
possibleBirthday.setMonth(possibleBirthday.getMonth() - (years * 12));
$('#new_member_date_of_birth').val(format_date(possibleBirthday));
} else {
alert("<?php echo __('patients.valid_number_years')?>")
}
});
function format_date(date) {
let d = new Date(date),
month = '' + (d.getMonth() + 1),
day = '' + d.getDate(),
year = d.getFullYear();
if (month.length < 2) {
month = '0' + month;
}
if (day.length < 2) {
day = '0' + day;
}
return [day, month, year].join('/');
}
$("#new_member_date_of_birth").on('change', function () {
var today = new Date();
var birthDate = $(this).val();
var temp_date = birthDate.split("/");
birthDate = new Date(temp_date[2], (temp_date[1] - 1), temp_date[0]);
//calculate years
var age = today.getFullYear() - birthDate.getFullYear();
age = parseInt(age);
var m = today.getMonth() - birthDate.getMonth();
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
age--;
}
//calculate months
var monthBirth = birthDate.getMonth() + 1;
var monthToday = today.getMonth() + 1;
if (monthToday > monthBirth) {
var months = monthToday - monthBirth;
} else if (monthToday == monthBirth) {
var months = 0;
} else if (monthToday < monthBirth) {
var months = monthToday - monthBirth;
months = months + 12;
}
if (months < 10) {
months = '0' + months
}
//set the values
$('#new_member_age_in_years').val(age);
$('#new_member_age_in_months').val(months);
});
$("#family_members_table").on('click', ".addMemberBtn", function () {
$("#view_family_members").modal("hide");
$("#new_family_member_modal").modal("show");
var id = $(this).attr('id');
$("#new_member_family_head_id").val(id);
});
$("#submitFamilyNewMember").click(function (e) {
let group_id = $('#group_id').val();
let new_member_family_head_id = $('#new_member_family_head_id').val();
let new_member_first_name = $('#new_member_first_name').val();
let new_member_last_name = $('#new_member_last_name').val();
let new_member_national_id = $('#new_member_national_id').val();
let new_member_religion = $('#new_member_religion').val();
let new_member_lc_one = $('#new_member_lc_one').val();
let new_member_subcounty_id = $('#new_member_subcounty_id').val();
let new_member_parish = $('#new_member_parish').val();
let new_member_patient_category = $('#new_member_patient_category').val();
let new_member_occupation = $('#new_member_occupation').val();
let new_member_village = $('#new_member_village').val();
let new_member_district_id = $('#new_member_district_id').val();
let new_member_language = $('#new_member_language').val();
let new_member_next_of_kin = $('#new_member_next_of_kin').val();
let new_member_phone = $('#new_member_phone').val();
let new_member_relationship_to_head = $('#new_member_relationship_to_head').val();
let new_member_gender = $("input[name='gender']" ).val();
let new_member_marital_status = $("input[name='marital_status']" ).val();
let new_member_phone_owner = $("input[name='phone_owner']" ).val();
let new_member_date_of_birth = $('#new_member_date_of_birth').val();
let new_member_county_id = $('#new_member_county_id').val();
if(new_member_family_head_id == "" || new_member_first_name == "" || new_member_last_name == "" || new_member_religion == "" || new_member_lc_one == "" || new_member_subcounty_id == "" || new_member_parish == "" || new_member_patient_category == "" || new_member_occupation == "" || new_member_village == "" || new_member_district_id == "" || new_member_language == "" || new_member_phone == "" || new_member_next_of_kin == "" || new_member_gender == "" || new_member_gender == "" || new_member_marital_status == "" || new_member_date_of_birth == "" || new_member_county_id == ""){
alert("plase fill in all the member details");
return false;
}
let data = {'group_id': group_id,'new_member_first_name': new_member_first_name,'new_member_last_name': new_member_last_name,'new_member_national_id':new_member_national_id,'new_member_religion':new_member_religion,'new_member_lc_one':new_member_lc_one,'new_member_subcounty_id':new_member_subcounty_id,'new_member_parish':new_member_parish,'new_member_patient_category':new_member_patient_category,'new_member_occupation':new_member_occupation,'new_member_village':new_member_village,'new_member_district_id':new_member_district_id,'new_member_language':new_member_language,'new_member_next_of_kin':new_member_next_of_kin,'new_member_phone':new_member_phone,'new_member_relationship_to_head':new_member_relationship_to_head,'new_member_gender': new_member_gender,'new_member_marital_status':new_member_marital_status,'new_member_phone_owner':new_member_phone_owner,'new_member_date_of_birth':new_member_date_of_birth,'new_member_family_head_id':new_member_family_head_id,'new_member_county_id': new_member_county_id};
$.ajax({
method: 'POST',
url: '/add_new_family_members_dynamically',
dataType: 'json',
data: data,
success: function(response){
$("#new_family_member_modal").modal("hide");
$(".dynamicFamilyMembers").append(response["html"]);
$("#saved_member_info").modal("show");
},
error: function(jqXHR, textStatus, errorThrown) {
alert(JSON.stringify(jqXHR));
console.log(JSON.stringify(jqXHR));
}
});
});
</script>
@endpush
@@ -0,0 +1,145 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/typeahead.js-master/dist/typehead-min.css') }}" rel="stylesheet">
<style type="text/css">
#divToPrint{
font-size: 13px;
color: #7c7c7c;
}
#receipt_table{
font-size: 1em;
font-weight: normal;
font-family: monospace
}
#receipt_table th{
border: 1px solid #dddddd;
}
#receipt_table td{
border: 1px solid #dddddd;
}
.receipt-label{
margin-top: 10px;
padding: 10px;
}
.receipt-title{
font-weight: bolder;
text-decoration: underline;
display: block; font-family:
monospace
}
</style>
@endpush
@section('content')
<div class="row bg-title">
<div class="col-md-7">
<h4>{{ __('insurance.premium_receipt') }}</h4>
</div>
<div class="col-md-5">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance.dasboard') }}</a></li>
<li class="active">{{ __('insurance.premium_receipt') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-sm-12">
@include('insurance::insurance_premiums.menu')
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="white-box">
<div class="row" style="float:right;">
<button class="btn btn-success glyphicon glyphicon-print" onclick="print_receipt()"> {{ __('insurance.print') }}</button>
&nbsp; &nbsp;
@php
$print_array = [$receipt->start_date, $receipt->end_date, $receipt->amount, $receipt->payment_date, $receipt->receipt_number, get_name($receipt->group_id, 'id', 'name', 'insurance_groups'), $receipt->group_id, $receipt->paid_by_name, $receipt->paid_by_contact, $receipt->created_by];
$seralized_data = serialize($print_array);
@endphp
<a href="/print_single_group_receipt_snappy/{{ $seralized_data }}" target="_blank" class="btn btn-success glyphicon glyphicon-print">PDF Print</a>
</div>
<div class="row" id="divToPrint">
<div class="col-sm-3"></div>
<div class="col-sm-6" style="text-align: center;">
<p style="text-align: center; font-size: 1em;">
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace"><b>{{ $hospital_information->name }}</b></span>
<span style="font-weight: bolder; text-decoration: underline; display: block; font-family: monospace">{{ $hospital_information->address }}</span>
<span class="receipt-label"><b>{{ __('insurance.tel') }}:</b> {{ $hospital_information->phone_number }}</span><br>
<span class="receipt-label"><b>{{ __('insurance.email') }}:</b> {{ $hospital_information->email }}</span><br>
<span class="receipt-label"><b>{{ __('insurance.cashier') }}:</b> {{ get_name($receipt->created_by, 'id', 'first_name', 'users') }} {{ get_name($receipt->created_by, 'id', 'last_name', 'users') }}</span><br>
<span class="receipt-label"><b>{{ __('insurance.date') }}:</b> {{ streamline_date($receipt->payment_date) }}</span><br>
<span class="receipt-label"><b>{{ __('insurance.receipt_number') }}</b> {{ $receipt->receipt_number }}</span><br>
</p>
<div>
<table class="table" id="receipt_table">
<tbody>
<tr>
<td><b>{{ __('insurance.start_of_cover_date') }}</b></td>
<td><b>{{ streamline_date($receipt->start_date) }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.end_of_cover_date') }}</b></td>
<td><b>{{ streamline_date($receipt->end_date) }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.amount_paid') }}</b></td>
<td><b>{{ ugandan_shillings($receipt->amount) }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.insurance_group_name') }}</b></td>
<td><b>{{ get_name($receipt->group_id, 'id', 'name', 'insurance_groups') }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.paid_by') }}</b></td>
<td><b>{{ $receipt->paid_by_name }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.paid_by_contact') }}</b></td>
<td><b>{{ $receipt->paid_by_contact }}</b></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-sm-3">
</div>
<i style="font-size: 0.8em; margin-left: 50%;">&copy; Stre@mline</i>
</div>
</div>
</div>
</div>
@endsection
@push('styles')
<script type="text/javascript">
function print_receipt() {
let myDiv = document.getElementById('divToPrint');
let newWindow = window.open('', 'SecondWindow', 'toolbar=0,stat=0');
newWindow.document.write("<html><body " +
"class='' " +
" onload='window.print()'>" +
myDiv.innerHTML +
"</body></html>");
newWindow.document.close();
return false;
}
</script>
@endpush
@@ -0,0 +1,185 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
@endpush
@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">{{ __('insurance.new_premium') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance.dashboard') }}</a></li>
<li class="active">{{ __('insurance.new_premiums') }}</li>
</ol>
</div>
</div>
@php
$back_date = \Streamline\Models\HospitalInformation::first()->pluck('back_date');
@endphp
<div class="row">
<div class="col-sm-12">
@include('insurance::insurance_premiums.menu')
</div>
</div>
<div class="white-box">
{{ Form::open(['route' => 'insurance_premiums.single_group_receipt_store','data-toggle'=>'validator']) }}
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('group_id', __('insurance.insurance_groups_lc')) }}
{{ Form::select('group_id', $insurance_groups, null, ['class' => 'form-control compulsory', 'required', 'id' => 'group_id']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('start_date', __('insurance.insurance_start_date')) }}
<div class="input-group">
{{ Form::text('start_date', '', ['class'=>'form-control compulsory', 'readonly', 'required', 'id'=>'start_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('end_date', __('insurance.insurance_end_date')) }}
<div class="input-group">
{{ Form::text('end_date', '', ['class'=>'form-control compulsory', 'readonly', 'required', 'id'=>'end_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('payment_date', __('insurance.payment_date')) }}
<div class="input-group">
{{ Form::text('payment_date', '', ['class'=>'form-control compulsory', 'readonly', 'required', 'id'=>'payment_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('amount', __('insurance.amount')) }}
{{ Form::number('amount', '', ['class' => 'form-control compulsory', 'required']) }}
{{ Form::hidden('expected_amount', '', ['class' => 'form-control compulsory', 'required', 'id' => 'expected_amount']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('paid_by_name', __('insurance.paid_by')) }}
{{ Form::text('paid_by_name', '', ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('paid_by_contact', __('insurance.paid_by_contact')) }}
{{ Form::text('paid_by_contact', '', ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="families_link">
<a style="color: #337ab7; cursor: pointer;" data-toggle="modal" data-target="#view_family_members">{{ __('insurance.view_group_members') }}</a>
</div>
</div>
</div>
{{ Form::button(__('insurance.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10', 'id' => 'submitBtn']) }}
{{ Form::button(__('insurance.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
{{-- modal --}}
<div class="modal fade" id="view_family_members" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="exampleModalLabel1">{{ __('insurance.families_in_group') }}</h4>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row">
<div class="col-md-12" id="families_in_group">
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('insurance.cancel') }}</button>
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/js/validator.js') }}"></script>
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script type="text/javascript">
$('#start_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
$('#end_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
let min_days = <?php echo $back_date[0]; ?>;
var min_date = new Date();
min_date.setDate(min_date.getDate()-min_days);
$('#payment_date').datepicker({
autoclose: true,
todayHighlight: true,
endDate: new Date(),
startDate: min_date,
format: 'dd-mm-yyyy'
});
$('#group_id').select2({
placeholder: "-- select group --"
}).change(function() {
let group_id = $('#group_id').val();
$.ajax({
method: 'GET',
url: '/get_expected_chi_group_amount/' + group_id,
success: function(response){
$('#amount').val(response);
$('#expected_amount').val(response);
},
error: function () {
//
}
});
//get families with respective members of this group
$.ajax({
method: 'GET',
url: '/get_families_of_group/' + group_id,
success: function(response){
$('#families_in_group').html(response);
}
})
});
function numberWithCommas(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
</script>
@endpush
@@ -0,0 +1,214 @@
@extends('layouts.main')
@push('styles')
<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-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance.new_premium') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance.dashboard') }}</a></li>
<li class="active">{{ __('insurance.new_premiums') }}</li>
</ol>
</div>
</div>
@php
$back_date = \Streamline\Models\HospitalInformation::first()->pluck('back_date');
@endphp
<div class="row">
<div class="col-sm-12">
@include('insurance::insurance_premiums.menu')
</div>
</div>
<div class="white-box">
{{ Form::open(['route' => 'insurance_premiums.single_group_receipt_store','data-toggle'=>'validator']) }}
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('group_id', __('insurance.insurance_groups_lc')) }}
{{ Form::select('group_id', $insurance_groups, $group_id, ['class' => 'form-control compulsory', 'required', 'id' => 'group_id']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('start_date', __('insurance.insurance_start_date')) }}
<div class="input-group">
{{ Form::text('start_date', '', ['class'=>'form-control compulsory', 'readonly', 'required', 'id'=>'start_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('end_date', __('insurance.insurance_end_date')) }}
<div class="input-group">
{{ Form::text('end_date', '', ['class'=>'form-control compulsory', 'readonly', 'required', 'id'=>'end_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('payment_date', __('insurance.payment_date')) }}
<div class="input-group">
{{ Form::text('payment_date', '', ['class'=>'form-control compulsory', 'readonly', 'required', 'id'=>'payment_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<div class="help-block with-errors"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('amount', __('insurance.amount')) }}
{{ Form::number('amount', '', ['class' => 'form-control compulsory', 'required']) }}
{{ Form::hidden('expected_amount', '', ['class' => 'form-control compulsory', 'required', 'id' => 'expected_amount']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('paid_by_name', __('insurance.paid_by')) }}
{{ Form::text('paid_by_name', '', ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('paid_by_contact', __('insurance.paid_by_contact')) }}
{{ Form::text('paid_by_contact', '', ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="families_link">
<a style="color: #337ab7; cursor: pointer;" data-toggle="modal" data-target="#view_family_members">{{ __('insurance.view_group_members') }}</a>
</div>
</div>
</div>
{{ Form::button(__('insurance.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10', 'id' => 'submitBtn']) }}
{{ Form::button(__('insurance.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
{{-- modal --}}
<div class="modal fade" id="view_family_members" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="exampleModalLabel1">{{ __('insurance.families_in_group') }}</h4>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row">
<div class="col-md-12" id="families_in_group">
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('insurance.cancel') }}</button>
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/js/validator.js') }}"></script>
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
<script type="text/javascript">
let group_id = <?php echo $group_id; ?>;
$.ajax({
method: 'GET',
url: '/get_expected_chi_group_amount/' + group_id,
success: function(response){
$('#amount').val(response);
$('#expected_amount').val(response);
},
error: function () {
//
}
});
//get families with respective members of this group
$.ajax({
method: 'GET',
url: '/get_families_of_group/' + group_id,
success: function(response){
$('#families_in_group').html(response);
}
});
$('#start_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
$('#end_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
let min_days = <?php echo $back_date[0]; ?>;
var min_date = new Date();
min_date.setDate(min_date.getDate()-min_days);
$('#payment_date').datepicker({
autoclose: true,
todayHighlight: true,
endDate: new Date(),
startDate: min_date,
format: 'dd-mm-yyyy'
});
$('#group_id').change(function() {
let group_id = $('#group_id').val();
$.ajax({
method: 'GET',
url: '/get_expected_chi_group_amount/' + group_id,
success: function(response){
$('#amount').val(response);
$('#expected_amount').val(response);
},
error: function () {
//
}
});
//get families with respective members of this group
$.ajax({
method: 'GET',
url: '/get_families_of_group/' + group_id,
success: function(response){
$('#families_in_group').html(response);
}
})
});
$('#submitBtn').click(function(e){
let group_amount = $('#amount').val();
let expected_amount = $('#expected_amount').val();
if(group_amount < expected_amount){
alert("An amount of more than "+numberWithCommas(expected_amount)+ " is expected");
return false;
}
});
function numberWithCommas(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
</script>
@endpush
@@ -0,0 +1,152 @@
@extends('layouts.main')
@push('styles')
<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" />
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
@endpush
@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">{{ __('insurance.single_group_receipts') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance.dashboard') }}</a></li>
<li class="active">{{ __('insurance.single_group_receipts') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-sm-12">
@include('insurance::insurance_premiums.menu')
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
{{ Form::open(['route' => 'insurance_premiums.single_group_receipt_history']) }}
<div class="row">
<div class="col-md-3">
<div class="form-group">
{{ Form::label('start_date', __('insurance_reports.start_date')) }}
<div class="input-group">
{{ Form::text('start_date', '', ['class'=>'form-control', 'readonly', 'id'=>'start_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
{{ Form::label('end_date', __('insurance_reports.end_date')) }}
<div class="input-group">
{{ Form::text('end_date', '', ['class'=>'form-control', 'readonly', 'id'=>'end_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
{{ Form::label('group_id', __('insurance.search_for_group_receipts')) }}
{{ Form::select('group_id', $insurance_groups, null, ['class' => 'form-control group_id']) }}
</div>
</div>
<div class="col-md-3">
<div class="form-group">
{{ Form::submit(__('insurance_reports.submit'), ['class'=>'btn btn-success pull-right']) }}
</div>
</div>
</div>
{{ Form::close() }}
<hr>
<h4><label class="label label-info">{{ $search_text }}</label></h4>
<br>
<div class="table-responsive">
<table id="table" class="table table-striped color-bordered-table success-bordered-table table-hover">
<thead>
<tr>
<th>{{ __('insurance.group_name') }}</th>
<th>{{ __('insurance.paid_by') }}</th>
<th>{{ __('insurance.amount_paid') }}</th>
<th>{{ __('insurance.paid_by_contact') }}</th>
<th>{{ __('insurance.start_date') }}</th>
<th>{{ __('insurance.end_date') }}</th>
<th>{{ __('insurance.payment_date') }}</th>
<th>{{ __('insurance.received_by') }}</th>
<th>{{ __('insurance.received_on') }}</th>
<th>{{ __('insurance.print_receipts') }}</th>
</tr>
</thead>
<tbody>
@foreach($receipts as $receipt)
<tr>
<td>{{ get_name($receipt->group_id, 'id', 'name', 'insurance_groups') }}</td>
<td>{{ $receipt->paid_by_name }}</td>
<td>{{ ugandan_shillings($receipt->amount) }}</td>
<td>{{ $receipt->paid_by_contact }}</td>
<td>{{ streamline_date($receipt->start_date) }}</td>
<td>{{ streamline_date($receipt->end_date) }}</td>
<td>{{ streamline_date($receipt->payment_date) }}</td>
<td>{{ get_full_name($receipt->created_by, "id", "first_name", "last_name", "users") }}</td>
<td>{{ streamline_date_time($receipt->created_at) }}</td>
<td>
<a href="/insurance_premiums/reprint_single_group_receipt/{{ $receipt->id }}" class="btn btn-info btn-sm"><i class="fa fa-print"></i>
{{ __('insurance.print_receipt') }}</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
@endsection
@push('scripts')
<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/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 src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script>
$('.group_id').select2({
placeholder: "-- select group --"
});
$('#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',
pageLength: 100,
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
</script>
@endpush
@@ -0,0 +1,96 @@
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('uploads/streamline/color/streamline_icon-02.png') }}">
<title>{{ config('app.name', 'Premiums Receipt - Stre@mline') }}</title>
<!-- Bootstrap Core CSS -->
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
<style>
body{
/*font-size: 1.2em;*/
}
thead {
/*display: table-header-group;*/
}
tfoot {
/*display: table-row-group;*/
}
tr {
page-break-inside: avoid;
}
</style>
</head>
<body>
<div class="container-fluid">
@include('layouts.header_pdf_print')
<div class="card">
<div class="card-header" style="text-align: center;">
<p style="text-align: center; font-size: 1em">
<h4>{{ __('insurance.health_insurance_card') }}</h4>
<h5><strong>{{ __('insurance.family_card') }}</strong></h5>
<span class="receipt-label"><b>{{ __('insurance.cashier') }}:</b> {{ get_full_name($cashier, "id", "first_name", "last_name", "users") }}</span><br>
<span class="receipt-label"><b>{{ __('insurance.date') }}:</b> {{ streamline_date_time_short($receipt_date) }}</span><br>
<span class="receipt-label"><b>{{ __('insurance.receipt_number') }}:</b> {{ $receipt_number }}</span><br>
</p>
</div>
<div class="card-body">
<table class="table" id="receipt_table">
<tbody>
<tr>
<td><b> {{ __('insurance.start_of_cover_date') }}: </b>{{ streamline_date($start_date) }}</td>
<td><b> {{ __('insurance.end_of_cover_date') }}:</b> {{ streamline_date($end_date) }}</td>
</tr>
<tr>
<td><b>{{ __('insurance.amount_paid') }}</b></td>
<td><b>{{ ugandan_shillings($amount) }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.insurance_group_name') }}</b></td>
<td><b>{{ $group_name }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.insurance_family_head') }}</b></td>
<td><b>{{ $family_name }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.number_of_people_covered') }}</b></td>
<td>
<b>{{ count($covered_family_members) }} {{ __('insurance.members') }}</b>
@if(count($covered_family_members))
@foreach($covered_family_members as $member_id)
@php
$member = \Streamline\Models\InsuranceMember::withTrashed()->find($member_id);
@endphp
<li>
{{ get_full_name($member->patient_id, "id", "first_name", "last_name", "patients")}} ({{ get_name($member->patient_id, "id", "number", "patients")}})
</li>
@endforeach
@endif
</td>
</tr>
</tbody>
</table>
<i style="font-size: 0.8em; margin-left: 50%;">{{ __('insurance.printed_by') }}: {{ get_full_name(auth()->user()->id, "id", "first_name", "last_name", "users") }}</i>
</div>
</div>
</div>
</body>
</html>
@@ -0,0 +1,97 @@
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" type="image/png" sizes="16x16" href="{{ base_path('public/uploads/streamline/color/streamline_icon-02.png') }}">
<title>{{ config('app.name', 'Premiums Receipt - Stre@mline') }}</title>
<!-- Bootstrap Core CSS -->
<link href="{{ base_path('public/bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
<style style="text-css">
body{
/*font-size: 1.2em;*/
}
thead {
/*display: table-header-group;*/
}
tfoot {
/*display: table-row-group;*/
}
tr {
/*page-break-inside: avoid;*/
}
</style>
</head>
<body>
<div class="container-fluid">
@include('layouts.header_pdf_print')
<div class="row">
<div class="col">
<div class="card">
<div class="card-header" style="text-align: center;">
<p style="text-align: center; font-size: 1em">
<h4>{{ __('insurance.health_insurance_card') }}</h4>
<h5><strong>{{ __('insurance.premium_receipts') }}</strong></h5>
<span class="receipt-label"><b>{{ __('insurance.cashier') }}:</b> {{ auth()->user()->first_name }} {{ auth()->user()->last_name }}</span><br>
<span class="receipt-label"><b>{{ __('insurance.date') }}:</b> {{ streamline_date_time_short($receipt_date) }}</span><br>
<span class="receipt-label"><b>{{ __('insurance.receipt_number') }}:</b> {{ $receipt_number }}</span><br>
</p>
</div>
<div class="card-body">
<table class="table" id="receipt_table">
<tbody>
<tr>
<td><b>{{ __('insurance.start_of_cover_date') }}</b></td>
<td><b>{{ streamline_date($start_date) }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.end_of_cover_date') }}</b></td>
<td><b>{{ streamline_date($end_date) }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.amount_paid') }}</b></td>
<td><b>{{ ugandan_shillings($amount) }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.insurance_group_name') }}</b></td>
<td><b>{{ $group_name }}</b></td>
</tr>
<tr>
<td><b>{{ __('insurance.client_name') }}</b></td>
<td><b>{{ $contact_name }}</b></td>
</tr>
<tr>
<td>
<br><br><b>{{ __('insurance.health_insurance_card') }} &nbsp;...........................</b>
</td>
<td>
<br><br><b>{{ __('insurance.client_signature') }} &nbsp;......................................</b>
</td>
</tr>
</tbody>
</table>
<i style="font-size: 0.8em; margin-left: 50%;">{{ __('insurance.printed_by') }}: {{ get_full_name(auth()->user()->id, "id", "first_name", "last_name", "users") }}</i>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
@@ -0,0 +1,92 @@
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('uploads/streamline/color/streamline_icon-02.png') }}">
<title>{{ config('app.name', 'Premiums Receipt - Stre@mline') }}</title>
<!-- Bootstrap Core CSS -->
<link href="{{ base_path('public/bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
<style style="text-css">
body{
/*font-size: 1.2em;*/
}
thead {
/*display: table-header-group;*/
}
tfoot {
/*display: table-row-group;*/
}
tr {
/*page-break-inside: avoid;*/
}
</style>
</head>
<body>
<div class="container-fluid">
@include('layouts.header_pdf_print')
<div class="row">
<div class="col">
<div class="card">
<div class="card-header" style="text-align: center;">
<p style="text-align: center; font-size: 1em">
<h4>{{ __('insurance.health_insurance_card') }}</h4>
<h5><strong>{{ __('insurance.single_group_receipt') }}</strong></h5>
<span class="receipt-label"><b>{{ __('insurance.cashier') }}:</b> {{ get_full_name($cashier_id, "id", "first_name", "last_name", "users") }} | <b>{{ __('insurance.date') }}:</b> {{ streamline_date($receipt_date) }} | <b>{{ __('insurance.receipt_number') }}:</b> {{ $receipt_number }}</span><br>
</p>
</div>
<div class="card-body">
<table class="table" id="receipt_table">
<tbody>
<tr>
<td style="padding: 5px;"><b>{{ __('insurance.insurance_group_name') }}</b></td>
<td style="padding: 5px;"><b>{{ $group_name }}</b></td>
</tr>
<tr>
<td style="padding: 5px;"><b>{{ __('insurance.start_date') }}: </b>{{ streamline_date($start_date) }}</td>
<td style="padding: 5px;"><b>{{ __('insurance.end_date') }}: </b>{{ streamline_date($end_date) }}</td>
</tr>
<tr>
<td style="padding: 5px;"><b>{{ __('insurance.amount_paid') }}</b></td>
<td style="padding: 5px;"><b>{{ ugandan_shillings($amount) }}</b></td>
</tr>
<tr>
<td style="padding: 5px;"><b>{{ __('insurance.paid_by') }}</b></td>
<td style="padding: 5px;"><b>{{ $paid_by_name }} ({{ $paid_by_contact }})</b></td>
</tr>
<tr>
<td style="padding: 5px;"><br><b>{{ __('insurance.signed') }}</b></td>
<td style="padding: 5px;">
<br>
<b>...............................</b><br>
{{ __('insurance.for') }}: {{ __('insurance.health_insurance_card') }}
</td>
</tr>
</tbody>
</table>
<i style="font-size: 0.8em; margin-left: 40%;">{{ __('insurance.printed_by') }}: {{ get_full_name(auth()->user()->id, "id", "first_name", "last_name", "users") }} on {{ streamline_date_time_short(\Carbon\Carbon::now()) }}</i>
<br>
<i style="font-size: 0.8em; margin-left: 40%;">-Stre@mline-</i>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
@@ -0,0 +1,144 @@
@extends('layouts.main')
@push('styles')
<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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance_reports.premium_report') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_reports.dashboard') }}</a></li>
<li><a href="{{ route('insurance.index') }}">{{ __('insurance_reports.insurance_reports') }}</a></li>
<li class="active">{{ __('insurance_reports.premium_report') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-body">
{{ Form::open(['route' => 'insurance_reports.cumulative_premiums_report']) }}
<div class="form-group">
{{ Form::label('start_date', __('insurance_reports.start_date')) }}
<div class="input-group">
{{ Form::text('start_date', '', ['class'=>'form-control', 'readonly', 'id'=>'start_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
<div class="form-group">
{{ Form::label('end_date', __('insurance_reports.end_date')) }}
<div class="input-group">
{{ Form::text('end_date', '', ['class'=>'form-control', 'readonly', 'id'=>'end_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
<div class="form-group">
{{ Form::submit(__('insurance_reports.submit'), ['class'=>'btn btn-success pull-right']) }}
</div>
{{ Form::close() }}
</div>
</div>
</div>
<div class="col-md-9">
<div class="panel panel-default">
<div class="panel-body">
<h4><label class="label label-info">{{ $search_text }}</label></h4>
<br><br>
<div class="table-responsive">
<table id="table" class="table table-striped table-bordered">
<thead>
<tr>
<th>#</th>
<th>{{ __('insurance_reports.group_name') }}</th>
<th>{{ __('insurance_reports.amount_paid') }}</th>
<th>{{ __('insurance_reports.start_date') }}</th>
<th>{{ __('insurance_reports.end_date') }}</th>
<th>{{ __('insurance_reports.payment_date') }}</th>
<th>{{ __('insurance_reports.insurance_status') }}</th>
<th>{{ __('insurance_reports.details') }}</th>
</tr>
</thead>
<tbody>
@php $counter = 1 @endphp
@foreach($reports as $report)
@php
$amount = group_amount_sum_period($report->id, $start_date, $end_date);
@endphp
<tr>
<td>{{ $counter }}</td>
<td>{{ $report->name }}</td>
<td>{{ ugandan_shillings($amount) }}</td>
<td>{{ streamline_date($report->start_date) }}</td>
<td>{{ streamline_date($report->end_date) }}</td>
<td>{{ streamline_date($report->payment_date) }}</td>
<td>
@if (date('Y-m-d') < $report->end_date)
<font color="green" ><strong>{{ __('insurance_reports.active') }}</strong></font>
@else
<font color="red"><strong>{{ __('insurance_reports.inactive') }}</strong></font>
@endif
</td>
<td>
{{ Form::model($report->id ,['route' => ['insurance_reports.group_premiums_report']]) }}
{{ Form::hidden('start_date', $start_date) }}
{{ Form::hidden('end_date', $end_date) }}
{{ Form::hidden('id', $report->id) }}
<button type="submit" class="btn btn-danger">{{ __('insurance_reports.details') }}</button>
{{ Form::close() }}
</td>
</tr>
@php $counter++ @endphp
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
<!-- Date Picker Plugin JavaScript -->
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
<script type="text/javascript">
$('#end_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd/mm/yyyy'
});
</script>
<script type="text/javascript">
$('#start_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd/mm/yyyy'
});
</script>
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
<script>
$('#table').DataTable();
</script>
@endpush
@@ -0,0 +1,232 @@
@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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance_reports.expired_CHI') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_reports.dashboard') }}</a></li>
<li><a href="{{ route('insurance.index') }}">{{ __('insurance_reports.CHI_reports') }}</a></li>
<li class="active">{{ __('insurance_reports.expired_CHI') }}</li>
</ol>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
{{ Form::open(['url' => 'expired_premiums_search', 'method' => 'ANY']) }}
<div class="row">
<div class="col-md-3">
<div class="form-group" id="searchby">
{{ Form::label('search_by', __('insurance_reports.date_of_expiry')) }}
{{ Form::select('search_by', ['0'=>'Last 24 hours','1'=>'Custom Date','2'=>'Custom Range', '3'=>'All Expired Records'], '', ['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-6" style="display: none;" id="date_range_search">
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('start_date', __('family_accounts.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', __('family_accounts.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('Submit',['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10', 'id'=>'select_patient']) }}
</div>
</div>
</div>
{{ Form::close() }}
<p class="text-muted m-b-30">{{ __('insurance_reports.export_data_to_csv_and_excel') }}</p>
<div class="table-responsive">
<table id="table" class="table table-striped table-bordered">
<thead>
<tr>
<th>#</th>
<th>{{ __('insurance_reports.group_name') }}</th>
<th>{{ __('insurance_reports.amount_paid') }}</th>
<th>{{ __('insurance_reports.start_date') }}</th>
<th>{{ __('insurance_reports.end_date') }}</th>
<th>{{ __('insurance_reports.payment_date') }}</th>
<th>{{ __('insurance_reports.contact_name') }}</th>
<th>{{ __('insurance_reports.details') }}</th>
</tr>
</thead>
<tbody>
{{-- @php $counter = 1 @endphp
@foreach($insurance_groups as $insurance_group)
@php $amount = group_amount_sum($insurance_group->id); @endphp
<tr>
<td>{{ $counter }}</td>
<td>{{ $insurance_group->name }}</td>
<td>{{ ugandan_shillings($amount) }}</td>
<td>{{ streamline_date($insurance_group->start_date) }}</td>
<td>{{ streamline_date($insurance_group->end_date) }}</td>
<td>{{ streamline_date($insurance_group->payment_date) }}</td>
<td>{{ $insurance_group->contact_name . ' [' . $insurance_group->contact_number . ']'}}</td>
<td>
<a href="/insurance_reports/expired_insurance_details/{{ $insurance_group->id }}" class="btn btn-success">{{ __('insurance_reports.details') }}</a>
</td>
</tr>
@php $counter++ @endphp
@endforeach --}}
@php $counter = 1 @endphp
@if (count($insurance_premiums) > 0)
@foreach($insurance_premiums as $record)
@php
$group_details = \Streamline\Models\InsuranceGroup::withTrashed()->find($record->group_id);
@endphp
@if ($group_details && ($record->end_date < date('Y-m-d')))
<tr>
<td>{{ $counter }}</td>
<td>
{{ $group_details->name }}
<br><br>
<u>{{ __('insurance_reports.covered_members') }}</u>
@php
$this_premium_covered_members_array = $record->covered_member_ids ? explode(",",$record->covered_member_ids) : [];
$this_premium_each_member_contribution_array = $record->covered_member_premiums_paid ? explode(",",$record->covered_member_premiums_paid) : [];
@endphp
<ol>
@for ($i = 0; $i < count($this_premium_covered_members_array); $i++)
<li>{!! insurance_flag(get_name($this_premium_covered_members_array[$i], "id", "patient_id", "insurance_members")) !!} ({{ ugandan_shillings($this_premium_each_member_contribution_array[$i]) }})</li>
@endfor
</ol>
</td>
<td>{{ ugandan_shillings($record->amount) }}</td>
<td>{{ streamline_date($record->start_date) }}</td>
<td>{{ streamline_date($record->end_date) }}</td>
<td>{{ streamline_date($record->payment_date) }}</td>
<td>{{ $group_details->contact_name . ' [' . $group_details->contact_number . ']'}}</td>
<td>
<a href="/insurance_reports/expired_insurance_details/{{ $record->group_id }}" class="btn btn-success">{{ __('insurance_reports.details') }}</a>
</td>
</tr>
@php $counter++ @endphp
@endif
@endforeach
@endif
</tbody>
</table>
</div>
</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>
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
<script>
$('#table').DataTable({
dom: 'Bfrtip',
buttons: [
'copy',
{
extend: 'excel',
message: 'LIST OF DRUGS',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6]
},
title:'{{ __('insurance_reports.expired_CHI') }}'
},
{
extend: 'csv',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6]
},
title:'{{ __('insurance_reports.expired_CHI') }}'
},
{
extend: 'pdf',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6]
},
title:'{{ __('insurance_reports.expired_CHI') }}'
},
{
extend: 'print',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6]
},
customize: function (win) {
$(win.document.body)
.css('font-size', '10pt')
.css('background', '#fff')
.prepend(
'<img src="<?php echo asset('uploads/logo/logo-sm.png'); ?>" style="position:absolute; top:0; right:0;" />'
);
$(win.document.body).find('table')
.addClass('compact')
.css('font-size', 'inherit');
},
title:'{{ __('insurance_reports.expired_CHI') }}'
},
]
});
$('#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
@@ -0,0 +1,78 @@
@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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ $group_name }} {{ __('insurance_reports.group_details') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_reports.dashboard') }}</a></li>
<li><a href="{{ route('insurance.index') }}">{{ __('insurance_reports.insurance_reports') }}</a></li>
<li class="active">{{ $group_name }} {{ __('insurance_reports.group_details') }}</li>
</ol>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<p class="text-muted m-b-30">{{ __('insurance_reports.export_data_to_csv_and_excel') }}</p>
<div class="table-responsive">
<table id="table" class="table table-striped table-bordered">
<thead>
<tr>
<th>#</th>
<th>{{ __('insurance_reports.amount_paid') }}</th>
<th>{{ __('insurance_reports.start_date') }}</th>
<th>{{ __('insurance_reports.end_date') }}</th>
<th>{{ __('insurance_reports.payment_date') }}</th>
<th>{{ __('insurance_reports.insurance_status') }}</th>
</tr>
</thead>
<tbody>
@php $counter = 1 @endphp
@foreach($insurance_subscriptions as $insurance_subscription)
<tr>
<td> {{ $counter }} </td>
<td> {{ ugandan_shillings($insurance_subscription->amount) }} </td>
<td> {{ streamline_date($insurance_subscription->start_date) }} </td>
<td> {{ streamline_date($insurance_subscription->end_date) }} </td>
<td> {{ streamline_date($insurance_subscription->payment_date) }} </td>
<td><font color="red"><strong>{{ __('insurance_reports.inactive') }}</strong></font></td>
</tr>
@php $counter++ @endphp
@endforeach
</tbody>
</table>
</div>
</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>
<script>
$('#table').DataTable({
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
</script>
@endpush
@@ -0,0 +1,72 @@
@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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance_reports.CHI_reports') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_reports.dashboard') }}</a></li>
<li><a href="{{ route('insurance.index') }}">{{ __('insurance_reports.CHI_reports') }}</a></li>
<li class="active">{{ __('insurance_reports.group_premium_reports') }}</li>
</ol>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<div class="table-responsive">
<table id="table" class="table table-striped table-bordered">
<thead>
<tr>
<th>#</th>
<th>{{ __('insurance_reports.group_name') }}</th>
<th>{{ __('insurance_reports.amount_paid') }}</th>
<th>{{ __('insurance_reports.start_date') }}</th>
<th>{{ __('insurance_reports.end_date') }}</th>
<th>{{ __('insurance_reports.payment_date') }}</th>
<th>{{ __('insurance_reports.insurance_status') }}</th>
</tr>
</thead>
<tbody>
@php $counter = 1 @endphp
@foreach($group_transactions as $group_transaction)
<tr>
<td> {{ $counter }} </td>
<td> {{ $insurance_groups[$group_transaction->group_id]}} </td>
<td> {{ ugandan_shillings($group_transaction->amount) }} </td>
<td> {{ streamline_date($group_transaction->start_date) }} </td>
<td> {{ streamline_date($group_transaction->end_date) }} </td>
<td> {{ streamline_date($group_transaction->payment_date) }} </td>
<td>
@if (date('Y-m-d') < $group_transaction->end_date)
<font color="green" ><strong>{{ __('insurance_reports.active') }}</strong></font>
@else
<font color="red"><strong>{{ __('insurance_reports.inactive') }}</strong></font>
@endif
</td>
</tr>
@php $counter++ @endphp
@endforeach
</tbody>
</table>
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
<script>
$('#table').DataTable();
</script>
@endpush
@@ -0,0 +1,112 @@
@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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance_reports.deposit_income_details') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_reports.dashboard') }}</a></li>
<li><a href="{{ route('insurance.index') }}">{{ __('insurance_reports.CHI_reports') }}</a></li>
<li class="active">{{ __('insurance_reports.deposit_income_details') }}</li>
</ol>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<h4><label class="label label-info">{{ $search_text }}</label></h4>
<br><br>
<div class="table-responsive">
<table id="table" class="table table-striped table-bordered">
<thead>
<tr>
<th>#</th>
<th>{{ __('insurance_reports.patient_name') }}</th>
<th>{{ __('insurance_reports.insurance_group') }}</th>
<th>{{ __('insurance_reports.deposit') }}</th>
<th>{{ __('insurance_reports.payment_date') }}</th>
<th>{{ __('insurance_reports.amount') }}</th>
</tr>
</thead>
<tbody>
@php $counter = 1; $total = 0; @endphp
@foreach($service_deposits as $service_deposit)
@php
$array_items = explode(",", $service_deposit->items_ids);
$array_amounts = explode(",", $service_deposit->patient_amount_paid);
@endphp
<tr>
<td>{{ $counter }}</td>
<td>{!! insurance_flag($service_deposit->patient_id) !!}</td>
<td>
{{ get_name(get_name($service_deposit->patient_id, 'patient_id', 'group_id', 'insurance_members'), 'id', 'name', 'insurance_groups') }}
</td>
<td>
<ol>
@for($i = 0; $i < count($array_items); $i++)
<li>
{{ get_name($array_items[$i], 'id', 'name', 'services') }}
</li>
@endfor
</ol>
</td>
<td>{{ $service_deposit->created_at }}</td>
<td>
<ol>
@for($i = 0; $i < count($array_amounts); $i++)
@php
if (!is_numeric($array_amounts[$i])){
continue;
}
$total += $array_amounts[$i];
@endphp
<li>
{{ ugandan_shillings($array_amounts[$i]) }}
</li>
@endfor
</ol>
</td>
</tr>
@php $counter++ @endphp
@endforeach
<tr>
<td colspan="5">{{ __('insurance_reports.total') }}</td>
<td>{{ ugandan_shillings($total) }}</td>
</tr>
</tbody>
</table>
</div>
</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>
<script>
$('#table').DataTable({
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
</script>
@endpush
@@ -0,0 +1,158 @@
@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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance_reports.insurance_expenditure') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_reports.dashboard') }}</a></li>
<li><a href="{{ route('insurance.index') }}">{{ __('insurance_reports.CHI_reports') }}</a></li>
<li class="active">{{ __('insurance_reports.insurance_expenditure') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="white-box">
{{ Form::open(['route' => 'insurance_reports.insurance_expenditure']) }}
<div class="form-group">
{{ Form::label('start_date', __('insurance_reports.start_date')) }}
<div class="input-group">
{{ Form::text('start_date', '', ['class'=>'form-control', 'readonly', 'id'=>'start_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
<div class="form-group">
{{ Form::label('end_date', __('insurance_reports.end_date')) }}
<div class="input-group">
{{ Form::text('end_date', '', ['class'=>'form-control', 'readonly', 'id'=>'end_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
<div class="form-group">
{{ Form::select('group_id',$insurance_groups_select,'',['class' => 'form-control', 'id' => 'insurance_groups']) }}
</div>
<div class="form-group">
{{ Form::submit(__('insurance_reports.submit'), ['class'=>'btn btn-success pull-right']) }}
</div>
{{ Form::close() }}
<br>
</div>
</div>
<div class="col-md-8">
<div class="white-box">
<h4>
<label class="label label-info">
{{ __('insurance_reports.from') }} {{ streamline_date($start_date) }} {{ __('insurance_reports.to') }} {{ streamline_date($end_date) }}
@if(isset($group_id) && $group_id != 0)
Group: {{ get_name($group_id, 'id', 'name', 'insurance_groups') }}
@endif
</label>
</h4>
<br><br>
<table class="table table-striped table-bordered" id="table">
<thead>
<tr>
<th>Item</th>
<th>Amount</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ __('insurance_reports.expenditure_on_drugs') }}</td>
<td><a href="/insurance_reports/insurance_expenditure_details/4">{{ ugandan_shillings($drugs_total) }}</a></td>
</tr>
<tr>
<td>{{ __('insurance_reports.expenditure_on_investigations') }}</td>
<td><a href="/insurance_reports/insurance_expenditure_details/3">{{ ugandan_shillings($investigations_total) }}</a></td>
</tr>
<tr>
<td>{{ __('insurance_reports.expenditure_on_procedures') }}</td>
<td><a href="/insurance_reports/insurance_expenditure_details/2">{{ ugandan_shillings($procedures_total) }}</a></td>
</tr>
<tr>
<td>{{ __('insurance_reports.expenditure_on_sundries') }}</td>
<td><a href="/insurance_reports/insurance_expenditure_details/5">{{ ugandan_shillings($sundries_total) }}</a></td>
</tr>
<tr>
<td>{{ __('insurance_reports.expenditure_on_services') }}</td>
<td><a href="/insurance_reports/insurance_expenditure_details/1">{{ ugandan_shillings($services_total) }}</a></td>
</tr>
<tr>
<td>{{ __('insurance_reports.expenditure_on_inpatient_accommodation') }}</td>
<td><a href="/insurance_reports/insurance_expenditure_details/6">{{ ugandan_shillings($bed_stay_total) }}</a></td>
</tr>
<tr>
<td>{{ __('insurance_reports.total_expenditure') }}</td>
<td>{{ ugandan_shillings($total) }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
@endsection
@push('scripts')
<!-- Date Picker Plugin JavaScript -->
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
<script src="{{ asset('elite/bower_components/select2/select2.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/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 src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
<script type="text/javascript">
$('#insurance_groups').select2({
placeholder: "-- select group --"
});
$('#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',
order:[],
paging:false,
searching:false,
bInfo:false,
buttons: [
'csv', 'excel', 'pdf'
]
});
</script>
@endpush
@@ -0,0 +1,114 @@
@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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance_reports.chi_expenditure_details') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_reports.dashboard') }}</a></li>
<li><a href="{{ route('insurance.index') }}">{{ __('insurance_reports.CHI_reports') }}</a></li>
<li class="active">{{ __('insurance_reports.chi_expenditure_details') }}</li>
</ol>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<h2 class="text-center">{{ $item_type_name . ' expenditure from ' . streamline_date($start_date) . ' to ' . streamline_date($end_date) }}</h2>
<hr>
<p class="text-muted m-b-30">{{ __('insurance_reports.export_data_to_csv_and_excel') }}</p>
<div class="table-responsive">
<table id="table" class="table table-striped color-bordered-table success-bordered-table">
<thead>
<tr>
<th>{{ __('insurance_reports.patient_name') }}</th>
<th>{{ __('insurance_reports.items') }}</th>
<th>{{ __('insurance_reports.quantities') }}</th>
<th>{{ __('insurance_reports.amount_paid') }}</th>
<th>{{ __('insurance_reports.date_paid') }}</th>
</tr>
</thead>
<tbody>
@php $total = 0; @endphp
@foreach($insurance_claims as $insurance_claim)
<tr>
<td>{!! insurance_flag($insurance_claim->patient_id) !!} ({{ get_name($insurance_claim->patient_id, 'id', 'number', 'patients') }})</td>
@php
$item_ids = explode(",", $insurance_claim->item_ids);
$item_quantities = explode(",", $insurance_claim->item_quantities);
@endphp
<td>
<ul>
@for($i = 0; $i < count($item_ids); $i++)
@if($item_type != 6)
<li>{{ $items[$item_ids[$i]] ?? '' }}</li>
@else
<li>{{ $items[get_name($item_ids[$i], 'id', 'bed_category_id', 'insurance_inpatient_accommodation_rates')] ?? '' }}</li>
@endif
@endfor
</ul>
</td>
<td>
<ul>
@for($i = 0; $i < count($item_quantities); $i++)
<li>{{ $item_quantities[$i] }}</li>
@endfor
</ul>
</td>
<td>{{ ugandan_shillings($insurance_claim->primary_plan_claim_total) }}</td>
<td>{{ streamline_date_time($insurance_claim->created_at) }}</td>
</tr>
@php $total += $insurance_claim->primary_plan_claim_total; @endphp
@endforeach
<tr>
<td></td>
<td></td>
<td><b>{{ __('insurance_reports.total') }}</b></td>
<td><b>{{ ugandan_shillings($total) }}</b></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</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>
<script>
$('#table').DataTable({
dom: 'Bfrtip',
bInfo: false,
bPaginate: false,
ordering: false,
buttons: [
{
extend: 'pdf',
title: '{{ __('insurance_reports.chi_expenditure_details') }}'
},
]
});
</script>
@endpush
@@ -0,0 +1,219 @@
@extends('layouts.main')
@push('styles')
<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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance_reports.chi_income_received') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_reports.dashboard') }}</a></li>
<li><a href="{{ route('insurance.index') }}">{{ __('insurance_reports.CHI_reports') }}</a></li>
<li class="active">{{ __('insurance_reports.chi_income') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="panel panel-default col-md-4">
<div class="panel-body">
{{ Form::open(['route' => 'insurance_reports.insurance_income_received']) }}
<div class="form-group">
{{ Form::label('start_date', __('insurance_reports.start_date')) }}
<div class="input-group">
{{ Form::text('start_date', '', ['class'=>'form-control', 'readonly', 'id'=>'start_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
<div class="form-group">
{{ Form::label('end_date', __('insurance_reports.end_date')) }}
<div class="input-group">
{{ Form::text('end_date', '', ['class'=>'form-control', 'readonly', 'id'=>'end_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
<div class="form-group">
{{ Form::submit(__('insurance_reports.submit'), ['class'=>'btn btn-success pull-right']) }}
</div>
{{ Form::close() }}
</div>
</div>
<div class="col-md-8">
<div class="panel panel-default">
<div class="panel-body">
<h4><label class="label label-info">{{ $search_text }}</label></h4>
<br><br>
{{-- <h5>{{ __('insurance_reports.received_premiums') }}</h5>
<table class="table table-striped table-bordered">
<tr>
<th width="170px">{{ __('insurance_reports.total_premiums') }}</th>
<td><a href="/insurance_reports/insurance_income_received_details">{{ ugandan_shillings($premiums) }}</a></td>
</tr>
</table>
<br>
<h5>{{ __('insurance_reports.received_co_payments') }}</h5>
<table class="table table-striped table-bordered">
<tr>
<th width="170px">{{ __('insurance_reports.total_co_payments') }}</th>
<td><a href="/insurance_reports/insurance_deposit_income">{{ ugandan_shillings($co_payments) }}</a></td>
</tr>
</table>
<br>
<h5>{{ __('insurance_reports.total_income') }}</h5>
<table class="table table-striped table-bordered">
<tr>
<th width="170px">{{ __('insurance_reports.total_income') }}</th>
<td>{{ ugandan_shillings($total) }}</td>
</tr>
</table>
<br>
<h5>{{ __('insurance_reports.total_expenditure') }}</h5>
<table class="table table-striped table-bordered">
<tr>
<th width="170px">{{ __('insurance_reports.total_expenditure') }}</th>
<td><a href="/insurance_reports/insurance_expenditure">{{ ugandan_shillings($expenditure_total) }}</a></td>
</tr>
</table>
<br>
<h5>{{ __('insurance_reports.net_profit') }}</h5>
<table class="table table-striped table-bordered">
<tr>
<th width="170px">{{ __('insurance_reports.net_profit') }}</th>
<td>{{ ugandan_shillings($total - $expenditure_total) }}</td>
</tr>
</table> --}}
<table class="table color-bordered-table success-bordered-table" id="table">
<thead>
<tr>
<th>Title</th>
<th>Amount</th>
</tr>
</thead>
<tbody>
<tr>
<td width="60%">{{ __('insurance_reports.total_premiums') }}</td>
<td><a href="/insurance_reports/insurance_income_received_details">{{ ugandan_shillings($premiums) }}</a></td>
</tr>
<tr>
<td width="60%">{{ __('insurance_reports.total_co_payments') }}</td>
<td><a href="/insurance_reports/insurance_deposit_income">{{ ugandan_shillings($co_payments) }}</a></td>
</tr>
<tr>
<td width="60%">{{ __('insurance_reports.total_income') }}</td>
<td>{{ ugandan_shillings($total) }}</td>
</tr>
<tr>
<td width="60%">{{ __('insurance_reports.total_expenditure') }}</td>
<td><a href="/insurance_reports/insurance_expenditure">{{ ugandan_shillings($expenditure_total) }}</a></td>
</tr>
<tr>
<td width="60%">{{ __('insurance_reports.net_profit') }}</td>
<td>{{ ugandan_shillings($total - $expenditure_total) }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
<!-- Date Picker Plugin JavaScript -->
<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/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 src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
<script type="text/javascript">
$('#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',
ordering:false,
paging:false,
searching:false,
bInfo:false,
// buttons: [
// 'copy',
// {
// extend: 'excel',
// message: 'LIST OF DRUGS',
// exportOptions: {
// columns: [0, 1, 2, 3, 4, 5, 6]
// },
// title:'{{ __('insurance_reports.expired_CHI') }}'
// },
// {
// extend: 'csv',
// exportOptions: {
// columns: [0, 1, 2, 3, 4, 5, 6]
// },
// title:'{{ __('insurance_reports.expired_CHI') }}'
// },
// {
// extend: 'pdf',
// exportOptions: {
// columns: [0, 1, 2, 3, 4, 5, 6]
// },
// title:'{{ __('insurance_reports.expired_CHI') }}'
// },
// {
// extend: 'print',
// exportOptions: {
// columns: [0, 1, 2, 3, 4, 5, 6]
// },
// customize: function (win) {
// $(win.document.body)
// .css('font-size', '10pt')
// .css('background', '#fff')
// .prepend(
// '<img src="<?php echo asset('uploads/logo/logo-sm.png'); ?>" style="position:absolute; top:0; right:0;" />'
// );
// $(win.document.body).find('table')
// .addClass('compact')
// .css('font-size', 'inherit');
// },
// title:'{{ __('insurance_reports.expired_CHI') }}'
// },
// ]
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
</script>
@endpush
@@ -0,0 +1,135 @@
@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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance_reports.chi_income_received') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_reports.dashboard') }}</a></li>
<li><a href="{{ route('insurance.index') }}">{{ __('insurance_reports.CHI_reports') }}</a></li>
<li class="active">{{ __('insurance_reports.income_received_from_premiums') }}</li>
</ol>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<h4><label class="label label-info">{{ $search_text }}</label></h4>
<br><br>
<div class="table-responsive">
<table id="table" class="table table-striped table-bordered">
<thead>
<tr>
<th>{{ __('insurance_reports.group_name') }}</th>
<th>{{ __('insurance_reports.family_name') }}</th>
<th>{{ __('insurance_reports.amount_paid') }}</th>
<th>{{ __('insurance_reports.start_date') }}</th>
<th>{{ __('insurance_reports.end_date') }}</th>
</tr>
</thead>
<tbody>
@php
$total_amount = 0;
@endphp
@foreach($insurance_subscriptions as $insurance_subscription)
@php
$explodeFamilyId = explode(",", $insurance_subscription->family_heads);
$explodeFamilyAmount = explode(",", $insurance_subscription->family_amount);
$count = count($explodeFamilyId);
$total_group_amount = array_sum($explodeFamilyAmount);
$total_amount += $total_group_amount;
$rowspan = $count +1;
@endphp
<tr>
<td rowspan='<?php echo $count + 1; ?>'>{{ get_name($insurance_subscription->group_id, 'id', 'name', 'insurance_groups') }}</td>
<td>{{ get_name($explodeFamilyId[0], 'id', 'name', 'insurance_heads_of_family') }}</td>
<td>{{ ugandan_shillings($explodeFamilyAmount[0]) }}</td>
<td>{{ streamline_date($insurance_subscription->start_date) }}</td>
<td>{{ streamline_date($insurance_subscription->end_date) }}</td>
</tr>
@for($i = 1; $i < count($explodeFamilyId); $i++)
<tr>
@for ($t=1; $t<$rowspan; $t++)
<td style="display: none;"></td>
@endfor
<td>{{ get_name($explodeFamilyId[$i], 'id', 'name', 'insurance_heads_of_family') }}</td>
<td>{{ isset($explodeFamilyAmount[$i]) ? ugandan_shillings($explodeFamilyAmount[$i]) : ugandan_shillings(0) }}</td>
<td>{{ streamline_date($insurance_subscription->start_date) }}</td>
<td>{{ streamline_date($insurance_subscription->end_date) }}</td>
</tr>
@endfor
<tr>
@for ($a=1; $a<$rowspan; $a++)
<td style="display: none;"></td>
@endfor
<td><b>{{ __('insurance_reports.group_total') }}</b></td>
<td>{{ ugandan_shillings($total_group_amount) }}</td>
<td></td>
<td></td>
</tr>
@endforeach
@if (count($single_group_receipts) > 0)
<tr>
<td colspan="3"><b>{{ __('insurance_reports.single_group_receipts') }}</b></td>
<td></td>
</tr>
@foreach ($single_group_receipts as $group_receipts)
<tr>
<td>{{ get_name($group_receipts->group_id, 'id', 'name', 'insurance_groups') }}</td>
<td></td>
<td>{{ ugandan_shillings($group_receipts->amount) }}</td>
<td>{{ streamline_date($group_receipts->start_date) }}</td>
<td>{{ streamline_date($group_receipts->end_date) }}</td>
</tr>
@php $total_amount += $group_receipts->amount; @endphp
@endforeach
@endif
<tr>
<td></td>
<td><b>{{ __('insurance_reports.total') }}</b></td>
<td>{{ ugandan_shillings($total_amount) }}</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</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>
<script>
$('#table').DataTable({
dom: 'Bfrtip',
ordering:false,
pageLength: 100,
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
</script>
@endpush
@@ -0,0 +1,173 @@
@extends('layouts.main')
@push('styles')
<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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance_reports.chi_premiums_collected') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_reports.dashboard') }}</a></li>
<li><a href="{{ route('insurance.index') }}">{{ __('insurance_reports.CHI_reports') }}</a></li>
<li class="active">{{ __('insurance_reports.CHI_transactions') }}</li>
</ol>
</div>
</div>
@include('flash::message')
@include('errors.list')
<div class="white-box">
{{ Form::open(['route' => 'insurance_reports.insurance_transactions']) }}
<div class="row">
<div class="col-md-4">
<div class="form-group">
{{ Form::label('start_date', __('insurance_reports.start_date')) }}
<div class="input-group">
{{ Form::text('start_date', '', ['class'=>'form-control', 'readonly', 'id'=>'start_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
{{ Form::label('end_date', __('insurance_reports.end_date')) }}
<div class="input-group">
{{ Form::text('end_date', '', ['class'=>'form-control', 'readonly', 'id'=>'end_date']) }}
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
{{ Form::submit(__('insurance_reports.submit'), ['class'=>'btn btn-success pull-right']) }}
</div>
</div>
</div>
{{ Form::close() }}
<hr>
<h4><label class="label label-info">{{ $search_text }}</label></h4>
<br><br>
<div class="table-responsive">
<table id="table" class="table table-striped table-bordered">
<thead>
<tr>
<th>#</th>
<th>{{ __('insurance_reports.group_name') }}</th>
<th>{{ __('insurance_reports.amount_paid') }}</th>
<th>{{ __('insurance_reports.start_date') }}</th>
<th>{{ __('insurance_reports.end_date') }}</th>
<th>{{ __('insurance_reports.payment_date') }}</th>
<th>{{ __('insurance_reports.received_on') }}</th>
<th>{{ __('insurance_reports.received_by') }}</th>
</tr>
</thead>
<tbody>
@php $counter = 1; $total_amount = 0; @endphp
@foreach($insurance_transactions as $insurance_transaction)
<tr>
<td>{{ $counter }}</td>
<td>{{ $insurance_groups[$insurance_transaction->group_id] }}</td>
<td>{{ ugandan_shillings($insurance_transaction->amount) }}</td>
<td>{{ streamline_date($insurance_transaction->start_date) }}</td>
<td>{{ streamline_date($insurance_transaction->end_date) }}</td>
<td>{{ streamline_date($insurance_transaction->payment_date) }}</td>
<td>{{ streamline_date_time($insurance_transaction->created_at) }}</td>
<td>{{ get_full_name($insurance_transaction->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
</tr>
@php $counter++; $total_amount += $insurance_transaction->amount; @endphp
@endforeach
</tbody>
</table>
</div>
<h3>Total Premiums Collected: {{ ugandan_shillings($total_amount) }}</h3>
</div>
@endsection
@push('scripts')
<!-- Date Picker Plugin JavaScript -->
<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/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 src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
<script type="text/javascript">
$('#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',
buttons: [
'copy',
{
extend: 'excel',
message: 'LIST OF DRUGS',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6, 7]
},
title:'{{ __('insurance_reports.chi_premiums_collected') }}'
},
{
extend: 'csv',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6, 7]
},
title:'{{ __('insurance_reports.chi_premiums_collected') }}'
},
{
extend: 'pdf',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6, 7]
},
title:'{{ __('insurance_reports.chi_premiums_collected') }}'
},
{
extend: 'print',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6, 7]
},
customize: function (win) {
$(win.document.body)
.css('font-size', '10pt')
.css('background', '#fff')
.prepend(
'<img src="<?php echo asset('uploads/logo/logo-sm.png'); ?>" style="position:absolute; top:0; right:0;" />'
);
$(win.document.body).find('table')
.addClass('compact')
.css('font-size', 'inherit');
},
title:'{{ __('insurance_reports.chi_premiums_collected') }}'
},
]
});
</script>
@endpush
@@ -0,0 +1,241 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
<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-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance_reports.insurance_about_to_expire') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_reports.dashboard') }}</a></li>
<li><a href="{{ route('insurance.index') }}">{{ __('insurance_reports.insurance_reports') }}</a></li>
<li class="active">{{ __('insurance_reports.insurance_about_to_expire') }}</li>
</ol>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
{{ Form::open(['route' => 'insurance_reports.view_expiry_status']) }}
<div class="row">
<div class="col-md-3">
<div class="form-group">
{{ Form::label('group_id', 'GROUP NAME') }}
{{ Form::select('group_id', $insurance_group_options, '', ['class' => 'form-control group_id', 'required']) }}
<div class="help-block with-errors"></div>
</div>
</div>
<div class="col-md-2">
<div class="form-group" style="display: none;" id="searchby">
{{ Form::label('search_by', __('patient_flow_monitoring.date')) }}
{{ Form::select('search_by', ['4'=>'Today', '0'=>'Last 24 hours','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', __('patient_flow_monitoring.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', __('patient_flow_monitoring.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-1">
<div class="form-group" style="padding-top: 5px;"><br>
{{ Form::button(__('patient_flow_monitoring.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10', 'id'=>'select_patient']) }}
</div>
</div>
</div>
{{ Form::close() }}
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<p class="text-muted m-b-30">{{ __('insurance_reports.export_data_to_csv_and_excel') }}</p>
<div class="table-responsive">
<table id="table" class="table table-striped table-bordered">
<thead>
<tr>
<th>#</th>
<th>{{ __('insurance_reports.group_name') }}</th>
<th>{{ __('insurance_reports.amount_paid') }}</th>
<th>{{ __('insurance_reports.start_date') }}</th>
<th>{{ __('insurance_reports.end_date') }}</th>
<th>{{ __('insurance_reports.payment_date') }}</th>
<th>{{ __('insurance_reports.insurance_status') }}</th>
<th>{{ __('insurance_reports.details') }}</th>
</tr>
</thead>
<tbody>
@php $counter = 1 @endphp
@foreach($insurance_groups as $insurance_group)
@php
$amount = group_amount_sum($insurance_group->id);
$dateToday = date('Y-m-d');
$date1 = date_create($dateToday);
$date2 = date_create($insurance_group->end_date);
$diff = date_diff($date1, $date2);
$days = ($diff->format("%R%a "));
@endphp
@if($days <= 30)
<tr>
<td>{{ $counter }}</td>
<td>{{ $insurance_group->name }}</td>
<td>{{ ugandan_shillings($amount) }}</td>
<td>{{ streamline_date($insurance_group->start_date) }}</td>
<td>{{ streamline_date($insurance_group->end_date) }}</td>
<td>{{ streamline_date($insurance_group->payment_date) }}</td>
<td>
@if(date('Y-m-d') > $insurance_group->end_date)
<font color="red"><strong>{{ __('insurance_reports.inactive') }}</strong></font>
@else
<font color="green" ><strong>{{ __('insurance_reports.active') }}</strong></font>
@endif
</td>
<td>
<a href="/insurance_reports/view_expiry_status_details/{{ $insurance_group->id }}" class="btn btn-success">{{ __('insurance_reports.details') }}</a>
</td>
</tr>
@php $counter++; @endphp
@endif
@endforeach
</tbody>
</table>
</div>
</div>
<div class="panel-footer">
<p>{{ __('insurance_reports.total_insurance_transactions') }}: {{ ugandan_shillings($total_insurance) }}</p>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<!-- Date Picker Plugin JavaScript -->
<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>
$('.group_id').select2({
placeholder: "Select"
});
$('#table').DataTable({
dom: 'Bfrtip',
pageLength: 50,
ordering:false,
buttons: [
'copy',
{
extend: 'excel',
message: 'LIST OF DRUGS',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6]
},
title:'{{ __('insurance_reports.insurance_about_to_expire') }}'
},
{
extend: 'csv',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6]
},
title:'{{ __('insurance_reports.insurance_about_to_expire') }}'
},
{
extend: 'pdf',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6]
},
title:'{{ __('insurance_reports.insurance_about_to_expire') }}'
},
{
extend: 'print',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6]
},
customize: function (win) {
$(win.document.body)
.css('font-size', '10pt')
.css('background', '#fff')
.prepend(
'<img src="<?php echo asset('uploads/logo/logo-sm.png'); ?>" style="position:absolute; top:0; right:0;" />'
);
$(win.document.body).find('table')
.addClass('compact')
.css('font-size', 'inherit');
},
title:'{{ __('insurance_reports.insurance_about_to_expire') }}'
},
]
});
$('#datepicker-autoclose,#datepicker-autoclose-1,#datepicker-autoclose-2,#ward_admission_date').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
@@ -0,0 +1,95 @@
@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-lg-4 col-md-6 col-sm-4 col-xs-12">
<h4 class="page-title">{{ $group_name }} {{ __('insurance_reports.premiums_history') }}</h4>
</div>
<div class="col-lg-8 col-sm-8 col-md-6 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_reports.dashboard') }}</a></li>
<li><a class="active"> {{ __('insurance_reports.CHI_reports') }}</a></li>
<li class="active">{{ $group_name }} {{ __('insurance_reports.details') }}</li>
</ol>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<p class="text-muted m-b-30">{{ __('insurance_reports.export_data_to_csv_and_excel') }}</p>
<div class="table-responsive">
<table id="table" class="table table-striped table-bordered">
<thead>
<tr>
<th>#</th>
<th></th>
<th>{{ __('insurance_reports.amount_paid') }}</th>
<th>{{ __('insurance_reports.start_date') }}</th>
<th>{{ __('insurance_reports.end_date') }}</th>
<th>{{ __('insurance_reports.payment_date') }}</th>
<th>{{ __('insurance_reports.insurance_status') }}</th>
</tr>
</thead>
<tbody>
@php $counter = 1 @endphp
@foreach($insurance_subscriptions as $insurance_subscription)
<tr>
<td> {{ $counter }} </td>
<td>
@php
$this_premium_covered_members_array = $insurance_subscription->covered_member_ids ? explode(",",$insurance_subscription->covered_member_ids) : [];
@endphp
<ol>
@for ($i = 0; $i < count($this_premium_covered_members_array); $i++)
<li>{!! insurance_flag(get_name($this_premium_covered_members_array[$i], "id", "patient_id", "insurance_members")) !!}</li>
@endfor
</ol>
</td>
<td> {{ ugandan_shillings($insurance_subscription->amount) }} </td>
<td> {{ streamline_date($insurance_subscription->start_date) }} </td>
<td> {{ streamline_date($insurance_subscription->end_date) }} </td>
<td> {{ streamline_date($insurance_subscription->payment_date) }} </td>
<td>
@if (date('Y-m-d') < $insurance_subscription->end_date)
<font color="green" ><strong>{{ __('insurance_reports.active') }}</strong></font>
@else
<font color="red"><strong>{{ __('insurance_reports.inactive') }}</strong></font>
@endif
</td>
</tr>
@php $counter++ @endphp
@endforeach
</tbody>
</table>
</div>
</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>
<script>
$('#table').DataTable({
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
</script>
@endpush
@@ -0,0 +1,123 @@
@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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance_benefits.add_tariff') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_tariffs/view_tariffs">{{ __('insurance_benefits.insurance_tariffs') }}</a></li>
<li class="active">{{ __('insurance_benefits.create') }}</li>
</ol>
</div>
</div>
@include('insurance::insurance_benefits.menu')
<div class="white-box">
@include('flash::message')
<h3>{{ __('insurance_benefits.insurance_benefit') }}: {{ $benefit->name }}</h3>
<h4>{{ __('insurance_benefits.item_type') }}: {{ [1 => 'Services', 2 => 'Procedures', 3 => 'Investigations', 4 => 'Drugs', 5 => 'Sundries'][$item_type] }}</h4>
<h4>{{ __('insurance_benefits.item_name') }}: {{ $item_name }}</h4>
<hr>
{{ Form::open(['route' => 'insurance_tariffs.save_tariff']) }}
{{ Form::hidden('benefit_id', $benefit->id, ['id' => 'benefit_id']) }}
{{ Form::hidden('item_id', $item_id, ['id' => 'item_id']) }}
{{ Form::hidden('item_type', $item_type, ['id' => 'item_type']) }}
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('tariff_name', __('insurance_benefits.tariff_name')) }}
{{ Form::text('tariff_name', '', ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('cash_price', __('insurance_benefits.cash_price')) }}
{{ Form::number('cash_price', $item_cash_price, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="form-group">
{{ Form::label('co_payment', __('insurance_benefits.co_payment')) }}
{{ Form::number('co_payment', $co_payment, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="form-group">
{{ Form::label('ipd_co_payment', __('insurance_benefits.ipd_co_payment')) }}
{{ Form::number('ipd_co_payment', $ipd_co_payment, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="form-group">
{{ Form::label('age_limit', __('insurance_benefits.age_limit')) }}
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('age_limit_start',__('insurance_benefits.start')) }}
{{ Form::number('age_limit_start','',['class' => 'form-control compulsory']) }}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('age_limit_end',__('insurance_benefits.end')) }}
{{ Form::number('age_limit_end','',['class' => 'form-control compulsory']) }}
</div>
</div>
</div>
</div>
<div class="form-group">
{{ Form::label('age_type', __('insurance_benefits.age_type')) }}
{{ Form::select('age_type', [0 => 'Days', 1 => 'Months', 2 => 'Years'], 2, ['class' => 'form-control compulsory', 'required']) }}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('gender', __('insurance_benefits.gender')) }}
{{ Form::select('gender', [0 => 'All', 1 => 'Male', 2 => 'Female'], 0, ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('authorisation', __('insurance_benefits.authorisation')) }}
<br><br>
{{ Form::radio('authorisation', 1, false, ['required']) }} Yes &nbsp;&nbsp;
{{ Form::radio('authorisation', 0, false, ['required']) }} No
</div>
<div class="form-group">
{{ Form::label('tariff_price', __('insurance_benefits.tariff_price')) }}
{{ Form::number('tariff_price', '', ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('ipd_tariff_price', __('insurance_benefits.ipd_tariff_price')) }}
{{ Form::number('ipd_tariff_price', '', ['class' => 'form-control compulsory', 'required']) }}
</div>
</div>
</div>
{{ Form::button(__('insurance_groups.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('insurance_groups.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
@endsection
@push('scripts')
<script></script>
@endpush
@@ -0,0 +1,122 @@
@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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance_benefits.edit_tariff') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_tariffs/view_tariffs">{{ __('insurance_benefits.insurance_tariffs') }}</a></li>
<li class="active">{{ __('insurance_benefits.create') }}</li>
</ol>
</div>
</div>
@include('insurance::insurance_benefits.menu')
<div class="white-box">
@include('flash::message')
<h3>{{ __('insurance_benefits.insurance_benefit') }}: {{ $benefit->name }}</h3>
<h4>{{ __('insurance_benefits.item_type') }}: {{ [1 => 'Services', 2 => 'Procedures', 3 => 'Investigations', 4 => 'Drugs', 5 => 'Sundries'][$item_type] }}</h4>
<h4>{{ __('insurance_benefits.item_name') }}: {{ $item_name }}</h4>
<hr>
{{ Form::open(['route' => 'insurance_tariffs.update_tariff']) }}
{{ Form::hidden('tariff_id', $tariff->id, ['id' => 'benefit_id']) }}
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('name', __('insurance_benefits.tariff_name')) }}
{{ Form::text('name', $tariff->name, ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('cash_price', __('insurance_benefits.cash_price')) }}
{{ Form::number('cash_price', $item_cash_price, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="form-group">
{{ Form::label('co_payment', __('insurance_benefits.co_payment')) }}
{{ Form::number('co_payment', $co_payment, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="form-group">
{{ Form::label('ipd_co_payment', __('insurance_benefits.ipd_co_payment')) }}
{{ Form::number('ipd_co_payment', $ipd_co_payment, ['class' => 'form-control', 'readonly']) }}
</div>
<div class="form-group">
{{ Form::label('age_limit', __('insurance_benefits.age_limit')) }}
@php $age_limits = explode(",", $tariff->age_limit); @endphp
<div class="row">
<div class="col-md-6">
<div class="form-group">
{{ Form::label('age_limit_start',__('insurance_benefits.start')) }}
{{ Form::number('age_limit_start', $age_limits[0],['class' => 'form-control compulsory']) }}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('age_limit_end',__('insurance_benefits.end')) }}
{{ Form::number('age_limit_end', $age_limits[1],['class' => 'form-control compulsory']) }}
</div>
</div>
</div>
</div>
<div class="form-group">
{{ Form::label('age_type', __('insurance_benefits.age_type')) }}
{{ Form::select('age_type', [0 => 'Days', 1 => 'Months', 2 => 'Years'], $tariff->age_type, ['class' => 'form-control compulsory', 'required']) }}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{{ Form::label('gender', __('insurance_benefits.gender')) }}
{{ Form::select('gender', [0 => 'All', 1 => 'Male', 2 => 'Female'], $tariff->gender, ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('authorisation', __('insurance_benefits.authorisation')) }}
<br><br>
{{ Form::radio('authorisation', 1, $tariff->authorisation == 1, ['required']) }} Yes &nbsp;&nbsp;
{{ Form::radio('authorisation', 0, $tariff->authorisation == 0, ['required']) }} No
</div>
<div class="form-group">
{{ Form::label('tariff_price', __('insurance_benefits.tariff_price')) }}
{{ Form::number('tariff_price', $tariff->tariff_price, ['class' => 'form-control compulsory', 'required']) }}
</div>
<div class="form-group">
{{ Form::label('ipd_tariff_price', __('insurance_benefits.ipd_tariff_price')) }}
{{ Form::number('ipd_tariff_price', $tariff->ipd_tariff_price, ['class' => 'form-control compulsory', 'required']) }}
</div>
</div>
</div>
{{ Form::button(__('insurance_groups.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('insurance_groups.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
@endsection
@push('scripts')
<script></script>
@endpush
@@ -0,0 +1,131 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
<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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance_benefits.inactive_insurance_tariffs') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_tariffs/view_tariffs">{{ __('insurance_benefits.insurance_tariffs') }}</a></li>
<li class="active">{{ __('insurance_benefits.inactive') }}</li>
</ol>
</div>
</div>
<div class="white-box">
@include('flash::message')
<div class="table-responsive">
<table id="table" class="table table-striped color-bordered-table success-bordered-table table-hover">
<thead>
<tr>
<th>{{ __('insurance_benefits.tariff_name') }}</th>
<th>{{ __('insurance_benefits.item_name') }}</th>
<th>{{ __('insurance_benefits.item_type') }}</th>
<th>{{ __('insurance_benefits.benefit_name') }}</th>
<th>{{ __('insurance_benefits.plan_name') }}</th>
<th>{{ __('insurance_benefits.gender') }}</th>
<th>{{ __('insurance_benefits.age_limit') }}</th>
<th>{{ __('insurance_benefits.cash_price') }}</th>
<th>{{ __('insurance_benefits.co_payment') }}</th>
<th>{{ __('insurance_benefits.tariff_price') }}</th>
<th>{{ __('insurance_benefits.ipd_co_payment') }}</th>
<th>{{ __('insurance_benefits.ipd_tariff_price') }}</th>
<th>{{ __('insurance_benefits.authorisation') }}</th>
<th></th>
</tr>
</thead>
<tbody>
@php
$time_periods = [0 => 'Days', 1 => 'Months', 2 => 'Years'];
$genders = [0 => 'All', 1 => 'Male', 2 => 'Female'];
@endphp
@foreach($tariffs as $tariff)
@php $age_limits = explode(",", $tariff->age_limit); @endphp
<tr>
<td>{{ $tariff->name }}</td>
<td>
@if ($tariff->item_type == 1)
{{ $services[$tariff->item_id] ?? '' }}
@elseif ($tariff->item_type == 2)
{{ $procedures[$tariff->item_id] ?? '' }}
@elseif ($tariff->item_type == 3)
{{ $investigations[$tariff->item_id] ?? '' }}
@elseif ($tariff->item_type == 4)
{{ $drugs[$tariff->item_id] ?? '' }}
@elseif ($tariff->item_type == 5)
{{ $sundries[$tariff->item_id] ?? '' }}
@endif
</td>
<td>
@if ($tariff->item_type == 1)
Services
@elseif ($tariff->item_type == 2)
Procedures
@elseif ($tariff->item_type == 3)
Investigations
@elseif ($tariff->item_type == 4)
Drugs
@elseif ($tariff->item_type == 5)
Sundries
@endif
</td>
<td>{{ $insurance_benefits[$tariff->benefit_id] ?? '' }}</td>
<td>{{ $insurance_plans[$tariff->plan_id] ?? '' }}</td>
<td>{{ ($genders[$tariff->gender] ?? 'All') }}</td>
<td>{{ ($age_limits[0] ?? "0") . ' to ' . ($age_limits[1] ?? "0") . ' ' . $time_periods[$tariff->age_type] ?? 'years' }}</td>
@php
$item_details = get_item_insurance_details($tariff->item_id, $tariff->item_type, $tariff->benefit_id);
$item_cash_price = $item_details ? $item_details['cash_price'] : 0;
$co_payment = $item_details ? $item_details['co_payment'] : 0;
$ipd_co_payment = $item_details ? ($item_details['ipd_co_payment'] ?? 0) : 0;
@endphp
<td>{{ ugandan_shillings($item_cash_price) }}</td>
<td>{{ ugandan_shillings($co_payment) }}</td>
<td>{{ ugandan_shillings($tariff->tariff_price) }}</td>
<td>{{ ugandan_shillings($ipd_co_payment) }}</td>
<td>{{ ugandan_shillings($tariff->ipd_tariff_price) }}</td>
<td>{{ ($tariff->authorisation == 1 ? 'Yes' : 'No') }}</td>
<td><a href='/insurance_tariffs/activate_tariff/{{ $tariff->id }}' class='btn btn-success btn-sm btn-rounded' onclick="return confirm('Are you sure?')">Restore</a></td>
</tr>
@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/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>
$('#table').DataTable({
dom: 'Bfrtip',
bInfo: false,
bPaginate: false,
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
</script>
@endpush
@@ -0,0 +1,174 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
<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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('insurance_benefits.insurance_tariffs') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('insurance_groups.dashboard') }}</a></li>
<li><a href="/insurance_tariffs/view_tariffs">{{ __('insurance_benefits.insurance_tariffs') }}</a></li>
<li class="active">{{ __('insurance_benefits.view') }}</li>
</ol>
</div>
</div>
<div class="white-box">
{{ Form::open(['method'=>'post','route' => 'insurance_tariffs.view_tariffs']) }}
<div class="row">
<div class="col-md-3">
<div class="form-group">
{{ Form::label('insurance_plan', 'Insurance Plan') }}
{{ Form::select('insurance_plan',$insurance_plans,'',['class'=>'form-control', 'id' => 'insurance_plan']) }}
</div>
</div>
<div class="col-md-3">
<div class="form-group">
{{ Form::label('insurance_benefit', 'Insurance Benefit') }}
{{ Form::select('insurance_benefit',$insurance_benefits,'',['class'=>'form-control', 'id' => 'insurance_benefit']) }}
</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">
<a href="/insurance_tariffs/view_inactive_tariffs" class="btn btn-warning">View deactivated tariffs</a>
<br><br>
@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_benefits.tariff_name') }}</th>
<th>{{ __('insurance_benefits.item_name') }}</th>
<th>{{ __('insurance_benefits.item_type') }}</th>
<th>{{ __('insurance_benefits.benefit_name') }}</th>
<th>{{ __('insurance_benefits.plan_name') }}</th>
<th>{{ __('insurance_benefits.gender') }}</th>
<th>{{ __('insurance_benefits.age_limit') }}</th>
<th>{{ __('insurance_benefits.cash_price') }}</th>
<th>{{ __('insurance_benefits.co_payment') }}</th>
<th>{{ __('insurance_benefits.tariff_price') }}</th>
<th>{{ __('insurance_benefits.ipd_co_payment') }}</th>
<th>{{ __('insurance_benefits.ipd_tariff_price') }}</th>
<th>{{ __('insurance_benefits.authorisation') }}</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@php
$time_periods = [0 => 'Days', 1 => 'Months', 2 => 'Years'];
$genders = [0 => 'All', 1 => 'Male', 2 => 'Female'];
@endphp
@foreach($tariffs as $tariff)
@php $age_limits = explode(",", $tariff->age_limit); @endphp
<tr>
<td>{{ $tariff->name }}</td>
<td>
@if ($tariff->item_type == 1)
{{ $services[$tariff->item_id] ?? '' }}
@elseif ($tariff->item_type == 2)
{{ $procedures[$tariff->item_id] ?? '' }}
@elseif ($tariff->item_type == 3)
{{ $investigations[$tariff->item_id] ?? '' }}
@elseif ($tariff->item_type == 4)
{{ $drugs[$tariff->item_id] ?? '' }}
@elseif ($tariff->item_type == 5)
{{ $sundries[$tariff->item_id] ?? '' }}
@endif
</td>
<td>
@if ($tariff->item_type == 1)
Services
@elseif ($tariff->item_type == 2)
Procedures
@elseif ($tariff->item_type == 3)
Investigations
@elseif ($tariff->item_type == 4)
Drugs
@elseif ($tariff->item_type == 5)
Sundries
@endif
</td>
<td>{{ $insurance_benefits[$tariff->benefit_id] ?? '' }}</td>
<td>{{ $insurance_plans[$tariff->plan_id] ?? '' }}</td>
<td>{{ ($genders[$tariff->gender] ?? 'All') }}</td>
<td>{{ ($age_limits[0] ?? "0") . ' to ' . ($age_limits[1] ?? "0") . ' ' . $time_periods[$tariff->age_type] ?? 'years' }}</td>
@php
$item_details = get_item_insurance_details($tariff->item_id, $tariff->item_type, $tariff->benefit_id);
$item_cash_price = $item_details ? $item_details['cash_price'] : 0;
$co_payment = $item_details ? $item_details['co_payment'] : 0;
$ipd_co_payment = $item_details ? ($item_details['ipd_co_payment'] ?? 0) : 0;
@endphp
<td>{{ ugandan_shillings($item_cash_price) }}</td>
<td>{{ ugandan_shillings($co_payment) }}</td>
<td>{{ ugandan_shillings($tariff->tariff_price) }}</td>
<td>{{ ugandan_shillings($ipd_co_payment) }}</td>
<td>{{ ugandan_shillings($tariff->ipd_tariff_price) }}</td>
<td>{{ ($tariff->authorisation == 1 ? 'Yes' : 'No') }}</td>
<td>@if(Auth::user()->can('insurance-tariffs-edit')) <a href='/insurance_tariffs/edit/{{ $tariff->id }}' class='btn btn-success btn-sm btn-rounded'>Edit</a>@endif</td>
<td>@if(Auth::user()->can('insurance-tariffs-delete')) <a href='/insurance_tariffs/delete/{{ $tariff->id }}' class='btn btn-danger btn-sm btn-rounded' onclick='return confirm("Are you sure?")'>Deactivate</a>@endif</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/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/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>
$('#insurance_plan, #insurance_benefit').select2({
placeholder: '-- select --',
});
$('#table').DataTable({
dom: 'Bfrtip',
bInfo: false,
bPaginate: false,
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
</script>
@endpush
@@ -0,0 +1,43 @@
@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">{{ __('person_titles.add_person_title') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('person_titles.dashboard') }}</a></li>
<li><a href="/person_titles">{{ __('person_titles.person_titles') }}</a></li>
<li class="active">{{ __('person_titles.create') }}</li>
</ol>
</div>
</div>
@include('insurance::person_titles.menu')
<div class="row">
<div class="col-sm-12">
<!--Flash messages at the top -->
@include('flash::message')
<div class="white-box">
{{ Form::open(['route' => 'person_titles.store', 'data-toggle' => 'validator']) }}
<div class="form-group">
{{ Form::label('name',__('person_titles.title'))}}
{{ Form::text('name','',['class' => 'form-control compulsory', 'required', 'placeholder'=>'e.g. Mrs']) }}
<div class="help-block with-errors"></div>
</div>
{{ Form::button(__('person_titles.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('person_titles.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/js/validator.js') }}"></script>
@endpush
@@ -0,0 +1,44 @@
@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">{{ __('person_titles.edit_person_titles') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('person_titles.dashboard') }}</a></li>
<li><a href="/person_titles">{{ __('person_titles.countries') }}</a></li>
<li class="active">{{ __('person_titles.edit') }}</li>
</ol>
</div>
</div>
@include('insurance::person_titles.menu')
<div class="row">
<div class="col-sm-12">
<!--Flash messages at the top -->
@include('flash::message')
<div class="white-box">
{{ Form::model($person_title, ['method' => 'PUT', 'route' => ['person_titles.update',$person_title], 'data-toggle' => 'validator']) }}
<div class="form-group">
{{ Form::hidden('id', $person_title->id) }}
{{ Form::label('name', __('person_titles.title')) }}
{{ Form::text('name', $person_title->name, ['class' => 'form-control compulsory', 'required', 'placeholder'=>'e.g. Mrs']) }}
<div class="help-block with-errors"></div>
</div>
{{ Form::button(__('person_titles.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('person_titles.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/js/validator.js') }}"></script>
@endpush
@@ -0,0 +1,84 @@
@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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('person_titles.activate_person_titles') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('person_titles.dashboard') }}</a></li>
<li><a href="/person_titles">{{ __('person_titles.person_titles') }}</a></li>
<li class="active">{{ __('person_titles.activate') }}</li>
</ol>
</div>
</div>
@include('insurance::person_titles.menu')
<div class="row">
<div class="col-sm-12">
@include('flash::message')
<div class="white-box">
<p class="text-muted m-b-30">{{ __('person_titles.export_data') }}</p>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>{{ __('person_titles.title') }}</th>
<th></th>
</tr>
</thead>
<tfoot>
<tr>
<th>{{ __('person_titles.title') }}</th>
<th></th>
</tr>
<tbody>
@foreach($person_titles as $person_title)
<tr>
<td>{{ $person_title->name }}</td>
<td>
{{ Form::model($person_title->id ,['method' => 'POST', 'route' => ['person_titles.activate', $person_title->id]]) }}
<button type="submit" class="btn btn-warning" onclick="return confirm('Are you sure?')"><i class="fa fa-check"></i> {{ __('person_titles.activate') }}</button>
{{ Form::close() }}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</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>
<script>
$('.table').DataTable({
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
</script>
@endpush
@@ -0,0 +1,88 @@
@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-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('person_titles.person_titles') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('person_titles.dashboard') }}</a></li>
<li><a href="{{ route('person_titles.index') }}">{{ __('person_titles.person_titles') }}</a></li>
<li class="active">{{ __('person_titles.view') }}</li>
</ol>
</div>
</div>
@include('insurance::person_titles.menu')
<div class="row">
<div class="col-sm-12">
@include('flash::message')
<div class="white-box">
<p class="text-muted m-b-30">{{ __('person_titles.export_data') }}</p>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>{{ __('person_titles.title') }}</th>
<th></th>
<th></th>
</tr>
</thead>
<tfoot>
<tr>
<th>{{ __('person_titles.title') }}</th>
<th></th>
<th></th>
</tr>
</tfoot>
<tbody>
@foreach($person_titles as $person_title)
<tr>
<td>{{ $person_title->name}}</td>
<td>
<a href="/person_titles/{{ $person_title->id }}/edit/" class="btn btn-info"><i class="fa fa-pencil"></i> {{ __('person_titles.edit') }}</a>
</td>
<td>
{{ Form::model($person_title->id ,['method' => 'DELETE', 'route' => ['person_titles.destroy', $person_title->id]]) }}
<button type="submit" class="btn btn-danger" onclick="return confirm('Are you sure?')"><i class="fa fa-trash"></i> {{ __('person_titles.delete') }}</button>
{{ Form::close() }}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</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>
<script>
$('.table').DataTable({
dom: 'Bfrtip',
pageLength: 50,
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
</script>
@endpush
@@ -0,0 +1,7 @@
<div class="panel panel-default">
<div class="panel-body">
<a href="{{ route('person_titles.create') }}" class="nav-item btn btn-default ti-plus"> {{ __('person_titles.add_person_title') }}</a>
<a href="{{ route('person_titles.index') }}" class="nav-item btn btn-default ti-pencil"> {{ __('person_titles.view_person_title') }}</a>
<a href="{{ route('person_titles.inactive') }}" class="nav-item btn btn-default ti-pencil"> {{ __('person_titles.activate_person_title') }}</a>
</div>
</div>
@@ -0,0 +1,73 @@
@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">{{ __('risks.risk') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('risks.dashboard') }}</a></li>
<li><a href="{{ route('risks.index') }}">{{ __('risks.risk') }}</a></li>
<li class="active">{{ __('risks.create') }}</li>
</ol>
</div>
</div>
@include('insurance::risks.menu')
<div class="row">
<div class="col-sm-12">
<!--Flash messages at the top -->
@include('flash::message')
<div class="white-box">
@if ($errors->any())
<div class="alert alert-danger">
<strong>Whoops!</strong> There were some problems with your input.<br><br>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
<div class="row">
<div class="col-md-12">
{{ Form::open(['route' => 'risks.store', 'data-toggle' => 'validator']) }}
<div class="form-group">
{{ Form::label('name', __('risks.risk_name')) }}
{{ Form::text('name', '', ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('code', __('risks.risk_code')) }}
{{ Form::text('code', '', ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('factor', __('risks.risk_factor')) }}
{{ Form::number('factor', '', ['class' => 'form-control compulsory', 'required', 'data-error' => '', 'step' => '0.001', 'min' => 0]) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('amount', __('risks.risk_amount')) }}
{{ Form::number('amount', '', ['class' => 'form-control compulsory', 'required', 'data-error' => '', 'step' => '0.01', 'min' => 0]) }}
<div class="help-block with-errors"></div>
</div>
</div>
{{ Form::button(__('risks.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('risks.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/js/validator.js') }}"></script>
@endpush
@@ -0,0 +1,73 @@
@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">{{ __('risks.risk') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('risks.dashboard') }}</a></li>
<li><a href="{{ route('risks.index') }}">{{ __('risks.risk') }}</a></li>
<li class="active">{{ __('risks.edit') }}</li>
</ol>
</div>
</div>
@include('insurance::risks.menu')
<div class="row">
<div class="col-md-12">
<!--Flash messages at the top -->
@include('flash::message')
<div class="white-box">
@if ($errors->any())
<div class="alert alert-danger">
<strong>Whoops!</strong> There were some problems with your input.<br><br>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
{{ Form::model($risk, ['method' => 'PUT', 'route' => ['risks.update', $risk], 'data-toggle' =>'validator']) }}
<div class="row">
<div class="col-md-12">
<div class="form-group">
{{ Form::label('name', __('risks.risk_name')) }}
{{ Form::text('name', $risk->name, ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('code', __('risks.risk_code')) }}
{{ Form::text('code', $risk->code, ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('factor', __('risks.risk_factor')) }}
{{ Form::number('factor', $risk->factor, ['class' => 'form-control compulsory', 'step' => '0.001', 'required', 'data-error' => '', 'min' => 0]) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('amount', __('risks.risk_amount')) }}
{{ Form::number('amount', $risk->amount, ['class' => 'form-control compulsory', 'required', 'data-error' => '', 'step' => '0.01', 'min' => 0]) }}
<div class="help-block with-errors"></div>
</div>
</div>
{{ Form::button(__('risks.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('risks.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/js/validator.js') }}"></script>
@endpush
@@ -0,0 +1,106 @@
@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" />
<style type="text/css">
.color-bordered-table.success-bordered-table {
border-top: 0px;
}
</style>
@endpush
@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">{{ __('risks.risk') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('risks.dashboard') }}</a></li>
<li><a href="{{ route('risks.index') }}">{{ __('risks.risk') }}</a></li>
<li class="active">{{ __('risks.inactive') }}</li>
</ol>
</div>
</div>
@include('insurance::risks.menu')
<div class="row">
<div class="col-sm-12">
@include('flash::message')
<div class="white-box">
<div class="table-responsive">
<table class="table color-bordered-table success-bordered-table">
<thead>
<tr>
<th>#</th>
<th>{{ __('risks.risk_name') }}</th>
<th>{{ __('risks.risk_code') }}</th>
<th>{{ __('risks.risk_factor') }}</th>
<th>{{ __('risks.risk_amount') }}</th>
<th>{{ __('risks.creator') }}</th>
<th>{{ __('risks.date') }}</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
@php $counter = 1; @endphp
@foreach($risks as $risk)
<tr>
<td>{{ $counter }}</td>
<td>{{ $risk->name }}</td>
<td>{{ $risk->code }}</td>
<td>{{ $risk->factor }}</td>
<td>{{ ugandan_shillings($risk->amount) }}</td>
<td>{{ get_full_name($risk->created_by, "id", 'first_name', 'last_name', 'users') }}</td>
<td>{{ streamline_date_time_short($risk->created_at) }}</td>
<td>
{{ Form::model($risk->id ,['method' => 'POST', 'route' => ['risks.activate', $risk->id]]) }}
<button type="submit" class="btn btn-sm btn-warning btn-rounded"
onclick="return confirm('Are you sure you want to activate this Risk?')"><i
class="fa fa-check"></i> {{ __('risks.activate') }}</button>
{{ Form::close() }}
</td>
</tr>
@php $counter++; @endphp
@endforeach
</tbody>
<tfoot>
<tr>
<th>#</th>
<th>{{ __('risks.risk_name') }}</th>
<th>{{ __('risks.risk_code') }}</th>
<th>{{ __('risks.risk_factor') }}</th>
<th>{{ __('risks.risk_amount') }}</th>
<th>{{ __('risks.creator') }}</th>
<th>{{ __('risks.date') }}</th>
<th>Actions</th>
</tr>
</tfoot>
</table>
</div>
</div>
</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>
<script>
$('.table').DataTable({
pageLength: 10,
order: [],
});
</script>
@endpush
@@ -0,0 +1,123 @@
@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" />
<style type="text/css">
.color-bordered-table.success-bordered-table {
border-top: 0px;
}
</style>
@endpush
@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">{{ __('risks.risk') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('risks.dashboard') }}</a></li>
<li><a href="{{ route('risks.create') }}">{{ __('risks.risk') }}</a></li>
<li class="active">{{ __('risks.index') }}</li>
</ol>
</div>
</div>
@include('insurance::risks.menu')
<div class="row">
<div class="col-sm-12">
@include('flash::message')
<div class="white-box">
@if (session('success'))
<div class="alert alert-success">
{{ session('success') }}
</div>
@endif
<p class="text-muted m-b-30">{{ __('risks.export_data_to_csv_excel_print') }}</p>
<div class="table-responsive">
<table class="table color-bordered-table success-bordered-table">
<thead>
<tr>
<th>#</th>
<th>{{ __('risks.risk_name') }}</th>
<th>{{ __('risks.risk_code') }}</th>
<th>{{ __('risks.risk_factor') }}</th>
<th>{{ __('risks.risk_amount') }}</th>
<th>{{ __('risks.creator') }}</th>
<th>{{ __('risks.date') }}</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
@php $counter = 1; @endphp
@foreach($risks as $risk)
<tr>
<td>{{ $counter }}</td>
<td>{{ $risk->name }}</td>
<td>{{ $risk->code }}</td>
<td>{{ $risk->factor }}</td>
<td>{{ ugandan_shillings($risk->amount) }}</td>
<td>{{ get_full_name($risk->created_by, "id", 'first_name', 'last_name', 'users') }}</td>
<td>{{ streamline_date_time_short($risk->created_at) }}</td>
<td>
@if (Auth::user()->can('insurance-risk-edit'))
<a class="btn btn-sm btn-warning btn-rounded" href="{{ route('risks.edit',$risk->id) }}"><i class="fa fa-pencil"></i> {{ __('risks.edit') }}</a>
@endif
<a class="btn btn-sm btn-rounded btn-info" href="{{ route('risks.show',$risk->id) }}"><i class="fa fa-info-circle"></i> {{ __('risks.view') }}</a>
@if (Auth::user()->can('insurance-risk-delete'))
{{ Form::model($risk->id ,['method' => 'DELETE', 'route' => ['risks.destroy', $risk->id]]) }}
<button type="submit" class="btn btn-sm btn-rounded btn-danger" onclick="return confirm('<?php echo __('risks.are_you_sure')?>')"><i class="fa fa-trash"></i> {{ __('risks.delete') }}</button>
{{ Form::close() }}
@endif
</td>
</tr>
@php $counter++; @endphp
@endforeach
</tbody>
<tfoot>
<tr>
<th>#</th>
<th>{{ __('risks.risk_name') }}</th>
<th>{{ __('risks.risk_code') }}</th>
<th>{{ __('risks.risk_factor') }}</th>
<th>{{ __('risks.risk_amount') }}</th>
<th>{{ __('risks.creator') }}</th>
<th>{{ __('risks.date') }}</th>
<th>Actions</th>
</tr>
</tfoot>
</table>
</div>
</div>
</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>
<script>
$('.table').DataTable({
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
],
pageLength: 10,
order: [],
});
</script>
@endpush
@@ -0,0 +1,13 @@
<div class="panel panel-default">
<div class="panel-body">
@if (Auth::user()->can('insurance-risk-list'))
<a href="{{ route('risks.index') }}" class="nav-item btn btn-default"><i class="fa fa-info-circle" aria-hidden="true"></i><span style="margin-left: 5px">View Risks</span></a>
@endif
@if (Auth::user()->can('insurance-risk-create'))
<a href="{{ route('risks.create') }}" class="nav-item btn btn-default"><i class="fa fa-plus" aria-hidden="true"></i><span style="margin-left: 5px">Add a Risk</span></a>
@endif
@if (Auth::user()->can('insurance-risk-delete'))
<a href="{{ route('risks.inactive') }}" class="nav-item btn btn-default"> <i class="fa fa-undo" aria-hidden="true"></i><span style="margin-left: 5px">Inactive Risks</span></a>
@endif
</div>
</div>
@@ -0,0 +1,58 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
<style type="text/css">
.color-bordered-table.success-bordered-table {
border-top: 0px;
}
</style>
@endpush
@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">{{ __('risks.risk') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('risks.dashboard') }}</a></li>
<li><a href="{{ route('risks.index') }}">{{ __('risks.risk') }}</a></li>
<li class="active">{{ __('risks.edit') }}</li>
</ol>
</div>
</div>
@include('insurance::risks.menu')
<div class="row">
<div class="col-sm-12">
<div class="white-box">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="form-group">
<strong>{{ __('risks.risk_name') }}:</strong>
{{ $risk->name }}
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="form-group">
<strong>{{ __('risks.risk_code') }}:</strong>
{{ $risk->code }}
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="form-group">
<strong>{{ __('risks.risk_factor') }}:</strong>
{{ $risk->factor }}
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="form-group">
<strong>{{ __('risks.risk_amount') }}:</strong>
{{ $risk->amount }}
</div>
</div>
</div>
</div>
</div>
</div>
@endsection