@extends('layouts.main') @push('styles') @endpush @section('content')

{{ __('inpatient.inpatient_billing') }}

@include('patients::allergies.header')

@include('flash::message') @php $total_deposits_paid = 0; $total_amount_to_pay = 0; $discount_amount = 0; $insurance_investigations = 0; $insurance_treatments = 0; $insurance_sundries = 0; $insurance_services = 0; $insurance_procedures = 0; $insurance_tta = 0; $investigation_amount_total = 0; $insurance_opd_treatment = 0; $opd_procedure_insurance_amount_total = 0; $opd_unpaid_treatment_total = $opd_sundries_total_cost = $opd_services_amount_total = $opd_procedure_amount_total = 0; $price_list_set_serial = serialize(['price_list_set' => $price_list_set]); $patient_insurance_status = (patient_insurance_status($patient_id) == 1); $counter = 0; $bill_closed = false; @endphp
@php $price_list_id = is_patient_category_attached_to_price_list($patient_id); @endphp @if(Auth::user()->can('price-list-category-change-billing') && !$patient_insurance_status) {{ Form::open(['route' => 'inpatient_billing', 'data-toggle' => 'validator']) }}
{{ Form::label('price_list_category_id', __('inpatient.price_list_category')) }}

{{ Form::button(__('inpatient.apply_changes'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}

{{ Form::close() }} @endif @if(is_null($inpatient_info->bed_category_id))

{{ __('inpatient.select_bed_category_warning') }}

@endif
{{ Form::open(['route' => 'store_inpatient_bill', 'id' => 'inpatient_bill_form']) }} {{ Form::hidden('billing_price_list', $price_list_set) }} {{ Form::hidden('patient_insurance_status', $patient_insurance_status) }}
@if($inpatient_info->discharged == 1) @php $end_date = new DateTime($inpatient_info->discharged_on) @endphp @else @php $end_date = new DateTime(date('Y-m-d')) @endphp @endif @php $start_date = new DateTime($inpatient_info->admitted_on); $days_spent_in_ward = ($end_date->diff($start_date)->format('%a')); @endphp {{ Form::hidden("duration", $days_spent_in_ward) }} {{ Form::hidden("inpatient_info_id", $inpatient_info->id) }} @if($inpatient_info->discharged == 1) @else @endif
{{ __('inpatient.ward') }} {{ get_name($inpatient_info->ward_id, 'id', 'name', 'wards') }} {{ __('inpatient.bed_category') }} @if(is_null($inpatient_info->bed_category_id)) @else {{ get_name($inpatient_info->bed_category_id, 'id', 'name', 'inpatient_bed_categories') }} @endif {{ __('inpatient.residence') }} {{ patient_residence($patient->id) }}
{{ __('inpatient.admitted') }}{{ streamline_date($inpatient_info->admitted_on) }} ( {{ $days_spent_in_ward }} days){{ __('inpatient.discharged_on') }}{{ streamline_date($inpatient_info->discharged_on) }}{{ __('inpatient.still_admitted') }}{{ __('inpatient.category') }} {{ get_name($patient->category_id, 'id', 'name', 'patient_categories') }} @if(!is_null($patient_discount)) ({{ $patient_discount["discount"] }} % {{ __('inpatient.discount') }}) @endif
$patient_id, 'episode_id' => $episode_id])->get(); $ward_bed_admission_total_cost = $chi_ward_accomodation_to_pay = 0; ?> @if(count($ward_bed_stays) > 0)
{{ __('inpatient.accomodation') }}
{{ __('inpatient.view_bed_admission_details') }}
@if(count($ward_bed_stays) > 0) @foreach($ward_bed_stays as $bed_record) @php $accomodation_cost = $bed_record->bed_fee_total; $chi_accomodation_cost = $bed_record->chi_bed_fee_total; $chi_ward_accomodation_to_pay += $chi_accomodation_cost; $ward_bed_admission_total_cost += $accomodation_cost; @endphp @endforeach @endif
{{ __('inpatient.bed_no') }} {{ __('inpatient.bed_category') }} {{ __('inpatient.from') }} {{ __('inpatient.to') }} {{ __('inpatient.duration') }} {{ __('inpatient.patient_to_pay') }} {{ __('inpatient.insurance_to_pay') }}
{{ $bed_record->bed_number}} {{ get_name($bed_record->bed_category, "id", "name", "inpatient_bed_categories") }} {{ streamline_date($bed_record->from) }} {{ streamline_date($bed_record->to) }} {{ $bed_record->duration }} {{ ugandan_shillings_with_decimals($accomodation_cost) }} {{ ugandan_shillings_with_decimals($chi_accomodation_cost) }}
{{ __('inpatient.patient_to_pay') }}
{{ Form::hidden('ward_bed_admission_cost', $ward_bed_admission_total_cost, ['id' => 'ward_bed_admission_cost']) }} {{ Form::text('display_ward_bed_admission_cost', ugandan_shillings_with_decimals($ward_bed_admission_total_cost), ['class' => 'form-control compulsory', 'readonly', 'id' => 'display_ward_bed_admission_cost']) }} @if($patient_insurance_status)
{{ __('inpatient.insurance_to_pay') }}
{{ Form::hidden('insurance_admission_cost', $chi_ward_accomodation_to_pay, ['id' => 'insurance_admission_cost']) }} {{ Form::text('display_insurance_ward_bed_admission_cost', ugandan_shillings_with_decimals($chi_ward_accomodation_to_pay), ['class' => 'form-control compulsory', 'readonly']) }} @endif
@endif @php $admission_cost = $ward_bed_admission_total_cost; @endphp
count() < 1) style="display: none" @endif>
{{ __('inpatient.investigations') }}
{{ __('inpatient.view_investigation_details') }}
@if(count($ordered_ward_investigations) > 0) @php // ids of the ordered investigations $investigation_ids = $ward_inv_pricing = $order_ids = $all_order_ids_array = []; foreach($ordered_ward_investigations as $ordered_investigation){ if (get_investigation_billing_mode() == 1 && $ordered_investigation->investigation_status == 0) { // no results yet, so ignore continue; } $investigation_ids = array_merge($investigation_ids, explode(",", $ordered_investigation->investigation_id)); $ward_inv_pricing = array_merge($ward_inv_pricing, explode(",", $ordered_investigation->ward_pricing_id)); $single_order_investigations = explode(",",$ordered_investigation->investigation_id); for ($w=0; $w < count($single_order_investigations) ; $w++) { echo ''; $all_order_ids_array[] = $ordered_investigation->id; } array_push($order_ids, $ordered_investigation->id); } $count_orders = count($order_ids); // create strings from arrays to use when submitting $investigation_ids_string = implode(',', $investigation_ids); $investigation_amount = 0; @endphp {{ Form::hidden('investigation_ids', $investigation_ids_string) }} @for ($i = 0; $i < count($investigation_ids); $i++) @php // get insurance status for investigation $investigation_insurance_status = get_name($investigation_ids[$i], "id", "insurance_coverage", "investigations"); // insurance flag $is_insured = 0; $tariff_id = 0; $benefit_id = 0; $investigation_amount_insurance = 0; if($patient_insurance_status){ $item_insurance_details = get_item_insurance_pricing($patient_id, $investigation_ids[$i], 3, true, $inpatient_info->ward_id); $investigation_amount = $item_insurance_details[2]; $investigation_amount_insurance = $item_insurance_details[1]; $is_insured = $item_insurance_details[0]; $tariff_id = $item_insurance_details[3]; $benefit_id = $item_insurance_details[4]; } else { if ($price_list_set && $price_list_set != 0){ $investigation_amount = get_price_list_category_price($price_list_set, 2, $investigation_ids[$i]); } elseif ($price_list_id) { $investigation_amount = get_price_list_category_price($price_list_id, 2, $investigation_ids[$i]); } else { $investigation_amount = get_name($investigation_ids[$i], "id", "non_insured_price", "investigations"); } } if (isset($ward_inv_pricing[$i]) && is_numeric($ward_inv_pricing[$i])) { $saved_prices = get_investigation_ward_pricing_by_id($ward_inv_pricing[$i]); $saved_ward_chi_price = $saved_prices[1]; $saved_ward_price = $saved_prices[0]; } else { $saved_prices = get_investigation_ward_pricing($patient_id, $episode_id, $investigation_ids[$i], $all_order_ids_array[$i]); $saved_ward_chi_price = $saved_prices[1]; $saved_ward_price = $saved_prices[0]; if($saved_prices[2]) { $ward_inv_pricing[$i] = $saved_prices[2]; } } //if the inv exists in ward pricing table use that price else use default if($saved_ward_price != "N/A"){ $investigation_amount = (is_null($price_list_set) || $price_list_set == "") ? $saved_ward_price : $investigation_amount; } $investigation_amount_insurance = $saved_ward_chi_price == 'N/A' ? $investigation_amount_insurance : $saved_ward_chi_price; $investigation_amount_total += $investigation_amount; $insurance_investigations += $investigation_amount_insurance; @endphp @php $counter++; @endphp @endfor @else @endif
{{ __('inpatient.name') }} {{ __('inpatient.patient_to_pay') }} {{ __('inpatient.insurance_to_pay') }}
@if($is_insured == 1) @else @endif {{ Form::hidden('investigations_item_ids[]', $investigation_ids[$i]) }} {{ Form::hidden('investigations_tariff_ids[]', $tariff_id) }} {{ Form::hidden('investigations_benefit_ids[]', $benefit_id) }} {{ Form::hidden('ward_inv_pricing_ids[]', ((isset($ward_inv_pricing[$i]) && is_numeric($ward_inv_pricing[$i])) ? $ward_inv_pricing[$i] : 0)) }} @if(Auth::user()->can('edit-investigation-prices-on-inpatient-bill') && $is_insured == 0) {{ Form::number('investigation_amount[]', $investigation_amount, ['class' => 'form-control investigation_amount', 'id' => 'investigation_amount_' . $counter]) }} @else {{ Form::number('investigation_amount[]', $investigation_amount, ['class' => 'form-control investigation_amount', 'readonly', 'id' => 'investigation_amount_' . $counter]) }} @endif {{ Form::hidden('investigation_insured[]', $is_insured) }} {{ Form::hidden('investigation_summed_amount[]', ($investigation_amount_insurance + $investigation_amount), ['id' => 'investigation_summed_amount_' . $counter]) }} @if($is_insured == 1 && Auth::user()->can('chi-to-pay-edit')) {{ Form::number('investigation_insurance_amount[]', $investigation_amount_insurance, ['class' => 'form-control investigation_insurance_amount', 'id' => 'investigation_insurance_amount_' . $counter]) }} @else {{ Form::number('investigation_insurance_amount[]', $investigation_amount_insurance, ['class' => 'form-control investigation_insurance_amount', 'readonly', 'id' => 'investigation_insurance_amount_' . $counter]) }} @endif
{{ __('inpatient.no_investigations_ordered') }}
{{ __('inpatient.patient_to_pay') }}
{{ Form::hidden('investigation_cost', $investigation_amount_total, ['id' => 'investigation_cost']) }} {{ Form::hidden('insurance_investigation_cost', $insurance_investigations, ['id' => 'insurance_investigation_cost']) }} {{ Form::text('display_investigation_cost', ugandan_shillings_with_decimals($investigation_amount_total), ['class' => 'form-control compulsory', 'readonly','id' => 'display_investigation_cost']) }} @if($patient_insurance_status)
{{ __('inpatient.insurance_to_pay') }}
{{ Form::text('display_insurance_investigation_cost', ugandan_shillings_with_decimals($insurance_investigations), ['class' => 'form-control compulsory', 'readonly','id' => 'display_insurance_investigation_cost']) }} @endif

count() < 1) style="display: none" @endif> @php $inpatient_info_ward_treatments_array = unserialize($inpatient_info->ward_treatments); $this_drug_sp = 0; $insurance_treatment_to_pay = 0; @endphp {{-- opd unpaid treatments --}} @php $opd_unpaid_treatments = \Streamline\Models\Treatment::where(['patient_id' => $patient_id, 'episode_id' => $episode_id,'payment_status' => 0, 'tta' => 0])->get(); @endphp @if (count($opd_unpaid_treatments) > 0)
@endif {{-- sundries section below --}}
count() < 1) style="display: none" @endif> whereNull('deleted_at')->where(['patient_id' => $patient_id, 'episode_id' => $episode_id])->groupBy('sundry_id')->selectRaw('*, sum(quantity_given) as quantity_given')->get(); ?> {{-- opd unpaid sundries --}} @php $opd_unpaid_sundries = \Streamline\Models\OrderedSundry::where(['patient_id' => $patient_id, 'episode_id' => $episode_id,'payment_status' => 0,'inpatient_bill_generated' => 0])->get(); $opd_sundries_total_cost = $opd_insurance_sundries = 0; @endphp @if (count($opd_unpaid_sundries) > 0)
@php $opd_sundries_ids = []; $opd_sundries_quantity = []; $opd_sundry_order_ids = []; $opd_sundries_orders_amounts = []; $opd_unit_sundries_selling_prices_array = []; foreach($opd_unpaid_sundries as $opd_ordered_sundry){ $opd_sundries_ids = array_merge($opd_sundries_ids, explode(",", $opd_ordered_sundry->sundries_id)); $opd_sundries_quantity = array_merge($opd_sundries_quantity, explode(",",$opd_ordered_sundry->quantity)); $opd_unit_sundries_selling_prices_array = array_merge($opd_unit_sundries_selling_prices_array, explode(",",$opd_ordered_sundry->sundries_amount));// is_null($treatment->sundries_amount) ? [] : explode(",", $treatment->unit_selling_prices); array_push($opd_sundry_order_ids, $opd_ordered_sundry->id); //if amounts are put at the time of ordering $opd_sundries_orders_amounts = is_null($opd_ordered_sundry->sundries_amount) ? array_merge($opd_sundries_orders_amounts, []) : array_merge($opd_sundries_orders_amounts, explode(",", $opd_ordered_sundry->sundries_amount)); } $count_orders = count($opd_sundry_order_ids); // create strings from arrays to use when submitting $opd_sundry_order_ids_string = implode(',', $opd_sundry_order_ids); @endphp @endif {{-- services section below --}}
@php $services_total_cost = 0; $ward_services_quantities_given = DB::table('ward_consultations_and_services')->whereNull('deleted_at')->where(['patient_id' => $patient_id, 'episode_id' => $episode_id])->get(); @endphp {{-- opd unpaid services --}} @php $opd_unpaid_services = \Streamline\Models\OrderedService::where(['patient_id' => $patient_id, 'episode_id' => $episode_id,'payment_status' => 0,'inpatient_bill_generated' => 0])->get(); $opd_services_amount_total = $opd_services_insurance_amount_total = 0; @endphp @if (count($opd_unpaid_services) > 0)
@endif
@php $ward_procedures = DB::table('ward_procedures')->whereNull('deleted_at')->where(['patient_id' => $patient_id, 'episode_id' => $episode_id])->get(); $procedures_total_cost = 0; @endphp {{-- opd unpaid procedures --}} @php $opd_unpaid_procedures = \Streamline\Models\OrderedProcedure::where(['patient_id' => $patient_id, 'episode_id' => $episode_id,'payment_status' => 0,'inpatient_bill_generated' => 0])->get(); $opd_procedures_total_cost = $opd_insurance_procedures = 0; @endphp
@if (count($opd_unpaid_procedures) > 0) @php $opd_procedure_ids = []; $opd_procedure_order_ids = []; // amounts at the time was ordered $opd_procedures_orders_amounts = []; foreach($opd_unpaid_procedures as $opd_ordered_procedure){ $opd_procedure_ids = array_merge($opd_procedure_ids, explode(",", $opd_ordered_procedure->procedure_id)); array_push($opd_procedure_order_ids, $opd_ordered_procedure->id); //if amounts are put at the time of ordering $opd_procedures_orders_amounts = is_null($opd_ordered_procedure->procedure_amount) ? array_merge($opd_procedures_orders_amounts, []) : array_merge($opd_procedures_orders_amounts, explode(",", $opd_ordered_procedure->procedure_amount)); } $opd_count_orders = count($opd_procedure_order_ids); // create strings from arrays to use when submitting $opd_procedure_order_ids_string = implode(',', $opd_procedure_order_ids); $opd_procedure_ids_string = implode(',', $opd_procedure_ids); $procedure_orders_amounts_string = implode(',', $opd_procedures_orders_amounts); @endphp @endif
@php $drugs_given_anae_cost_total = 0; @endphp {{--other_drugs_given)): ?>
{{ __('inpatient.anaesthetics') }}
other_drugs_given); $drugs_given_anae_cost = unserialize($anaesthesia->other_drugs_cost); $do_not_bill_other_drugs = explode(",", $anaesthesia->other_drugs_bill); $drugs = DB::table('drugs')->where('available', 1)->whereNull('deleted_at')->pluck('name', 'id'); $units = DB::table('drug_units')->whereNull('deleted_at')->pluck('name', 'id'); if (count($drugs_given_anae) > 0) { foreach ($drugs_given_anae as $key => $value) { if (isset($drugs[$value['id']]) && !in_array($value['id'], $do_not_bill_other_drugs)) { $name = $drugs[$value['id']] ?? ""; $dose = $value['dose'] ?? ""; $unit = $units[$value['unit']] ?? ""; $cost = isset($drugs_given_anae_cost[$key]) ? trim($drugs_given_anae_cost[$key]) : 0; $drugs_given_anae_cost_total += $cost; echo "" . "" . "" . "" . ""; } } } ?>
{{ __('inpatient.drug_name') }} {{ __('inpatient.dose') }} {{ __('inpatient.unit_price') }}
{$name}{$dose}{$unit}".ugandan_shillings_with_decimals($cost)."
'form-control compulsory', 'readonly']); ?>

