@extends('layouts.app') @section('title','IPD Admission') @section('pages') @php $show_checklist_btn = 1; if ((in_array('PATHOLOGY', $departments) && ($total_reports > $doneReports)) || $admission->ipd_checklist_verified == 1) { $show_checklist_btn = 0; } @endphp
@include('layouts.partials.nav-menu')
{{ $patient->account_title ? $patient->account_title->name : '' }} {{ $patient->name ? $patient->name : '' }} ({{ $patient->code }})
{{-- @if($admission->ipd_checklist_verified == 1) --}} {{-- @endif --}} @if(!empty($dischargeExists) && isset($saleInvoice->id) ) @endif @php $redirect = request()->redirect; $id = request()->segment(3) ; $redirect = $redirect .'/'. $id; @endphp
{{--
Age: {{age($patient->account_contact->date_of_birth).' years'}}, Gender: {{$patient->account_contact->gender->name ?? ''}}, Date Of Birth: {{formatedDate($patient->account_contact->date_of_birth) ?? ''}}, Marital Status: {{$marital_status->name ?? ''}}, Blood Group: {{$blood_group->group ?? ''}}
@if($patient->account_contact->any_known_allergies) Any Known Allergies: {{$patient->account_contact->any_known_allergies}}
@endif @if($admission->note) Admission Note: {{$admission->note}} @endif
Admission Details

Admission No {{$admission->ipd_admission_no}}
IPD CASE/FILE NUMBER {{$admission->ipd_file_no ?? 'N/A'}}
Patient Name {{$patient->account_title->name ?? '' }}{{ $patient->name ?? ' '}}
Admission Date {!!formatedDateTime($admission->admission_date_time)!!}
Referred By {{$admission->referal_from ?? 'N/A'}}
Additional Details

Previous medical issue {{$admission->previous_medical_issue ?? 'N/A'}}
Patient source {{$patient_source->enquiry_source_name}}
TPA {{$tpa_account->name ?? 'N/A'}}
Referral partner {{$refferal_partner->name ?? 'N/A'}}
Casualty {{($admission->casualty == '1') ? 'Yes' : 'No'}}
@if(isset($patient->account_images->image) && $patient->account_images->image != '') @else @endif

Update Profile Image

--}}
@php $i=1;@endphp @if(count($saleInvoices)>0) @foreach($saleInvoices as $key => $list) @php $Receive = TransactionCalculationReceiveAmount($list->id,'IPD_INVOICE'); @endphp @php $i++; @endphp @php if (in_array('PATHOLOGY', $departments) && (isset($Receive['dueAmount']) && $Receive['dueAmount'] > 0)) { $show_checklist_btn = 0; } @endphp @endforeach @else @endif
Sl No Invoice No. Consultant Bed Bill Amount Status Balance
{{ $key+1 }} @if(isset($list->id) && $list->id!='') {{$list->voucher_type_invoice_no??''}} @endif
{{ formatedDate($list->invoice_date) }}
{{ formatedTime($list->invoice_date) }}
{!! $list->getDoctor->name??'Self' !!} {{ isset($pending_history) && isset($pending_history[0]->getBed->name) ?$pending_history[0]->getBed->name : 'N/A' }} Total: {{ convertDecimelPoint($Receive['totalBilling']) ?? ''}}
Received: {{ convertDecimelPoint($Receive['receivedAmount']) ?? ''}} @if($Receive['dueAmount']>0)
Due: {{ convertDecimelPoint($Receive['dueAmount']) ?? ''}} @endif
{{ isset($Receive['dueAmount']) && $Receive['dueAmount'] > 0 ? 'Pending' : 'Paid' }} {!! $Receive['dueAmount'] > 0 ? 'Collect' : '' !!}
No Data Found

Invoice Summary

{{----}} @php $totalReceivedAmount = 0; @endphp @foreach($transactionHistory as $key => $list) {{----}} @endforeach
SL.NO DateMode Mode Amount
{!! $key+1 !!} {!! $list['transactionDate'] !!} {!! $list['transactionMode'] !!} {!! $list['paymentMode']??'' !!} @if($list['advanceReceived']=='Yes') (Advance) @endif @php $totalReceivedAmount+=$list['amount'] @endphp {!! $list['amount'] !!}
Total Received {!! convertDecimelPoint($totalReceivedAmount) !!}
Balance Amount {!! isset($transactionSummery['dueAmount']) && $transactionSummery['dueAmount']>0 ? convertDecimelPoint($transactionSummery['dueAmount']-$transactionSummery['discountAmount']) : 0 !!}

Collection Summary

@php $gst_amount = $gst_amount ?? 0; @endphp @if($gst_amount>0) @endif @if($transactionSummery['discountAmount']>0) @endif @php $grand_total = $transactionSummery['totalBilling'] + $gst_amount - (Integer)$transactionSummery['discountAmount'] ?? 0; @endphp @if($transactionSummery['roundOffAmount']!=0) @endif
BASIC AMOUNT {!! isset($transactionSummery['totalBilling']) ? convertDecimelPoint($transactionSummery['totalBilling']) : '' !!}
TOTAL TAX {!! convertDecimelPoint($gst_amount) ?? '' !!}
SUBTOTAL {!! convertDecimelPoint($transactionSummery['totalBilling'] + $gst_amount) ?? '' !!}
SPECIAL DISCOUNT {!! convertDecimelPoint($transactionSummery['discountAmount']) ?? '' !!}
Round OFF {!! $transactionSummery['roundOffAmount'] !!}
GRAND TOTAL {!! convertDecimelPoint(round($grand_total)) !!}
@endsection @section('js') @endsection