mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-12 11:11:31 +00:00
291 lines
14 KiB
PHP
Executable File
291 lines
14 KiB
PHP
Executable File
<!DOCTYPE html>
|
|
<html lang="{{ app()->getLocale() }}">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="description" content="">
|
|
<meta name="author" content="">
|
|
|
|
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('uploads/streamline/color/streamline_icon-02.png') }}">
|
|
<title>{{ config('app.name', 'Inpatient Bill - Stre@mline') }}</title>
|
|
<!-- Bootstrap Core CSS -->
|
|
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
|
|
|
<style>
|
|
body{
|
|
font-size: 0.8em;
|
|
}
|
|
/*thead, tfoot { display: table-row-group }*/
|
|
thead {
|
|
display: table-header-group;
|
|
}
|
|
tfoot {
|
|
display: table-row-group;
|
|
}
|
|
tr {
|
|
page-break-before: always;
|
|
page-break-after: always;
|
|
page-break-inside: avoid !important;
|
|
}
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
<div class="container-fluid">
|
|
@include('layouts.header_pdf_print')
|
|
<h5 class="heading" style="text-align: center;">{{ __('investigations.lab_result_details') }}</h5>
|
|
|
|
<div class="row">
|
|
<table class="table table-light table-sm table-borderless">
|
|
<tr>
|
|
<th scope="row">{{ __('investigations.patient_number') }}</th>
|
|
<td>{{ $patient->number}}</td>
|
|
<th>{{ __('investigations.lab_number') }}</th>
|
|
<td>
|
|
{{ $ordered_investigation->lab_number ?? $ordered_investigation->id }}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">{{ __('investigations.patient_names') }}</th>
|
|
<td>{{ ucwords($patient->first_name) }} {{ ucwords($patient->last_name) }}</td>
|
|
<th>{{ __('investigations.hospital_unit') }}</th>
|
|
<td>
|
|
@if($ordered_investigation->inpatient == 1)
|
|
{{ get_ward_name($ordered_investigation->patient_id, $ordered_investigation->episode_id) }}
|
|
@else
|
|
OPD
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">{{ __('investigations.age') }}</th>
|
|
<td>
|
|
@php $dob = get_name($ordered_investigation->patient_id, 'id', 'date_of_birth', 'patients'); @endphp
|
|
{{ get_patients_age($dob, $ordered_investigation->created_at) }}
|
|
</td>
|
|
<th>{{ __('investigations.requested') }}</th>
|
|
<td>{{ streamline_date_time($ordered_investigation->created_at) }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">{{ __('investigations.gender') }}</th>
|
|
<td>
|
|
{{ get_name($ordered_investigation->patient_id, 'id', 'gender', 'patients') == 1 ? "Male" : "Female" }}
|
|
</td>
|
|
<th>{{ __('investigations.received') }}</th>
|
|
<td>{{ streamline_date_time($ordered_investigation->request_received_date) }}</td>
|
|
</tr>
|
|
@php
|
|
$invs_results = DB::table('investigation_results')->where('investigation_id', $ordered_investigation->investigation_id)
|
|
->where('patient_id', $ordered_investigation->patient_id)
|
|
->where('episode_id', $ordered_investigation->episode_id)
|
|
->first();
|
|
|
|
$user_id = $invs_results ? $invs_results->created_by : $ordered_investigation->request_received_by;
|
|
$performed_at = $invs_results ? streamline_date_time($invs_results->created_at) : "N/A";
|
|
@endphp
|
|
<tr>
|
|
<th scope="row">{{ __('investigations.patient_category') }}</th>
|
|
<td>
|
|
{{ get_name($patient->category_id, 'id', 'name', 'patient_categories') }}
|
|
</td>
|
|
<th>{{ __('investigations.performed_at') }}</th>
|
|
<td>{{ $performed_at }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">{{ __('investigations.residence') }}</th>
|
|
<td>{{ patient_residence($patient->id) }}</td>
|
|
<th>{{ __('investigations.doctor') }}</th>
|
|
<td>
|
|
@php
|
|
$created_by = Streamline\Models\User::find($ordered_investigation->created_by);
|
|
|
|
if ($ordered_investigation->ordered_by) {
|
|
$ordered_by_name = $ordered_investigation->ordered_by;
|
|
} elseif ($created_by && $created_by->hasRole('Doctors')) {
|
|
$ordered_by_name = get_full_name($ordered_investigation->created_by, 'id', 'first_name', 'last_name', 'users');
|
|
} else {
|
|
$ordered_by_name = __('investigations.self_request');
|
|
}
|
|
@endphp
|
|
{{ $ordered_by_name }}
|
|
{{--{{ getDNS1DBarcodePNG($ordered_investigation->id) }}
|
|
<span>{{ sprintf("%04u", $ordered_investigation->id) }}</span>--}}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-6">
|
|
<table class='table table-sm'>
|
|
<thead class="thead-light">
|
|
<tr>
|
|
<th>{{ __('investigations.tests') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($investigation_ids as $record)
|
|
<tr>
|
|
<td>{{ get_name($record, 'id', 'name', 'investigations') }}</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="col-6">
|
|
<table class='table table-sm'>
|
|
<thead class="thead-light">
|
|
<tr>
|
|
<th>{{ __('investigations.specimens') }}</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
@php
|
|
$records = explode(",", $ordered_investigation->specimen);
|
|
$status_array = explode(",", $ordered_investigation->specimen_status);
|
|
@endphp
|
|
@for($i = 0; $i < count($records); $i++)
|
|
<tr>
|
|
<td>{{ get_name($records[$i], 'id', 'name', 'laboratory_specimens') }}</td>
|
|
<td>
|
|
@if ($status_array[$i] == 1)
|
|
<font color='green'>{{ __('investigations.taken') }}</font>
|
|
@elseif ($status_array[$i] == 2)
|
|
<font color='orange'>{{ __('investigations.not_taken') }}</font>
|
|
@elseif ($status_array[$i] == 3)
|
|
<font color='#ff4500'>{{ __('investigations.rejected') }}</font>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
@endfor
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row-fluid">
|
|
<div class="col-auto">
|
|
<hr>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col">
|
|
<h6>{{ __('investigations.test_results') }}</h6>
|
|
<table class='table table-sm'>
|
|
<thead class="thead-light">
|
|
<tr>
|
|
<th>{{ __('investigations.investigation_name') }}</th>
|
|
<th>{{ __('investigations.results') }}</th>
|
|
<th>{{ __('investigations.normal_ranges') }}</th>
|
|
<th>{{ __('investigations.unit') }}</th>
|
|
<th>{{ __('investigations.comment') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($results as $result)
|
|
@if($result['type'] == 0)
|
|
<tr>
|
|
<td><b>{{ $result['name'] }}</b></td>
|
|
<td>{!! nl2br(e($result['result'])) !!}</td>
|
|
<td>{{ $result['range'] }}</td>
|
|
<td>
|
|
@if(get_name($result['units'], 'id', 'name', 'unit_of_measure') != "N/A")
|
|
{{ get_name($result['units'], 'id', 'name', 'unit_of_measure') }}
|
|
@endif
|
|
</td>
|
|
<td>{!! nl2br(e($result['comment'])) !!}</td>
|
|
</tr>
|
|
@elseif($result['type'] == 1)
|
|
<tr>
|
|
<td colspan="6"></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="5"><b>{{ $result['name'] }}</b></td>
|
|
</tr>
|
|
@php
|
|
$specialised_results = \Streamline\Models\InvestigationSpecialisedResult::where('id', $result['result'])->first();
|
|
|
|
if($specialised_results){
|
|
$variable_id_array = explode(',', $specialised_results->specialised_variable_id);
|
|
$variable_value_array = explode(',', $specialised_results->value);
|
|
$variable_comment_array = explode(',', $specialised_results->comment);
|
|
}
|
|
@endphp
|
|
|
|
@if($specialised_results)
|
|
@for($i = 0; $i < count($variable_id_array); $i++)
|
|
<tr>
|
|
<td>{{ get_name($variable_id_array[$i], 'id', 'name', 'investigation_specialised_variables') }}</td>
|
|
<td>{!! nl2br(e($variable_value_array[$i])) !!}</td>
|
|
<td>
|
|
@if(get_name($variable_id_array[$i], 'id', 'range_type', 'investigation_specialised_variables') == 1)
|
|
{{ get_dynamic_normal_range_specialized($variable_id_array[$i], get_patient_age_group($patient->id), get_name($patient->id, 'id', 'gender', 'patients')) }}
|
|
@else
|
|
{{ get_name($variable_id_array[$i], 'id', 'normal_ranges', 'investigation_specialised_variables') }}
|
|
@endif
|
|
</td>
|
|
<td>
|
|
@if(get_name(get_name($variable_id_array[$i], 'id', 'units', 'investigation_specialised_variables'), 'id', 'name', 'unit_of_measure') != "N/A")
|
|
{{ get_name(get_name($variable_id_array[$i], 'id', 'units', 'investigation_specialised_variables'), 'id', 'name', 'unit_of_measure') }}
|
|
@endif
|
|
</td>
|
|
<td>{!! nl2br(e($variable_comment_array[$i])) !!}</td>
|
|
</tr>
|
|
@endfor
|
|
@endif
|
|
@endif
|
|
@endforeach
|
|
@if(count($results) < 1)
|
|
<tr><td colspan="5" class="text-center"><p><code>{{ __('investigations.no_results_available') }}</code></p></td></tr>
|
|
@endif
|
|
</tbody>
|
|
</table>
|
|
|
|
<br>
|
|
@php
|
|
$counter=0; $auth='';
|
|
if(!empty($results)) {
|
|
foreach($results as $result) if ($result['authenticated'] == '1') $counter++;
|
|
if($counter == count($results)) $auth='1';
|
|
}
|
|
@endphp
|
|
|
|
@if (is_add_lab_stamp_feature_enabled() && !empty($hospitalInfo->lab_stamp) && $auth =='1')
|
|
<table class="table table-borderless">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<h6>{{ __('investigations.performed_by') }} :
|
|
<span @if (Auth::user()->can('hide-performed-by-on-lab-results-print-out')) style="display: none;" @endif><b>{{ get_full_name($user_id, 'id', 'first_name', 'last_name', 'users') }}</b></span>
|
|
</h6>
|
|
</td>
|
|
<td>
|
|
<h6>{{ __('investigations.verified_by') }} : <span>............................................................</span></h6>
|
|
<img style="max-width: 300px; max-height: 140px;" src="{{ asset($hospitalInfo->lab_stamp) }}" class="img-fluid mx-auto d-block mx-3" alt="{{ $hospitalInfo->name}} stamp">
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
@else
|
|
<div class="row">
|
|
<div class="col-6">
|
|
<h6>
|
|
{{ __('investigations.performed_by') }} :
|
|
<span @if (Auth::user()->can('hide-performed-by-on-lab-results-print-out')) style="display: none;" @endif><b>{{ get_full_name($user_id, 'id', 'first_name', 'last_name', 'users') }}</b></span>
|
|
</h6>
|
|
</div>
|
|
<div class="col-6">
|
|
<h6>{{ __('investigations.verified_by') }} : <span>............................................................</span></h6>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |