mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-12 11:11:31 +00:00
resolved conflicts
This commit is contained in:
docker/statistics/Modules/WardManagement/Resources/views/inpatient/discharge_summary_print.blade.php
Executable
+873
@@ -0,0 +1,873 @@
|
||||
<!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>
|
||||
|
||||
@php
|
||||
$total_deposits_paid = 0;
|
||||
$total_amount_to_pay = 0;
|
||||
$discount_amount = 0;
|
||||
$insurance_hospital_stay = 0;
|
||||
$insurance_investigations = 0;
|
||||
$insurance_treatments = 0;
|
||||
$insurance_sundries = 0;
|
||||
$insurance_procedures = 0;
|
||||
$insurance_tta = 0;
|
||||
$insurance_services = 0;
|
||||
$price_list_id = is_patient_category_attached_to_price_list($patient_id);
|
||||
$investigation_amount_total = 0;
|
||||
@endphp
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
@include('layouts.header_pdf_print')
|
||||
|
||||
<h5 class="heading" style="text-align: center;"> {{ __('inpatient.discharge_summary') }}</h5>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<table class="table table-light table-sm table-borderless">
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.patient_number') }}</th>
|
||||
<td>{{ $patient->number}}</td>
|
||||
<td width="60" style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.ward') }}</th>
|
||||
<td>
|
||||
{{ get_name($inpatient_info->ward_id, 'id', 'name', 'wards') }} |
|
||||
@if(is_null($inpatient_info->bed_category_id))
|
||||
@else
|
||||
{{ get_name($inpatient_info->bed_category_id, 'id', 'name', 'inpatient_bed_categories') }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.patient_names') }}</th>
|
||||
<td>{{ $patient->first_name}} {{ $patient->last_name}}</td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.admitted') }}</th>
|
||||
<td>
|
||||
@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
|
||||
|
||||
{{ streamline_date($inpatient_info->admitted_on) }} ( {{ $days_spent_in_ward }} {{ __('inpatient.days') }})
|
||||
|
||||
{{ Form::hidden("duration", $days_spent_in_ward) }}
|
||||
{{ Form::hidden("inpatient_info_id", $inpatient_info->id) }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.age') }}</th>
|
||||
<td><?php echo get_patients_age($patient->date_of_birth); ?></td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.discharged') }}</th>
|
||||
<td>
|
||||
@if($inpatient_info->discharged == 1)
|
||||
{{ streamline_date($inpatient_info->discharged_on) }}
|
||||
@else
|
||||
{{ __('inpatient.still_admitted') }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.gender') }}</th>
|
||||
<td>{{ $patient->gender == 1 ? __('inpatient.male') : __('inpatient.female') }}</td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th scope="row">{{ __('inpatient.category') }}</th>
|
||||
<td>
|
||||
{{ get_name($patient->category_id, 'id', 'name', 'patient_categories') }}
|
||||
|
||||
@if(!is_null($patient_discount))
|
||||
({{ $patient_discount["discount"] }} % {{ __('inpatient.discount') }})
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if( Auth::user()->can('view-patient-episode-primary-diagnoses') && !$main_exam)
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<strong>{{ __('inpatient.primary_diagnosis') }}</strong>
|
||||
|
||||
@php
|
||||
$primary_diagnosis = \Streamline\Models\Diagnosis::withTrashed()->find($inpatient_info->primary_diagnosis);
|
||||
@endphp
|
||||
|
||||
<table class="table table-light table-sm table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>{{ $primary_diagnosis ? $primary_diagnosis->name : "" }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col">
|
||||
@php $other_diagnoses = @unserialize($inpatient_info->other_diagnoses); @endphp
|
||||
|
||||
@if(!empty($other_diagnoses) && !(count($other_diagnoses) == 1 && $other_diagnoses[0] == ''))
|
||||
<strong>{{ __('inpatient.secondary_diagnosis') }}</strong>
|
||||
|
||||
<table class="table table-light table-sm table-bordered">
|
||||
<thead>
|
||||
@foreach($other_diagnoses as $diagnosis)
|
||||
@php
|
||||
$other_diagnosis = \Streamline\Models\Diagnosis::withTrashed()->find($diagnosis);
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $other_diagnosis ? $other_diagnosis->name : "" }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</thead>
|
||||
</table>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<br>
|
||||
|
||||
@if($cons_comments && ($cons_comments->comments || $cons_comments->history_comments || $cons_comments->clinic_examination_comments || $cons_comments->investigation_and_management_plan_comments))
|
||||
<h4>{{ __('inpatient.opd_consultation_comments') }}</h4>
|
||||
|
||||
<table class="table table-light table-sm table-bordered">
|
||||
@if($cons_comments->comments)
|
||||
<tr>
|
||||
<td><b>{{ __('inpatient.comments') }}</b></td>
|
||||
<td>{{ $cons_comments->comments }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if($cons_comments->history_comments)
|
||||
<tr>
|
||||
<td><b>{{ __('inpatient.history') }}</b></td>
|
||||
<td>{{ $cons_comments->history_comments }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if($cons_comments->clinic_examination_comments)
|
||||
<tr>
|
||||
<td><b>{{ __('consultations.clinical_examination') }}</b></td>
|
||||
<td>{{ $cons_comments->clinic_examination_comments }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if($cons_comments->investigation_and_management_plan_comments)
|
||||
<tr>
|
||||
<td><b>{{ __('consultations.investigation_and_mgt_plan') }}</b></td>
|
||||
<td>{{ $cons_comments->investigation_and_management_plan_comments }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
|
||||
<br>
|
||||
@endif
|
||||
|
||||
<strong>{{ __('inpatient.clinical_summary') }}</strong>
|
||||
|
||||
<table class="table table-light table-sm table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>{{ $inpatient_info->clinical_summary }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<strong>{{ __('inpatient.investigations_done') }}</strong>
|
||||
|
||||
<table class="table table-light table-sm table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Investigation Name</th>
|
||||
<th>Result</th>
|
||||
<th>Comment</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(count($ward_investigations) > 0)
|
||||
@for($i = 0; $i < count($ward_investigations['name']); $i++)
|
||||
@if(in_array($i, $ward_investigations_position))
|
||||
<tr>
|
||||
<td colspan="3" class="text-center" style="color: #0000FF; font-weight: small;">
|
||||
{{ $ward_investigations_date[array_search($i, $ward_investigations_position)] }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td>{{ $ward_investigations['name'][$i] }}</td>
|
||||
<input type="hidden" name="ward_investigation_ids[]" value="{{ $ward_investigations['id'][$i] }}">
|
||||
<td>
|
||||
@if($ward_investigations['type'][$i] == 1 && $ward_investigations['value'][$i] != "Pending")
|
||||
<i style="color: blue"> {{ __('inpatient.refer_to_investigation_report') }} </i>
|
||||
@else
|
||||
{!! nl2br(e($ward_investigations['value'][$i])) !!}
|
||||
@endif
|
||||
</td>
|
||||
<td>{!! nl2br(e($ward_investigations['comment'][$i])) !!}</td>
|
||||
</tr>
|
||||
@endfor
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="3">{{ __('inpatient.no_ward_invs') }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{{-- if patient has any treatment to take home --}}
|
||||
@if (count($treatment_to_take_away) > 0)
|
||||
<br>
|
||||
|
||||
<strong>{{ __('inpatient.treatment_on_discharge') }}</strong>
|
||||
<table class="table table-light table-sm table-bordered">
|
||||
@foreach($treatment_to_take_away as $treatment)
|
||||
@php
|
||||
$tta_drugs_array = explode(",", $treatment->drugs);
|
||||
$tta_dose_array = explode(",", $treatment->doses);
|
||||
$tta_freq_array = explode(",", $treatment->frequencies);
|
||||
$tta_duration_array = explode(",", $treatment->durations);
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
<td colspan="4" class="text-center" style="color: #0000FF; font-weight: small;">{{ __('inpatient.ordered_on') }} {{ streamline_date($treatment->created_at) }} by <b>{{ get_full_name($treatment->created_by, "id", "first_name", "last_name", "users") }}</b></td>
|
||||
</tr>
|
||||
@for($x = 0; $x < count($tta_drugs_array); $x++)
|
||||
@php
|
||||
$drug_name = get_name($tta_drugs_array[$x], 'id', "name", 'drugs');
|
||||
$drug_unit = get_name(get_name($tta_drugs_array[$x], 'id', "unit_id", 'drugs'), "id", "name", "drug_units");
|
||||
$frequency = get_name($tta_freq_array[$x], "id", "name", "dosage_frequencies");
|
||||
@endphp
|
||||
<tr class='gradeX'>
|
||||
<td>{{ $drug_name }}</td>
|
||||
<input type="hidden" name="tta_drugs[]" value="{{ $tta_drugs_array[$x] }}">
|
||||
<td>{{ $tta_dose_array[$x] }} {{ $drug_unit }} {{ $frequency}} </td>
|
||||
<td>{{ $tta_duration_array[$x] }}</td>
|
||||
@if($treatment->dispense_status == 1)
|
||||
<td style='color: green;'>{{ __('inpatient.dispensed') }}</td>
|
||||
@else
|
||||
<td style='color: maroon;'>{{ __('inpatient.pending_dispensing') }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endfor
|
||||
@endforeach
|
||||
</table>
|
||||
@endif
|
||||
|
||||
<br>
|
||||
|
||||
@if($main_exam)
|
||||
<div class="row"><div class="col"><strong>{{ __('patient_episode.eye_clinic') }} Main Exam</strong></div></div>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<table class='table table-sm'>
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th colspan="3" class="text-center">External</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="10%"></th>
|
||||
<th width="45%" class="text-center">Right</th>
|
||||
<th width="45%" class="text-center">Left</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Ext</th>
|
||||
<th class="text-center">{{ $main_exam->external_right }}</th>
|
||||
<th class="text-center">{{ $main_exam->external_left }}</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table class='table table-sm'>
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th colspan="3" class="text-center">Slit Lamp</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="20%"><b>Section</b></th>
|
||||
<th width="40%" class="text-right"><b>Right</b></th>
|
||||
<th width="40%" class="text-right"><b>Left</b></th>
|
||||
</tr>
|
||||
|
||||
@foreach($slit_lamp_test_areas as $area)
|
||||
<tr>
|
||||
<td><b>{{ $area->name }}</b></td>
|
||||
@php
|
||||
$right_slug = $area->slug."_right";
|
||||
$left_slug = $area->slug."_left";
|
||||
$left_other_slug = $area->slug."_other_left";
|
||||
$right_other_slug = $area->slug."_other_right";
|
||||
@endphp
|
||||
<td class="text-center">
|
||||
@if(in_array($main_exam->$right_slug, $slit_lamp_test_area_ids))
|
||||
@php
|
||||
$value_array = explode(',', $main_exam->$right_slug);
|
||||
@endphp
|
||||
@for($x = 0; $x < count($value_array); $x++)
|
||||
- {{ $slit_lamp_test_area_values[$value_array[$x]] }} <br/>
|
||||
@endfor
|
||||
@endif
|
||||
@if(isset($right_other_slug))
|
||||
- {{ $main_exam->$right_other_slug }}
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">
|
||||
@if(in_array($main_exam->$left_slug, $slit_lamp_test_area_ids))
|
||||
@php
|
||||
$value_array = explode(',', $main_exam->$left_slug);
|
||||
@endphp
|
||||
@for($x = 0; $x < count($value_array); $x++)
|
||||
- {{ $slit_lamp_test_area_values[$value_array[$x]] }} <br/>
|
||||
@endfor
|
||||
@endif
|
||||
@if(isset($left_other_slug))
|
||||
- {{ $main_exam->$left_other_slug }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@if (!empty($main_exam->doctors_notes))
|
||||
<table class="table table-sm table-bordered">
|
||||
<thead class="thead-light">
|
||||
<tr><th>{{ __('inpatient.doctor_comments') }} (Main Exam)</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td>{!! nl2br(e($main_exam->doctors_notes)) !!}</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
<table class='table table-sm'>
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th>EYE</th>
|
||||
<th>SECTION</th>
|
||||
<th>DIAGNOSIS</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$right_diagnosis_array = explode(",", $main_exam->right_eye_diagnosis);
|
||||
$left_diagnosis_array = explode(",", $main_exam->left_eye_diagnosis);
|
||||
@endphp
|
||||
@if(count($right_diagnosis_array) > 0)
|
||||
@foreach($right_diagnosis_array as $id)
|
||||
<tr>
|
||||
<td>Right</td>
|
||||
<td>{{ get_name(get_name($id, 'id', 'diagnosis_category', 'diagnoses'),'id','name','diagnosis_categories') }}</td>
|
||||
<td>{{ get_name($id, 'id', 'name', 'diagnoses') }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<th>-</th>
|
||||
<th>-</th>
|
||||
<th>-</th>
|
||||
@endif
|
||||
@if(count($left_diagnosis_array) > 0)
|
||||
@foreach($left_diagnosis_array as $id)
|
||||
<tr>
|
||||
<td>Left</td>
|
||||
<td>{{ get_name(get_name($id, 'id', 'diagnosis_category', 'diagnoses'),'id','name','diagnosis_categories') }}</td>
|
||||
<td>{{ get_name($id, 'id', 'name', 'diagnoses') }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<th>-</th>
|
||||
<th>-</th>
|
||||
<th>-</th>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table class='table table-sm'>
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th colspan="2" class="text-center">IOP</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="45%" class="text-center">Right</th>
|
||||
<th width="45%" class="text-center">Left</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-center">{{ $main_exam->iop_right ?? '-' }}</th>
|
||||
<th class="text-center">{{ $main_exam->iop_left ?? '-' }}</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table class='table table-sm'>
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th colspan="2" class="text-center">CDR</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="45%" class="text-center">Right</th>
|
||||
<th width="45%" class="text-center">Left</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-center">{{ $main_exam->cdr_right ?? '-' }}</th>
|
||||
<th class="text-center">{{ $main_exam->cdr_left ?? '-' }}</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if($base_exam)
|
||||
<br><br>
|
||||
<div class="row"> <div class="col"><strong>{{ __('patient_episode.eye_clinic') }} Base Refraction Exam</strong></div></div>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<table class="table table-sm">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th class="text-left">Visual Acuity</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-2">Distance</div>
|
||||
<div class="col-5">Right</div>
|
||||
<div class="col-5">Left</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row" style="margin-bottom: 10px">
|
||||
<div class="col-2 text-center">sc</div>
|
||||
<div class="col-5">
|
||||
{{ Form::text('visual_acuity_distance_sc_right', $base_exam->visual_acuity_distance_sc_right, ['class' => 'form-control', 'readonly']) }}
|
||||
</div>
|
||||
<div class="col-5">
|
||||
{{ Form::text('visual_acuity_distance_sc_left', $base_exam->visual_acuity_distance_sc_left, ['class' => 'form-control', 'readonly']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px">
|
||||
<div class="col-2 text-center">ph</div>
|
||||
<div class="col-5">
|
||||
{{ Form::text('visual_acuity_distance_ph_right', $base_exam->visual_acuity_distance_ph_right, ['class' => 'form-control', 'readonly']) }}
|
||||
</div>
|
||||
<div class="col-5">
|
||||
{{ Form::text('visual_acuity_distance_ph_left', $base_exam->visual_acuity_distance_ph_left, ['class' => 'form-control', 'readonly']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px">
|
||||
<div class="col-2 text-center">cc</div>
|
||||
<div class="col-5">
|
||||
{{ Form::text('visual_acuity_distance_cc_right', $base_exam->visual_acuity_distance_cc_right, ['class' => 'form-control', 'readonly']) }}
|
||||
</div>
|
||||
<div class="col-5">
|
||||
{{ Form::text('visual_acuity_distance_cc_left', $base_exam->visual_acuity_distance_cc_left, ['class' => 'form-control', 'readonly']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-2">Near</div>
|
||||
<div class="col-10"></div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px">
|
||||
<div class="col-2 text-center">sc</div>
|
||||
<div class="col-5">
|
||||
{{ Form::text('visual_acuity_near_sc_right', $base_exam->visual_acuity_near_sc_right, ['class' => 'form-control', 'readonly']) }}
|
||||
</div>
|
||||
<div class="col-5">
|
||||
{{ Form::text('visual_acuity_near_sc_left', $base_exam->visual_acuity_near_sc_left, ['class' => 'form-control', 'readonly']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-2 text-center">cc</div>
|
||||
<div class="col-5">
|
||||
{{ Form::text('visual_acuity_near_cc_right', $base_exam->visual_acuity_near_cc_right, ['class' => 'form-control', 'readonly']) }}
|
||||
</div>
|
||||
<div class="col-5">
|
||||
{{ Form::text('visual_acuity_near_cc_left', $base_exam->visual_acuity_near_cc_left, ['class' => 'form-control', 'readonly']) }}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Add
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ Form::text('added_values',$base_exam->added_values, ['class' => 'form-control', 'readonly']) }}
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6 form-group">
|
||||
<label>Best Vision Right Eye</label>
|
||||
{{ Form::text('best_right_vision',$base_exam->best_right_vision, ['class' => 'form-control', 'readonly']) }}
|
||||
</div>
|
||||
<div class="col-6 form-group">
|
||||
<label>Best Vision Left Eye</label>
|
||||
{{ Form::text('best_left_vision',$base_exam->best_left_vision, ['class' => 'form-control', 'readonly']) }}
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<table class='table table-sm'>
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th class="text-center">Refraction</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
Autorefractor
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row" style="margin-bottom: 10px">
|
||||
<div class="col-1"></div>
|
||||
<div class="col-11">
|
||||
<div class="row">
|
||||
<div class="col-4">Sphere</div>
|
||||
<div class="col-4">Cylinder</div>
|
||||
<div class="col-4">Axis</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px">
|
||||
<div class="col-1">R</div>
|
||||
<div class="col-11">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
{{ $base_exam->manifest_auto_right_sphere ?? "-" }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $base_exam->manifest_auto_right_cylinder ?? "-" }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $base_exam->manifest_auto_right_axis ?? "-" }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px">
|
||||
<div class="col-1">L</div>
|
||||
<div class="col-11">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
{{ $base_exam->manifest_auto_left_sphere ?? "-" }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $base_exam->manifest_auto_left_cylinder ?? "-" }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $base_exam->manifest_auto_left_axis ?? "-" }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Keratometry
|
||||
|
||||
<div class="row" style="margin-bottom: 10px">
|
||||
<div class="col-1"></div>
|
||||
<div class="col-11">
|
||||
<div class="row">
|
||||
<div class="col-4">K1</div>
|
||||
<div class="col-4">K2</div>
|
||||
<div class="col-4">Axis</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px">
|
||||
<div class="col-1">R</div>
|
||||
<div class="col-11">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
{{ $base_exam->keratometry_k1_right ?? "-" }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $base_exam->keratometry_k2_right ?? "-" }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $base_exam->keratometry_axis_right ?? "-" }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px">
|
||||
<div class="col-1">L</div>
|
||||
<div class="col-11">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
{{ $base_exam->keratometry_k1_left ?? "-" }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $base_exam->keratometry_k2_left ?? "-" }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $base_exam->keratometry_axis_left ?? "-" }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Retinoscope
|
||||
<div class="row" style="margin-bottom: 10px">
|
||||
<div class="col-1"></div>
|
||||
<div class="col-11">
|
||||
<div class="row">
|
||||
<div class="col-4">Sphere</div>
|
||||
<div class="col-4">Cylinder</div>
|
||||
<div class="col-4">Axis</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px">
|
||||
<div class="col-1">R</div>
|
||||
<div class="col-11">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
{{ $base_exam->manifest_ret_right_sphere ?? "-" }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $base_exam->manifest_ret_right_cylinder ?? "-" }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $base_exam->manifest_ret_right_axis ?? "-" }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px">
|
||||
<div class="col-1">L</div>
|
||||
<div class="col-11">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
{{ $base_exam->manifest_ret_left_sphere ?? "-" }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $base_exam->manifest_ret_left_cylinder ?? "-" }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $base_exam->manifest_ret_left_axis ?? "-" }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Subjective
|
||||
<div class="row" style="margin-bottom: 10px">
|
||||
<div class="col-1"></div>
|
||||
<div class="col-11">
|
||||
<div class="row">
|
||||
<div class="col-4">Sphere</div>
|
||||
<div class="col-4">Cylinder</div>
|
||||
<div class="col-4">Axis</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px">
|
||||
<div class="col-1">R</div>
|
||||
<div class="col-11">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
{{ $base_exam->subjective_right_sphere ?? "-" }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $base_exam->subjective_right_cylinder ?? "-" }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $base_exam->subjective_right_axis ?? "-" }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px">
|
||||
<div class="col-1">L</div>
|
||||
<div class="col-11">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
{{ $base_exam->subjective_left_sphere ?? "-" }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $base_exam->subjective_left_cylinder ?? "-" }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ $base_exam->subjective_left_axis ?? "-" }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6 form-group">
|
||||
<label>PD for Right Eye</label>
|
||||
{{ Form::text('pd_right_eye', $base_exam->pd_right_eye, ['class' => 'form-control', 'readonly']) }}
|
||||
</div>
|
||||
<div class="col-6 form-group">
|
||||
<label>PD for Left Eye</label>
|
||||
{{ Form::text('pd_left_eye', $base_exam->pd_left_eye, ['class' => 'form-control', 'readonly']) }}
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
</div>
|
||||
@if (!empty($base_exam->comment))
|
||||
<div class="col">
|
||||
<table class="table table-sm table-bordered">
|
||||
<thead class="thead-light">
|
||||
<tr><th>{{ __('inpatient.doctor_comments') }} (Base Refraction Exam)</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td>{!! nl2br(e($base_exam->comment)) !!}</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<strong>{{ __('inpatient.discharge_summary') }}</strong>
|
||||
|
||||
<table class="table table-light table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr><td>{{ $inpatient_info->discharge_summary }}</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{{-- if a home with follow up show appointment details --}}
|
||||
@if ($inpatient_info->outcome_id == 3)
|
||||
@php
|
||||
$patient_appointment = \Streamline\Models\PatientAppointment::where(['patient_id' => $patient_id, 'episode_id' => $episode_id])->first();
|
||||
@endphp
|
||||
|
||||
<br>
|
||||
|
||||
<strong>{{ __('inpatient.appointment_details') }}</strong>
|
||||
<table class="table table-light table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><b>{{ __('inpatient.appointment_date') }}</b></td>
|
||||
<td>{{ streamline_date($patient_appointment->appointment_date) }} {{ __('inpatient.at') }} {{ $patient_appointment->appointment_time }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><b>{{ __('inpatient.clinic') }}</b></td>
|
||||
<td>{{ get_name($patient_appointment->clinic_allocation, "id", "name", "clinics") }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><b>{{ __('inpatient.doctor_to_see') }}</b></td>
|
||||
<td>{{ get_full_name($patient_appointment->incharge_id, "id", "first_name", "last_name", "users") }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
|
||||
<br>
|
||||
|
||||
<table class="table table-light table-sm table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><b>{{ __('inpatient.discharged_by') }}: </b></td>
|
||||
<td>{{ get_full_name($inpatient_info->discharged_by, "id", "first_name", "last_name", "users")}} {{ __('inpatient.on') }} {{ streamline_date($inpatient_info->discharged_on)}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<table class="table table-light table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><b>{{ __('inpatient.printed_by') }}: </b></td>
|
||||
<td>{{ get_full_name(auth()->id(), "id", "first_name", "last_name", "users") }} {{ __('inpatient.on') }} {{ streamline_date_time(date("Y-m-d H:i:s")) }}</td>
|
||||
{{-- @if (is_add_stamp_feature_enabled() && !empty($hospitalInfo->stamp))
|
||||
<td><b>{{ __('inpatient.stamp') }}: </b></td>
|
||||
@endif --}}
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{{ __('inpatient.printed_by_signature') }}:</b></td>
|
||||
<td></td>
|
||||
{{-- @if (is_add_stamp_feature_enabled() && !empty($hospitalInfo->stamp))
|
||||
<td>
|
||||
<img style="max-width: 300px; max-height: 140px;" src="{{ asset($hospitalInfo->stamp) }}" class="img-fluid mx-auto d-block mx-3" alt="{{ $hospitalInfo->name}} stamp">
|
||||
</td>
|
||||
@endif --}}
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@if (is_add_stamp_feature_enabled() && !empty($hospitalInfo->stamp))
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><b>{{ __('inpatient.stamp') }}: </b></td>
|
||||
<td style="text-align: center">
|
||||
<img style="max-width: 300px; max-height: 150px;" src="{{ asset($hospitalInfo->stamp) }}" class="img-fluid mx-auto d-block mx-3" alt="{{ $hospitalInfo->name}} stamp">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Executable
+305
@@ -0,0 +1,305 @@
|
||||
@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/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" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-md-7">
|
||||
<h4 class="page-title">{{ __('inpatient.incoming_inpatient_bills') }}</h4>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('inpatient.dashboard') }}</a></li>
|
||||
<li class="active">{{ __('inpatient.incoming_inpatient_bills') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
<div class="white-box">
|
||||
{{ Form::open(['route' => 'inpatient_bills.incoming', 'method' => 'POST']) }}
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
{{ Form::label('ward_id', __('inpatient.wards')) }}
|
||||
{{ Form::select('ward_id', $wards, '', ['class' => 'form-control compulsory', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
{{ Form::label('inpatient_status', __('inpatient.inpatient_status')) }}
|
||||
{{ Form::select('inpatient_status', $inpatient_status, 0, ['class' => 'form-control compulsory', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group" id="searchby">
|
||||
{{ Form::label('search_by', __('inpatient.date')) }}
|
||||
{{ Form::select('search_by', ['0'=>__('inpatient.today'), '1' => __('inpatient.yesterday'),'2'=>__('inpatient.custom_date'),'3'=>__('inpatient.custom_date_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', __('inpatient.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', __('inpatient.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-2">
|
||||
<div class="form-group" style="padding-top: 5px;"><br>
|
||||
{{ Form::button(__('inpatient.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10', 'id'=>'select_patient']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="white-box">
|
||||
<h4><label class="label label-info">{{ $search_text }}</label></h4>
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="display: none"></th>
|
||||
<th>{{ __('inpatient.admission_day_ward_discharge') }}</th>
|
||||
<th>{{ __('inpatient.patient_names') }}</th>
|
||||
<th>{{ __('inpatient.admitted_by') }}</th>
|
||||
<th>{{ __('inpatient.category') }}</th>
|
||||
<th>{{ __('inpatient.ward') }}</th>
|
||||
<th>{{ __('inpatient.total_saved_bill') }}</th>
|
||||
<th>{{ __('inpatient.amount_paid_and_invoiced') }}</th>
|
||||
<th>{{ __('inpatient.balance') }}</th>
|
||||
<th>{{ __('inpatient.bill_last_updated') }}</th>
|
||||
<th>{{ __('inpatient.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$amount_to_pay_grand_total = 0;
|
||||
$amount_paid_grand_total = 0;
|
||||
$total_bill_sum = 0;
|
||||
@endphp
|
||||
@if(count($inpatients_info) > 0)
|
||||
@foreach($inpatients_info as $inpatient_info)
|
||||
<tr>
|
||||
<th style="display: none">{{ $inpatient_info->id }}</th>
|
||||
<td>
|
||||
{{ streamline_date_time($inpatient_info->admitted_on) }}
|
||||
@php
|
||||
$admitted_on = new Carbon\Carbon($inpatient_info->admitted_on);
|
||||
|
||||
if ($inpatient_info->discharged == 1) {
|
||||
$days_on_ward = $admitted_on->diffInDays($inpatient_info->discharged_on);
|
||||
} else {
|
||||
$days_on_ward = $admitted_on->diffInDays(Carbon\Carbon::now());
|
||||
}
|
||||
@endphp
|
||||
|
||||
<br><br>
|
||||
|
||||
<span style='font-size: smaller; color: #0a776c; font-weight: bold;'>{{ $days_on_ward }} {{ __('inpatient.days_on_ward') }}</span>
|
||||
|
||||
@if($inpatient_info->discharged == 1)
|
||||
<br><br><span style="color:green; font-weight:bold">{{ __('inpatient.discharged_on') }} {{ streamline_date($inpatient_info->discharged_on) }} {{ __('inpatient.by') }} {{ get_full_name($inpatient_info->discharged_by, 'id', 'first_name', 'last_name', 'users') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>{!! insurance_flag($inpatient_info->patient_id) !!} ({{ $inpatient_info->patients_number }})</td>
|
||||
<td>
|
||||
{{ get_full_name($inpatient_info->created_by, "id", "first_name", "last_name", "users") }}
|
||||
</td>
|
||||
<td>{{ $patient_categories[$inpatient_info->patients_category_id] ?? "" }}</td>
|
||||
<td>{{ $wards[$inpatient_info->ward_id] ?? "" }}</td>
|
||||
@php
|
||||
$amount_to_pay = $inpatient_info->bills_amount_to_pay ?? 0;
|
||||
|
||||
$bill_last_created_by = $inpatient_info->bills_created_by;
|
||||
$bill_last_updated_by = $inpatient_info->bills_updated_by;
|
||||
|
||||
$bill_last_updated_by = $bill_last_updated_by ? get_full_name($bill_last_updated_by, 'id', 'first_name', 'last_name', 'users') : get_full_name($bill_last_created_by, 'id', 'first_name', 'last_name', 'users');
|
||||
|
||||
$amount_to_pay_grand_total += is_numeric($amount_to_pay) ? $amount_to_pay : 0;
|
||||
|
||||
$amount_to_pay = is_null($inpatient_info->bills_amount_to_pay) ? "<label class='label label-info'>Bill not yet saved</label>" : ugandan_shillings($amount_to_pay);
|
||||
|
||||
$invoices_amount = is_numeric($inpatient_info->bills_invoices_amount) ? $inpatient_info->bills_invoices_amount : 0;
|
||||
$amount_paid = is_numeric($inpatient_info->bills_amount_paid) ? $inpatient_info->bills_amount_paid : 0;
|
||||
|
||||
$amount_paid_plus_invoices_to_pay = $amount_paid + $invoices_amount;
|
||||
$amount_paid_grand_total += $amount_paid_plus_invoices_to_pay;
|
||||
$original_bill = is_numeric($inpatient_info->bills_original_bill) ? $inpatient_info->bills_original_bill : 0;
|
||||
$total_bill_sum += $original_bill;
|
||||
@endphp
|
||||
<td>{{ ugandan_shillings($original_bill) }}</td>
|
||||
<td>{!! ugandan_shillings($amount_paid_plus_invoices_to_pay) !!}</td>
|
||||
<td>
|
||||
{!! $amount_to_pay !!}
|
||||
</td>
|
||||
<td>
|
||||
{{ streamline_date_time($inpatient_info->updated_at) }} by {{ $bill_last_updated_by }}
|
||||
@php
|
||||
$inpatient_bill_record = \Streamline\Models\InpatientBill::where(['patient_id' => $inpatient_info->patient_id, 'episode_id' => $inpatient_info->episode_id])->first();
|
||||
@endphp
|
||||
|
||||
@if ($inpatient_bill_record)
|
||||
@php
|
||||
$bill_authorized_by_array = is_null($inpatient_bill_record->bill_authorized_by) ? [] : explode(",", $inpatient_bill_record->bill_authorized_by);
|
||||
$bill_authorized_at_array = is_null($inpatient_bill_record->bill_authorized_at) ? [] : explode(",",$inpatient_bill_record->bill_authorized_at);
|
||||
@endphp
|
||||
@if (count($bill_authorized_by_array) > 0)
|
||||
<p>
|
||||
<b style="color: blue">{{ __('inpatient.bill_authorized_by') }}:</b>
|
||||
@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
|
||||
</p>
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a class="btn btn-success btn-sm" href="patient_finance/set_patient_session{{ $inpatient_info->patient_id }}">Select Patient</a>
|
||||
<br><br>
|
||||
<a class="btn btn-primary btn-sm" href="patient_finance/view_inpatient_bill/{{ $inpatient_info->patient_id }}/{{ $inpatient_info->episode_id }}">View Inpatient Bill</a>
|
||||
<br><br>
|
||||
{{ Form::open(['url' => 'receive_inpatient_payment']) }}
|
||||
{{ Form::hidden('patient_id', $inpatient_info->patient_id) }}
|
||||
{{ Form::hidden('episode_id', $inpatient_info->episode_id) }}
|
||||
{{ Form::submit('Receive Payment', ['class' => 'btn btn-info btn-sm btn-rounded'])}}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr class="warning"><td class="center" colspan="10">{{ __('inpatient.no_records_found') }}</td></tr>
|
||||
@endif
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th style="display: none"></th>
|
||||
<th><strong>{{ __('inpatient.total') }}</strong></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th>{{ ugandan_shillings($total_bill_sum) }}</th>
|
||||
<th>{{ ugandan_shillings($amount_paid_grand_total) }}</th>
|
||||
<th>{{ ugandan_shillings($amount_to_pay_grand_total) }}</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('styles')
|
||||
<style type="text/css">
|
||||
#depositTable td{
|
||||
border-left: 1px solid #dddddd;
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@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 type="text/javascript">
|
||||
$('#datepicker-autoclose,#datepicker-autoclose-1,#datepicker-autoclose-2').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy-mm-dd'
|
||||
});
|
||||
|
||||
$('#search_by').change(function () {
|
||||
if ($(this).val() == 2) {
|
||||
$('#date_search').show();
|
||||
$('#date_range_search').hide();
|
||||
} else if ($(this).val() == 3) {
|
||||
$('#date_range_search').show();
|
||||
$('#date_search').hide();
|
||||
} else {
|
||||
$('#date_search,#date_range_search').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
pageLength: 100,
|
||||
buttons: [
|
||||
'copy',
|
||||
{ extend: 'csv',
|
||||
message: 'INCOMING INPATIENT BILLS',
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
|
||||
},
|
||||
sheetName: 'INCOMING INPATIENT BILLS ON STREAMLINE'
|
||||
},
|
||||
{ extend: 'excel',
|
||||
message: 'INCOMING INPATIENT BILLS',
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
|
||||
},
|
||||
sheetName: 'INPATIENT BILLS ON STREAMLINE'
|
||||
},
|
||||
{ extend: 'pdf',
|
||||
message: 'INCOMING INPATIENT BILLS',
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2 ]
|
||||
},
|
||||
sheetName: 'INPATIENT BILLS ON STREAMLINE'
|
||||
},
|
||||
'print'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row bg-title">
|
||||
<div class="col-md-7">
|
||||
<h4 class="page-title">{{ __('inpatient.inpatient_attendant_pass') }}</h4>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('inpatient.dashboard') }}</a></li>
|
||||
<li class="active">{{ __('inpatient.inpatient_attendant_pass') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<h4>{{ __('inpatient.patient_information') }}</h4>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-responsive table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><b>{{ __('inpatient.patient_names') }}</b></td>
|
||||
<td>{!! insurance_flag($patient->id) !!}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{{ __('inpatient.patient_number') }}</b></td>
|
||||
<td>{{ $patient->number }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{{ __('inpatient.pay_later') }}</b></td>
|
||||
<td>
|
||||
@if(isset($discount->pay_later) && $discount->pay_later == 1)
|
||||
{{ __('inpatient.yes') }}
|
||||
{{ Form::hidden('pay_later', 1, ['id' => 'pay_later']) }}
|
||||
@else
|
||||
{{ __('inpatient.no') }}
|
||||
{{ Form::hidden('pay_later', 0, ['id' => 'pay_later']) }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<h4>{{ __('inpatient.deposits_made') }}</h4>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<th>{{ __('inpatient.received_on') }}</th>
|
||||
<th>{{ __('inpatient.receipt_number') }}</th>
|
||||
<th>{{ __('inpatient.received_by') }}</th>
|
||||
<th>{{ __('inpatient.amount_paid') }}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(count($inpatient_deposits) > 0)
|
||||
@php $total_paid = 0; @endphp
|
||||
@foreach($inpatient_deposits as $deposit)
|
||||
<tr>
|
||||
<td>{{ $deposit->receipt_number }}</td>
|
||||
<td>{{ get_full_name($deposit->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
<td>{{ streamline_date($deposit->created_at) }}</td>
|
||||
@php $total_paid += $deposit->patient_amount_paid; @endphp
|
||||
<td>{{ ugandan_shillings($deposit->patient_amount_paid) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td colspan="3"><b>{{ __('inpatient.total') }}</b></td>
|
||||
<td>{{ ugandan_shillings($total_paid) }}</td>
|
||||
</tr>
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="4" style="color: red" class="text-center">{{ __('inpatient.no_deposits_made_yet') }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::open(['route' => 'store_inpatient_attendant_pass', 'data-toggle' => 'validator']) }}
|
||||
<div class="white-box">
|
||||
<div class="row">
|
||||
@if(is_null($inpatient_bill))
|
||||
<div class="col-md-12">
|
||||
<h3><span class="label label-danger">{{ __('inpatient.no_patient_billing_generated') }}</span></h3>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-4">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
{{ Form::label('expiry_days', __('inpatient.expire_after_how_many_days')) }}
|
||||
{{ Form::number('expiry_days', $number_of_days, ['class' => 'form-control compulsory', 'required']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<br>
|
||||
{{ Form::button(__('inpatient.issue_pass'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10', 'onclick' => 'return confirm("Are you sure you want to issue pass?")']) }}
|
||||
{{ Form::button(__('inpatient.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
|
||||
@endsection
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
@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: 12px;
|
||||
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>{{ __('inpatient.inpatient_attendant_pass') }}</h4>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('inpatient.dashboard') }}</a></li>
|
||||
<li class="active">{{ __('inpatient.inpatient_attendant_pass') }}</li>
|
||||
</ol>
|
||||
</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()"> {{ __('inpatient.print') }}</button></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>Tel:</b> {{ $hospital_information->phone_number }}</span><b>Email:</b> {{ $hospital_information->email }}</span><br>
|
||||
<span class="receipt-label"><b>{{ __('inpatient.department') }}:</b> {{ get_name($inpatient_info->ward_id, "id", "name", "wards") }}</span><br>
|
||||
<span class="receipt-label"><b>{{ __('inpatient.date') }}:</b> {{ streamline_date_time_short(\Carbon\Carbon::now()) }}</span><br>
|
||||
<span class="receipt-label"><b>{{ __('inpatient.patient_names') }}</b> : {{ $patient->first_name }} {{ $patient->last_name }} ({{ $patient->number }}) <b>-{{ get_name($patient->category_id, "id", "name", "patient_categories") }}</b></span>
|
||||
</p>
|
||||
|
||||
<table class="table" id="receipt_table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<b>{{ __('inpatient.patient_pass_expires') }}<br>
|
||||
{{ streamline_date_time(\Carbon\Carbon::now()->addDays($number_of_days)) }}</b>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4">
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div style="text-align: center;">
|
||||
<small><strong>{{ __('inpatient.issued_by') }}:</strong> {{ get_full_name($attendant_pass_information->created_by, "id", "first_name", "last_name", "users") }}</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
</div>
|
||||
|
||||
<i style="font-size: 0.8em; margin-left: 50%;">© 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
|
||||
+1241
File diff suppressed because it is too large
Load Diff
Executable
+3169
File diff suppressed because it is too large
Load Diff
docker/statistics/Modules/WardManagement/Resources/views/inpatient/inpatient_billing_print.blade.php
Executable
+1415
File diff suppressed because it is too large
Load Diff
+178
@@ -0,0 +1,178 @@
|
||||
<!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 Consultation and Services - Stre@mline') }}</title>
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
body{
|
||||
/*font-size: 1.2em;*/
|
||||
}
|
||||
/*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;
|
||||
}
|
||||
|
||||
.card-header{
|
||||
padding: 5px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
@include('layouts.header_pdf_print')
|
||||
|
||||
<h5 class="heading" style="text-align: center;">{{ __('inpatient.inpatient_consultation_and_services_details') }}</h5>
|
||||
|
||||
<div class="row">
|
||||
<table class="table table-light table-sm table-borderless">
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.patient_number') }}</th>
|
||||
<td>{{ $patient->number}}</td>
|
||||
<td width="60" style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.ward') }}</th>
|
||||
<td>
|
||||
{{ get_name($inpatient_info->ward_id, 'id', 'name', 'wards') }} |
|
||||
@if($inpatient_info->bed_category_id)
|
||||
{{ get_name($inpatient_info->bed_category_id, 'id', 'name', 'inpatient_bed_categories') }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.patient_names') }}</th>
|
||||
<td>{{ $patient->first_name}} {{ $patient->last_name}}</td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.admitted') }}</th>
|
||||
<td>
|
||||
@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
|
||||
|
||||
{{ streamline_date($inpatient_info->admitted_on) }} ( {{ $days_spent_in_ward }} {{ __('inpatient.days') }})
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.age') }}</th>
|
||||
<td><?php echo get_patients_age($patient->date_of_birth); ?></td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.discharged') }}</th>
|
||||
<td>
|
||||
@if($inpatient_info->discharged == 1)
|
||||
{{ streamline_date($inpatient_info->discharged_on) }}
|
||||
@else
|
||||
{{ __('inpatient.still_admitted') }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.gender') }}</th>
|
||||
<td>{{ $patient->gender == 1 ? __('inpatient.male') : __('inpatient.female') }}</td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th scope="row">{{ __('inpatient.category') }}</th>
|
||||
<td>
|
||||
{{ get_name($patient->category_id, 'id', 'name', 'patient_categories') }}
|
||||
|
||||
@if(!is_null($patient_discount))
|
||||
({{ $patient_discount["discount"] }} % {{ __('inpatient.discount') }})
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<?php
|
||||
$services_total_cost = 0;
|
||||
|
||||
$ward_services_quantities_given = DB::table('ward_consultations_and_services')->where(['patient_id' => $patient_id, 'episode_id' => $episode_id])->groupBy('service_id')->selectRaw('*, sum(quantity_given) as quantity_given')->get();
|
||||
?>
|
||||
|
||||
@if(count($ward_services_quantities_given) > 0)
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
{{ __('inpatient.consultation_and_services') }}
|
||||
</div>
|
||||
|
||||
<table class="table table-light table-sm">
|
||||
<thead>
|
||||
<th>{{ __('inpatient.date') }}</th>
|
||||
<th>{{ __('inpatient.name') }}</th>
|
||||
<th>{{ __('inpatient.quantity') }}</th>
|
||||
<th>{{ __('inpatient.unit_cost') }}</th>
|
||||
<th>{{ __('inpatient.subtotal') }}</th>
|
||||
</thead>
|
||||
@foreach($ward_services_quantities_given as $record)
|
||||
|
||||
<?php
|
||||
$dispensation_details = \Streamline\Models\WardConsultationsAndService::where(['patient_id' => $patient_id, 'episode_id' => $episode_id, 'service_id' => $record->service_id])->get();
|
||||
?>
|
||||
|
||||
@foreach($dispensation_details as $dispensation)
|
||||
@php
|
||||
$services_cost = $record->unit_price;
|
||||
@endphp
|
||||
<tr>
|
||||
<td>
|
||||
{{ streamline_date($dispensation->created_at) }}
|
||||
<br>
|
||||
<font style="color: blue;">{{ __('inpatient.by') }}: {{ get_full_name($dispensation->created_by, "id", "first_name", "last_name", "users") }}</font>
|
||||
</td>
|
||||
<td>
|
||||
{{ $service_items[$dispensation->service_id] }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $dispensation->quantity_given }}
|
||||
</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($services_cost) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($services_cost * $dispensation->quantity_given) }}
|
||||
</td>
|
||||
@php
|
||||
$single_service_cost = $services_cost * $dispensation->quantity_given;
|
||||
|
||||
$services_total_cost += $single_service_cost;
|
||||
@endphp
|
||||
</tr>
|
||||
@endforeach
|
||||
@endforeach
|
||||
<tr>
|
||||
<td colspan="3"><strong>{{ __('inpatient.services_total') }}</strong></td>
|
||||
<td colspan="2"><strong>{{ ugandan_shillings($services_total_cost) }}</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+148
@@ -0,0 +1,148 @@
|
||||
<!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 Progress Notes - Stre@mline') }}</title>
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
body{
|
||||
/*font-size: 1.2em;*/
|
||||
}
|
||||
/*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;
|
||||
}
|
||||
|
||||
.card-header{
|
||||
padding: 5px;
|
||||
}
|
||||
h5{
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
@include('layouts.header_pdf_print')
|
||||
|
||||
<h5 class="heading" style="text-align: center;">{{ __('inpatient.inpatient_details') }}</h5>
|
||||
|
||||
<div class="row">
|
||||
<table class="table table-light table-sm table-borderless">
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.patient_number') }}</th>
|
||||
<td>{{ $patient->number}}</td>
|
||||
<td width="60" style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.ward') }}</th>
|
||||
<td>
|
||||
{{ get_name($inpatient_info->ward_id, 'id', 'name', 'wards') }} |
|
||||
@if($inpatient_info->bed_category_id)
|
||||
{{ get_name($inpatient_info->bed_category_id, 'id', 'name', 'inpatient_bed_categories') }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.patient_names') }}</th>
|
||||
<td>{{ $patient->first_name}} {{ $patient->last_name}}</td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.admitted') }}</th>
|
||||
<td>
|
||||
@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
|
||||
|
||||
{{ streamline_date($inpatient_info->admitted_on) }} ( {{ $days_spent_in_ward }} {{ __('inpatient.days') }})
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.age') }}</th>
|
||||
<td><?php echo get_patients_age($patient->date_of_birth); ?></td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.discharged') }}</th>
|
||||
<td>
|
||||
@if($inpatient_info->discharged == 1)
|
||||
{{ streamline_date($inpatient_info->discharged_on) }}
|
||||
@else
|
||||
{{ __('inpatient.still_admitted') }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.gender') }}</th>
|
||||
<td>{{ $patient->gender == 1 ? __('inpatient.male') : __('inpatient.female') }}</td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th scope="row">{{ __('inpatient.category') }}</th>
|
||||
<td>
|
||||
{{ get_name($patient->category_id, 'id', 'name', 'patient_categories') }}
|
||||
|
||||
@if(!is_null($patient_discount))
|
||||
({{ $patient_discount["discount"] }} % {{ __('inpatient.discount') }})
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<h3>{{ __('inpatient.inpatient_detailed_notes') }}</h3>
|
||||
|
||||
@php $sheet_histories = DB::table('ward_inpatient_detailed_notes')->whereNull('deleted_at')->where(['patient_id' => $patient_id, 'episode_id' => $episode_id])->get(); @endphp
|
||||
@if(count($sheet_histories) > 0)
|
||||
<table class="table color-bordered-table muted-bordered-table">
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
@foreach($sheet_histories as $comment_record)
|
||||
<tr>
|
||||
<td>
|
||||
<h5 @if(is_null($comment_record->history)) style="display:none;"@endif>{{ __('inpatient.history') }}</h5>
|
||||
{{ $comment_record->history }}
|
||||
<h5 @if(is_null($comment_record->result)) style="display:none;"@endif>{{ __('inpatient.results') }}</h5>
|
||||
{{ $comment_record->result }}
|
||||
<h5 @if(is_null($comment_record->vitals)) style="display:none;"@endif>{{ __('inpatient.vitals_and_examination') }}</h5>
|
||||
{{ $comment_record->vitals }}
|
||||
<h5 @if(is_null($comment_record->impression)) style="display:none;"@endif>{{ __('inpatient.impression') }}</h5>
|
||||
{{ $comment_record->impression }}
|
||||
<h5 @if(is_null($comment_record->plan)) style="display:none;"@endif>{{ __('inpatient.plan') }}</h5>
|
||||
{{ $comment_record->plan }}
|
||||
<br>
|
||||
<span style="color: blue">{{ get_full_name($comment_record->created_by, "id", "first_name", "last_name", "users") }} {{ __('inpatient.on') }} {{ streamline_date_time_short($comment_record->created_at) }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Executable
+150
@@ -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('uploads/streamline/color/streamline_icon-02.png') }}">
|
||||
<title>{{ config('app.name', 'Inpatient Extras - Stre@mline') }}</title>
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
body{
|
||||
/*font-size: 1.2em;*/
|
||||
}
|
||||
/*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;
|
||||
}
|
||||
|
||||
.card-header{
|
||||
padding: 5px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
@include('layouts.header_pdf_print')
|
||||
|
||||
<h5 class="heading" style="text-align: center;">{{ __('inpatient.inpatient_extras_details') }}</h5>
|
||||
|
||||
<div class="row">
|
||||
<table class="table table-light table-sm table-borderless">
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.patient_number') }}</th>
|
||||
<td>{{ $patient->number}}</td>
|
||||
<td width="60" style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.ward') }}</th>
|
||||
<td>
|
||||
{{ get_name($inpatient_info->ward_id, 'id', 'name', 'wards') }} |
|
||||
@if($inpatient_info->bed_category_id)
|
||||
{{ get_name($inpatient_info->bed_category_id, 'id', 'name', 'inpatient_bed_categories') }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.patient_names') }}</th>
|
||||
<td>{{ $patient->first_name}} {{ $patient->last_name}}</td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.admitted') }}</th>
|
||||
<td>
|
||||
@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
|
||||
|
||||
{{ streamline_date($inpatient_info->admitted_on) }} ( {{ $days_spent_in_ward }} {{ __('inpatient.days') }})
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.age') }}</th>
|
||||
<td><?php echo get_patients_age($patient->date_of_birth); ?></td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.discharged') }}</th>
|
||||
<td>
|
||||
@if($inpatient_info->discharged == 1)
|
||||
{{ streamline_date($inpatient_info->discharged_on) }}
|
||||
@else
|
||||
{{ __('inpatient.still_admitted') }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.gender') }}</th>
|
||||
<td>{{ $patient->gender == 1 ? __('inpatient.male') : __('inpatient.female') }}</td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th scope="row">{{ __('inpatient.category') }}</th>
|
||||
<td>
|
||||
{{ get_name($patient->category_id, 'id', 'name', 'patient_categories') }}
|
||||
|
||||
@if(!is_null($patient_discount))
|
||||
({{ $patient_discount["discount"] }} % {{ __('inpatient.discount') }})
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<?php
|
||||
$ward_extras_given = DB::table('ward_extras')->where(['patient_id' => $patient_id, 'episode_id' => $episode_id])->get();
|
||||
$extras_total_cost = 0;
|
||||
?>
|
||||
|
||||
@if(count($ward_extras_given) > 0)
|
||||
<div class="card">
|
||||
<table class="table table-light table-sm">
|
||||
<thead>
|
||||
<th>{{ __('inpatient.date') }}</th>
|
||||
<th>{{ __('inpatient.name') }}</th>
|
||||
<th>{{ __('inpatient.cost') }}</th>
|
||||
</thead>
|
||||
@foreach($ward_extras_given as $extras_record)
|
||||
<tr>
|
||||
<td>
|
||||
{{ streamline_date($extras_record->created_at)}}
|
||||
{{ __('inpatient.by') }}: <font color="blue">{{ get_full_name($extras_record->created_by, "id", "first_name", "last_name", "users")}}</font>
|
||||
</td>
|
||||
<td>
|
||||
{{ $extras_record->extra_item }}
|
||||
</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($extras_record->extra_cost) }}
|
||||
@php $extras_total_cost += $extras_record->extra_cost; @endphp
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td colspan="2"><strong>{{ __('inpatient.extras_total') }}</strong></td>
|
||||
<td><strong>{{ ugandan_shillings($extras_total_cost) }}</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Executable
+146
@@ -0,0 +1,146 @@
|
||||
<!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 Procedures - Stre@mline') }}</title>
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
body{
|
||||
/*font-size: 1.2em;*/
|
||||
}
|
||||
/*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;
|
||||
}
|
||||
|
||||
.card-header{
|
||||
padding: 5px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
@include('layouts.header_pdf_print')
|
||||
|
||||
<h5 class="heading" style="text-align: center;">{{ __('inpatient.inpatient_procedures_details') }}</h5>
|
||||
|
||||
<div class="row">
|
||||
<table class="table table-light table-sm table-borderless">
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.patient_number') }}</th>
|
||||
<td>{{ $patient->number}}</td>
|
||||
<td width="60" style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.ward') }}</th>
|
||||
<td>
|
||||
{{ get_name($inpatient_info->ward_id, 'id', 'name', 'wards') }} |
|
||||
@if($inpatient_info->bed_category_id)
|
||||
{{ get_name($inpatient_info->bed_category_id, 'id', 'name', 'inpatient_bed_categories') }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.patient_names') }}</th>
|
||||
<td>{{ $patient->first_name}} {{ $patient->last_name}}</td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.admitted') }}</th>
|
||||
<td>
|
||||
@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
|
||||
|
||||
{{ streamline_date($inpatient_info->admitted_on) }} ( {{ $days_spent_in_ward }} {{ __('inpatient.days') }})
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.age') }}</th>
|
||||
<td><?php echo get_patients_age($patient->date_of_birth); ?></td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.discharged') }}</th>
|
||||
<td>
|
||||
@if($inpatient_info->discharged == 1)
|
||||
{{ streamline_date($inpatient_info->discharged_on) }}
|
||||
@else
|
||||
{{ __('inpatient.still_admitted') }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.gender') }}</th>
|
||||
<td>{{ $patient->gender == 1 ? __('inpatient.male') : __('inpatient.female') }}</td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th scope="row">{{ __('inpatient.category') }}</th>
|
||||
<td>
|
||||
{{ get_name($patient->category_id, 'id', 'name', 'patient_categories') }}
|
||||
|
||||
@if(!is_null($patient_discount))
|
||||
({{ $patient_discount["discount"] }} % {{ __('inpatient.discount') }})
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<table class="table table-bordered">
|
||||
<?php
|
||||
$ward_investigation_pricings = DB::table('ward_investigation_pricings')->where(['patient_id' => $patient_id, 'episode_id' => $episode_id])->get();
|
||||
?>
|
||||
|
||||
@if(count($ward_investigation_pricings) > 0)
|
||||
@php $total_modal_investigations_cost = 0; @endphp
|
||||
@foreach($ward_investigation_pricings as $ward_inv_price)
|
||||
<tr>
|
||||
<td>
|
||||
{{ __('inpatient.recorded_by') }}: <font color="blue">{{ get_full_name($ward_inv_price->created_by, "id", "first_name", "last_name", "users")}}</font><br>
|
||||
{{ __('inpatient.on') }} <b>{{ streamline_date($ward_inv_price->created_at)}}</b>
|
||||
</td>
|
||||
<td>
|
||||
{{ __('inpatient.name') }}:
|
||||
{{ get_name($ward_inv_price->investigation_id, "id", "name", "investigations") }}
|
||||
</td>
|
||||
<td>
|
||||
{{ __('inpatient.price') }}:{{ ugandan_shillings($ward_inv_price->price) }}
|
||||
</td>
|
||||
</tr>
|
||||
@php $total_modal_investigations_cost += $ward_inv_price->price; @endphp
|
||||
@endforeach
|
||||
<tr>
|
||||
<td colspan="2"><strong>{{ __('inpatient.total_cost_of_investigations') }}</strong></td>
|
||||
<td colspan="2"><strong>{{ ugandan_shillings($total_modal_investigations_cost) }}</strong></td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Executable
+156
@@ -0,0 +1,156 @@
|
||||
<!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 Progress Notes - Stre@mline') }}</title>
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
body{
|
||||
/*font-size: 1.2em;*/
|
||||
}
|
||||
/*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;
|
||||
}
|
||||
|
||||
.card-header{
|
||||
padding: 5px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
@include('layouts.header_pdf_print')
|
||||
|
||||
<h5 class="heading" style="text-align: center;">{{ __('inpatient.inpatient_progress_notes_details') }}</h5>
|
||||
|
||||
<div class="row">
|
||||
<table class="table table-light table-sm table-borderless">
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.patient_number') }}</th>
|
||||
<td>{{ $patient->number}}</td>
|
||||
<td width="60" style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.ward') }}</th>
|
||||
<td>
|
||||
{{ get_name($inpatient_info->ward_id, 'id', 'name', 'wards') }} |
|
||||
@if($inpatient_info->bed_category_id)
|
||||
{{ get_name($inpatient_info->bed_category_id, 'id', 'name', 'inpatient_bed_categories') }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.patient_names') }}</th>
|
||||
<td>{{ $patient->first_name}} {{ $patient->last_name}}</td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.admitted') }}</th>
|
||||
<td>
|
||||
@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
|
||||
|
||||
{{ streamline_date($inpatient_info->admitted_on) }} ( {{ $days_spent_in_ward }} {{ __('inpatient.days') }})
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.age') }}</th>
|
||||
<td><?php echo get_patients_age($patient->date_of_birth); ?></td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.discharged') }}</th>
|
||||
<td>
|
||||
@if($inpatient_info->discharged == 1)
|
||||
{{ streamline_date($inpatient_info->discharged_on) }}
|
||||
@else
|
||||
{{ __('inpatient.still_admitted') }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.gender') }}</th>
|
||||
<td>{{ $patient->gender == 1 ? __('inpatient.male') : __('inpatient.female') }}</td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th scope="row">{{ __('inpatient.category') }}</th>
|
||||
<td>
|
||||
{{ get_name($patient->category_id, 'id', 'name', 'patient_categories') }}
|
||||
|
||||
@if(!is_null($patient_discount))
|
||||
({{ $patient_discount["discount"] }} % {{ __('inpatient.discount') }})
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<h3>{{ __('inpatient.doctor_progress_notes') }}</h3>
|
||||
|
||||
@php $sheet_comments = DB::table('ward_inpatient_sheet_comments')->whereNull('deleted_at')->where(['patient_id' => $patient_id, 'episode_id' => $episode_id])->get(); @endphp
|
||||
@if(count($sheet_comments) > 0)
|
||||
<table class="table color-bordered-table muted-bordered-table">
|
||||
@foreach($sheet_comments as $comment_record)
|
||||
<tr>
|
||||
<td>
|
||||
<font color="blue">{{ get_full_name($comment_record->created_by, "id", "first_name", "last_name", "users") }}</font>
|
||||
{{ __('inpatient.on') }}
|
||||
<font color="blue">{{ streamline_date_time($comment_record->created_at) }}</font>
|
||||
</td>
|
||||
<td>
|
||||
{{ $comment_record->ward_comments }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
@endif
|
||||
|
||||
<h3>{{ __('inpatient.nurse_progress_notes') }}</h3>
|
||||
|
||||
@php $sheet_comments = DB::table('ward_inpatient_sheet_nurse_comments')->whereNull('deleted_at')->where(['patient_id' => $patient_id, 'episode_id' => $episode_id])->get(); @endphp
|
||||
@if(count($sheet_comments) > 0)
|
||||
<table class="table color-bordered-table muted-bordered-table">
|
||||
@foreach($sheet_comments as $comment_record)
|
||||
<tr>
|
||||
<td>
|
||||
<font color="blue">{{ get_full_name($comment_record->created_by, "id", "first_name", "last_name", "users") }}</font>
|
||||
{{ __('inpatient.on') }}
|
||||
<font color="blue">{{ streamline_date_time($comment_record->created_at) }}</font>
|
||||
</td>
|
||||
<td>
|
||||
{{ $comment_record->ward_comments }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
<!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 Procedures - Stre@mline') }}</title>
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
body{
|
||||
/*font-size: 1.2em;*/
|
||||
}
|
||||
/*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;
|
||||
}
|
||||
|
||||
.card-header{
|
||||
padding: 5px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
@include('layouts.header_pdf_print')
|
||||
|
||||
<h5 class="heading" style="text-align: center;">{{ __('inpatient.inpatient_procedures_details') }}</h5>
|
||||
|
||||
<div class="row">
|
||||
<table class="table table-light table-sm table-borderless">
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.patient_number') }}</th>
|
||||
<td>{{ $patient->number}}</td>
|
||||
<td width="60" style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.ward') }}</th>
|
||||
<td>
|
||||
{{ get_name($inpatient_info->ward_id, 'id', 'name', 'wards') }} |
|
||||
@if($inpatient_info->bed_category_id)
|
||||
{{ get_name($inpatient_info->bed_category_id, 'id', 'name', 'inpatient_bed_categories') }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.patient_names') }}</th>
|
||||
<td>{{ $patient->first_name}} {{ $patient->last_name}}</td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.admitted') }}</th>
|
||||
<td>
|
||||
@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
|
||||
|
||||
{{ streamline_date($inpatient_info->admitted_on) }} ( {{ $days_spent_in_ward }} {{ __('inpatient.days') }})
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.age') }}</th>
|
||||
<td><?php echo get_patients_age($patient->date_of_birth); ?></td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.discharged') }}</th>
|
||||
<td>
|
||||
@if($inpatient_info->discharged == 1)
|
||||
{{ streamline_date($inpatient_info->discharged_on) }}
|
||||
@else
|
||||
{{ __('inpatient.still_admitted') }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.gender') }}</th>
|
||||
<td>{{ $patient->gender == 1 ? __('inpatient.male') : __('inpatient.female') }}</td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th scope="row">{{ __('inpatient.category') }}</th>
|
||||
<td>
|
||||
{{ get_name($patient->category_id, 'id', 'name', 'patient_categories') }}
|
||||
|
||||
@if(!is_null($patient_discount))
|
||||
({{ $patient_discount["discount"] }} % {{ __('inpatient.discount') }})
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<?php
|
||||
$ward_procedures = DB::table('ward_procedures')->where(['patient_id' => $patient_id, 'episode_id' => $episode_id])->get();
|
||||
|
||||
$total_modal_procedures_cost = 0;
|
||||
|
||||
$inpatient_procedures = @unserialize($inpatient_info->procedures);
|
||||
|
||||
$inpatient_procedures_done_by = @unserialize($inpatient_info->procedures_done_by);
|
||||
|
||||
$inpatient_procedure_hospital_fees = @unserialize($inpatient_info->procedure_hospital_fee);
|
||||
|
||||
$inpatient_procedures_staff_fees = @unserialize($inpatient_info->procedure_staff_fee);
|
||||
|
||||
$procedures_staff_fee = DB::table('ward_procedures')->whereNull('deleted_at')->where(['patient_id' => $patient_id, 'episode_id' => $episode_id])->pluck("staff_fee", "procedure_id")->toArray();
|
||||
|
||||
$procedures_hospital_fee = DB::table('ward_procedures')->whereNull('deleted_at')->where(['patient_id' => $patient_id, 'episode_id' => $episode_id])->pluck("hospital_fee", "procedure_id")->toArray();
|
||||
|
||||
$procedures_counter = 0;
|
||||
?>
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Recorded By</th>
|
||||
<th>{{ __('inpatient.name') }}</th>
|
||||
<th>{{ __('inpatient.hospital_fees') }}</th>
|
||||
<th>{{ __('inpatient.staff_fees') }}</th>
|
||||
<th>{{ __('inpatient.performed_by') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($ward_procedures as $ward_procedure_record)
|
||||
<tr>
|
||||
<td>
|
||||
<font color="blue">{{ get_full_name($ward_procedure_record->created_by, "id", "first_name", "last_name", "users")}}</font>
|
||||
{{ __('inpatient.on') }} <b>{{ is_null($ward_procedure_record->procedure_date) ? streamline_date($ward_procedure_record->created_at) : streamline_date($ward_procedure_record->procedure_date) }}</b>
|
||||
</td>
|
||||
<td>
|
||||
{{ get_name($ward_procedure_record->procedure_id, "id", "name", "procedures") }}
|
||||
@php
|
||||
$single_procedure_cost = 0;
|
||||
if($ward_procedure_record->hospital_fee || $ward_procedure_record->staff_fee) {
|
||||
$single_procedure_cost = $ward_procedure_record->hospital_fee + $ward_procedure_record->staff_fee;
|
||||
}
|
||||
@endphp
|
||||
({{ __('inpatient.cost') }} : {{ugandan_shillings($single_procedure_cost) }})
|
||||
</td>
|
||||
<td>{{ ugandan_shillings($ward_procedure_record->hospital_fee) }}</td>
|
||||
<td>{{ ugandan_shillings($ward_procedure_record->staff_fee) }}</td>
|
||||
<td>
|
||||
{{ get_full_name($ward_procedure_record->performed_by, "id", "first_name", "last_name", "users") }}
|
||||
</td>
|
||||
</tr>
|
||||
@php $total_modal_procedures_cost += $single_procedure_cost; @endphp
|
||||
@endforeach
|
||||
<tr>
|
||||
<td colspan="2">{{ __('inpatient.cost') }}</td>
|
||||
<td colspan="3">{{ ugandan_shillings($total_modal_procedures_cost) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Executable
+3555
File diff suppressed because it is too large
Load Diff
docker/statistics/Modules/WardManagement/Resources/views/inpatient/inpatient_sheet_history.blade.php
Executable
+1100
File diff suppressed because it is too large
Load Diff
+183
@@ -0,0 +1,183 @@
|
||||
<!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 Sundries - Stre@mline') }}</title>
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
body{
|
||||
/*font-size: 1.2em;*/
|
||||
}
|
||||
/*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;
|
||||
}
|
||||
|
||||
.card-header{
|
||||
padding: 5px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
@include('layouts.header_pdf_print')
|
||||
|
||||
<h5 class="heading" style="text-align: center;">{{ __('inpatient.inpatient_sundries_details') }}</h5>
|
||||
|
||||
<div class="row">
|
||||
<table class="table table-light table-sm table-borderless">
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.patient_number') }}</th>
|
||||
<td>{{ $patient->number}}</td>
|
||||
<td width="60" style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.ward') }}</th>
|
||||
<td>
|
||||
{{ get_name($inpatient_info->ward_id, 'id', 'name', 'wards') }} |
|
||||
@if($inpatient_info->bed_category_id)
|
||||
{{ get_name($inpatient_info->bed_category_id, 'id', 'name', 'inpatient_bed_categories') }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.patient_names') }}</th>
|
||||
<td>{{ $patient->first_name}} {{ $patient->last_name}}</td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.admitted') }}</th>
|
||||
<td>
|
||||
@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
|
||||
|
||||
{{ streamline_date($inpatient_info->admitted_on) }} ( {{ $days_spent_in_ward }} {{ __('inpatient.days') }})
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.age') }}</th>
|
||||
<td><?php echo get_patients_age($patient->date_of_birth); ?></td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.discharged') }}</th>
|
||||
<td>
|
||||
@if($inpatient_info->discharged == 1)
|
||||
{{ streamline_date($inpatient_info->discharged_on) }}
|
||||
@else
|
||||
{{ __('inpatient.still_admitted') }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.gender') }}</th>
|
||||
<td>{{ $patient->gender == 1 ? __('inpatient.male') : __('inpatient.female') }}</td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th scope="row">{{ __('inpatient.category') }}</th>
|
||||
<td>
|
||||
{{ get_name($patient->category_id, 'id', 'name', 'patient_categories') }}
|
||||
|
||||
@if(!is_null($patient_discount))
|
||||
({{ $patient_discount["discount"] }} % {{ __('inpatient.discount') }})
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$ward_sundry_quantities_given = DB::table('ward_sundry_dispensations')->where(['patient_id' => $patient_id, 'episode_id' => $episode_id])->groupBy('sundry_id')->selectRaw('*, sum(quantity_given) as quantity_given')->get();
|
||||
$sundries_total_cost = $insurance_sundries = 0;
|
||||
$patient_insurance_status = (patient_insurance_status($patient_id) == 1);
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<table class="table table-light table-sm table-borderless">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('inpatient.name') }}</th>
|
||||
<th>{{ __('patient_finance.unit_cost') }}</th>
|
||||
<th @if(!$patient_insurance_status) style="display: none" @endif>{{ __('inpatient.insurance_unit_price') }}</th>
|
||||
<th>{{ __('inpatient.quantity') }}</th>
|
||||
<th>{{ __('inpatient.patient_to_pay') }}</th>
|
||||
<th @if(!$patient_insurance_status) style="display: none" @endif>{{ __('inpatient.insurance_to_pay') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($ward_sundry_quantities_given as $sundry_record)
|
||||
@php
|
||||
$sundries_cost = $this_sundry_sp = 0;
|
||||
$is_insured = 0;
|
||||
$tariff_id = 0;
|
||||
$benefit_id = 0;
|
||||
$insurance_sundry_amount = 0;
|
||||
|
||||
if($patient_insurance_status){
|
||||
$item_insurance_details = get_item_insurance_pricing($patient_id, $sundry_record->sundry_id, 5, true, $inpatient_info->ward_id);
|
||||
$sundries_cost = $item_insurance_details[2];
|
||||
$insurance_sundry_amount = $item_insurance_details[1];
|
||||
$is_insured = $item_insurance_details[0];
|
||||
$tariff_id = $item_insurance_details[3];
|
||||
$benefit_id = $item_insurance_details[4];
|
||||
} else {
|
||||
$sundries_cost = get_name($sundry_record->sundry_id, "id", "non_insured_price", "sundries");
|
||||
}
|
||||
|
||||
//get actual total costs incase the price of item changed after dispensation to allow retro billing
|
||||
$this_sundry_total_price = 0;
|
||||
$per_ward_sundry_given_rows = DB::table('ward_sundry_dispensations')->whereNull('deleted_at')->where(['patient_id' => $patient_id, 'episode_id' => $episode_id, 'sundry_id' => $sundry_record->sundry_id])->get();
|
||||
|
||||
if (count($per_ward_sundry_given_rows) > 0) {
|
||||
foreach ($per_ward_sundry_given_rows as $sundry_ward_record) {
|
||||
$this_sundry_sp = ($sundry_ward_record->price != 0) ? $sundry_ward_record->price : $sundries_cost;
|
||||
$this_sundry_total_price += ($this_sundry_sp * $sundry_ward_record->quantity_given);
|
||||
$insurance_sundry_amount = $sundry_ward_record->chi_price;
|
||||
}
|
||||
} else {
|
||||
$this_sundry_total_price = $sundry_record->quantity_given * $sundries_cost;
|
||||
}
|
||||
|
||||
$sundries_total_cost += $this_sundry_total_price;
|
||||
$insurance_sundries += ($sundry_record->quantity_given * $insurance_sundry_amount);
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ get_name($sundry_record->sundry_id, "id", "name", "sundries") }}</td>
|
||||
<td>{{ $this_sundry_sp }}</td>
|
||||
<td @if(!$patient_insurance_status) style="display: none" @endif>{{ $insurance_sundry_amount }}</td>
|
||||
<td>{{ $sundry_record->quantity_given }}</td>
|
||||
<td>{{ $this_sundry_total_price }}</td>
|
||||
<td @if(!$patient_insurance_status) style="display: none" @endif>{{ $sundry_record->quantity_given * $insurance_sundry_amount }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td colspan="4"><strong>{{ __('inpatient.sundries_total') }}</strong></td>
|
||||
<td><strong>{{ ugandan_shillings($sundries_total_cost) }}</strong></td>
|
||||
<td><strong>{{ ugandan_shillings($insurance_sundries) }}</strong></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+189
@@ -0,0 +1,189 @@
|
||||
<!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 Sundries - Stre@mline') }}</title>
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
body{
|
||||
/*font-size: 1.2em;*/
|
||||
}
|
||||
/*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;
|
||||
}
|
||||
|
||||
.card-header{
|
||||
padding: 5px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
@include('layouts.header_pdf_print')
|
||||
|
||||
<h5 class="heading" style="text-align: center;">{{ __('inpatient.inpatient_treatment_details') }}</h5>
|
||||
|
||||
<div class="row">
|
||||
<table class="table table-light table-sm table-borderless">
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.patient_number') }}</th>
|
||||
<td>{{ $patient->number}}</td>
|
||||
<td width="60" style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.ward') }}</th>
|
||||
<td>
|
||||
{{ get_name($inpatient_info->ward_id, 'id', 'name', 'wards') }} |
|
||||
@if($inpatient_info->bed_category_id)
|
||||
{{ get_name($inpatient_info->bed_category_id, 'id', 'name', 'inpatient_bed_categories') }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.patient_names') }}</th>
|
||||
<td>{{ $patient->first_name}} {{ $patient->last_name}}</td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.admitted') }}</th>
|
||||
<td>
|
||||
@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
|
||||
|
||||
{{ streamline_date($inpatient_info->admitted_on) }} ( {{ $days_spent_in_ward }} {{ __('inpatient.days') }})
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.age') }}</th>
|
||||
<td><?php echo get_patients_age($patient->date_of_birth); ?></td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.discharged') }}</th>
|
||||
<td>
|
||||
@if($inpatient_info->discharged == 1)
|
||||
{{ streamline_date($inpatient_info->discharged_on) }}
|
||||
@else
|
||||
{{ __('inpatient.still_admitted') }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.gender') }}</th>
|
||||
<td>{{ $patient->gender == 1 ? __('inpatient.male') : __('inpatient.female') }}</td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th scope="row">{{ __('inpatient.category') }}</th>
|
||||
<td>
|
||||
{{ get_name($patient->category_id, 'id', 'name', 'patient_categories') }}
|
||||
|
||||
@if(!is_null($patient_discount))
|
||||
({{ $patient_discount["discount"] }} % {{ __('inpatient.discount') }})
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
|
||||
<?php
|
||||
//get the quantity given so far of this particular treatment
|
||||
$ward_quantities_given_option2 = DB::table('ward_treatment_dispensations')->where(['patient_id' => $patient_id, 'episode_id' => $episode_id])->groupBy('drug_id')->selectRaw('*, sum(quantity_given) as quantity_given')->get();
|
||||
|
||||
$treatment_total_cost = 0;
|
||||
?>
|
||||
|
||||
@if(count($ward_quantities_given_option2) > 0)
|
||||
<div class="card">
|
||||
@if(get_ward_prescription_model() == 1)
|
||||
<div class="card-header">
|
||||
{{ __('inpatient.treatments') }}
|
||||
</div>
|
||||
|
||||
<table class="table table-light table-sm">
|
||||
<thead>
|
||||
<th>{{ __('inpatient.date') }}</th>
|
||||
<th>{{ __('inpatient.name') }}</th>
|
||||
<th>{{ __('inpatient.quantity') }}</th>
|
||||
<th>{{ __('inpatient.unit_cost') }}</th>
|
||||
<th>{{ __('inpatient.subtotal') }}</th>
|
||||
</thead>
|
||||
@foreach($ward_quantities_given_option2 as $record)
|
||||
<?php
|
||||
$dispensation_details = \Streamline\Models\WardTreatmentDispensation::where(['patient_id' => $patient_id, 'episode_id' => $episode_id, 'drug_id' => $record->drug_id])->get();
|
||||
?>
|
||||
|
||||
@foreach($dispensation_details as $dispensation)
|
||||
@php
|
||||
$drugs_cost = 0;
|
||||
// check if drug and patient is eligible for insurance
|
||||
if(get_name($dispensation->drug_id, "id", "insurance_coverage", "drugs") == 1 && patient_insurance_status($patient_id) == 1){
|
||||
$drugs_cost = get_name($dispensation->drug_id, "id", "insured_price", "drugs");
|
||||
//$insurance_amount = get_name($dispensation->drug_id, "id", "non_insured_price", "drugs") - $treatment_amount;
|
||||
//$is_insured = 1;
|
||||
} else {
|
||||
$drugs_cost = get_name($dispensation->drug_id, "id", "non_insured_price", "drugs");
|
||||
}
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
{{ streamline_date($dispensation->created_at) }}
|
||||
<font style="color: blue;">{{ __('inpatient.by') }}: {{ get_full_name($dispensation->created_by, "id", "first_name", "last_name", "users") }}</font>
|
||||
</td>
|
||||
<td>
|
||||
{{ get_name($record->drug_id, "id", "name", "drugs") }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $dispensation->quantity_given }}
|
||||
</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($drugs_cost) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($drugs_cost * $dispensation->quantity_given) }}
|
||||
</td>
|
||||
@php
|
||||
$single_drug_subtotal = $drugs_cost * $dispensation->quantity_given;
|
||||
|
||||
$treatment_total_cost += $single_drug_subtotal;
|
||||
@endphp
|
||||
</tr>
|
||||
@endforeach
|
||||
@endforeach
|
||||
<tr>
|
||||
<td colspan="4"><strong>{{ __('inpatient.treatment_total') }}</strong></td>
|
||||
<td colspan="1"><strong>{{ ugandan_shillings($treatment_total_cost) }}</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+426
@@ -0,0 +1,426 @@
|
||||
@push('styles')
|
||||
<style type="text/css">
|
||||
|
||||
.btn-default-bluish {
|
||||
background: #b6cce2;
|
||||
border: 1px solid #e4e7ea;
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@php
|
||||
$past_delivery_record = \Streamline\Models\MaternityDeliveryRecord::where(['patient_id' => $patient_id])->get();
|
||||
$babies = \Streamline\Models\Patient::where(['parent_id' => $patient_id])->get();
|
||||
@endphp
|
||||
|
||||
@if (count($past_delivery_record) > 0)
|
||||
@if( Auth::user()->can('view-delivery-record'))
|
||||
<div class="white-box" style="padding-top: 2px;">
|
||||
<h3>{{ __('inpatient.delivery_record_details') }}</h3>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('prescriptions.date') }}</th>
|
||||
<th>{{ __('inpatient.foetal_number') }}</th>
|
||||
<th>{{ __('maternity.blood_loss') }}</th>
|
||||
<th>{{ __('maternity.blood_loss_measurement') }}</th>
|
||||
<th>{{ __('inpatient.recorded_by') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($past_delivery_record as $past_delivery_record)
|
||||
<tr>
|
||||
<td>
|
||||
{{ streamline_date_time($past_delivery_record->created_at) }}
|
||||
<br>
|
||||
@if(check_if_episode_is_a_followup($past_delivery_record->episode_id))
|
||||
<small style="color: green"><br>({{ __('patient_episode.review_from') }} {{ streamline_date(get_name(get_name($past_delivery_record->episode_id, 'id', 'parent_episode_id', 'patient_episodes'), 'id', 'created_at', 'patient_episodes')) }})</small>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
{{ $past_delivery_record->foetal_number }}
|
||||
</td>
|
||||
<td>{{ $past_delivery_record->blood_loss }} (mls)</td>
|
||||
<td>{{ $past_delivery_record->bloodloss_measurement }}</td>
|
||||
<td>{{ get_full_name($past_delivery_record->created_by, "id", "first_name", "last_name", "users") }}</td>
|
||||
<td>
|
||||
<a class="btn btn-rounded btn-xs btn-default-bluish view_detail_{{ $past_delivery_record->id }}" onclick="past_episode_row_details({{ $past_delivery_record->id }})">{{ __('inpatient.view_details') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="past_episode_row" id="past_episode_row{{ $past_delivery_record->id }}" style="display: none">
|
||||
<td colspan="6">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>{{ __('maternity.baby') }} 1</th>
|
||||
@if($past_delivery_record->foetal_number == 2)
|
||||
<th>{{ __('maternity.baby') }} 2</th>
|
||||
@elseif ($past_delivery_record->foetal_number == 3)
|
||||
<th>{{ __('maternity.baby') }} 2</th>
|
||||
<th>{{ __('maternity.baby') }} 3</th>
|
||||
@endif
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $foetal_number = $past_delivery_record->foetal_number; @endphp
|
||||
<tr>
|
||||
<th>{{ __('maternity.date_of_birth') }}</th>
|
||||
@php
|
||||
$date_of_birth_array = explode(",", $past_delivery_record->date_of_birth);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
<td>{{ $date_of_birth_array[$x] }}</td>
|
||||
@endfor
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('maternity.delivery_time') }}</th>
|
||||
@php
|
||||
$delivery_time_array = explode(",", $past_delivery_record->delivery_time);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
<td>{{ $delivery_time_array[$x] }}</td>
|
||||
@endfor
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('maternity.duration_1st') }}</th>
|
||||
@php
|
||||
$duration_first_array = explode(",", $past_delivery_record->duration_1);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
<td>{{ $duration_first_array[$x] }} {{ __('maternity.hours') }}</td>
|
||||
@endfor
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('maternity.duration_2nd') }}</th>
|
||||
@php
|
||||
$duration_second_stage_array = explode(",", $past_delivery_record->duration_2);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
@php
|
||||
$duration2_in_hrs_and_mins = explode("and", $duration_second_stage_array[$x]);
|
||||
@endphp
|
||||
<td>{{ $duration2_in_hrs_and_mins[0] }} {{ __('maternity.hours') }} {{ $duration2_in_hrs_and_mins[1] }} {{ __('maternity.minutes') }}</td>
|
||||
@endfor
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('maternity.duration_3rd') }}</th>
|
||||
@php
|
||||
$duration_third_stage_array = explode(",", $past_delivery_record->duration_3);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
@php
|
||||
$duration3_in_hrs_and_mins = explode("and", $duration_third_stage_array[$x]);
|
||||
@endphp
|
||||
<td>{{ $duration3_in_hrs_and_mins[0] }} {{ __('maternity.hours') }} {{ $duration2_in_hrs_and_mins[1] }} {{ __('maternity.minutes') }}</td>
|
||||
@endfor
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('maternity.delivered_by_cadre') }}</th>
|
||||
@php
|
||||
$delivered_by_cadre_array = explode(",", $past_delivery_record->delivered_by_cadre);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
<td>{{ $delivered_by_cadre_array[$x] == 1 ? "Staff" : "Student" }}</td>
|
||||
@endfor
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('maternity.delivered_by_name') }}</th>
|
||||
@php
|
||||
$delivered_by_name_array = explode(",", $past_delivery_record->delivered_by_name);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
<td>{{ isset($users[$delivered_by_name_array[$x]]) ? get_full_name($delivered_by_name_array[$x], "id", "first_name", "last_name", "users") : '' }}</td>
|
||||
@endfor
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('maternity.supervised_by') }}</th>
|
||||
@php
|
||||
$supervised_by_array = explode(",", $past_delivery_record->supervised_by);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
<td>{{ isset($users[$supervised_by_array[$x]]) ? $users[$supervised_by_array[$x]] : '' }}</td>
|
||||
@endfor
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('maternity.mode_of_delivery') }}</th>
|
||||
@php
|
||||
$mode_of_delivery_array = explode(",", $past_delivery_record->mode_of_delivery);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
<td>{{ isset($delivery_modes[$mode_of_delivery_array[$x]]) ? $delivery_modes[$mode_of_delivery_array[$x]] : '' }}</td>
|
||||
@endfor
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('maternity.indication_for_cs') }}</th>
|
||||
@php
|
||||
$indication_for_cs_array = explode(",", $past_delivery_record->indication_for_cs);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
<td>{{ $indication_for_cs_array[$x] }}</td>
|
||||
@endfor
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('maternity.location_of_delivery') }}</th>
|
||||
@php
|
||||
$location_of_delivery_array = explode(",", $past_delivery_record->location_of_delivery);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
<td>{{ isset($delivery_locations[$location_of_delivery_array[$x]]) ? $delivery_locations[$location_of_delivery_array[$x]] : '' }}</td>
|
||||
@endfor
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('maternity.resuscitation_airway') }}</th>
|
||||
@php
|
||||
$resuscitation_airway_array = explode(",", $past_delivery_record->resuscitation_airway);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
<td>
|
||||
@if ($resuscitation_airway_array[$x] == "1")
|
||||
{{ __('maternity.nil') }}
|
||||
@elseif($resuscitation_airway_array[$x] == "2")
|
||||
{{ __('maternity.bag') }}
|
||||
@elseif($resuscitation_airway_array[$x] == "3")
|
||||
{{ __('maternity.mask') }}
|
||||
@endif
|
||||
</td>
|
||||
@endfor
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('maternity.resuscitation_suction') }}</th>
|
||||
@php
|
||||
$resuscitation_suction_array = explode(",", $past_delivery_record->resuscitation_suction);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
<td>{{ $resuscitation_suction_array[$x] }}</td>
|
||||
@endfor
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('maternity.comments') }}</th>
|
||||
@php
|
||||
$delivery_comments_array = explode(",", $past_delivery_record->delivery_comments);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
<td>{{ $delivery_comments_array[$x] }}</td>
|
||||
@endfor
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>{{ __('maternity.baby') }} 1</th>
|
||||
@if($past_delivery_record->foetal_number == 2)
|
||||
<th>{{ __('maternity.baby') }} 2</th>
|
||||
@elseif ($past_delivery_record->foetal_number == 3)
|
||||
<th>{{ __('maternity.baby') }} 2</th>
|
||||
<th>{{ __('maternity.baby') }} 3</th>
|
||||
@endif
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ __('maternity.received_by') }}</th>
|
||||
@php
|
||||
$received_by_array = explode(",", $past_delivery_record->received_by);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
<td>{{ isset($users[$received_by_array[$x]]) ? get_full_name($received_by_array[$x], "id", "first_name", "last_name", "users") : '' }}</td>
|
||||
@endfor
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('maternity.sex') }}</th>
|
||||
@php
|
||||
$gender_array = explode(",", $past_delivery_record->gender);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
@if($gender_array[$x] ==1 )
|
||||
<td>{{ __('maternity.female') }}</td>
|
||||
@elseif($gender_array[$x] == 2)
|
||||
<td>{{ __('maternity.male') }}</td>
|
||||
@else
|
||||
<td>{{ __('maternity.other') }}</td>
|
||||
@endif
|
||||
@endfor
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('maternity.condition') }}</th>
|
||||
@php
|
||||
$baby_condition_array = explode(",", $past_delivery_record->baby_condition);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
@if($baby_condition_array[$x] == 1)
|
||||
<td>{{ __('maternity.alive') }}</td>
|
||||
@elseif($baby_condition_array[$x] == 2)
|
||||
<td>{{ __('maternity.fresh_sb') }}</td>
|
||||
@elseif($baby_condition_array[$x] == 3)
|
||||
<td>{{ __('maternity.macerated_sb') }}</td>
|
||||
@endif
|
||||
@endfor
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('maternity.weight') }}</th>
|
||||
@php
|
||||
$weight_array = explode(",", $past_delivery_record->weight);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
<td>{{ $weight_array[$x] }} Kg</td>
|
||||
@endfor
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('maternity.congenital_abnormalities_apparent') }}</th>
|
||||
@php
|
||||
$congenital_abnormalities_array = explode(",", $past_delivery_record->congenital_abnormalities);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
<td>{{ $congenital_abnormalities_array[$x] }}</td>
|
||||
@endfor
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('maternity.birth_order') }}</th>
|
||||
@php
|
||||
$birth_order_array = explode(",", $past_delivery_record->birth_order);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
<td>{{ $birth_order_array[$x] }}</td>
|
||||
@endfor
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('maternity.apgar_1') }}</th>
|
||||
@php
|
||||
$apgar_score_at_1_min_array = explode(",", $past_delivery_record->apgar_score_at_minute_1);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
<td>{{ $apgar_score_at_1_min_array[$x] }}</td>
|
||||
@endfor
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('maternity.apgar_5') }}</th>
|
||||
@php
|
||||
$apgar_score_at_5_min_array = explode(",", $past_delivery_record->apgar_score_at_minute_5);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
<td>{{ $apgar_score_at_5_min_array[$x] }}</td>
|
||||
@endfor
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('maternity.apgar_10') }}</th>
|
||||
@php
|
||||
$apgar_score_at_10_min_array = explode(",", $past_delivery_record->apgar_score_at_minute_10);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
<td>{{ $apgar_score_at_10_min_array[$x] }}</td>
|
||||
@endfor
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('maternity.age_established_respiration') }}</th>
|
||||
@php
|
||||
$age_established_spontaneous_respiration_array = explode(",", $past_delivery_record->age_established_spontaneous_reg_respiration);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
<td>{{ $age_established_spontaneous_respiration_array[$x] }}</td>
|
||||
@endfor
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('maternity.comments') }}</th>
|
||||
@php
|
||||
$baby_comments_array = explode(",", $past_delivery_record->baby_comments);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
<td>{{ $baby_comments_array[$x] }}</td>
|
||||
@endfor
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>{{ __('maternity.moved_to') }}</th>
|
||||
@php
|
||||
$moved_to_array = explode(",", $past_delivery_record->moved_to);
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < $foetal_number; $x++)
|
||||
<td>{{ get_name($moved_to_array[$x], "id", "name", "wards") }}</td>
|
||||
@endfor
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
@if (count($babies) > 0)
|
||||
<tr>
|
||||
<th colspan="6"><b>Baby details</b></th>
|
||||
</tr>
|
||||
@php $baby_counter = 1; @endphp
|
||||
@foreach($babies as $baby)
|
||||
<tr>
|
||||
<td>{{ $baby_counter }}. {{ $baby->first_name." ".$baby->last_name }} ({{ $baby->number }}) <a href="/patient_episodes/set_patient_id/{{ $baby->id }}" class="btn btn-success btn-xs btn-rounded">{{ __('inpatient.select_baby_home') }}</a>
|
||||
</td>
|
||||
<td colspan="5"></td>
|
||||
</tr>
|
||||
@php $baby_counter++; @endphp
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
|
||||
let current_past_episode = 0;
|
||||
function past_episode_row_details(id) {
|
||||
$('.past_episode_row').hide();
|
||||
|
||||
if (current_past_episode !== id) {
|
||||
$('#past_episode_row' + id).show();
|
||||
current_past_episode = id;
|
||||
$('.view_detail_'+id).html("Hide Details");
|
||||
} else {
|
||||
current_past_episode = 0;
|
||||
$('.view_detail_'+id).html("View Details");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
+267
@@ -0,0 +1,267 @@
|
||||
@if(Auth::user()->can('view-vitals-on-inpatient-sheet'))
|
||||
|
||||
<hr>
|
||||
|
||||
<h4>Vitals and Observations</h4>
|
||||
|
||||
<table class="table table-bordered color-bordered-table success-bordered-table">
|
||||
<tbody>
|
||||
@if(count($patient_vitals) > 0)
|
||||
@foreach($patient_vitals as $key => $value)
|
||||
<tr>
|
||||
<td class="text-center"><span style="font-size: 18px; color: black">{{ $key }}</span></td>
|
||||
<td>
|
||||
<table class="table table-bordered color-bordered-table success-bordered-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
@php $vitals_counter = 0; @endphp
|
||||
@foreach($value as $value_array)
|
||||
@php
|
||||
if($vitals_counter > 4) {
|
||||
break;
|
||||
}
|
||||
$vitals_counter++;
|
||||
@endphp
|
||||
<td>
|
||||
<span style="font-size: 15px; color: black">{{ $value_array["value"] }}</span>
|
||||
|
||||
<hr>
|
||||
|
||||
@php
|
||||
try {
|
||||
echo Carbon\Carbon::parse($value_array["time"])->toDateTimeString();
|
||||
} catch (Exception) {}
|
||||
@endphp
|
||||
</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td style="color: black" class="text-center">No Vitals Registered</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a class="btn btn-sm btn-rounded btn-primary" data-toggle="modal" data-target="#view_vitals">View All Vitals</a>
|
||||
<a class="btn btn-sm btn-rounded btn-success" data-toggle="modal" data-target="#add_vitals">Add New Vitals</a>
|
||||
@endif
|
||||
|
||||
<div class="modal fade" id="add_vitals" 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">×</span></button>
|
||||
<h4 class="modal-title" id="add_vitals_label">Add New Vitals</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input type='hidden' id="age_group" value="{{ $age_group }}">
|
||||
|
||||
<h4>Select Vitals</h4>
|
||||
|
||||
<input type='hidden' id="vitals_slug_0">
|
||||
|
||||
<table class='table color-bordered-table success-bordered-table'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="25%">Vitals</th>
|
||||
<th>Value</th>
|
||||
<th>Normal Ranges</th>
|
||||
<th width="10%">NEWS</th>
|
||||
<th>TIme and Date</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody class='vitals_table'>
|
||||
<tr>
|
||||
<td>
|
||||
<div class='form-group controls'>
|
||||
<select name='vitals_observations[]' id='vitals_observation_0' class='form-control compulsory required' onchange='get_observation_info(0, this.value)'>@php echo $options_observations; @endphp</select>
|
||||
<input type='hidden' id='vitals_slug_0'>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class='form-group controls'>
|
||||
<input type='number' class='form-control' id='vitals_value_0' name='vitals_value[]' onchange='get_score(0, this.value)'>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class='form-group controls'>
|
||||
<input type='text' class='form-control' id='vitals_normal_ranges_0' readonly>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div id='vitals_news_0'></div>
|
||||
</td>
|
||||
<td>
|
||||
<div class='form-group controls'>
|
||||
<input type='datetime-local' name='vitals_datetime[]' id='vitals_datetime_0' class='form-control compulsory' />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class='form-group'>
|
||||
<button type='button' class='btn btn-sm btn-rounded btn-success add_vitals_row' style='color: white;'><i class='fa fa-plus'></i></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-success" onclick="save_vitals()">Save</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('layout.close') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="view_vitals" 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">×</span></button>
|
||||
<h4 class="modal-title" id="view_vitals_label">View All Vitals</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered color-bordered-table success-bordered-table">
|
||||
<tbody>
|
||||
@if(count($patient_vitals) > 0)
|
||||
@foreach($patient_vitals as $key => $value)
|
||||
<tr>
|
||||
<td class="text-center"><span style="font-size: 18px; color: black">{{ $key }}</span></td>
|
||||
<td>
|
||||
<table class="table table-bordered color-bordered-table success-bordered-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
@foreach($value as $value_array)
|
||||
<td>
|
||||
<span style="font-size: 15px; color: black">{{ $value_array["value"] }}</span>
|
||||
|
||||
<hr>
|
||||
|
||||
@php
|
||||
try {
|
||||
echo Carbon\Carbon::parse($value_array["time"])->toDateTimeString();
|
||||
} catch (Exception) {}
|
||||
@endphp
|
||||
</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td style="color: black" class="text-center">No Vitals Registered</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('layout.close') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('js/observations/all_age_groups.js') }}"></script>
|
||||
|
||||
<script>
|
||||
let vitals_rows = 1;
|
||||
|
||||
$('.add_vitals_row').click(function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('.vitals_table').append("<tr id='vitals_row_" + vitals_rows + "'>\
|
||||
<td><div class='form-group controls'>\
|
||||
<select name='vitals_observations[]' id='vitals_observation_" + vitals_rows + "' class='form-control compulsory required' onchange='get_observation_info(" + vitals_rows + ", this.value)'>@php echo $options_observations; @endphp</select>\
|
||||
<input type='hidden' id='vitals_slug_" + vitals_rows + "'></div></td><td><div class='form-group controls'>\
|
||||
<input type='text' class='form-control' id='vitals_value_" + vitals_rows + "' name='vitals_value[]' onchange='get_score(" + vitals_rows + ", this.value)'>\
|
||||
</div></td><td>\
|
||||
<div class='form-group controls'><input type='text' class='form-control' id='vitals_normal_ranges_" + vitals_rows + "' readonly></div>\
|
||||
</td><td><div id='vitals_news_" + vitals_rows + "'></div></td><td><div class='form-group controls'>\
|
||||
<input type='datetime-local' name='vitals_datetime[]' id='vitals_datetime_" + vitals_rows + "' class='form-control compulsory'/>\
|
||||
</div></td><td><div class='form-group'>\
|
||||
<button type='button' class='btn btn-sm btn-rounded btn-danger' onclick='remove_vitals_row(" + vitals_rows + ")' style='color: white;'><i class='fa fa-trash'></i></button>\
|
||||
</div></td></tr>");
|
||||
|
||||
vitals_rows++;
|
||||
});
|
||||
|
||||
function remove_vitals_row(id) {
|
||||
$('#vitals_row_' + id).remove();
|
||||
}
|
||||
|
||||
function get_observation_info(id, value) {
|
||||
$.ajax({
|
||||
method: 'GET',
|
||||
url: '/observations/get_observation_info/' + value,
|
||||
success: function(response){
|
||||
let responseArray = JSON.parse(response);
|
||||
|
||||
if (responseArray["error"] == 0) {
|
||||
$('#vitals_normal_ranges_' + id).val(responseArray["normal_range"]);
|
||||
$('#vitals_slug_' + id).val(responseArray["slug"]);
|
||||
} else {
|
||||
$('#vitals_normal_ranges_' + id).val();
|
||||
$('#vitals_slug_' + id).val();
|
||||
}
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
//alert(JSON.stringify(jqXHR));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function save_vitals() {
|
||||
let vitals_observations = $("select[name='vitals_observations[]'] option:selected" ).map(function(){
|
||||
return this.value;
|
||||
}).get();
|
||||
|
||||
let vitals_value = $("input[name='vitals_value[]']" ).map(function(){
|
||||
return this.value;
|
||||
}).get();
|
||||
|
||||
let vitals_datetime = $("input[name='vitals_datetime[]']" ).map(function(){
|
||||
return this.value;
|
||||
}).get();
|
||||
|
||||
let patient_id = $('#patient_id').val();
|
||||
let episode_id = $('#episode_id').val();
|
||||
let inpatient_id = $('#inpatient_id').val();
|
||||
|
||||
$.ajax({
|
||||
url: '/save_patient_vitals',
|
||||
data: {
|
||||
"vitals_observations[]": vitals_observations, "vitals_value[]": vitals_value, "vitals_datetime[]": vitals_datetime,
|
||||
"patient_id": patient_id, "episode_id": episode_id, "inpatient_id": inpatient_id
|
||||
},
|
||||
success: function(response){
|
||||
if (response == "1") {
|
||||
alert("Vitals successfully added");
|
||||
window.location.reload();
|
||||
} else {
|
||||
alert("Please make sure all values are filled in correctly");
|
||||
}
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
//
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
+388
@@ -0,0 +1,388 @@
|
||||
<!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="{{ public_path('uploads/streamline/color/streamline_icon-02.png') }}">
|
||||
<title>{{ config('app.name', 'Inpatient Bill - Stre@mline') }}</title>
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="{{ public_path('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
/*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')
|
||||
<h5 class="heading" style="text-align: center;">{{ __('patient_episode.treatment_sheet') }}</h5>
|
||||
<table class="table table-light table-sm table-borderless">
|
||||
<tr>
|
||||
<th>{{ __('patient_file.patient_names') }}</th>
|
||||
<td>{{ $patient->first_name}} {{ $patient->last_name}}</td>
|
||||
<th>{{ __('patient_file.patient_number') }}</th>
|
||||
<td>{{ $patient->number}}</td>
|
||||
<th>{{ __('patient_file.gender') }}</th>
|
||||
<td><?php echo $patient->gender == 1 ? __('patient_file.male') : __('patient_file.female') ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('patient_file.category') }}</th>
|
||||
<td>
|
||||
{{ get_name($patient->category_id, 'id', 'name', 'patient_categories') }}
|
||||
</td>
|
||||
<th>{{ __('inpatient.ward') }}</th>
|
||||
<td>
|
||||
{{ get_name($ward_id, 'id', 'name', 'wards') }}
|
||||
</td>
|
||||
<th>{{ __('layout.admission_date') }}</th>
|
||||
<td>{{ streamline_date($admitted_on) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<hr>
|
||||
|
||||
@if(count($ordered_cancer_protocols) > 0)
|
||||
<table class="table table-bordered color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Section</th>
|
||||
<th>Drug</th>
|
||||
<th>Dose</th>
|
||||
<th>Duration</th>
|
||||
<th>Quantity Given</th>
|
||||
<th>Given By</th>
|
||||
<th>Given On</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($ordered_cancer_protocols as $ordered_cancer_protocol)
|
||||
@php
|
||||
$pre_chemo_drugs = json_decode($ordered_cancer_protocol->pre_chemo_drugs, true);
|
||||
$chemo_drugs = json_decode($ordered_cancer_protocol->chemo_drugs, true);
|
||||
$post_chemo_drugs = json_decode($ordered_cancer_protocol->post_chemo_drugs, true);
|
||||
|
||||
$pre_chemo_drugs_count = count($pre_chemo_drugs);
|
||||
$chemo_drugs_count = count($chemo_drugs);
|
||||
$post_chemo_drugs_count = count($post_chemo_drugs);
|
||||
|
||||
$pre_chemo_doses_count = array_sum(array_map(function ($value) {return count($value['dose']);}, $pre_chemo_drugs));
|
||||
$chemo_doses_count = array_sum(array_map(function ($value) {return count($value['dose']);}, $chemo_drugs));
|
||||
$post_chemo_doses_count = array_sum(array_map(function ($value) {return count($value['dose']);}, $post_chemo_drugs));
|
||||
|
||||
$pre_chemo_doses_count += array_sum(array_map(function ($value) {return array_sum(array_map(function ($value_two) {return count($value_two['duration']);}, $value['dose']));}, $pre_chemo_drugs));
|
||||
$chemo_doses_count += array_sum(array_map(function ($value) {return array_sum(array_map(function ($value_two) {return count($value_two['duration']);}, $value['dose']));}, $chemo_drugs));
|
||||
$post_chemo_doses_count += array_sum(array_map(function ($value) {return array_sum(array_map(function ($value_two) {return count($value_two['duration']);}, $value['dose']));}, $post_chemo_drugs));
|
||||
|
||||
$protocol_details = \Streamline\Models\CancerProtocol::find($ordered_cancer_protocol->protocol_id);
|
||||
$duration_counter = 0;
|
||||
@endphp
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<h3 class="text-center">{{ $protocol_details->name }} @if($ordered_cancer_protocol->protocol_status != 0) ({{ [1 => 'Stopped', 2 => 'Completed'][$ordered_cancer_protocol->protocol_status] ?? '' }}) @endif</h3>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td rowspan="{{ $pre_chemo_drugs_count + $pre_chemo_doses_count + 1 }}">Pre-Chemo</td>
|
||||
</tr>
|
||||
|
||||
@for($x = 0; $x < $pre_chemo_drugs_count; $x++)
|
||||
@php
|
||||
$pre_chemo_duration_count = array_sum(array_map(function ($value_two) {return count($value_two['duration']);}, $pre_chemo_drugs[$x]['dose']));
|
||||
@endphp
|
||||
<tr>
|
||||
<td rowspan="{{ count($pre_chemo_drugs[$x]['dose']) + $pre_chemo_duration_count + 1 }}">
|
||||
{{ $drugs[$pre_chemo_drugs[$x]['drug_id']] ?? '' }}
|
||||
|
||||
<br><br>
|
||||
|
||||
Factor: {{ $factors[$pre_chemo_drugs[$x]['drug_factor']] ?? '' }}
|
||||
|
||||
<br>
|
||||
|
||||
Route: {{ $drug_routes[$pre_chemo_drugs[$x]['drug_route']] ?? '' }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@for($i = 0; $i < count($pre_chemo_drugs[$x]['dose']); $i++)
|
||||
<tr>
|
||||
<td rowspan="{{ count($pre_chemo_drugs[$x]['dose'][$i]['duration']) + 1 }}">
|
||||
@php
|
||||
$drug_dosage = $drug_units[$drug_with_units[$pre_chemo_drugs[$x]['drug_id']]];
|
||||
|
||||
if ($pre_chemo_drugs[$x]['drug_factor'] == 1) {
|
||||
$drug_dosage .= '/m<sup>2</sup>';
|
||||
} else if ($pre_chemo_drugs[$x]['drug_factor'] == 2) {
|
||||
$drug_dosage .= '/Kg';
|
||||
}
|
||||
@endphp
|
||||
|
||||
Dose: {{ $pre_chemo_drugs[$x]['dose'][$i]['dose'] }} {!! $drug_dosage !!}
|
||||
|
||||
@if(!empty($pre_chemo_drugs[$x]['dose'][$i]['instructions']))
|
||||
<br><br>
|
||||
<span style="color: red">{{ $pre_chemo_drugs[$x]['dose'][$i]['instructions'] }}</span>
|
||||
@endif
|
||||
|
||||
@if(!empty($pre_chemo_drugs[$x]['dose'][$i]['weight_range']))
|
||||
<br><br>
|
||||
<span style="color: #0a776c">({{ $pre_chemo_drugs[$x]['dose'][$i]['weight_range'] }})</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@for($p = 0; $p < count($pre_chemo_drugs[$x]['dose'][$i]['duration']); $p++)
|
||||
<tr>
|
||||
@if(is_null($pre_chemo_drugs[$x]['dose'][$i]['duration'][$p]['given_by']))
|
||||
<td>
|
||||
{{ $pre_chemo_drugs[$x]['dose'][$i]['duration'][$p]['name'] }}
|
||||
</td>
|
||||
<td colspan="3"></td>
|
||||
@else
|
||||
<td>
|
||||
{{ $pre_chemo_drugs[$x]['dose'][$i]['duration'][$p]['name'] }}
|
||||
</td>
|
||||
<td>{{ $pre_chemo_drugs[$x]['dose'][$i]['duration'][$p]['quantity_given'] }}</td>
|
||||
<td style="color: #00AEEF">{{ $users_array[$pre_chemo_drugs[$x]['dose'][$i]['duration'][$p]['given_by']] }}</td>
|
||||
<td style="color: #00AEEF">{{ Carbon\Carbon::parse($pre_chemo_drugs[$x]['dose'][$i]['duration'][$p]['given_on'])->toDateTimeString() }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
|
||||
@php $duration_counter++; @endphp
|
||||
@endfor
|
||||
@endfor
|
||||
@endfor
|
||||
|
||||
<tr>
|
||||
<td rowspan="{{ $chemo_drugs_count + $chemo_doses_count + 1 }}">Chemo</td>
|
||||
</tr>
|
||||
|
||||
@for($x = 0; $x < $chemo_drugs_count; $x++)
|
||||
@php
|
||||
$chemo_duration_count = array_sum(array_map(function ($value_two) {return count($value_two['duration']);}, $chemo_drugs[$x]['dose']));
|
||||
@endphp
|
||||
<tr>
|
||||
<td rowspan="{{ count($chemo_drugs[$x]['dose']) + $chemo_duration_count + 1 }}">
|
||||
{{ $drugs[$chemo_drugs[$x]['drug_id']] ?? '' }}
|
||||
|
||||
<br><br>
|
||||
|
||||
Factor: {{ $factors[$chemo_drugs[$x]['drug_factor']] ?? '' }}
|
||||
|
||||
<br>
|
||||
|
||||
Route: {{ $drug_routes[$chemo_drugs[$x]['drug_route']] ?? '' }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@for($i = 0; $i < count($chemo_drugs[$x]['dose']); $i++)
|
||||
<tr>
|
||||
<td rowspan="{{ count($chemo_drugs[$x]['dose'][$i]['duration']) + 1 }}">
|
||||
@php
|
||||
$drug_dosage = $drug_units[$drug_with_units[$chemo_drugs[$x]['drug_id']]];
|
||||
|
||||
if ($chemo_drugs[$x]['drug_factor'] == 1) {
|
||||
$drug_dosage .= '/m<sup>2</sup>';
|
||||
} else if ($chemo_drugs[$x]['drug_factor'] == 2) {
|
||||
$drug_dosage .= '/Kg';
|
||||
}
|
||||
@endphp
|
||||
|
||||
Dose: {{ $chemo_drugs[$x]['dose'][$i]['dose'] }} {!! $drug_dosage !!}
|
||||
|
||||
@if(!empty($chemo_drugs[$x]['dose'][$i]['instructions']))
|
||||
<br><br>
|
||||
<span style="color: red">{{ $chemo_drugs[$x]['dose'][$i]['instructions'] }}</span>
|
||||
@endif
|
||||
|
||||
@if(!empty($chemo_drugs[$x]['dose'][$i]['weight_range']))
|
||||
<br><br>
|
||||
<span style="color: #0a776c">({{ $chemo_drugs[$x]['dose'][$i]['weight_range'] }})</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@for($p = 0; $p < count($chemo_drugs[$x]['dose'][$i]['duration']); $p++)
|
||||
<tr>
|
||||
@if(is_null($chemo_drugs[$x]['dose'][$i]['duration'][$p]['given_by']))
|
||||
<td>
|
||||
{{ $chemo_drugs[$x]['dose'][$i]['duration'][$p]['name'] }}
|
||||
</td>
|
||||
<td colspan="3"></td>
|
||||
@else
|
||||
<td>
|
||||
{{ $chemo_drugs[$x]['dose'][$i]['duration'][$p]['name'] }}
|
||||
</td>
|
||||
<td>{{ $chemo_drugs[$x]['dose'][$i]['duration'][$p]['quantity_given'] }}</td>
|
||||
<td style="color: #00AEEF">{{ $users_array[$chemo_drugs[$x]['dose'][$i]['duration'][$p]['given_by']] }}</td>
|
||||
<td style="color: #00AEEF">{{ Carbon\Carbon::parse($chemo_drugs[$x]['dose'][$i]['duration'][$p]['given_on'])->toDateTimeString() }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
|
||||
@php $duration_counter++; @endphp
|
||||
@endfor
|
||||
@endfor
|
||||
@endfor
|
||||
|
||||
<tr>
|
||||
<td rowspan="{{ $post_chemo_drugs_count + $post_chemo_doses_count + 1 }}">Post-Chemo</td>
|
||||
</tr>
|
||||
|
||||
@for($x = 0; $x < $post_chemo_drugs_count; $x++)
|
||||
@php
|
||||
$post_chemo_duration_count = array_sum(array_map(function ($value_two) {return count($value_two['duration']);}, $post_chemo_drugs[$x]['dose']));
|
||||
@endphp
|
||||
<tr>
|
||||
<td rowspan="{{ count($post_chemo_drugs[$x]['dose']) + $post_chemo_duration_count + 1 }}">
|
||||
{{ $drugs[$post_chemo_drugs[$x]['drug_id']] ?? '' }}
|
||||
|
||||
<br><br>
|
||||
|
||||
Factor: {{ $factors[$post_chemo_drugs[$x]['drug_factor']] ?? '' }}
|
||||
|
||||
<br>
|
||||
|
||||
Route: {{ $drug_routes[$post_chemo_drugs[$x]['drug_route']] ?? '' }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@for($i = 0; $i < count($post_chemo_drugs[$x]['dose']); $i++)
|
||||
<tr>
|
||||
<td rowspan="{{ count($post_chemo_drugs[$x]['dose'][$i]['duration']) + 1 }}">
|
||||
@php
|
||||
$drug_dosage = $drug_units[$drug_with_units[$post_chemo_drugs[$x]['drug_id']]];
|
||||
|
||||
if ($post_chemo_drugs[$x]['drug_factor'] == 1) {
|
||||
$drug_dosage .= '/m<sup>2</sup>';
|
||||
} else if ($post_chemo_drugs[$x]['drug_factor'] == 2) {
|
||||
$drug_dosage .= '/Kg';
|
||||
}
|
||||
@endphp
|
||||
|
||||
Dose: {{ $post_chemo_drugs[$x]['dose'][$i]['dose'] }} {!! $drug_dosage !!}
|
||||
|
||||
@if(!empty($post_chemo_drugs[$x]['dose'][$i]['instructions']))
|
||||
<br><br>
|
||||
<span style="color: red">{{ $post_chemo_drugs[$x]['dose'][$i]['instructions'] }}</span>
|
||||
@endif
|
||||
|
||||
@if(!empty($post_chemo_drugs[$x]['dose'][$i]['weight_range']))
|
||||
<br><br>
|
||||
<span style="color: #0a776c">({{ $post_chemo_drugs[$x]['dose'][$i]['weight_range'] }})</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@for($p = 0; $p < count($post_chemo_drugs[$x]['dose'][$i]['duration']); $p++)
|
||||
<tr>
|
||||
@if(is_null($post_chemo_drugs[$x]['dose'][$i]['duration'][$p]['given_by']))
|
||||
<td>
|
||||
{{ $post_chemo_drugs[$x]['dose'][$i]['duration'][$p]['name'] }}
|
||||
</td>
|
||||
<td colspan="3"></td>
|
||||
@else
|
||||
<td>
|
||||
{{ $post_chemo_drugs[$x]['dose'][$i]['duration'][$p]['name'] }}
|
||||
</td>
|
||||
<td>{{ $post_chemo_drugs[$x]['dose'][$i]['duration'][$p]['quantity_given'] }}</td>
|
||||
<td style="color: #00AEEF">{{ $users_array[$post_chemo_drugs[$x]['dose'][$i]['duration'][$p]['given_by']] }}</td>
|
||||
<td style="color: #00AEEF">{{ Carbon\Carbon::parse($post_chemo_drugs[$x]['dose'][$i]['duration'][$p]['given_on'])->toDateTimeString() }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
|
||||
@php $duration_counter++; @endphp
|
||||
@endfor
|
||||
@endfor
|
||||
@endfor
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<hr>
|
||||
@endif
|
||||
|
||||
@if(count($ward_prescriptions) > 0)
|
||||
<table class="table table-bordered color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Drug</th>
|
||||
<th>Duration</th>
|
||||
<th>Given By</th>
|
||||
<th>Given On</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($ward_prescriptions as $ward_prescription)
|
||||
@php
|
||||
$ward_prescription_drugs = explode(",", $ward_prescription->drugs);
|
||||
$ward_prescription_dose_array = isset($ward_prescription->doses) ? explode(",", $ward_prescription->doses) : [];
|
||||
$ward_prescription_freq_array = isset($ward_prescription->frequencies) ? explode(",", $ward_prescription->frequencies) : [];
|
||||
$ward_prescription_duration_array = isset($ward_prescription->durations) ? explode(",", $ward_prescription->durations) : [];
|
||||
$ward_prescription_quantity_array = isset($ward_prescription->quantities_dispensed) ? explode(",", $ward_prescription->quantities_dispensed) : [];
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < count($ward_prescription_drugs); $x++)
|
||||
@php
|
||||
$drug_unit = get_name(get_name($ward_prescription_drugs[$x], 'id', "unit_id", 'drugs'), "id", "name", "drug_units");
|
||||
$frequency = get_name($ward_prescription_freq_array[$x], "id", "name", "dosage_frequencies");
|
||||
$current_factor = get_name($ward_prescription_freq_array[$x], "id", "factor", "dosage_frequencies");
|
||||
|
||||
try { $current_factor = (int)ceil($current_factor); } catch (ErrorException $e) { $current_factor = 1; }
|
||||
|
||||
$split_duration = explode(" ", $ward_prescription_duration_array[$x]);
|
||||
$duration_counter = 0;
|
||||
$opd_quantity_to_give_per_day = ceil($ward_prescription_quantity_array[$x] / ((int)$split_duration[0] * $current_factor));
|
||||
@endphp
|
||||
<tr>
|
||||
<td rowspan="{{ ((int)$split_duration[0] * $current_factor) + 1 }}">
|
||||
{{ $drugs[$ward_prescription_drugs[$x]] }}
|
||||
<br><br>
|
||||
{{ $ward_prescription_dose_array[$x] }} {{ $drug_unit }} {{ $frequency}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@for($p = 0; $p < $split_duration[0]; $p++)
|
||||
@for($y = 0; $y < $current_factor; $y++)
|
||||
@php
|
||||
// get the dispensed so far
|
||||
$treatment_sheet_dispensations = \Streamline\Models\TreatmentSheetDispensations::where('ward_treatment_id', $ward_prescription->id)
|
||||
->where('drug_id', $ward_prescription_drugs[$x])->where('order_number', $duration_counter)->first();
|
||||
@endphp
|
||||
<tr>
|
||||
@if($treatment_sheet_dispensations)
|
||||
<td>Day {{ $p + 1 }} <br> Dose {{ $y + 1 }}</td>
|
||||
<td style="color: #00AEEF">{{ $users_array[$treatment_sheet_dispensations->given_by] }}</td>
|
||||
<td style="color: #00AEEF">{{ Carbon\Carbon::parse($treatment_sheet_dispensations->given_on)->toDateTimeString() }}</td>
|
||||
@else
|
||||
<td colspan="3" style="display: none">Day {{ $p + 1 }}     Dose {{ $y + 1 }}</td>
|
||||
@endif
|
||||
@php $duration_counter++; @endphp
|
||||
</tr>
|
||||
@endfor
|
||||
@endfor
|
||||
@endfor
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Executable
+346
@@ -0,0 +1,346 @@
|
||||
<!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', 'Referral Notes - 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;
|
||||
}
|
||||
|
||||
.card-header{
|
||||
padding: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
@include('layouts.header_pdf_print')
|
||||
|
||||
<h5 class="heading" style="text-align: center;"> {{ __('inpatient.inpatient_referral_notes') }}</h5>
|
||||
|
||||
<div class="row col">
|
||||
<table class="table table-light table-sm table-borderless">
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.patient_number') }}</th>
|
||||
<td>{{ $patient->number}}</td>
|
||||
<td width="60" style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.ward') }}</th>
|
||||
<td>
|
||||
{{ get_name($inpatient_info->ward_id, 'id', 'name', 'wards') }} |
|
||||
@if(is_null($inpatient_info->bed_category_id))
|
||||
@else
|
||||
{{ get_name($inpatient_info->bed_category_id, 'id', 'name', 'inpatient_bed_categories') }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.patient_names') }}</th>
|
||||
<td>{{ $patient->first_name}} {{ $patient->last_name}}</td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.admitted') }}</th>
|
||||
<td>
|
||||
@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
|
||||
|
||||
{{ streamline_date($inpatient_info->admitted_on) }} ( {{ $days_spent_in_ward }} {{ __('inpatient.days') }})
|
||||
|
||||
{{ Form::hidden("duration", $days_spent_in_ward) }}
|
||||
{{ Form::hidden("inpatient_info_id", $inpatient_info->id) }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.age') }}</th>
|
||||
<td><?php echo get_patients_age($patient->date_of_birth); ?></td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.discharged') }}</th>
|
||||
<td>
|
||||
@if($inpatient_info->discharged == 1)
|
||||
{{ streamline_date($inpatient_info->discharged_on) }}
|
||||
@else
|
||||
{{ __('inpatient.still_admitted') }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.gender') }}</th>
|
||||
<td>{{ $patient->gender == 1 ? __('inpatient.male') : __('inpatient.female') }}</td>
|
||||
<td style="border-top: 0px;"> </td>
|
||||
<th scope="row">{{ __('inpatient.category') }}</th>
|
||||
<td>
|
||||
{{ get_name($patient->category_id, 'id', 'name', 'patient_categories') }}
|
||||
|
||||
@if(!is_null($patient_discount))
|
||||
({{ $patient_discount["discount"] }} % {{ __('inpatient.discount') }})
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@if( Auth::user()->can('view-patient-episode-primary-diagnoses'))
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong>{{ __('inpatient.primary_diagnosis') }}</strong>
|
||||
</div>
|
||||
|
||||
@php
|
||||
$primary_diagnosis = \Streamline\Models\Diagnosis::withTrashed()->find($inpatient_info->primary_diagnosis);
|
||||
@endphp
|
||||
|
||||
<table class="table table-light table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>{{ $primary_diagnosis ? $primary_diagnosis->name : "" }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@php
|
||||
$other_diagnoses = @unserialize($inpatient_info->other_diagnoses);
|
||||
@endphp
|
||||
|
||||
@if(!empty($other_diagnoses))
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong>{{ __('inpatient.secondary_diagnosis') }}</strong>
|
||||
</div>
|
||||
<table class="table table-light table-sm">
|
||||
<thead>
|
||||
@foreach($other_diagnoses as $diagnosis)
|
||||
@php
|
||||
$other_diagnosis = \Streamline\Models\Diagnosis::withTrashed()->find($diagnosis);
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $other_diagnosis ? $other_diagnosis->name : "" }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong>{{ __('inpatient.clinical_summary') }}</strong>
|
||||
</div>
|
||||
<table class="table table-light table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>{{ $inpatient_info->clinical_summary }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong>{{ __('inpatient.investigations_done') }}</strong>
|
||||
</div>
|
||||
<table class="table table-light table-sm">
|
||||
<thead>
|
||||
@if(count($ward_investigations) > 0)
|
||||
@for($i = 0; $i < count($ward_investigations['name']); $i++)
|
||||
@if(in_array($i, $ward_investigations_position))
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<h5><code>{{ $ward_investigations_date[array_search($i, $ward_investigations_position)] }}</code></h5>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td>{{ $ward_investigations['name'][$i] }}</td>
|
||||
<input type="hidden" name="ward_investigation_ids[]" value="{{ $ward_investigations['id'][$i] }}">
|
||||
<td>
|
||||
@if($ward_investigations['type'][$i] == 1 && $ward_investigations['value'][$i] != "Pending")
|
||||
<i style="color: blue"> {{ __('inpatient.refer_to_investigation_report') }} </i>
|
||||
@else
|
||||
{{ $ward_investigations['value'][$i] }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $ward_investigations['comment'][$i] }}</td>
|
||||
</tr>
|
||||
@endfor
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="3">{{ __('inpatient.no_ward_invs') }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- if patient has any treatment to take home --}}
|
||||
@if (count($treatment_to_take_away) > 0)
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong>{{ __('inpatient.treatment_on_discharge') }}</strong>
|
||||
</div>
|
||||
<table class="table table-light table-sm">
|
||||
@foreach($treatment_to_take_away as $treatment)
|
||||
@php
|
||||
$tta_drugs_array = explode(",", $treatment->drugs);
|
||||
$tta_dose_array = explode(",", $treatment->doses);
|
||||
$tta_freq_array = explode(",", $treatment->frequencies);
|
||||
$tta_duration_array = explode(",", $treatment->durations);
|
||||
$altered = $treatment->altered;
|
||||
@endphp
|
||||
|
||||
@if($altered == 0)
|
||||
<tr>
|
||||
<td colspan="4" class="text-center" style="color: #0000FF; font-weight: small;">{{ __('inpatient.ordered_on') }} {{ streamline_date($treatment->created_at) }}</td>
|
||||
</tr>
|
||||
@for($x = 0; $x < count($tta_drugs_array); $x++)
|
||||
@php
|
||||
$drug_name = get_name($tta_drugs_array[$x], 'id', "name", 'drugs');
|
||||
$drug_unit = get_name(get_name($tta_drugs_array[$x], 'id', "unit_id", 'drugs'), "id", "name", "drug_units");
|
||||
$frequency = get_name($tta_freq_array[$x], "id", "name", "dosage_frequencies");
|
||||
@endphp
|
||||
<tr class='gradeX'>
|
||||
<td>{{ $drug_name }}</td>
|
||||
<td>{{ $tta_dose_array[$x] }} {{ $drug_unit }} {{ $frequency}} </td>
|
||||
<td>{{ $tta_duration_array[$x] }}</td>
|
||||
</tr>
|
||||
@endfor
|
||||
@else
|
||||
@php
|
||||
$altered_dispensed_tta = \Streamline\Models\PatientDispensing::where(['treatment_id'=>$treatment->id, 'patient_id' => $patient->patient_id, 'tta' => 1])->first();
|
||||
|
||||
$tta_drugs_array = is_object($altered_dispensed_tta) ? explode(",", $altered_dispensed_tta->drugs) : [];
|
||||
$tta_dose_array = is_object($altered_dispensed_tta) ? explode(",", $altered_dispensed_tta->dose) : [];
|
||||
$tta_freq_array = is_object($altered_dispensed_tta) ?explode(",", $altered_dispensed_tta->drug_frequency) : [];
|
||||
$tta_duration_array = is_object($altered_dispensed_tta) ? explode(",", $altered_dispensed_tta->duration) : [];
|
||||
@endphp
|
||||
|
||||
<tr><td colspan=4 style='color: #0000FF; font-weight: small;'> {{ is_object($altered_dispensed_tta) ? streamline_date($altered_dispensed_tta->created_at) : "" }}</td></tr>
|
||||
@for($x = 1; $x < count($tta_drugs_array); $x++)
|
||||
@php
|
||||
$drug_name = get_name($tta_drugs_array[$x], 'id', "name", 'drugs');
|
||||
$drug_unit = get_name(get_name($tta_drugs_array[$x], 'id', "unit_id", 'drugs'), "id", "name", "drug_units");
|
||||
$frequency = get_name($tta_freq_array[$x], "id", "name", "dosage_frequencies");
|
||||
@endphp
|
||||
|
||||
<tr class='gradeX'>
|
||||
<td>{{ $drug_name }}</td>
|
||||
<td>{{ $tta_dose_array[$x] }} {{ $drug_unit }} {{ $frequency}} </td>
|
||||
<td>{{ $tta_duration_array[$x] }}</td>
|
||||
</tr>
|
||||
@endfor
|
||||
@endif
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong>{{ __('inpatient.referral_notes') }}</strong>
|
||||
</div>
|
||||
<table class="table table-light table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>{{ $inpatient_info->referral_notes }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<table class="table table-light table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><b>{{ __('inpatient.referred_by') }}: </b></td>
|
||||
<td>{{ get_full_name($inpatient_info->discharged_by, "id", "first_name", "last_name", "users")}} {{ __('inpatient.on') }} {{ streamline_date($inpatient_info->discharged_on)}} {{ __('inpatient.to') }} {{ get_name($inpatient_info->referred_to, 'id', 'name', 'referral_hospitals') }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
{{ __('inpatient.printed_by') }}
|
||||
</div>
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item">
|
||||
<?php echo Auth::user()->first_name . ' ' . Auth::user()->last_name; ?>
|
||||
....................................................
|
||||
({{ streamline_date(date("Y-m-d")) }})
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+581
@@ -0,0 +1,581 @@
|
||||
<div class="modal fade" id="treatment_sheet_details" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="treatment_sheet_details_label">Treatment Sheet</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<a href="/treatment_sheet/print/{{ $episode_id }}" target="_blank" class="btn btn-sm btn-success">Print Treatment Sheet</a>
|
||||
<hr>
|
||||
|
||||
@if(count($ordered_cancer_protocols) > 0)
|
||||
<table class="table table-bordered color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Section</th>
|
||||
<th>Drug</th>
|
||||
<th>Dose</th>
|
||||
<th>Duration</th>
|
||||
<th>Quantity Given</th>
|
||||
<th>Given By</th>
|
||||
<th>Given On</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($ordered_cancer_protocols as $ordered_cancer_protocol)
|
||||
@php
|
||||
$pre_chemo_drugs = json_decode($ordered_cancer_protocol->pre_chemo_drugs, true);
|
||||
$chemo_drugs = json_decode($ordered_cancer_protocol->chemo_drugs, true);
|
||||
$post_chemo_drugs = json_decode($ordered_cancer_protocol->post_chemo_drugs, true);
|
||||
|
||||
$pre_chemo_drugs_count = count($pre_chemo_drugs);
|
||||
$chemo_drugs_count = count($chemo_drugs);
|
||||
$post_chemo_drugs_count = count($post_chemo_drugs);
|
||||
|
||||
$pre_chemo_doses_count = array_sum(array_map(function ($value) {return count($value['dose']);}, $pre_chemo_drugs));
|
||||
$chemo_doses_count = array_sum(array_map(function ($value) {return count($value['dose']);}, $chemo_drugs));
|
||||
$post_chemo_doses_count = array_sum(array_map(function ($value) {return count($value['dose']);}, $post_chemo_drugs));
|
||||
|
||||
$pre_chemo_doses_count += array_sum(array_map(function ($value) {return array_sum(array_map(function ($value_two) {return count($value_two['duration']);}, $value['dose']));}, $pre_chemo_drugs));
|
||||
$chemo_doses_count += array_sum(array_map(function ($value) {return array_sum(array_map(function ($value_two) {return count($value_two['duration']);}, $value['dose']));}, $chemo_drugs));
|
||||
$post_chemo_doses_count += array_sum(array_map(function ($value) {return array_sum(array_map(function ($value_two) {return count($value_two['duration']);}, $value['dose']));}, $post_chemo_drugs));
|
||||
|
||||
$protocol_details = \Streamline\Models\CancerProtocol::find($ordered_cancer_protocol->protocol_id);
|
||||
$duration_counter = 0;
|
||||
@endphp
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<h3 class="text-center">{{ $protocol_details->name }} @if($ordered_cancer_protocol->protocol_status != 0) ({{ [1 => 'Stopped', 2 => 'Completed'][$ordered_cancer_protocol->protocol_status] ?? '' }}) @endif</h3>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td rowspan="{{ $pre_chemo_drugs_count + $pre_chemo_doses_count + 1 }}">Pre-Chemo</td>
|
||||
</tr>
|
||||
|
||||
@for($x = 0; $x < $pre_chemo_drugs_count; $x++)
|
||||
@php
|
||||
$pre_chemo_duration_count = array_sum(array_map(function ($value_two) {return count($value_two['duration']);}, $pre_chemo_drugs[$x]['dose']));
|
||||
@endphp
|
||||
<tr>
|
||||
<td rowspan="{{ count($pre_chemo_drugs[$x]['dose']) + $pre_chemo_duration_count + 1 }}">
|
||||
{{ $drugs[$pre_chemo_drugs[$x]['drug_id']] ?? '' }}
|
||||
|
||||
<br><br>
|
||||
|
||||
Factor: {{ $factors[$pre_chemo_drugs[$x]['drug_factor']] ?? '' }}
|
||||
|
||||
<br>
|
||||
|
||||
Route: {{ $drug_routes[$pre_chemo_drugs[$x]['drug_route']] ?? '' }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@for($i = 0; $i < count($pre_chemo_drugs[$x]['dose']); $i++)
|
||||
<tr>
|
||||
<td rowspan="{{ count($pre_chemo_drugs[$x]['dose'][$i]['duration']) + 1 }}">
|
||||
@php
|
||||
$drug_dosage = $drug_units[$drug_with_units[$pre_chemo_drugs[$x]['drug_id']]];
|
||||
|
||||
if ($pre_chemo_drugs[$x]['drug_factor'] == 1) {
|
||||
$drug_dosage .= '/m<sup>2</sup>';
|
||||
} else if ($pre_chemo_drugs[$x]['drug_factor'] == 2) {
|
||||
$drug_dosage .= '/Kg';
|
||||
}
|
||||
@endphp
|
||||
|
||||
Dose: {{ $pre_chemo_drugs[$x]['dose'][$i]['dose'] }} {!! $drug_dosage !!}
|
||||
|
||||
@if(!empty($pre_chemo_drugs[$x]['dose'][$i]['instructions']))
|
||||
<br><br>
|
||||
<span style="color: red">{{ $pre_chemo_drugs[$x]['dose'][$i]['instructions'] }}</span>
|
||||
@endif
|
||||
|
||||
@if(!empty($pre_chemo_drugs[$x]['dose'][$i]['weight_range']))
|
||||
<br><br>
|
||||
<span style="color: #0a776c">({{ $pre_chemo_drugs[$x]['dose'][$i]['weight_range'] }})</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@for($p = 0; $p < count($pre_chemo_drugs[$x]['dose'][$i]['duration']); $p++)
|
||||
<tr>
|
||||
@if($inpatient_info->discharged == 1)
|
||||
<td>{{ $pre_chemo_drugs[$x]['dose'][$i]['duration'][$p]['name'] }}</td>
|
||||
<td colspan="3">{{ __('inpatient.not_given') }}</td>
|
||||
@elseif(is_null($pre_chemo_drugs[$x]['dose'][$i]['duration'][$p]['given_by']))
|
||||
@if($ordered_cancer_protocol->protocol_status == 0)
|
||||
<td>
|
||||
{{ $pre_chemo_drugs[$x]['dose'][$i]['duration'][$p]['name'] }}
|
||||
|
||||
<br><br>
|
||||
|
||||
{{ Form::checkbox('pre_chemo_day_given[]', $duration_counter, false, ['class' => 'treatment_sheet_remove duration_row_' . $duration_counter . $ordered_cancer_protocol->id, 'onchange' => 'highlight_duration_row("' . $duration_counter . $ordered_cancer_protocol->id . '", this.checked)']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('pre_chemo_quantity_given[]', 0, ['class' => 'form-control treatment_sheet_remove duration_row_' . $duration_counter . $ordered_cancer_protocol->id])}}
|
||||
|
||||
{{ $drug_forms[$drug_with_forms[$pre_chemo_drugs[$x]['drug_id']]] }}
|
||||
</td>
|
||||
<td>{{ Form::select('pre_chemo_given_by[]', $users_array, '', ['class' => 'form-control treatment_sheet_remove duration_row_' . $duration_counter . $ordered_cancer_protocol->id])}}</td>
|
||||
<td><input type='datetime-local' name='pre_chemo_given_on[]' class='form-control treatment_sheet_remove duration_row_{{ $duration_counter . $ordered_cancer_protocol->id }}'/></td>
|
||||
{{ Form::hidden('pre_chemo_tracker_num[]', $duration_counter, ['class' => 'treatment_sheet_remove duration_row_' . $duration_counter . $ordered_cancer_protocol->id]) }}
|
||||
{{ Form::hidden('pre_chemo_order_id[]', $ordered_cancer_protocol->id, ['class' => 'treatment_sheet_remove duration_row_' . $duration_counter . $ordered_cancer_protocol->id]) }}
|
||||
@else
|
||||
<td>{{ $pre_chemo_drugs[$x]['dose'][$i]['duration'][$p]['name'] }}</td>
|
||||
<td colspan="3"></td>
|
||||
@endif
|
||||
@else
|
||||
<td>
|
||||
{{ $pre_chemo_drugs[$x]['dose'][$i]['duration'][$p]['name'] }}
|
||||
</td>
|
||||
<td>{{ $pre_chemo_drugs[$x]['dose'][$i]['duration'][$p]['quantity_given'] }}</td>
|
||||
<td style="color: #00AEEF">{{ $users_array[$pre_chemo_drugs[$x]['dose'][$i]['duration'][$p]['given_by']] }}</td>
|
||||
<td style="color: #00AEEF">{{ Carbon\Carbon::parse($pre_chemo_drugs[$x]['dose'][$i]['duration'][$p]['given_on'])->toDateTimeString() }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
|
||||
@php $duration_counter++; @endphp
|
||||
@endfor
|
||||
@endfor
|
||||
@endfor
|
||||
|
||||
<tr>
|
||||
<td rowspan="{{ $chemo_drugs_count + $chemo_doses_count + 1 }}">Chemo</td>
|
||||
</tr>
|
||||
|
||||
@for($x = 0; $x < $chemo_drugs_count; $x++)
|
||||
@php
|
||||
$chemo_duration_count = array_sum(array_map(function ($value_two) {return count($value_two['duration']);}, $chemo_drugs[$x]['dose']));
|
||||
@endphp
|
||||
<tr>
|
||||
<td rowspan="{{ count($chemo_drugs[$x]['dose']) + $chemo_duration_count + 1 }}">
|
||||
{{ $drugs[$chemo_drugs[$x]['drug_id']] ?? '' }}
|
||||
|
||||
<br><br>
|
||||
|
||||
Factor: {{ $factors[$chemo_drugs[$x]['drug_factor']] ?? '' }}
|
||||
|
||||
<br>
|
||||
|
||||
Route: {{ $drug_routes[$chemo_drugs[$x]['drug_route']] ?? '' }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@for($i = 0; $i < count($chemo_drugs[$x]['dose']); $i++)
|
||||
<tr>
|
||||
<td rowspan="{{ count($chemo_drugs[$x]['dose'][$i]['duration']) + 1 }}">
|
||||
@php
|
||||
$drug_dosage = $drug_units[$drug_with_units[$chemo_drugs[$x]['drug_id']]];
|
||||
|
||||
if ($chemo_drugs[$x]['drug_factor'] == 1) {
|
||||
$drug_dosage .= '/m<sup>2</sup>';
|
||||
} else if ($chemo_drugs[$x]['drug_factor'] == 2) {
|
||||
$drug_dosage .= '/Kg';
|
||||
}
|
||||
@endphp
|
||||
|
||||
Dose: {{ $chemo_drugs[$x]['dose'][$i]['dose'] }} {!! $drug_dosage !!}
|
||||
|
||||
@if(!empty($chemo_drugs[$x]['dose'][$i]['instructions']))
|
||||
<br><br>
|
||||
<span style="color: red">{{ $chemo_drugs[$x]['dose'][$i]['instructions'] }}</span>
|
||||
@endif
|
||||
|
||||
@if(!empty($chemo_drugs[$x]['dose'][$i]['weight_range']))
|
||||
<br><br>
|
||||
<span style="color: #0a776c">({{ $chemo_drugs[$x]['dose'][$i]['weight_range'] }})</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@for($p = 0; $p < count($chemo_drugs[$x]['dose'][$i]['duration']); $p++)
|
||||
<tr>
|
||||
@if($inpatient_info->discharged == 1)
|
||||
<td>{{ $chemo_drugs[$x]['dose'][$i]['duration'][$p]['name'] }}</td>
|
||||
<td colspan="3">{{ __('inpatient.not_given') }}</td>
|
||||
@elseif(is_null($chemo_drugs[$x]['dose'][$i]['duration'][$p]['given_by']))
|
||||
@if($ordered_cancer_protocol->protocol_status == 0)
|
||||
<td>
|
||||
{{ $chemo_drugs[$x]['dose'][$i]['duration'][$p]['name'] }}
|
||||
|
||||
<br><br>
|
||||
|
||||
{{ Form::checkbox('chemo_day_given[]', $duration_counter, false, ['class' => 'treatment_sheet_remove duration_row_' . $duration_counter . $ordered_cancer_protocol->id, 'onchange' => 'highlight_duration_row("' . $duration_counter . $ordered_cancer_protocol->id . '", this.checked)']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('chemo_quantity_given[]', 0, ['class' => 'form-control treatment_sheet_remove duration_row_' . $duration_counter . $ordered_cancer_protocol->id])}}
|
||||
{{ $drug_forms[$drug_with_forms[$chemo_drugs[$x]['drug_id']]] }}
|
||||
</td>
|
||||
<td>{{ Form::select('chemo_given_by[]', $users_array, '', ['class' => 'form-control treatment_sheet_remove duration_row_' . $duration_counter . $ordered_cancer_protocol->id])}}</td>
|
||||
<td><input type='datetime-local' name='chemo_given_on[]' class='form-control treatment_sheet_remove duration_row_{{ $duration_counter . $ordered_cancer_protocol->id }}'/></td>
|
||||
{{ Form::hidden('chemo_tracker_num[]', $duration_counter, ['class' => 'treatment_sheet_remove duration_row_' . $duration_counter . $ordered_cancer_protocol->id]) }}
|
||||
{{ Form::hidden('chemo_order_id[]', $ordered_cancer_protocol->id, ['class' => 'treatment_sheet_remove duration_row_' . $duration_counter . $ordered_cancer_protocol->id]) }}
|
||||
@else
|
||||
<td>{{ $chemo_drugs[$x]['dose'][$i]['duration'][$p]['name'] }}</td>
|
||||
<td colspan="3"></td>
|
||||
@endif
|
||||
@else
|
||||
<td>
|
||||
{{ $chemo_drugs[$x]['dose'][$i]['duration'][$p]['name'] }}
|
||||
</td>
|
||||
<td>{{ $chemo_drugs[$x]['dose'][$i]['duration'][$p]['quantity_given'] }}</td>
|
||||
<td style="color: #00AEEF">{{ $users_array[$chemo_drugs[$x]['dose'][$i]['duration'][$p]['given_by']] }}</td>
|
||||
<td style="color: #00AEEF">{{ Carbon\Carbon::parse($chemo_drugs[$x]['dose'][$i]['duration'][$p]['given_on'])->toDateTimeString() }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
|
||||
@php $duration_counter++; @endphp
|
||||
@endfor
|
||||
@endfor
|
||||
@endfor
|
||||
|
||||
<tr>
|
||||
<td rowspan="{{ $post_chemo_drugs_count + $post_chemo_doses_count + 1 }}">Post-Chemo</td>
|
||||
</tr>
|
||||
|
||||
@for($x = 0; $x < $post_chemo_drugs_count; $x++)
|
||||
@php
|
||||
$post_chemo_duration_count = array_sum(array_map(function ($value_two) {return count($value_two['duration']);}, $post_chemo_drugs[$x]['dose']));
|
||||
@endphp
|
||||
<tr>
|
||||
<td rowspan="{{ count($post_chemo_drugs[$x]['dose']) + $post_chemo_duration_count + 1 }}">
|
||||
{{ $drugs[$post_chemo_drugs[$x]['drug_id']] ?? '' }}
|
||||
|
||||
<br><br>
|
||||
|
||||
Factor: {{ $factors[$post_chemo_drugs[$x]['drug_factor']] ?? '' }}
|
||||
|
||||
<br>
|
||||
|
||||
Route: {{ $drug_routes[$post_chemo_drugs[$x]['drug_route']] ?? '' }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@for($i = 0; $i < count($post_chemo_drugs[$x]['dose']); $i++)
|
||||
<tr>
|
||||
<td rowspan="{{ count($post_chemo_drugs[$x]['dose'][$i]['duration']) + 1 }}">
|
||||
@php
|
||||
$drug_dosage = $drug_units[$drug_with_units[$post_chemo_drugs[$x]['drug_id']]];
|
||||
|
||||
if ($post_chemo_drugs[$x]['drug_factor'] == 1) {
|
||||
$drug_dosage .= '/m<sup>2</sup>';
|
||||
} else if ($post_chemo_drugs[$x]['drug_factor'] == 2) {
|
||||
$drug_dosage .= '/Kg';
|
||||
}
|
||||
@endphp
|
||||
|
||||
Dose: {{ $post_chemo_drugs[$x]['dose'][$i]['dose'] }} {!! $drug_dosage !!}
|
||||
|
||||
@if(!empty($post_chemo_drugs[$x]['dose'][$i]['instructions']))
|
||||
<br><br>
|
||||
<span style="color: red">{{ $post_chemo_drugs[$x]['dose'][$i]['instructions'] }}</span>
|
||||
@endif
|
||||
|
||||
@if(!empty($post_chemo_drugs[$x]['dose'][$i]['weight_range']))
|
||||
<br><br>
|
||||
<span style="color: #0a776c">({{ $post_chemo_drugs[$x]['dose'][$i]['weight_range'] }})</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@for($p = 0; $p < count($post_chemo_drugs[$x]['dose'][$i]['duration']); $p++)
|
||||
<tr>
|
||||
@if($inpatient_info->discharged == 1)
|
||||
<td>{{ $post_chemo_drugs[$x]['dose'][$i]['duration'][$p]['name'] }}</td>
|
||||
<td colspan="3">{{ __('inpatient.not_given') }}</td>
|
||||
@elseif(is_null($post_chemo_drugs[$x]['dose'][$i]['duration'][$p]['given_by']))
|
||||
@if($ordered_cancer_protocol->protocol_status == 0)
|
||||
<td>
|
||||
{{ $post_chemo_drugs[$x]['dose'][$i]['duration'][$p]['name'] }}
|
||||
|
||||
<br><br>
|
||||
|
||||
{{ Form::checkbox('post_chemo_day_given[]', $duration_counter, false, ['class' => 'treatment_sheet_remove duration_row_' . $duration_counter . $ordered_cancer_protocol->id, 'onchange' => 'highlight_duration_row("' . $duration_counter . $ordered_cancer_protocol->id . '", this.checked)']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('post_chemo_quantity_given[]', 0, ['class' => 'form-control treatment_sheet_remove duration_row_' . $duration_counter . $ordered_cancer_protocol->id])}}
|
||||
{{ $drug_forms[$drug_with_forms[$post_chemo_drugs[$x]['drug_id']]] }}
|
||||
</td>
|
||||
<td>{{ Form::select('post_chemo_given_by[]', $users_array, '', ['class' => 'form-control treatment_sheet_remove duration_row_' . $duration_counter . $ordered_cancer_protocol->id])}}</td>
|
||||
<td><input type='datetime-local' name='post_chemo_given_on[]' class='form-control treatment_sheet_remove duration_row_{{ $duration_counter . $ordered_cancer_protocol->id }}'/></td>
|
||||
{{ Form::hidden('post_chemo_tracker_num[]', $duration_counter, ['class' => 'treatment_sheet_remove duration_row_' . $duration_counter . $ordered_cancer_protocol->id]) }}
|
||||
{{ Form::hidden('post_chemo_order_id[]', $ordered_cancer_protocol->id, ['class' => 'treatment_sheet_remove duration_row_' . $duration_counter . $ordered_cancer_protocol->id]) }}
|
||||
@else
|
||||
<td>{{ $post_chemo_drugs[$x]['dose'][$i]['duration'][$p]['name'] }}</td>
|
||||
<td colspan="3"></td>
|
||||
@endif
|
||||
@else
|
||||
<td>
|
||||
{{ $post_chemo_drugs[$x]['dose'][$i]['duration'][$p]['name'] }}
|
||||
</td>
|
||||
<td>{{ $post_chemo_drugs[$x]['dose'][$i]['duration'][$p]['quantity_given'] }}</td>
|
||||
<td style="color: #00AEEF">{{ $users_array[$post_chemo_drugs[$x]['dose'][$i]['duration'][$p]['given_by']] }}</td>
|
||||
<td style="color: #00AEEF">{{ Carbon\Carbon::parse($post_chemo_drugs[$x]['dose'][$i]['duration'][$p]['given_on'])->toDateTimeString() }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
|
||||
@php $duration_counter++; @endphp
|
||||
@endfor
|
||||
@endfor
|
||||
@endfor
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<hr>
|
||||
@endif
|
||||
|
||||
@if(count($ward_prescriptions) > 0)
|
||||
<table class="table table-bordered color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Drug</th>
|
||||
<th>Duration</th>
|
||||
<th>Given By</th>
|
||||
<th>Given On</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($ward_prescriptions as $ward_prescription)
|
||||
@php
|
||||
$ward_prescription_drugs = explode(",", $ward_prescription->drugs);
|
||||
$ward_prescription_dose_array = isset($ward_prescription->doses) ? explode(",", $ward_prescription->doses) : [];
|
||||
$ward_prescription_freq_array = isset($ward_prescription->frequencies) ? explode(",", $ward_prescription->frequencies) : [];
|
||||
$ward_prescription_duration_array = isset($ward_prescription->durations) ? explode(",", $ward_prescription->durations) : [];
|
||||
$ward_prescription_quantity_array = isset($ward_prescription->quantities_dispensed) ? explode(",", $ward_prescription->quantities_dispensed) : [];
|
||||
@endphp
|
||||
|
||||
@for($x = 0; $x < count($ward_prescription_drugs); $x++)
|
||||
@php
|
||||
$drug_name = get_name($ward_prescription_drugs[$x], 'id', "name", 'drugs');
|
||||
$drug_unit = get_name(get_name($ward_prescription_drugs[$x], 'id', "unit_id", 'drugs'), "id", "name", "drug_units");
|
||||
$frequency = get_name($ward_prescription_freq_array[$x], "id", "name", "dosage_frequencies");
|
||||
$current_factor = get_name($ward_prescription_freq_array[$x], "id", "factor", "dosage_frequencies");
|
||||
|
||||
try { $current_factor = (int)ceil($current_factor); } catch (ErrorException $e) { $current_factor = 1; }
|
||||
|
||||
$split_duration = explode(" ", $ward_prescription_duration_array[$x]);
|
||||
$duration_counter = 0;
|
||||
$opd_quantity_to_give_per_day = ceil($ward_prescription_quantity_array[$x] / ((int)$split_duration[0] * $current_factor));
|
||||
@endphp
|
||||
<tr>
|
||||
<td rowspan="{{ ((int)$split_duration[0] * $current_factor) + 1 }}">
|
||||
{{ $drug_name }}
|
||||
<br><br>
|
||||
{{ $ward_prescription_dose_array[$x] }} {{ $drug_unit }} {{ $frequency}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@for($p = 0; $p < $split_duration[0]; $p++)
|
||||
@for($y = 0; $y < $current_factor; $y++)
|
||||
@php
|
||||
// get the dispensed so far
|
||||
$treatment_sheet_dispensations = \Streamline\Models\TreatmentSheetDispensations::where('ward_treatment_id', $ward_prescription->id)
|
||||
->where('drug_id', $ward_prescription_drugs[$x])->where('order_number', $duration_counter)->first();
|
||||
@endphp
|
||||
<tr>
|
||||
@if($treatment_sheet_dispensations)
|
||||
<td>Day {{ $p + 1 }} <br> Dose {{ $y + 1 }}</td>
|
||||
<td style="color: #00AEEF">{{ $users_array[$treatment_sheet_dispensations->given_by] }}</td>
|
||||
<td style="color: #00AEEF">{{ Carbon\Carbon::parse($treatment_sheet_dispensations->given_on)->toDateTimeString() }}</td>
|
||||
@elseif($inpatient_info->discharged == 1)
|
||||
<td>Day {{ $p + 1 }} <br> Dose {{ $y + 1 }}</td>
|
||||
<td colspan="2">{{ __('inpatient.not_given') }}</td>
|
||||
@else
|
||||
@php
|
||||
$opd_id = $ward_prescription->id . '-' . $ward_prescription_drugs[$x] . '-' . $duration_counter;
|
||||
@endphp
|
||||
<td>
|
||||
Day {{ $p + 1 }} <br> Dose {{ $y + 1 }}
|
||||
|
||||
<br><br>
|
||||
|
||||
{{ Form::checkbox('opd_day_given[]', $duration_counter, false, ['class' => 'treatment_sheet_remove duration_row_' . $opd_id, 'onchange' => 'highlight_duration_row("' . $opd_id . '", this.checked)']) }}
|
||||
</td>
|
||||
<td>{{ Form::select('opd_given_by[]', $users_array, Auth::id(), ['class' => 'form-control select treatment_sheet_remove duration_row_' . $opd_id])}}</td>
|
||||
<td><input type='datetime-local' name='opd_given_on[]' class='form-control treatment_sheet_remove duration_row_{{ $opd_id }}' value="{{ date('Y-m-d') }}T{{ date('H:i') }}" max="{{ date('Y-m-d') }}T{{ date('H:i') }}"/></td>
|
||||
{{ Form::hidden('opd_order_number[]', $duration_counter, ['class' => 'treatment_sheet_remove duration_row_' . $opd_id]) }}
|
||||
{{ Form::hidden('opd_ward_treatment_id[]', $ward_prescription->id, ['class' => 'treatment_sheet_remove duration_row_' . $opd_id]) }}
|
||||
{{ Form::hidden('opd_drug_id[]', $ward_prescription_drugs[$x], ['class' => 'treatment_sheet_remove duration_row_' . $opd_id]) }}
|
||||
{{ Form::hidden('opd_quantity_given[]', $opd_quantity_to_give_per_day, ['class' => 'treatment_sheet_remove duration_row_' . $opd_id]) }}
|
||||
@endif
|
||||
@php $duration_counter++; @endphp
|
||||
</tr>
|
||||
@endfor
|
||||
@endfor
|
||||
@endfor
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" id="close_treatment_sheet" data-dismiss="modal">{{ __('layout.close') }}</button>
|
||||
<button type="button" class="btn btn-success" onclick="submitTreatmentSheet()">{{ __('layout.submit') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
function highlight_duration_row(id, status) {
|
||||
if (status) {
|
||||
$('.duration_row_' + id).each(function () {
|
||||
$(this).removeClass('treatment_sheet_remove')
|
||||
});
|
||||
} else {
|
||||
$('.duration_row_' + id).each(function () {
|
||||
$(this).addClass('treatment_sheet_remove')
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function submitTreatmentSheet() {
|
||||
$(".treatment_sheet_remove").each(function () {
|
||||
$(this).remove()
|
||||
});
|
||||
|
||||
let pre_chemo_given_by = $("select[name='pre_chemo_given_by[]'] option:selected").map(function () {
|
||||
return this.value;
|
||||
}).get();
|
||||
|
||||
let pre_chemo_given_on = $("input[name='pre_chemo_given_on[]']").map(function () {
|
||||
return this.value;
|
||||
}).get();
|
||||
|
||||
let pre_chemo_tracker_num = $("input[name='pre_chemo_tracker_num[]']").map(function () {
|
||||
return this.value;
|
||||
}).get();
|
||||
|
||||
let pre_chemo_order_id = $("input[name='pre_chemo_order_id[]']").map(function () {
|
||||
return this.value;
|
||||
}).get();
|
||||
|
||||
let pre_chemo_quantity_given = $("input[name='pre_chemo_quantity_given[]']").map(function () {
|
||||
return this.value;
|
||||
}).get();
|
||||
|
||||
// chemo
|
||||
|
||||
let chemo_given_by = $("select[name='chemo_given_by[]'] option:selected").map(function () {
|
||||
return this.value;
|
||||
}).get();
|
||||
|
||||
let chemo_given_on = $("input[name='chemo_given_on[]']").map(function () {
|
||||
return this.value;
|
||||
}).get();
|
||||
|
||||
let chemo_tracker_num = $("input[name='chemo_tracker_num[]']").map(function () {
|
||||
return this.value;
|
||||
}).get();
|
||||
|
||||
let chemo_order_id = $("input[name='chemo_order_id[]']").map(function () {
|
||||
return this.value;
|
||||
}).get();
|
||||
|
||||
let chemo_quantity_given = $("input[name='chemo_quantity_given[]']").map(function () {
|
||||
return this.value;
|
||||
}).get();
|
||||
|
||||
// post
|
||||
|
||||
let post_chemo_given_by = $("select[name='post_chemo_given_by[]'] option:selected").map(function () {
|
||||
return this.value;
|
||||
}).get();
|
||||
|
||||
let post_chemo_given_on = $("input[name='post_chemo_given_on[]']").map(function () {
|
||||
return this.value;
|
||||
}).get();
|
||||
|
||||
let post_chemo_tracker_num = $("input[name='post_chemo_tracker_num[]']").map(function () {
|
||||
return this.value;
|
||||
}).get();
|
||||
|
||||
let post_chemo_order_id = $("input[name='post_chemo_order_id[]']").map(function () {
|
||||
return this.value;
|
||||
}).get();
|
||||
|
||||
let post_chemo_quantity_given = $("input[name='post_chemo_quantity_given[]']").map(function () {
|
||||
return this.value;
|
||||
}).get();
|
||||
|
||||
// opd treatments
|
||||
let opd_given_by = $("select[name='opd_given_by[]'] option:selected").map(function () {
|
||||
return this.value;
|
||||
}).get();
|
||||
|
||||
let opd_given_on = $("input[name='opd_given_on[]']").map(function () {
|
||||
return this.value;
|
||||
}).get();
|
||||
|
||||
let opd_order_number = $("input[name='opd_order_number[]']").map(function () {
|
||||
return this.value;
|
||||
}).get();
|
||||
|
||||
let opd_ward_treatment_id = $("input[name='opd_ward_treatment_id[]']").map(function () {
|
||||
return this.value;
|
||||
}).get();
|
||||
|
||||
let opd_drug_id = $("input[name='opd_drug_id[]']").map(function () {
|
||||
return this.value;
|
||||
}).get();
|
||||
|
||||
let opd_quantity_given = $("input[name='opd_quantity_given[]']").map(function () {
|
||||
return this.value;
|
||||
}).get();
|
||||
|
||||
let patient_id = $("#patient_id").val();
|
||||
let episode_id = $("#episode_id").val();
|
||||
let ward_id = $("#ward_id").val();
|
||||
|
||||
$.ajax({
|
||||
url: '/treatment_sheet/save',
|
||||
data: {
|
||||
"pre_chemo_given_by[]": pre_chemo_given_by,
|
||||
"pre_chemo_given_on[]": pre_chemo_given_on,
|
||||
"pre_chemo_tracker_num[]": pre_chemo_tracker_num,
|
||||
"pre_chemo_order_id[]": pre_chemo_order_id,
|
||||
"pre_chemo_quantity_given[]": pre_chemo_quantity_given,
|
||||
"chemo_given_by[]": chemo_given_by,
|
||||
"chemo_given_on[]": chemo_given_on,
|
||||
"chemo_tracker_num[]": chemo_tracker_num,
|
||||
"chemo_order_id[]": chemo_order_id,
|
||||
"chemo_quantity_given[]": chemo_quantity_given,
|
||||
"post_chemo_given_by[]": post_chemo_given_by,
|
||||
"post_chemo_given_on[]": post_chemo_given_on,
|
||||
"post_chemo_tracker_num[]": post_chemo_tracker_num,
|
||||
"post_chemo_order_id[]": post_chemo_order_id,
|
||||
"post_chemo_quantity_given[]": post_chemo_quantity_given,
|
||||
"opd_given_by[]": opd_given_by,
|
||||
"opd_given_on[]": opd_given_on,
|
||||
"opd_order_number[]": opd_order_number,
|
||||
"opd_ward_treatment_id[]": opd_ward_treatment_id,
|
||||
"opd_drug_id[]": opd_drug_id,
|
||||
"opd_quantity_given[]": opd_quantity_given,
|
||||
"patient_id": patient_id,
|
||||
"episode_id": episode_id,
|
||||
"ward_id": ward_id
|
||||
},
|
||||
success: function (response) {
|
||||
if (response === "self") {
|
||||
alert("Treatment sheet saved successfully");
|
||||
window.location.reload();
|
||||
} else if (response === "patient_home") {
|
||||
alert("Treatment sheet saved successfully");
|
||||
window.location.href = '/patient_episodes';
|
||||
} else if (response === "ward_home") {
|
||||
alert("Treatment sheet saved successfully");
|
||||
window.location.href = '/wards/select';
|
||||
} else {
|
||||
alert("An error occurred");
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
//
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
@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">{{ __('patient_episode.treatment_sheet') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('patient_episode.dashboard') }}</a></li>
|
||||
<li><a href="{{ route('patients.index') }}">{{ __('patient_episode.patients') }}</a></li>
|
||||
<li class="active">{{ __('patient_episode.treatment_sheet') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('patients::allergies.header')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a type="button" data-toggle="modal" data-target="#treatment_sheet_details" id="treatment_sheet_btn" style="display: none">Treatment Sheet</a>
|
||||
|
||||
{{ Form::hidden('patient_id', $patient_id, ['id' => 'patient_id']) }}
|
||||
{{ Form::hidden('episode_id', $episode_id, ['id' => 'episode_id']) }}
|
||||
{{ Form::hidden('ward_id', $ward_id, ['id' => 'ward_id']) }}
|
||||
|
||||
@include('ward_management::inpatient.treatment_sheet_details')
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
setTimeout(function() {
|
||||
$('#treatment_sheet_btn').click();
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
$('#close_treatment_sheet').click(function () {
|
||||
window.location.href = '/treatment_sheet/redirect_back';
|
||||
})
|
||||
</script>
|
||||
@endpush
|
||||
Reference in New Issue
Block a user