--}}
whereNull('deleted_at')->where(['patient_id' => $patient_id, 'episode_id' => $episode_id])->get(); ?>
@php $unpaid_opd_grand_total = $opd_unpaid_treatment_total + $opd_sundries_total_cost + $opd_services_amount_total + $opd_procedure_amount_total; $amount_to_pay = $extras_total_cost + $tta_total_cost + $procedures_total_cost + $sundries_total_cost + $treatment_total_cost + $admission_cost + $investigation_amount_total + $services_total_cost + $drugs_given_anae_cost_total + $unpaid_opd_grand_total; $total_insurance_payment = $chi_ward_accomodation_to_pay + $insurance_investigations + $insurance_treatments + $insurance_sundries + $insurance_procedures + $insurance_tta + $insurance_services + $insurance_opd_treatment + $opd_insurance_sundries + $opd_services_insurance_amount_total + $opd_procedure_insurance_amount_total; @endphp @if(count($service_deposits) > 0) @foreach($service_deposits as $service_deposit) @if(($service_deposit->service_type == "Inpatient_Deposit") && ($service_deposit->patient_id == $patient_id) && ($service_deposit->episode_id == $episode_id)) @php $total_deposits_paid += $service_deposit->patient_amount_paid; @endphp @endif @endforeach @endif @php $co_payment = check_patient_category_co_payment_status($patient->category_id); $total_copayment_share = 0; if(!empty($co_payment) && $co_payment['co_payment_share'] != 0){ $total_copayment_share = $amount_to_pay / $co_payment['co_payment_share']; } @endphp
{{ __('inpatient.initial_total_bill') }}

{{ Form::text('display_insurance_amount_owed', ugandan_shillings_with_decimals((int)$total_insurance_payment + (int)$amount_to_pay), ['class' => 'form-control compulsory', 'readonly']) }}
{{ __('inpatient.patient_to_pay_total') }}

{{ Form::hidden('original_amount_owed', (int)$amount_to_pay, ['id' => 'original_amount_owed']) }} {{ Form::text('display_amount_owed', ugandan_shillings_with_decimals((int)$amount_to_pay), ['class' => 'form-control compulsory', 'readonly', 'id' => 'display_amount_owed']) }}
@if($total_insurance_payment == 0)
{{ __('inpatient.insurance_to_pay_total') }}

{{ Form::hidden('original_insurance_amount_owed', (int)$total_insurance_payment, ['id' => 'original_insurance_amount_owed']) }} {{ Form::text('display_insurance_amount_owed', ugandan_shillings_with_decimals($total_insurance_payment), ['class' => 'form-control compulsory', 'readonly', 'id' => 'display_insurance_amount_owed']) }}
@endif
@php $ward_discount_records = \Streamline\Models\InpatientWardDiscounts::where(['inpatient_info_id' => $inpatient_info->id])->get(); $ward_discount_total = 0; @endphp @if(count($ward_discount_records) > 0)
{{ __('inpatient.ward_discount_amount') }}
@if(count($ward_discount_records) > 0) @foreach($ward_discount_records as $ward_discount) @php $ward_discount_total += $ward_discount->amount; @endphp @endforeach @else @endif
{{ __('inpatient.staff_in_charge') }} {{ __('inpatient.ward') }} {{ __('inpatient.amount') }} {{ __('inpatient.date_received') }}
{{ get_full_name($ward_discount->created_by, 'id', 'first_name', 'last_name', 'users') }} {{ get_name($ward_discount->ward_id, 'id', 'name', 'wards') }} {{ ugandan_shillings_with_decimals($ward_discount->amount) }} {{ streamline_date_time($ward_discount->created_at) }}
{{ __('inpatient.no_ward_discounts_given') }}
{{ __('inpatient.total_ward_discount_amount') }}
{{ Form::hidden('ward_discount_total', $ward_discount_total, ['id' => 'ward_discount_total']) }} {{ Form::text('display_ward_discount_total', ugandan_shillings_with_decimals($ward_discount_total), ['class' => 'form-control compulsory', 'readonly']) }}
@endif
@php $category_to_pay_deposits = 0; $patient_category_invoices_record = \Streamline\Models\PatientCategoryInvoice::where(['patient_id' => $patient_id, 'episode_id' => $episode_id, 'patient_category' => $patient->category_id])->get(); @endphp
@php $dependant_consumptions_total = 0; $dependant_consumptions = \Streamline\Models\DependantsConsumption::where(['dependant_patient_id' => $patient_id, 'episode_id' => $episode_id])->get(); @endphp
@php $debt_plan_total = 0; $debt_plan_payments = \Streamline\Models\DebtPlan::where(['patient_id' => $patient_id, 'episode_id' => $episode_id, 'tag_id' => 10])->get(); @endphp

@if (Auth::user()->can('view-inpatient-bill-saving-history')) @if ($inpatient_bill_info && !is_null($inpatient_bill_info->bill_saved_by)) @php $bill_savers_array = explode(",", $inpatient_bill_info->bill_saved_by); $saver_timestamps_array = explode(",", $inpatient_bill_info->bill_saved_at); @endphp
{{ __('inpatient.bill_saving_trail') }}
@for ($i = 0; $i < count($bill_savers_array); $i++) @if (isset($bill_savers_array[$i]) && isset($saver_timestamps_array[$i])) @endif @endfor

@endif @endif

{{ __('inpatient.bill_checked_by') }}: {{ get_full_name(Illuminate\Support\Facades\Auth::id(), "id", "first_name", "last_name", "users") }} {{ __('inpatient.on') }} {{ streamline_date_time(date("Y-m-d")) }}

@if ($inpatient_bill_info)

{{ __('inpatient.bill_authorized_by') }}: @php $bill_authorized_by_array = is_null($inpatient_bill_info->bill_authorized_by) ? [] : explode(",", $inpatient_bill_info->bill_authorized_by); $bill_authorized_at_array = is_null($inpatient_bill_info->bill_authorized_at) ? [] : explode(",",$inpatient_bill_info->bill_authorized_at); $bill_closed = $inpatient_bill_info->bill_closed == 1; @endphp @for ($i = 0; $i < count($bill_authorized_by_array); $i++) {{ get_full_name($bill_authorized_by_array[$i], "id", "first_name", "last_name", "users") }} {{ __('inpatient.on') }} {{ streamline_date_time($bill_authorized_at_array[$i]) }} @endfor

@if($inpatient_bill_info->bill_closed == 1)

{{ __('inpatient.bill_closed_by') }}: {{ get_full_name($inpatient_bill_info->bill_closed_by, "id", "first_name", "last_name", "users") }} {{ __('inpatient.on') }} {{ streamline_date_time($inpatient_bill_info->bill_closed_at) }}

@endif @endif
@if( Auth::user()->can('view-inpatient-sheet')) @endif @if(Auth::user()->can('view-recalculate-inpatient-bill') && !$bill_closed)
{{ Form::button(__('inpatient.re_calculate_bill'),['type'=>'submit','class' => 'btn btn-success col-md-12', 'name'=>'submit-btn','value'=>'re_calculate_bill', 'id' => 'recalculateBillBtn']) }}
@endif @if( Auth::user()->can('authorize-inpatient-bill') && !$bill_closed)
{{ Form::button(__('inpatient.authorize_bill'),['type'=>'submit','class' => 'btn btn-primary col-md-12', 'name'=>'submit-btn','value'=>'authorize_bill']) }}
@endif @if (Auth::user()->can('pay-inpatient-bill-from-inpatient-billing-page') && !$bill_closed)
{{ Form::button(__('inpatient.pay_bill'),['type'=>'submit','class' => 'btn btn-success col-md-12', 'name'=>'submit-btn','value'=>'pay_bill']) }}
@endif @if (Auth::user()->can('open-inpatient-bill') && $bill_closed) @endif

@if (Auth::user()->can('save-inpatient-bill') && !$bill_closed)
{{ Form::button(__('inpatient.save_bill'),['type'=>'submit','class' => 'btn btn-success col-md-12', 'name'=>'submit-btn','value'=>'save']) }}
@endif @if (Auth::user()->can('save-and-close-inpatient-bill') && $inpatient_info->discharged == 1 && !$bill_closed)
{{ Form::button(__('inpatient.save_close_bill'),['type'=>'submit','class' => 'btn btn-success col-md-12', 'name'=>'submit-btn','value'=>'save_close_bill', 'id' => 'save_close_bill']) }}
@endif
{{ Form::close() }}
@endsection @push('scripts') @endpush