init project

This commit is contained in:
2026-05-25 11:08:52 +07:00
parent a388c619b5
commit 895fdd9b83
1437 changed files with 384844 additions and 27 deletions

View File

@@ -0,0 +1,713 @@
<div class="{{(request()->segment(1)!='shared' ? 'modal':'')}} fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
@if(request()->segment(1)!='shared')
<div class="print-preview-header">
<ul>
<li style="display: inline-block;" class="approve" reverify="1">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i>&nbsp;<b> {{__('sample.btn_approve')}} </b></a>
@endif
</li>
<li style="display: inline-block;" class="print">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
<a href="javascript:void(0)" id="doPrinting__"><i class="fa fa-print"></i>&nbsp;<b>{{__('sample.btn_print')}}</b></a>
@endif
</li>
@if(!empty($labSettings->alternative_logo) && 1==2)
<li style="display: inline-block;" class="print" title="Print with alternative logo">
<a href="javascript:void(0)" id="change_logo_print"><i class="fa fa-print"></i>&nbsp;<b>{{__('Print Alt-Logo')}}</b></a>
</li>
@endif
@if(!empty($sample->patient->telegramChatId) && $labSettings->telegrambot==1 && 1==2)
<li style="display: inline-block;" class="print_" title="Share this result through patient's telegram">
<a href="javascript:void(0)" id="send_lab_result_patient" target_receiver="patient"><i class="fa fa-send"></i>&nbsp;<b>{{__('Send to Patient')}}</b></a>
</li>
@endif
@if(!empty($sample->sample_source->telegramChatId) && $labSettings->telegrambot==1 && 1==2)
<li style="display: inline-block;" class="print_" title="Share this result through clinician's telegram">
<a href="javascript:void(0)" id="send_lab_result_clinician" target_receiver="clinician"><i class="fa fa-send"></i>&nbsp;<b>{{__('Send to Clinician')}}</b></a>
</li>
@endif
<li style=" position: absolute; top: 0; right: 50px;">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['view_sample']))
<a href="{{url('sample/search?kword=&sample_date=today')}}"><b>{{__('sidebar.view_sample')}}</b></a>
@endif
</li>
</ul>
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
</div>
@endif
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
<title>Result</title>
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
<style>
@font-face {
font-family: 'KhmerOS_muollight';
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
display:swap;
}
@php
$configures = collect($labConfigures);
$fontNameHeader = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
$fontSizeHeader = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
$resultColorHeader = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
$fontName = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT')->pluck('assigned_attribute_value')->first());
$fontSize = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT')->pluck('assigned_attribute_value')->first());
$resultColor = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT')->pluck('assigned_attribute_value')->first());
$lineHeight = ($configures->where('atrribute_code', 'LINE_HEIGHT_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
@endphp
{{-- @if(!empty($lineHeight))--}}
{{-- p{--}}
{{-- line-height: 0 !important;--}}
{{-- }--}}
{{-- ._department-sample-info tr--}}
{{-- ,.line-height_{--}}
{{-- line-height: {{$lineHeight}} !important;--}}
{{-- }--}}
{{-- @endif--}}
@font-face {
font-family: 'result_font';
}
@font-face {
font-family: 'label_header_font';
}
.result-page-color{
color: {{empty($resultColor) ? '#0000ff' : $resultColor}};
}
.patient-info tr td{
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
font-size:15px !important;
}
.header-label-title-color{
color: {{empty($resultColorHeader) ? '#0000ff' : $resultColorHeader}};
font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}';
}
.header-label-font{
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
}
.result-font, .name{
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
}
._department-sample-info tr td{
padding-top: 0px !important;
padding-bottom: 0px !important;
}
.result-font-size{
font-size: {{empty($fontSize) ? '13pt' : $fontSize}};
}
.KhmerOS {
font-family: 'SourceSerifPro-Regular', 'KhmerOS', 'serif';
}
.KhmerMoulLight {
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
}
.tacteng {
font-family: Tacteng !important;
}
.sourceserifpro-bold {
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
font-weight: bold;
}
page[size="A4"] {
background: white;
width: 21cm;
display: block;
margin: 10px auto;
{{(request()->segment(1)!='shared' ? 'margin-left: 0cm !important;':'')}}
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
padding: 0cm 1cm 1cm 1cm;
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
font-size: 12pt;
line-height: 23px;
page-break-after: always;
}
page[size="A4"], th, td {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
page[size="A4"] table {
}
table th, table td {
text-align: left;
}
table td {
font-weight: normal;
}
table.patient-info, table.department-sample-info {
border: 1px solid #7a7a7a;
line-height: 18px;
padding: 3px;
}
table.patient-info td, table.patient-info th {
vertical-align: top;
}
table.department-sample-info {
background-color: #ebebeb;
}
table.test-result {
font-family: 'SourceSerifPro-Regular', 'serif';
}
table.test-result tr th {
border-bottom: 1px solid black;
}
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
padding-right: .2cm;
}
table.test-result tr:first-child + tr td {
padding-top: 5px;
}
p.value-pair {
position: relative;
width: 100%;
margin: 0;
}
p.value-pair:before {
content: '';
display: block;
position: absolute;
width: 100%;
bottom: .25rem;
height: 0;
line-height: 0;
border-bottom: 2px dotted #858585;
}
p.value-pair .name {
background: white;
z-index: 1;
position: relative;
padding-right: 5px;
}
p.value-pair .value {
background: white;
z-index: 1;
right: 0;
position: absolute;
padding-left: 5px;
font-weight: bold;
}
.out-of-range {
font-family: 'SourceSerifPro-Bold', 'serif';
font-weight: bold;
font-size: 12pt;
}
.text-center {
text-align: center;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-top {
vertical-align: top;
}
.text-bottom {
vertical-align: bottom;
}
.text-middle {
vertical-align: middle;
}
.text-bold {
font-weight: bold;
}
.text-no-wrap {
white-space: nowrap;
}
table.test-result {
line-height: 16px;
}
#footer {
line-height: 17px;
}
#footer .laboratory-address td {
border-top: 1px solid black;
padding-top: 10px;
}
#footer .result-footer-signature td {
vertical-align: top;
padding-bottom: 0px;
}
@page {
margin: 1cm 1cm 0;
}
@media print {
@page {
margin-top: 1cm;
margin-left: 0.2cm !important;
margin-bottom: 0cm;
@bottom-right {
content: "{{__('general.page')}}" counter(page);
font-size: 13px;
margin-top: -35px !important;
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
}
}
body,
page[size="A4"] {
margin-left: 0cm !important;
padding-right: 0cm !important;
box-shadow: none;
background-color: transparent;
}
body .sample-result .sample-type{
page-break-inside: avoid;
}
#footer {
display: block;
position: fixed;
bottom: 0px;
padding-bottom: 0px !important;
}
#footer .result-footer-signature td {
vertical-align: top;
padding-bottom: 0px;
}
table .tname{
width:360px !important;
}
}
table .tname{
width:360px !important;
}
/*table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
width:390px !important;
}*/
#print_invoice_modal .table-inv th, .table-inv td {
/*border: 1px solid black;*/
/*border-collapse: collapse;*/
}
.abnormal{
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
color: {{$labSettings->abnormal_text_color}} !important;
font-size: {{empty($fontSize) ? '13pt' : $fontSize}};
}
.patient-info{
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Time New Roman' : 'label_header_font' ): 'Khmer OS Siemreap')}}";
font-size: {{empty($fontSizeHeader) ? '13pt' : $fontSizeHeader}};
}
#footer{
font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";
}
.font-changable-base-on-localize{
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
}
</style>
<input type="hidden" name="verify" id="verify" value="">
<page size="A4">
<table border="0" width="100%">
<thead>
<tr id="def-logo">
<th style="width:100%" class="text-center">
@if(!empty($samplePhysician->logo))
<img width="98%" height="140px" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
@else
<table width="100%">
<tr>
<td style="width:120px; vertical-align: top;" class="text-center">
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
</td>
<td class="text-center">
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff; font-family: 'Times New Roman';" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
</td>
<td style="width:120px" >&nbsp;</td>
</tr>
</table>
@endif
</th>
</tr>
<tr id="dyn-logo" style="display:none;">
<th style="width:100%" class="text-center">
@if(!empty($labSettings->alternative_logo))
<img width="98%" height="140px" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/avatars/labs/alternative_logo/'.$labSettings->alternative_logo) }}" />
@endif
</th>
</tr>
<tr>
<td class="text-top text-center" style="padding-top:0" valign="top">
<div style="font-size: 13.5pt; text-transform: uppercase; font-weight: bold;" class="header-label-title-color header-label-font">{{__('sample.print_title')}}</div>
</td>
</tr>
<tr>
<th>
@if($labSettings->result_header_id==1)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style=" padding-top:1px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:1px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:1px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:1px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style="margin-left:30px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.table_sample_source')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{@$sample->sample_source->name_en}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:1px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="30%" style="padding-bottom:1px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-bottom:1px;line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="25%" style="padding-bottom:1px; line-height:20px;" align="left">: {{explode("-",@$samplePhysician->name_en)[0]}}</td>
</tr>
</tbody>
</table>
@elseif($labSettings->result_header_id==2)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
</tr>
</tbody>
</table>
@elseif($labSettings->result_header_id==3)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
<td width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
</tr>
<tr>
<td width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
<td width="25%" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_requester')}}</td>
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
</tr>
</tbody>
</table>
@elseif($labSettings->result_header_id==4)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color" width="25%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} , <b class="header-label-title-color">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
<td class="header-label-title-color" width="25%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.table_sample_source')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{@$sample->sample_source->name_en}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
</tbody>
</table>
@elseif($labSettings->result_header_id==5)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_code')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->patient->patient_uuid}}</td>
</tr>
<tr>
<td width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
<td width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
</tr>
<tr>
<td width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
<td width="25%" rowspan="2" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_requester')}}</td>
<td width="25%" rowspan="2" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
</tr>
<tr>
<td width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
</tbody>
</table>
@elseif($labSettings->result_header_id==6)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color" width="25%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} , <b class="header-label-title-color">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
<td class="header-label-title-color" width="25%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
</tr>
</tbody>
</table>
@else
<table width="100%" style="border-collapse: collapse;border-top: 2px solid #000000;border-bottom: 2px solid #000000;">
<tbody>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" width="13%" style="padding-top:2px; line-height:20px;">{{__('ឈ្មោះ/Name')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" width="19%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color font-changable-base-on-localize" width="15%" style="line-height:20px;">{{__('អាយុ/Age')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" width="21%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}}</td>
<td class="header-label-title-color font-changable-base-on-localize" width="13%" style="line-height:20px;">{{__('ភេទ/Sex')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="line-height:20px;" align="left">: {{$sample->patient->gender==1 ? 'Male':'Female'}}</td>
</tr>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" style="line-height:20px;">{{__('Patient ID')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="line-height:20px;" align="left">: {{$sample->patient->patient_uuid}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-top:2px; line-height:20px;">{{__('Lab ID')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('ទូរស័ព្ទ/Phone')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
</tr>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('Requested By')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('Requested Date')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('Analysis Date')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;" align="left">: {{date('d-M-Y H:i');}}</td>
</tr>
</tbody>
</table>
@endif
</th>
</tr>
</thead>
<tfoot>
<tr>
<td width="100%">
<table width="100%" border="0">
<tbody><tr>
<td colspan="4" style="/*height: 240px;*/ height: 100px;">&nbsp;</td>
</tr>
</tbody></table>
</td>
</tr>
</tfoot>
<tbody class="sample-result" id="sample-result-print" style="font-size: 12pt;">
<!-- Comment -->
</tbody>
<!-- Note -->
</table>
<table id="footer" width="100%" border="0" style="margin-top:0px !important;">
<tbody>
<tr style="height:40px !important;"><td colspan="3">&nbsp;<br></td></tr>
<tr>
<td class="text-center text-no-wrap" style="width: 6.7cm"></td>
<td style="width: 6.3cm"></td>
<td class="text-center text-no-wrap" style="width: 6.7cm; font-size:15px">
{{__('sample.report_date')}} : {{date('d-M-Y H:i')}} </td>
</tr>
<tr class="result-footer-signature" id="def-signature">
<td class="text-center text-no-wrap" style="font-size:15px" valign="bottom">
{{__('sample.verify_by')}}
<br>
@if(!empty($labSettings->verify_label))
<img id="signature-preview" style="width: 200px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->verify_label)}}">
@else
<br>
<br>
@endif
</td>
<td class="text-center text-no-wrap">
</td>
<td class="text-center text-no-wrap" style="font-size:15px">
{{__('sample.lab_technician')}} <br>
@if(!empty(\App\Helpers\Helpers::getPrinterSignature($sample->id)))
<img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">
@else
<br>
<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>
@endif
</td>
</tr>
@if($labSettings->show_result_footer==1)
<tr>
<td colspan="3" id="footer_line" class="result-page-color" style="text-align:center; border-top:1px solid #000 !important; padding-top:0px; letter-spacing: -0.5px !important;">
<span style="line-height: 10px !important; font-size:12px">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} <br>
{{$labSettings->phone_number}} {{$labSettings->email}}</span><br>
</td>
</tr>
@endif
</tbody></table>
</page>
</div></div>
</div>
<script>
function printTest() {
@if($sample->is_printed==0)
printRecorder()
@endif
printJS({
printable: "presult-1",
type: "html"
});
setTimeout(function(){ window.location.href=sample_base_url }, 10000)
}
function changeLogoAndPrint(){
$('#dyn-logo, #def-logo').toggle();
$('#dyn-signature, #def-signature').toggle();
printJS({
printable: "presult-1",
type: "html"
});
setTimeout(function(){ window.location.href=sample_base_url }, 10000)
}
document.getElementById("doPrinting__").addEventListener("click", printTest)
@if(!empty($labSettings->alternative_logo))
document.getElementById("change_logo_print").addEventListener("click", changeLogoAndPrint);
@endif
</script>

View File

@@ -0,0 +1,543 @@
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
<div class="print-preview-header">
<div class="presult-pagination d-none">
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
<span class="page-count">1</span>
</div>
<ul>
<li style="display: inline-block;" class="approve" reverify="1">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i>&nbsp;<b> {{__('sample.btn_approve')}} </b></a>
@endif
</li>
<li style="display: inline-block;" class="print">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
<a href="javascript:void(0)" id="doPrinting__"><i class="fa fa-print"></i>&nbsp;<b>{{__('sample.btn_print')}}</b></a>
@endif
</li>
</ul>
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
</div>
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
<title>Result</title>
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
<style>
@font-face {
font-family: 'KhmerOS_muollight';
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
display:swap;
}
@php
$configures = collect($labConfigures);
$fontNameHeader = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
$fontSizeHeader = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
$resultColorHeader = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
$fontName = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT')->pluck('assigned_attribute_value')->first());
$fontSize = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT')->pluck('assigned_attribute_value')->first());
$resultColor = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT')->pluck('assigned_attribute_value')->first());
@endphp
@font-face {
font-family: 'result_font';
{{--src: url('{{url(env("APP_URL").'storage/assets/fonts/'.(empty($fontName) ? 'times_new_roman.ttf':$fontName))}}');--}}
{{--display:swap;--}}
}
@font-face {
font-family: 'label_header_font';
{{--src: url('{{url(env("APP_URL").'storage/assets/fonts/'.(empty($fontNameHeader) ? 'times_new_roman.ttf':$fontNameHeader))}}');--}}
{{--display:swap;--}}
}
.result-page-color{
color: {{empty($resultColor) ? '#0000ff' : $resultColor}};
}
.header-label-title-color{
color: {{empty($resultColorHeader) ? '#0000ff' : $resultColorHeader}};
}
.header-label-font{
font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}';
}
.result-font, .name{
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
}
.result-font-size{
font-size: {{empty($fontSize) ? '13pt' : $fontSize}};
}
.KhmerOS {
font-family: 'SourceSerifPro-Regular', 'KhmerOS', 'serif';
}
.KhmerMoulLight {
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
}
.tacteng {
font-family: Tacteng !important;
}
.sourceserifpro-bold {
/*font-family: 'result_font';*/
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
font-weight: bold;
}
/*body {
background: rgb(204, 204, 204);
}*/
page[size="A4"] {
background: white;
width: 21cm;
display: block;
margin: 10px auto;
margin-left: 0cm !important;
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
padding: 0cm 1cm 1cm 1cm;
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
font-size: 12pt;
line-height: 23px;
page-break-after: always;
}
page[size="A4"], th, td {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
page[size="A4"] table {
/*border-spacing: 2px !important;*/
/*border-collapse: separate !important;*/
}
table th, table td {
text-align: left;
}
table td {
font-weight: normal;
}
table.patient-info, table.department-sample-info {
border: 1px solid #7a7a7a;
line-height: 18px;
padding: 3px;
}
table.patient-info td, table.patient-info th {
vertical-align: top;
}
table.department-sample-info {
background-color: #ebebeb;
}
table.test-result {
font-family: 'SourceSerifPro-Regular', 'serif';
}
table.test-result tr th {
border-bottom: 1px solid black;
}
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
padding-right: .2cm;
}
table.test-result tr:first-child + tr td {
padding-top: 5px;
}
p.value-pair {
position: relative;
width: 100%;
margin: 0;
}
p.value-pair:before {
content: '';
display: block;
position: absolute;
width: 100%;
bottom: .25rem;
height: 0;
line-height: 0;
border-bottom: 2px dotted #858585;
}
p.value-pair .name {
background: white;
z-index: 1;
position: relative;
padding-right: 5px;
}
p.value-pair .value {
background: white;
z-index: 1;
right: 0;
position: absolute;
padding-left: 5px;
font-weight: bold;
}
.out-of-range {
font-family: 'SourceSerifPro-Bold', 'serif';
font-weight: bold;
font-size: 12pt;
}
.text-center {
text-align: center;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-top {
vertical-align: top;
}
.text-bottom {
vertical-align: bottom;
}
.text-middle {
vertical-align: middle;
}
.text-bold {
font-weight: bold;
}
.text-no-wrap {
white-space: nowrap;
}
table.test-result {
line-height: 16px;
}
#footer {
line-height: 17px;
}
#footer .laboratory-address td {
border-top: 1px solid black;
padding-top: 10px;
}
#footer .result-footer-signature td {
vertical-align: top;
padding-bottom: 0px;
}
@page {
margin: 1cm 1cm 0;
}
@media print {
@page {
margin-top: 1cm;
margin-left: 0.2cm !important;
margin-bottom: 0
}
/*@page:first {*/
/* margin-top: 0.5cm !important;*/
/*}*/
body,
page[size="A4"] {
margin-left: 0cm !important;
padding-right: 0cm !important;
box-shadow: none;
background-color: transparent;
}
body .sample-result .sample-type{
page-break-inside: avoid;
}
#footer {
display: block;
position: fixed;
bottom: 0;
/*margin-top: 500px !important;*/
padding-bottom: 0px !important;
}
#footer .result-footer-signature td {
vertical-align: top;
padding-bottom: 0px;
}
table .tname{
width:360px !important;
}
}
table .tname{
width:360px !important;
}
/*table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
width:390px !important;
}*/
#print_invoice_modal .table-inv th, .table-inv td {
/*border: 1px solid black;*/
/*border-collapse: collapse;*/
}
.abnormal{
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
color: {{$labSettings->abnormal_text_color}} !important;
}
.patient-info{
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Time New Roman' : 'label_header_font' ): 'Khmer OS Siemreap')}}";
font-size: {{empty($fontSizeHeader) ? '13pt' : $fontSizeHeader}};
}
#footer{
font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";
}
</style>
<input type="hidden" name="verify" id="verify" value="">
<page size="A4">
<table border="0" width="100%">
<thead>
<tr>
<th style="width:100%" class="text-center">
@if(!empty($samplePhysician->logo))
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" style="max-height:130px !important;" />
@else
<table width="100%">
<tr>
<td style="width:120px; vertical-align: top;" class="text-center">
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
</td>
<td class="text-center">
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff; font-family: 'Times New Roman';" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
</td>
<td style="width:120px" >&nbsp;</td>
</tr>
</table>
@endif
</th>
</tr>
<tr>
<td class="text-top text-center" style="padding-top:0" valign="top">
<div style="font-size: 13.5pt; text-transform: uppercase; font-weight: bold;" class="header-label-title-color header-label-font">{{__('sample.print_title')}}</div>
</td>
</tr>
<tr>
<th>
@if($labSettings->result_header_id==1)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td class="header-label-title-color" width="20%" style=" padding-top:1px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:1px; line-height:20px;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:1px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:1px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style="margin-left:30px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.table_sample_source')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{@$sample->sample_source->name_en}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:1px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="30%" style="padding-bottom:1px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-bottom:1px;line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="25%" style="padding-bottom:1px; line-height:20px;" align="left">: {{explode("-",$samplePhysician->name_en)[0]}}</td>
</tr>
</tbody>
</table>
@elseif($labSettings->result_header_id==2)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td class="header-label-title-color" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{@$samplePhysician->name_en}}</td>
</tr>
</tbody>
</table>
@elseif($labSettings->result_header_id==3)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td class="header-label-title-color" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
</tr>
<tr>
<td class="result-page-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
<td class="result-page-color" width="25%" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
</tr>
</tbody>
</table>
@else
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td class="header-label-title-color" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color" width="25%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} , <b class="header-label-title-color">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
<td class="header-label-title-color" width="25%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
</tr>
</tbody>
</table>
@endif
</th>
</tr>
</thead>
<tfoot>
<tr>
<td width="100%">
<table width="100%" border="0">
<tbody><tr>
<td colspan="4" style="height: 150px;">&nbsp;</td>
</tr>
</tbody></table>
</td>
</tr>
</tfoot>
<tbody class="sample-result" id="sample-result-print" style="font-size: 12pt;">
<!-- Comment -->
</tbody>
<!-- Note -->
</table>
<table id="footer" width="100%" border="0" style="margin-top:0px !important;">
<tbody>
<tr style="height:40px !important;"><td colspan="3">&nbsp;<br></td></tr>
<tr>
<td class="text-center text-no-wrap" style="width: 6.7cm"></td>
<td style="width: 6.3cm"></td>
<td class="text-center text-no-wrap" style="width: 6.7cm">
{{__('sample.report_date')}} : {{date('d-M-Y H:i', strtotime($sample->collected_date))}} </td>
</tr>
<tr class="result-footer-signature">
<td class="text-center text-no-wrap" valign="bottom">
{{__('sample.verify_by')}}
<br>
@if(!empty($labSettings->verify_label))
<img id="signature-preview" style="width: 200px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->verify_label)}}">
@else
<br>
@endif
</td>
<td class="text-center text-no-wrap">
</td>
<td class="text-center text-no-wrap">
{{__('sample.lab_technician')}} <br>
@if(!empty(\App\Helpers\Helpers::getPrinterSignature($sample->id)))
<img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">
@else
<br>
<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>
@endif
</td>
</tr>
@if($labSettings->show_result_footer==1)
<tr>
<td colspan="3" id="footer_line" class="result-page-color" style="text-align:center; border-top:1px solid #000 !important; padding-top:0px; letter-spacing: -0.5px !important;">
<span style="line-height: 20px !important;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </span><br>
<span style="line-height: 20px !important;">{{$labSettings->phone_number}} {{$labSettings->email}}</span><br>
</td>
</tr>
@endif
</tbody></table>
</page>
</div></div>
</div>
<script>
function printTest() {
printJS({
printable: "presult-1",
type: "html",
onPrintDialogClose: printJobComplete
});
// setTimeout(function(){ window.location.href=sample_base_url }, 10000)
}
function printJobComplete() {
}
document.getElementById("doPrinting__").addEventListener("click", printTest);
</script>

View File

@@ -0,0 +1,597 @@
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
<div class="print-preview-header">
<div class="presult-pagination d-none">
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
<span class="page-count">1</span>
</div>
<ul>
<li style="display: inline-block;" class="approve" reverify="1">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i>&nbsp;<b> {{__('sample.btn_approve')}} </b></a>
@endif
</li>
<li style="display: inline-block;" class="print">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
<a href="javascript:void(0)" id="doPrinting__"><i class="fa fa-print"></i>&nbsp;<b>{{__('sample.btn_print')}}</b></a>
@endif
</li>
<li style="display: inline-block;" class="print" title="Change Result Logo">
<a href="javascript:void(0)" id="change_logo_print"><i class="fa fa-picture-o"></i>&nbsp;<b>{{__('Pick Logo')}}</b></a>
</li>
<li style=" position: absolute; top: 0; right: 50px;">
<a href="{{url('sample/search?kword=&sample_date=today')}}"><b>{{__('sidebar.view_sample')}}</b></a>
</li>
</ul>
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
</div>
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
<title>Result</title>
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
<style>
@font-face {
font-family: 'KhmerOS_muollight';
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
display:swap;
}
@php
$configures = collect($labConfigures);
$fontNameHeader = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
$fontSizeHeader = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
$resultColorHeader = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
$fontName = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT')->pluck('assigned_attribute_value')->first());
$fontSize = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT')->pluck('assigned_attribute_value')->first());
$resultColor = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT')->pluck('assigned_attribute_value')->first());
@endphp
@font-face {
font-family: 'result_font';
/*src: url('{{url(env("APP_URL").'storage/assets/fonts/'.(empty($fontName) ? 'times_new_roman.ttf':$fontName))}}');*/
/*display:swap;*/
}
@font-face {
font-family: 'label_header_font';
/*src: url('{{url(env("APP_URL").'storage/assets/fonts/'.(empty($fontNameHeader) ? 'times_new_roman.ttf':$fontNameHeader))}}'); */
/*display:swap;*/
}
.result-page-color{
color: {{empty($resultColor) ? '#0000ff' : $resultColor}};
}
.patient-info tr td{
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
font-size:15px !important;
}
.header-label-title-color{
color: {{empty($resultColorHeader) ? '#0000ff' : $resultColorHeader}};
font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}';
}
.header-label-font{
/*font-family: 'label_header_font';*/
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}';*/
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
}
.result-font, .name{
/*font-family: "{{(empty($fontName) ? 'Time New Roman' : 'result_font')}}";*/
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
}
.result-font-size{
font-size: {{empty($fontSize) ? '13pt' : $fontSize}};
}
.KhmerOS {
font-family: 'SourceSerifPro-Regular', 'KhmerOS', 'serif';
}
.KhmerMoulLight {
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
}
.tacteng {
font-family: Tacteng !important;
}
.sourceserifpro-bold {
/*font-family: 'result_font';*/
/*font-family: "{{(empty($fontName) ? 'Time New Roman' : 'result_font')}}";*/
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
font-weight: bold;
}
/*body {
background: rgb(204, 204, 204);
}*/
page[size="A4"] {
background: white;
width: 21cm;
display: block;
margin: 10px auto;
margin-left: 0cm !important;
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
padding: 0cm 1cm 1cm 1cm;
/*font-family: 'result_font';*/
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
font-size: 12pt;
line-height: 23px;
page-break-after: always;
}
page[size="A4"], th, td {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
page[size="A4"] table {
/*border-spacing: 2px !important;*/
/*border-collapse: separate !important;*/
}
table th, table td {
text-align: left;
}
table td {
font-weight: normal;
}
table.patient-info, table.department-sample-info {
border: 1px solid #7a7a7a;
line-height: 18px;
padding: 3px;
}
table.patient-info td, table.patient-info th {
vertical-align: top;
}
table.department-sample-info {
background-color: #ebebeb;
}
table.test-result {
font-family: 'SourceSerifPro-Regular', 'serif';
}
table.test-result tr th {
border-bottom: 1px solid black;
}
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
padding-right: .2cm;
}
table.test-result tr:first-child + tr td {
padding-top: 5px;
}
p.value-pair {
position: relative;
width: 100%;
margin: 0;
}
p.value-pair:before {
content: '';
display: block;
position: absolute;
width: 100%;
bottom: .25rem;
height: 0;
line-height: 0;
border-bottom: 2px dotted #858585;
}
p.value-pair .name {
background: white;
z-index: 1;
position: relative;
padding-right: 5px;
}
p.value-pair .value {
background: white;
z-index: 1;
right: 0;
position: absolute;
padding-left: 5px;
font-weight: bold;
}
.out-of-range {
font-family: 'SourceSerifPro-Bold', 'serif';
font-weight: bold;
font-size: 12pt;
}
.text-center {
text-align: center;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-top {
vertical-align: top;
}
.text-bottom {
vertical-align: bottom;
}
.text-middle {
vertical-align: middle;
}
.text-bold {
font-weight: bold;
}
.text-no-wrap {
white-space: nowrap;
}
table.test-result {
line-height: 16px;
}
#footer {
line-height: 17px;
}
#footer .laboratory-address td {
border-top: 1px solid black;
padding-top: 10px;
}
#footer .result-footer-signature td {
vertical-align: top;
padding-bottom: 0px;
}
@page {
margin: 1cm 1cm 0;
}
@media print {
@page {
margin-top: 1cm;
margin-left: 0.2cm !important;
margin-bottom: 0
}
/*@page:first {*/
/* margin-top: 0.5cm !important;*/
/*}*/
body,
page[size="A4"] {
margin-left: 0cm !important;
padding-right: 0cm !important;
box-shadow: none;
background-color: transparent;
}
body .sample-result .sample-type{
page-break-inside: avoid;
}
#footer {
display: block;
position: fixed;
bottom: 0;
/*margin-top: 500px !important;*/
padding-bottom: 0px !important;
}
#footer .result-footer-signature td {
vertical-align: top;
padding-bottom: 0px;
}
table .tname{
width:360px !important;
}
}
table .tname{
width:360px !important;
}
/*table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
width:390px !important;
}*/
#print_invoice_modal .table-inv th, .table-inv td {
/*border: 1px solid black;*/
/*border-collapse: collapse;*/
}
.abnormal{
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
color: {{$labSettings->abnormal_text_color}} !important;
font-size: {{empty($fontSize) ? '13pt' : $fontSize}};
}
.patient-info{
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Time New Roman' : 'label_header_font' ): 'Khmer OS Siemreap')}}";
font-size: {{empty($fontSizeHeader) ? '13pt' : $fontSizeHeader}};
}
#footer{
/*font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";*/
font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";
}
.font-changable-base-on-localize{
/*font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";*/
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
}
</style>
<input type="hidden" name="verify" id="verify" value="">
<page size="A4">
<table border="0" width="100%">
<thead>
<tr id="def-logo">
<th style="width:100%" class="text-center">
@if(!empty($samplePhysician->logo))
<img width="98%" height="140px" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
@else
<table width="100%">
<tr>
<td style="width:120px; vertical-align: top;" class="text-center">
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
</td>
<td class="text-center">
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff; font-family: 'Times New Roman';" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
</td>
<td style="width:120px" >&nbsp;</td>
</tr>
</table>
@endif
</th>
</tr>
<tr id="dyn-logo" style="display:none;">
<th style="width:100%" class="text-center">
<table width="100%">
<tr>
<td style="width:120px; vertical-align: top;" class="text-center">
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
</td>
<td class="text-center">
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff; font-family: 'Times New Roman';" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
</td>
<td style="width:120px" >&nbsp;</td>
</tr>
</table>
</th>
</tr>
<tr>
<td class="text-top text-center" style="padding-top:0" valign="top">
<div style="font-size: 13.5pt; text-transform: uppercase; font-weight: bold;" class="header-label-title-color header-label-font">{{__('sample.print_title')}}</div>
</td>
</tr>
<tr>
<th>
@if($labSettings->result_header_id==1)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style=" padding-top:1px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:1px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:1px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:1px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style="margin-left:30px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.table_sample_source')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{@$sample->sample_source->name_en}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:1px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="30%" style="padding-bottom:1px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-bottom:1px;line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="25%" style="padding-bottom:1px; line-height:20px;" align="left">: {{explode("-",@$samplePhysician->name_en)[0]}}</td>
</tr>
</tbody>
</table>
@elseif($labSettings->result_header_id==2)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
</tr>
</tbody>
</table>
@elseif($labSettings->result_header_id==3)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
</tr>
</tbody>
</table>
@else
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color" width="25%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} , <b class="header-label-title-color">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
<td class="header-label-title-color" width="25%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
</tr>
</tbody>
</table>
@endif
</th>
</tr>
</thead>
<tfoot>
<tr>
<td width="100%">
<table width="100%" border="0">
<tbody><tr>
<td colspan="4" style="height: 240px;">&nbsp;</td>
</tr>
</tbody></table>
</td>
</tr>
</tfoot>
<tbody class="sample-result" id="sample-result-print" style="font-size: 12pt;">
<!-- Comment -->
</tbody>
<!-- Note -->
</table>
<table id="footer" width="100%" border="0" style="margin-top:0px !important;">
<tbody>
<tr style="height:40px !important;"><td colspan="3">&nbsp;<br></td></tr>
<tr>
<td class="text-center text-no-wrap" style="width: 6.7cm"></td>
<td style="width: 6.3cm"></td>
<td class="text-center text-no-wrap" style="width: 6.7cm">
{{__('sample.report_date')}} : {{date('d-M-Y H:i')}} </td>
</tr>
<tr class="result-footer-signature">
<td class="text-center text-no-wrap" valign="bottom">
{{__('sample.verify_by')}}
<br>
@if(!empty($labSettings->verify_label))
<img id="signature-preview" style="width: 200px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->verify_label)}}">
@else
<br>
@endif
</td>
<td class="text-center text-no-wrap">
</td>
<td class="text-center text-no-wrap">
{{__('sample.lab_technician')}} <br>
@if(!empty(\App\Helpers\Helpers::getPrinterSignature($sample->id)))
<img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">
@else
<br>
<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>
@endif
</td>
</tr>
@if($labSettings->show_result_footer==1)
<tr>
<td colspan="3" id="footer_line" class="result-page-color" style="text-align:center; border-top:1px solid #000 !important; padding-top:0px; letter-spacing: -0.5px !important;">
<span style="line-height: 20px !important;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </span><br>
<span style="line-height: 20px !important;">{{$labSettings->phone_number}} {{$labSettings->email}}</span><br>
</td>
</tr>
@endif
</tbody></table>
</page>
</div></div>
</div>
<script>
function printTest() {
@if($sample->is_printed==0)
printRecorder()
@endif
printJS({
printable: "presult-1",
type: "html"
});
setTimeout(function(){ window.location.href=sample_base_url }, 10000)
}
function changeLogoAndPrint(){
$('#dyn-logo, #def-logo').toggle();
printJS({
printable: "presult-1",
type: "html"
});
setTimeout(function(){ window.location.href=sample_base_url }, 10000)
}
document.getElementById("doPrinting__").addEventListener("click", printTest);
document.getElementById("change_logo_print").addEventListener("click", changeLogoAndPrint);
</script>

View File

@@ -0,0 +1,758 @@
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
<div class="print-preview-header">
<div class="presult-pagination d-none">
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
<span class="page-count">1</span>
</div>
<ul>
<li style="display: inline-block;" class="approve" reverify="1">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i>&nbsp;<b> {{__('sample.btn_approve')}} </b></a>
@endif
</li>
<li style="display: inline-block;" class="print">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
<a href="javascript:void(0)" id="doPrinting__"><i class="fa fa-print"></i>&nbsp;<b>{{__('sample.btn_print')}}</b></a>
@endif
</li>
@if(!empty($labSettings->alternative_logo))
<li style="display: inline-block;" class="print" title="Print with alternative logo">
<a href="javascript:void(0)" id="change_logo_print"><i class="fa fa-print"></i>&nbsp;<b>{{__('Print Alt-Logo')}}</b></a>
</li>
@endif
@if(!empty($sample->patient->telegramChatId) && Auth::id()==1)
<li style="display: inline-block;" class="print_" title="Share results through patient's telegram">
<a href="javascript:void(0)" id="send_lab_result"><i class="fa fa-send"></i>&nbsp;<b>{{__('Share Results')}}</b></a>
</li>
@endif
<li style=" position: absolute; top: 0; right: 50px;">
<a href="{{url('sample/search?kword=&sample_date=today')}}"><b>{{__('sidebar.view_sample')}}</b></a>
</li>
</ul>
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
</div>
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
<title>Result</title>
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
{{--<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/lightgallery/preview_result.css')}}">--}}
<style>
@font-face {
font-family: 'KhmerOS_muollight';
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
display:swap;
}
@php
$configures = collect($labConfigures);
$fontNameHeader = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
$fontSizeHeader = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
$resultColorHeader = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
$fontName = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT')->pluck('assigned_attribute_value')->first());
$fontSize = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT')->pluck('assigned_attribute_value')->first());
$resultColor = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT')->pluck('assigned_attribute_value')->first());
$lineHeight = ($configures->where('atrribute_code', 'LINE_HEIGHT_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
@endphp
@if(!empty($lineHeight))
p{
line-height 0 !important;
}
._department-sample-info tr
,.line-height_{
line-height: {{$lineHeight}} !important;
}
@endif
@font-face {
font-family: 'result_font';
/*src: url('{{url(env("APP_URL").'storage/assets/fonts/'.(empty($fontName) ? 'times_new_roman.ttf':$fontName))}}');*/
/*display:swap;*/
}
@font-face {
font-family: 'label_header_font';
/*src: url('{{url(env("APP_URL").'storage/assets/fonts/'.(empty($fontNameHeader) ? 'times_new_roman.ttf':$fontNameHeader))}}'); */
/*display:swap;*/
}
.result-page-color{
color: {{empty($resultColor) ? '#0000ff' : $resultColor}};
}
.patient-info tr td{
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
font-size:15px !important;
}
.header-label-title-color{
color: {{empty($resultColorHeader) ? '#0000ff' : $resultColorHeader}};
font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}';
}
.header-label-font{
/*font-family: 'label_header_font';*/
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}';*/
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
}
.result-font, .name{
/*font-family: "{{(empty($fontName) ? 'Time New Roman' : 'result_font')}}";*/
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
}
._department-sample-info tr td{
padding-top: 0px !important;
padding-bottom: 0px !important;
}
.result-font-size{
font-size: {{empty($fontSize) ? '12pt' : $fontSize}};
}
.KhmerOS {
font-family: 'SourceSerifPro-Regular', 'KhmerOS', 'serif';
}
.KhmerMoulLight {
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
}
.tacteng {
font-family: Tacteng !important;
}
.sourceserifpro-bold {
/*font-family: 'result_font';*/
/*font-family: "{{(empty($fontName) ? 'Time New Roman' : 'result_font')}}";*/
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
font-weight: bold;
}
/*body {
background: rgb(204, 204, 204);
}*/
page[size="A4"] {
background: white;
width: 21cm;
display: block;
margin: 10px auto;
margin-left: 0cm !important;
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
padding: 0cm 1cm 1cm 1cm;
/*font-family: 'result_font';*/
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
font-size: 12pt;
line-height: 23px;
page-break-after: always;
}
page[size="A4"], th, td {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
page[size="A4"] table {
/*border-spacing: 2px !important;*/
/*border-collapse: separate !important;*/
}
table th, table td {
text-align: left;
}
table td {
font-weight: normal;
}
table.patient-info, table.department-sample-info {
border: 1px solid #7a7a7a;
line-height: 18px;
padding: 3px;
}
table.patient-info td, table.patient-info th {
vertical-align: top;
}
table.department-sample-info {
background-color: #ebebeb;
}
table.test-result {
font-family: 'SourceSerifPro-Regular', 'serif';
}
table.test-result tr th {
border-bottom: 1px solid black;
}
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
padding-right: .2cm;
}
table.test-result tr:first-child + tr td {
padding-top: 5px;
}
p.value-pair {
position: relative;
width: 100%;
margin: 0;
}
p.value-pair:before {
content: '';
display: block;
position: absolute;
width: 100%;
bottom: .25rem;
height: 0;
line-height: 0;
border-bottom: 2px dotted #858585;
}
p.value-pair .name {
background: white;
z-index: 1;
position: relative;
padding-right: 5px;
}
p.value-pair .value {
background: white;
z-index: 1;
right: 0;
position: absolute;
padding-left: 5px;
font-weight: bold;
}
.out-of-range {
font-family: 'SourceSerifPro-Bold', 'serif';
font-weight: bold;
font-size: 12pt;
}
.text-center {
text-align: center;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-top {
vertical-align: top;
}
.text-bottom {
vertical-align: bottom;
}
.text-middle {
vertical-align: middle;
}
.text-bold {
font-weight: bold;
}
.text-no-wrap {
white-space: nowrap;
}
table.test-result {
line-height: 16px;
}
#footer {
line-height: 17px;
}
#footer .laboratory-address td {
border-top: 1px solid black;
padding-top: 10px;
}
#footer .result-footer-signature td {
vertical-align: top;
padding-bottom: 0px;
}
@page {
margin: 1cm 1cm 0;
}
@media print {
@page {
margin-top: 1cm;
margin-left: 0.2cm !important;
margin-bottom: 0cm;
}
body,
page[size="A4"] {
margin-left: 0cm !important;
padding-right: 0cm !important;
box-shadow: none;
background-color: transparent;
}
body .sample-result .sample-type{
page-break-inside: avoid;
}
#footer {
display: block;
position: fixed;
bottom: 0px;
padding-bottom: 0px !important;
}
#footer .result-footer-signature td {
vertical-align: top;
padding-bottom: 0px;
}
@if(Auth::id()==1)
#footer .page{
counter-increment:listCounter;
}
#footer .page:after{
content: counter(listCounter);
}
@endif
table .tname{
width:360px !important;
}
}
table .tname{
width:360px !important;
}
/*table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
width:390px !important;
}*/
#print_invoice_modal .table-inv th, .table-inv td {
/*border: 1px solid black;*/
/*border-collapse: collapse;*/
}
.abnormal{
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
color: {{$labSettings->abnormal_text_color}} !important;
font-size: {{empty($fontSize) ? '13pt' : $fontSize}};
}
.patient-info{
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Time New Roman' : 'label_header_font' ): 'Khmer OS Siemreap')}}";
font-size: {{empty($fontSizeHeader) ? '13pt' : $fontSizeHeader}};
}
#footer{
font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";
}
.font-changable-base-on-localize{
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
}
</style>
<input type="hidden" name="verify" id="verify" value="">
<page size="A4">
<table border="0" width="100%">
<thead>
<tr id="def-logo">
<th style="width:100%" class="text-center">
@if(!empty($samplePhysician->logo))
<img width="98%" height="140px" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
@else
<table width="100%">
<tr>
<td style="width:120px; vertical-align: top;" class="text-center">
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
</td>
<td class="text-center">
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff; font-family: 'Times New Roman';" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
</td>
<td style="width:120px" >&nbsp;</td>
</tr>
</table>
@endif
</th>
</tr>
<tr id="dyn-logo" style="display:none;">
<th style="width:100%" class="text-center">
@if(!empty($labSettings->alternative_logo))
<img width="98%" height="140px" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/avatars/labs/alternative_logo/'.$labSettings->alternative_logo) }}" />
@endif
</th>
<tr>
<td class="text-top text-center">
<div class="KhmerMoulLight_" style="font-size: 13.5pt; text-transform: uppercase; color: #0000ff; font-weight: bold;">{{__('sample.print_title')}}</div>
</td>
</tr>
<tr>
<th>
@if($labSettings->result_header_id==1)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style=" padding-top:1px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:1px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:1px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:1px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style="margin-left:30px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.table_sample_source')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{@$sample->sample_source->name_en}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:1px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="30%" style="padding-bottom:1px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-bottom:1px;line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="25%" style="padding-bottom:1px; line-height:20px;" align="left">: {{explode("-",@$samplePhysician->name_en)[0]}}</td>
</tr>
</tbody>
</table>
@elseif($labSettings->result_header_id==2)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
</tr>
</tbody>
</table>
@elseif($labSettings->result_header_id==3)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
<td width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
</tr>
<tr>
<td width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
<td width="25%" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.request_by')}}</td>
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
</tr>
</tbody>
</table>
@elseif($labSettings->result_header_id==4)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color" width="25%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} , <b class="header-label-title-color">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
<td class="header-label-title-color" width="25%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.table_sample_source')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{@$sample->sample_source->name_en}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
</tbody>
</table>
@elseif($labSettings->result_header_id==5)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_code')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->patient->patient_uuid}}</td>
</tr>
<tr>
<td width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
<td width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
</tr>
<tr>
<td width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
<td width="25%" rowspan="2" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.request_by')}}</td>
<td width="25%" rowspan="2" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
</tr>
<tr>
<td width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
</tbody>
</table>
@elseif($labSettings->result_header_id==6)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color" width="25%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} , <b class="header-label-title-color">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
<td class="header-label-title-color" width="25%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
</tr>
</tbody>
</table>
@else
<table width="100%" style="border-collapse: collapse;border-top: 2px solid #000000;border-bottom: 2px solid #000000;">
<tbody>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" width="13%" style="padding-top:2px; line-height:20px;">{{__('ឈ្មោះ/Name')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" width="19%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color font-changable-base-on-localize" width="15%" style="line-height:20px;">{{__('អាយុ/Age')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" width="21%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}}</td>
<td class="header-label-title-color font-changable-base-on-localize" width="13%" style="line-height:20px;">{{__('ភេទ/Sex')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="line-height:20px;" align="left">: {{$sample->patient->gender==1 ? 'Male':'Female'}}</td>
</tr>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" style="line-height:20px;">{{__('Patient ID')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="line-height:20px;" align="left">: {{$sample->patient->patient_uuid}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-top:2px; line-height:20px;">{{__('Lab ID')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('ទូរស័ព្ទ/Phone')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
</tr>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('Requested By')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('Requested Date')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('Analysis Date')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;" align="left">: {{date('d-M-Y H:i');}}</td>
</tr>
</tbody>
</table>
@endif
</th>
</tr>
</thead>
<tfoot>
<tr>
<td width="100%">
<table width="100%" border="0">
<tbody><tr>
<td colspan="4" style="height: 240px;">&nbsp;</td>
</tr>
</tbody></table>
</td>
</tr>
</tfoot>
<tbody class="sample-result" id="sample-result-print" style="font-size: 11pt;">
<!-- Comment -->
</tbody>
<!-- Note -->
</table>
<table id="footer" width="100%" border="0" style="margin-top:0px !important;">
<tbody>
<tr style="height:40px !important;">&nbsp;<br><td colspan="3"></td></tr>
<tr>
<td class="text-center text-no-wrap" style="width: 6.3cm">
</td>
<td style="width: 6.3cm"></td>
<td class="text-center text-no-wrap" style="width: 6.3cm">
{{__('sample.report_date')}} : {{date('d-M-Y H:i')}} </td>
</tr>
<tr class="result-footer-signature" id="def-signature">
<td class="text-center text-no-wrap" style="font-size:15px" valign="bottom">
{{__('sample.verify_by')}}
<br>
@if(!empty($labSettings->verify_label))
<img id="signature-preview" style="width: 200px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->verify_label)}}">
@else
<br>
@endif
</td>
<td class="text-center text-no-wrap">
</td>
<td class="text-center text-no-wrap" style="font-size:15px">
{{__('sample.lab_technician')}} <br>
@if(!empty(\App\Helpers\Helpers::getPrinterSignature($sample->id)))
<img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">
@else
<br>
<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>
@endif
<span class="page" style="position:fixed; bottom:12px; right: 10px; font-weight:bold;"></span>
</td>
</tr>
<tr class="result-footer-signature" id="dyn-signature" style="display:none;">
<td class="text-center text-no-wrap" style="font-size:15px" valign="bottom">
{{__('sample.verify_by')}} .
<br>
@if(!empty($labSettings->alter_verify_sign))
<img style="width: 200px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->alter_verify_sign)}}">
@else
<br>
@endif
</td>
<td class="text-center text-no-wrap">
</td>
<td class="text-center text-no-wrap" style="font-size:15px">
{{__('sample.lab_technician')}} .<br>
@if(!empty($labSettings->alter_labtech_sign))
<!--<img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">-->
<img style="width: 200px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->alter_labtech_sign)}}">
@else
<br>
<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>
@endif
<span class="page" style="position:fixed; bottom:12px; right: 10px; font-weight:bold;"></span>
</td>
</tr>
@if($labSettings->show_result_footer==1)
<tr>
<td colspan="3" id="footer_line" class="result-page-color" style="text-align:center; border-top:1px solid #000 !important; padding-top:0px; letter-spacing: -0.5px !important;">
@if($sample->lab_id!=22)
<span style="line-height: 10px !important; font-size:12px">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} <br>
{{$labSettings->phone_number}} {{$labSettings->email}}</span><br>
@endif
</td>
</tr>
@endif
</tbody></table>
</page>
</div></div>
<button class="previous d-none"><i class="fa fa-chevron-left"></i></button>
<button class="next d-none"><i class="fa fa-chevron-right"></i></button>
</div>
<script>
function printTest() {
@if($sample->is_printed==0)
printRecorder()
@endif
printJS({
printable: "presult-1",
type: "html"
});
setTimeout(function(){ window.location.href=sample_base_url }, 10000)
}
function changeLogoAndPrint(){
$('#dyn-logo, #def-logo').toggle();
$('#dyn-signature, #def-signature').toggle();
printJS({
printable: "presult-1",
type: "html"
});
setTimeout(function(){ window.location.href=sample_base_url }, 10000)
}
document.getElementById("doPrinting__").addEventListener("click", printTest)
@if(!empty($labSettings->alternative_logo))
document.getElementById("change_logo_print").addEventListener("click", changeLogoAndPrint);
@endif
</script>

View File

@@ -0,0 +1,445 @@
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
<div class="print-preview-header">
<div class="presult-pagination d-none">
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
<span class="page-count">1</span>
</div>
<ul>
<li style="display: inline-block;" class="approve" reverify="1">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i>&nbsp;<b> {{__('sample.btn_approve')}} </b></a>
@endif
</li>
<li style="display: inline-block;" class="print">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html'); {{$sample->is_printed==0? 'printRecorder()':''}}" id="doPrinting"><i class="fa fa-print"></i>&nbsp;<b>{{__('sample.btn_print')}}</b></a>
@endif
</li>
</ul>
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
</div>
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
<title>Result</title>
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
<style>
@font-face {
font-family: 'KhmerOS_muollight';
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
display:swap;
}
.KhmerOS {
font-family: 'SourceSerifPro-Regular', 'KhmerOS', 'serif';
}
.KhmerMoulLight {
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
}
.tacteng {
font-family: Tacteng !important;
}
.sourceserifpro-bold {
font-family: 'SourceSerifPro-Bold', 'serif';
}
/*body {
background: rgb(204, 204, 204);
}*/
page[size="A4"] {
background: white;
width: 21cm;
display: block;
margin: 10px auto;
margin-left: 0.5cm !important;
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
padding: 1cm;
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';
font-size: 12pt;
line-height: 23px;
page-break-after: always;
}
page[size="A4"], th, td {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
page[size="A4"] table {
border-spacing: 2px !important;
border-collapse: separate !important;
}
table th, table td {
text-align: left;
}
table td {
font-weight: normal;
}
table.patient-info, table.department-sample-info {
border: 1px solid #7a7a7a;
line-height: 18px;
padding: 3px;
}
table.patient-info td, table.patient-info th {
vertical-align: top;
}
table.department-sample-info {
background-color: #ebebeb;
}
table.test-result {
font-family: 'SourceSerifPro-Regular', 'serif';
}
table.test-result tr th {
border-bottom: 1px solid black;
}
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
padding-right: .2cm;
}
table.test-result tr:first-child + tr td {
padding-top: 5px;
}
p.value-pair {
position: relative;
width: 100%;
margin: 0;
}
p.value-pair:before {
content: '';
display: block;
position: absolute;
width: 100%;
bottom: .25rem;
height: 0;
line-height: 0;
border-bottom: 2px dotted #858585;
}
p.value-pair .name {
background: white;
z-index: 1;
position: relative;
padding-right: 5px;
}
p.value-pair .value {
background: white;
z-index: 1;
right: 0;
position: absolute;
padding-left: 5px;
font-weight: bold;
}
.out-of-range {
font-family: 'SourceSerifPro-Bold', 'serif';
font-weight: bold;
font-size: 12pt;
}
.text-center {
text-align: center;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-top {
vertical-align: top;
}
.text-bottom {
vertical-align: bottom;
}
.text-middle {
vertical-align: middle;
}
.text-bold {
font-weight: bold;
}
.text-no-wrap {
white-space: nowrap;
}
table.test-result {
line-height: 16px;
}
#footer {
line-height: 17px;
}
#footer .laboratory-address td {
border-top: 1px solid black;
padding-top: 10px;
}
#footer .result-footer-signature td {
vertical-align: top;
padding-bottom: 0px;
}
@page {
margin: 1cm 1cm 0;
}
@media print {
@page {
margin-top: 0.5cm;
margin-left: 0.5cm !important;
}
body,
page[size="A4"] {
margin-left: 0.1cm !important;
padding-right: 0.8cm !important;
box-shadow: none;
background-color: transparent;
}
/*@page {
margin: 1cm;
margin-left: 0.5cm !important;
}
body,
page[size="A4"] {
margin: 0;
margin-left: 0.5cm !important;
padding: 0;
box-shadow: none;
background-color: transparent;
}
*/
/*tbody .sample-result {
page-break-inside: avoid;
}*/
body .sample-result .sample-type{
page-break-inside: avoid;
}
#footer {
display: block;
position: fixed;
bottom: 0;
/*margin-top: 500px !important;*/
padding-bottom: 0px !important;
}
#footer .result-footer-signature td {
vertical-align: top;
padding-bottom: 0px;
}
/* table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
width:390px !important;
}*/
table .tname{
width:360px !important;
}
}
table .tname{
width:360px !important;
}
/*table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
width:390px !important;
}*/
#print_invoice_modal .table-inv th, .table-inv td {
border: 1px solid black;
border-collapse: collapse;
}
.abnormal{
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
color: {{$labSettings->abnormal_text_color}} !important;
}
.patient-info, #footer{
font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";
}
</style>
<page size="A4">
<table border="0" width="100%" style="font-size:11.5pt !important;">
<thead>
<tr>
<th style="width:100%" class="text-center">
@if(!empty($samplePhysician->logo))
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
@else
<table width="100%">
<tr>
<td style="width:120px; vertical-align: top;" class="text-center">
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
</td>
<td class="text-center">
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
</td>
<td style="width:120px" >&nbsp;</td>
</tr>
</table>
@endif
</th>
</tr>
<tr>
<td class="text-top text-center">
<div class="KhmerMoulLight_" style="font-size: 13.5pt; text-transform: uppercase; color: #0000ff; font-weight: bold;">{{__('sample.print_title')}}</div>
</td>
</tr>
<tr>
<th>
@if($labSettings->result_header_id==1)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td width="20%" style="font-size:17px !important; padding-top:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="font-size:17px !important; padding-top:1px; line-height:20px;" align="left">: {{$sample->patient->name_en}}</td>
<td width="25%" style="padding-left:0.7cm; padding-top:1px; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="font-size:17px !important; padding-top:1px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td width="20%" style="font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="font-size:17px !important; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b style="color: #0000ff; margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
<td width="25%" style="padding-left:0.7cm; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.table_sample_source')}}</td>
<td width="25%" style="font-size:17px !important; line-height:20px;" align="left">: {{$sample->sample_source->name_en}}</td>
</tr>
<tr>
<td width="20%" style="font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('patient.table_phon')}}</td>
<td width="30%" style="font-size:17px !important; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
<td width="25%" style="padding-left:0.7cm; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="25%" style="font-size:17px !important; line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
</tr>
<tr>
<td width="20%" style="font-size:17px !important; padding-bottom:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="30%" style="font-size:17px !important; padding-bottom:1px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
<td width="25%" style="padding-left:0.7cm; padding-bottom:1px; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="25%" style="font-size:17px !important; padding-bottom:1px; line-height:20px;" align="left">: {{explode("-",$samplePhysician->name_en)[0]}}</td>
</tr>
</tbody>
</table>
@elseif($labSettings->result_header_id==2)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td width="20%" style="font-size:17px !important; padding-top:2px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="font-size:17px !important; padding-top:2px; line-height:20px;" align="left">: {{$sample->patient->name_en}}</td>
<td width="25%" style="padding-left:0.7cm; padding-top:2px; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="font-size:17px !important; padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td width="20%" style="font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="font-size:17px !important; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b style="color: #0000ff; margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
<td width="25%" style="padding-left:0.7cm; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="25%" style="font-size:17px !important; line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
</tr>
<tr>
<td width="20%" style="font-size:17px !important; padding-bottom:2px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="30%" style="font-size:17px !important; padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
<td width="25%" style="padding-left:0.7cm; padding-bottom:2px; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="25%" style="font-size:17px !important; padding-bottom:2px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
</tr>
</tbody>
</table>
@else
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td width="20%" style="font-size:17px !important; padding-top:2px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="font-size:17px !important; padding-top:2px; line-height:20px;" align="left">: {{$sample->patient->name_en}}</td>
<td width="25%" style="font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="25%" style="font-size:17px !important; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} , <b style="color: #0000ff;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
</tr>
<tr>
<td width="20%" style="font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="30%" style="font-size:17px !important; line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
<td width="25%" style="padding-top:2px; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="font-size:17px !important; padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td width="20%" style="padding-bottom:2px; font-size:17px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="30%" style="font-size:17px !important; padding-bottom:2px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
<td width="25%" style="font-size:17px !important; padding-bottom:2px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="25%" style="font-size:17px !important; padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
</tr>
</tbody>
</table>
@endif
</th>
</tr>
</thead>
<tfoot>
<tr>
<td width="100%">
<table width="100%" border="0">
<tbody><tr>
<td colspan="4" style="height: 240px;">&nbsp;</td>
</tr>
</tbody></table>
</td>
</tr>
</tfoot>
<tbody class="sample-result" id="sample-result-print" style="font-size: 12pt;">
<!-- Comment -->
</tbody>
<!-- Note -->
</table>
<table id="footer" width="100%" border="0" style="margin-top:20px !important;">
<tbody>
<tr style="height:40px !important;">&nbsp;<br><td colspan="3"></td></tr>
<tr>
<td class="text-center text-no-wrap" style="width: 7cm">
</td>
<td style="width: 7cm"></td>
<td class="text-center text-no-wrap" style="width: 7cm">
{{__('Date Issue')}} : {{date('d-M-Y')}} </td>
</tr>
<tr class="result-footer-signature">
<td class="text-center text-no-wrap" valign="bottom">
</td>
<td class="text-center text-no-wrap"></td>
<td class="text-center text-no-wrap">
@if(!empty(Auth::user()->signature))
<img id="signature-preview" style="width: 240px !important;" src="{{url(env("APP_URL").'storage/images/signature/'.Auth::user()->signature)}}">
@endif
</td>
</tr>
</tbody></table>
</page>
</div></div>
<button class="previous d-none"><i class="fa fa-chevron-left"></i></button>
<button class="next d-none"><i class="fa fa-chevron-right"></i></button>
</div>

View File

@@ -0,0 +1,357 @@
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
<div class="print-preview-header">
<div class="presult-pagination d-none">
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
<span class="page-count">1</span>
</div>
<ul>
<li style="display: inline-block;" class="approve" reverify="1">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i>&nbsp;<b> {{__('sample.btn_approve')}} </b></a>
@endif
</li>
<li style="display: inline-block;" class="print">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html'); {{$sample->is_printed==0? 'printRecorder()':''}}" id="doPrinting"><i class="fa fa-print"></i>&nbsp;<b>{{__('sample.btn_print')}}</b></a>
@endif
</li>
</ul>
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
</div>
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
<title>Result</title>
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
<style>
page[size="A4"] {
background: white;
width: 21cm;
display: block;
margin: 10px auto;
margin-left: 0.5cm !important;
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
padding: 1cm;
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';
font-size: 11.5pt;
line-height: 23px;
page-break-after: always;
}
page[size="A4"], th, td {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
page[size="A4"] table {
border-spacing: 2px !important;
border-collapse: separate !important;
}
table th, table td {
text-align: left;
}
table td {
font-weight: normal;
}
table.patient-info, table.department-sample-info {
border: 1px solid #7a7a7a;
line-height: 18px;
padding: 3px;
}
table.patient-info td, table.patient-info th {
vertical-align: top;
}
table.department-sample-info {
background-color: #ebebeb;
}
table.test-result {
font-family: 'SourceSerifPro-Regular', 'serif';
}
table.test-result tr th {
border-bottom: 1px solid black;
}
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
padding-right: .2cm;
}
table.test-result tr:first-child + tr td {
padding-top: 5px;
}
p.value-pair {
position: relative;
width: 100%;
margin: 0;
}
p.value-pair:before {
content: '';
display: block;
position: absolute;
width: 100%;
bottom: .25rem;
height: 0;
line-height: 0;
border-bottom: 2px dotted #858585;
}
p.value-pair .name {
background: white;
z-index: 1;
position: relative;
padding-right: 5px;
}
p.value-pair .value {
background: white;
z-index: 1;
right: 0;
position: absolute;
padding-left: 5px;
font-weight: bold;
}
.out-of-range {
font-family: 'SourceSerifPro-Bold', 'serif';
font-weight: bold;
font-size: 12pt;
}
.text-center {
text-align: center;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-top {
vertical-align: top;
}
.text-bottom {
vertical-align: bottom;
}
.text-middle {
vertical-align: middle;
}
.text-bold {
font-weight: bold;
}
.text-no-wrap {
white-space: nowrap;
}
table.test-result {
line-height: 16px;
}
#footer {
line-height: 17px;
}
#footer .laboratory-address td {
border-top: 1px solid black;
padding-top: 10px;
}
#footer .result-footer-signature td {
vertical-align: top;
padding-bottom: 0px;
}
@page {
margin: 1cm 1cm 0;
}
@media print {
@page {
margin: 1cm;
margin-left: 0.5cm !important;
}
body,
page[size="A4"] {
margin: 0;
margin-left: 0.5cm !important;
padding: 0;
box-shadow: none;
background-color: transparent;
}
/*tbody .sample-result {
page-break-inside: avoid;
}*/
body .sample-result .sample-type{
page-break-inside: avoid;
}
#footer {
display: block;
position: fixed;
bottom: 0;
margin-top: 500px !important;
padding-bottom: 0px !important;
}
#footer .result-footer-signature td {
vertical-align: top;
padding-bottom: 0px;
}
/* table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
width:390px !important;
}*/
table .tname{
width:360px !important;
}
table td, table th{
font-family:"Verdana" !important;
font-size:11.5pt !important;
}
}
table td, table th{
font-family:"Verdana" !important;
font-size:11.5pt !important;
}
table .tname{
width:360px !important;
}
/*table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
width:390px !important;
}*/
#print_invoice_modal .table-inv th, .table-inv td {
border: 1px solid black;
border-collapse: collapse;
}
.abnormal{
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
color: {{$labSettings->abnormal_text_color}} !important;
}
</style>
<page size="A4">
<table border="0" width="100%" style="font-size:11.5pt !important;">
<thead>
<tr>
<th style="width:100%" class="text-center">
@if(!empty($samplePhysician->logo))
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
@else
<table width="100%">
<tr>
<td style="width:120px; vertical-align: top;" class="text-center">
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
</td>
<td class="text-center">
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
</td>
<td style="width:120px" >&nbsp;</td>
</tr>
</table>
@endif
</th>
</tr>
<tr>
<th>
<table width="100%" border="0" class="patient-info_">
<tbody>
<tr>
<td width="50%" colspan="2" style="font-size:11.5pt !important; padding-top:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Date Receive')}}: <span style="color: #0a0302;">{{date('d-M-Y H:i',strtotime($sample->collected_date))}}</span></td>
<td width="50%" colspan="2" style="font-size:11.5pt !important; text-align: right; padding-top:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Patho N#')}}: <span style="color: #0a0302;">{{$sample->sample_number}}</span></td>
</tr>
<tr style="height: 5px !important;">
<td colspan="4" style="border-bottom: 2px solid #ccc;"></td>
</tr>
<tr>
<td width="20%" style="padding-bottom:1px; font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{('Physician')}}</td>
<td width="30%" style="font-size:11.5pt !important; padding-bottom:1px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
<td width="20%" style="font-size:11.5pt !important; padding-top:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="font-size:11.5pt !important; padding-top:1px; line-height:20px;" align="left">: {{$sample->patient->name_en}}</td>
</tr>
<tr>
<td width="20%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Telephone')}}</td>
<td width="30%" style="font-size:11.5pt !important; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
<td width="20%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="font-size:11.5pt !important; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}}</td>
</tr>
<tr>
<td width="20%" style="font-size:11.5pt !important; padding-bottom:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="30%" style="font-size:11.5pt !important; padding-bottom:1px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
<td width="20%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_gender')}}</td>
<td width="30%" style="font-size:11.5pt !important; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
</tr>
<tr>
<td width="20%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Email')}}</td>
<td width="30%" style="font-size:11.5pt !important; line-height:20px;" align="left">: #N/A</td>
<td width="20%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Other/Info')}}</td>
<td width="30%" style="font-size:11.5pt !important; line-height:20px;" align="left">: #N/A</td>
</tr>
<tr style="height: 5px !important;">
<td colspan="4" style="border-bottom: 2px solid #ccc;"></td>
</tr>
</tbody>
</table>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td width="100%">
<table width="100%" border="0">
<tbody><tr>
<td colspan="4" style="height: 240px;">&nbsp;</td>
</tr>
</tbody></table>
</td>
</tr>
</tfoot>
<tbody class="sample-result" id="sample-result-print" style="font-size: 12pt;">
<!-- Comment -->
</tbody>
<!-- Note -->
</table>
<table id="footer" width="100%" border="0" style="margin-top:20px !important;">
<tbody>
<tr style="height:40px !important;">&nbsp;<br><td colspan="3"></td></tr>
<tr>
<td class="text-center text-no-wrap" style="width: 7cm">
</td>
<td style="width: 7cm"></td>
<td class="text-center text-no-wrap" style="width: 7cm">
{{__('Date Issue')}} : {{date('d-M-Y')}} </td>
</tr>
<tr class="result-footer-signature">
<td class="text-center text-no-wrap" valign="bottom">
</td>
<td class="text-center text-no-wrap"></td>
<td class="text-center text-no-wrap">
@if(!empty(Auth::user()->signature))
<img id="signature-preview" style="width: 240px !important;" src="{{url(env("APP_URL").'storage/images/signature/'.Auth::user()->signature)}}">
@endif
</td>
</tr>
</tbody></table>
</page>
</div></div>
<button class="previous d-none"><i class="fa fa-chevron-left"></i></button>
<button class="next d-none"><i class="fa fa-chevron-right"></i></button>
</div>

View File

@@ -0,0 +1,801 @@
<div class="{{(request()->segment(1)!='shared' ? 'modal':'')}} fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
@if(request()->segment(1)!='shared')
<div class="print-preview-header">
<div class="presult-pagination d-none">
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
<span class="page-count">1</span>
</div>
<ul>
<li style="display: inline-block;" class="approve" reverify="1">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i>&nbsp;<b> {{__('sample.btn_approve')}} </b></a>
@endif
</li>
<li style="display: inline-block;" class="print">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
<a href="javascript:void(0)" id="doPrinting__"><i class="fa fa-print"></i>&nbsp;<b>{{__('sample.btn_print')}}</b></a>
@endif
</li>
@if(!empty($labSettings->alternative_logo))
<li style="display: inline-block;" class="print" title="Print with alternative logo">
<a href="javascript:void(0)" id="change_logo_print"><i class="fa fa-print"></i>&nbsp;<b>{{__('Print Alt-Logo')}}</b></a>
</li>
@endif
@if(!empty($sample->patient->telegramChatId) && $labSettings->telegrambot==1)
<li style="display: inline-block;" class="print_" title="Share this result through patient's telegram">
<a href="javascript:void(0)" id="send_lab_result_patient" target_receiver="patient"><i class="fa fa-send"></i>&nbsp;<b>{{__('Send to Patient')}}</b></a>
</li>
@endif
@if(!empty($sample->sample_source->telegramChatId) && $labSettings->telegrambot==1)
<li style="display: inline-block;" class="print_" title="Share this result through clinician's telegram">
<a href="javascript:void(0)" id="send_lab_result_clinician" target_receiver="clinician"><i class="fa fa-send"></i>&nbsp;<b>{{__('Send to Clinician')}}</b></a>
</li>
@endif
<li style=" position: absolute; top: 0; right: 50px;">
<a href="{{url('sample/search?kword=&sample_date=today')}}"><b>{{__('sidebar.view_sample')}}</b></a>
</li>
</ul>
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
</div>
@endif
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
<title>Result</title>
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
<style>
@font-face {
font-family: 'KhmerOS_muollight';
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
display:swap;
}
@php
$configures = collect($labConfigures);
$fontNameHeader = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
$fontSizeHeader = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
$resultColorHeader = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
$fontName = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT')->pluck('assigned_attribute_value')->first());
$fontSize = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT')->pluck('assigned_attribute_value')->first());
$resultColor = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT')->pluck('assigned_attribute_value')->first());
$lineHeight = ($configures->where('atrribute_code', 'LINE_HEIGHT_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
@endphp
@if(!empty($lineHeight))
p{
line-height 0 !important;
}
._department-sample-info tr
,.line-height_{
line-height: {{$lineHeight}} !important;
}
@endif
@font-face {
font-family: 'result_font';
}
@font-face {
font-family: 'label_header_font';
}
.result-page-color{
color: {{empty($resultColor) ? '#0000ff' : $resultColor}};
}
.patient-info tr td{
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
font-size:15px !important;
}
.header-label-title-color{
color: {{empty($resultColorHeader) ? '#0000ff' : $resultColorHeader}};
font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}';
}
.header-label-font{
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
}
.result-font, .name{
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
}
._department-sample-info tr td{
padding-top: 0px !important;
padding-bottom: 0px !important;
}
.result-font-size{
font-size: {{empty($fontSize) ? '13pt' : $fontSize}};
}
.KhmerOS {
font-family: 'SourceSerifPro-Regular', 'KhmerOS', 'serif';
}
.KhmerMoulLight {
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
}
.tacteng {
font-family: Tacteng !important;
}
.sourceserifpro-bold {
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
font-weight: bold;
}
page[size="A4"] {
background: white;
width: 21cm;
display: block;
margin: 10px auto;
{{(request()->segment(1)!='shared' ? 'margin-left: 0cm !important;':'')}}
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
padding: 0cm 1cm 1cm 1cm;
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
font-size: 12pt;
line-height: 23px;
page-break-after: always;
}
page[size="A4"], th, td {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
page[size="A4"] table {
border-spacing: 0px !important;
border-collapse: collapse !important;
}
table th, table td {
text-align: left;
}
table td {
font-weight: normal;
}
table.patient-info, table.department-sample-info {
border: 1.5px solid #1100ff;
line-height: 18px;
padding: 3px;
}
table.patient-info td, table.patient-info th {
vertical-align: top;
}
table.department-sample-info {
background-color: #ebebeb;
}
table.test-result {
font-family: 'SourceSerifPro-Regular', 'serif';
}
table.test-result tr th {
border-bottom: 1px solid black;
}
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
padding-right: .2cm;
}
table.test-result tr:first-child + tr td {
padding-top: 5px;
}
p.value-pair {
position: relative;
width: 100%;
margin: 0;
}
p.value-pair:before {
/*content: '';*/
content: none;
display: block;
position: absolute;
width: 100%;
bottom: .25rem;
height: 0;
line-height: 0;
border-bottom: 2px dotted #858585;
}
p.value-pair .name {
background: none;
z-index: 1;
position: relative;
padding-right: 5px;
}
p.value-pair .value {
background: white;
z-index: 1;
right: 0;
position: absolute;
padding-left: 5px;
font-weight: bold;
}
.out-of-range {
font-family: 'SourceSerifPro-Bold', 'serif';
font-weight: bold;
font-size: 12pt;
}
.text-center {
text-align: center;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-top {
vertical-align: top;
}
.text-bottom {
vertical-align: bottom;
}
.text-middle {
vertical-align: middle;
}
.text-bold {
font-weight: bold;
}
.text-no-wrap {
white-space: nowrap;
}
table.test-result {
line-height: 16px;
}
#footer {
line-height: 17px;
}
#footer .laboratory-address td {
border-top: 1px solid black;
padding-top: 10px;
}
#footer .result-footer-signature td {
vertical-align: top;
padding-bottom: 0px;
}
@page {
margin: 1cm 1cm 0;
}
@media print {
@page {
margin-top: 1cm;
margin-left: 0.2cm !important;
margin-bottom: 0cm;
@bottom-left {
content: content
}
}
body,
page[size="A4"] {
margin-left: 0cm !important;
padding-right: 0cm !important;
box-shadow: none;
background-color: transparent;
}
body .sample-result .sample-type{
page-break-inside: avoid;
}
#footer {
display: block;
position: fixed;
bottom: 0px;
padding-bottom: 0px !important;
}
#footer .result-footer-signature td {
vertical-align: top;
padding-bottom: 0px;
}
@if(Auth::id()==1)
#footer .page{
counter-increment:listCounter;
}
#footer .page:after{
content: counter(listCounter);
}
@endif
table .tname{
width:360px !important;
}
._department-sample-info tr td{
padding-top: 0px !important;
padding-bottom: 0px !important;
}
}
table .tname{
width:360px !important;
}
/*table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
width:390px !important;
}*/
#print_invoice_modal .table-inv th, .table-inv td {
/*border: 1px solid black;*/
/*border-collapse: collapse;*/
}
.abnormal{
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
color: {{$labSettings->abnormal_text_color}} !important;
font-size: {{empty($fontSize) ? '13pt' : $fontSize}};
}
.patient-info{
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Time New Roman' : 'label_header_font' ): 'Khmer OS Siemreap')}}";
font-size: {{empty($fontSizeHeader) ? '13pt' : $fontSizeHeader}};
}
#footer{
font-family: "{{(App::isLocale('en') ? 'result_font' : 'Khmer OS Siemreap')}}";
}
.font-changable-base-on-localize{
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
}
</style>
<input type="hidden" name="verify" id="verify" value="">
<page size="A4">
<table border="0" width="100%">
<thead>
@if(request()->segment(1)!='shared')
<tr id="def-logo">
<th style="width:100%" class="text-center">
@if(!empty($samplePhysician->logo))
<img width="98%" height="110px" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}?time={{time()}}" />
@else
<table width="100%">
<tr>
<td style="width:110px; vertical-align: top;" class="text-center">
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}?time={{time()}}" alt="Logo" style="width: 120px;">
</td>
<td class="text-center">
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff; font-family: 'Times New Roman';" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
</td>
<td style="width:110px" >&nbsp;</td>
</tr>
</table>
@endif
</th>
</tr>
@else
<tr id="def-logo">
<th style="width:100%" class="text-center">
@if(!empty($samplePhysician->logo))
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}?time={{time()}}" />
@else
@if(!empty($labSettings->alternative_logo))
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/avatars/labs/alternative_logo/'.$labSettings->alternative_logo) }}" />
@endif
@endif
</th>
</tr>
@endif
<tr id="dyn-logo" style="display:none;">
<th style="width:100%" class="text-center">
@if(!empty($labSettings->alternative_logo))
<img width="98%" height="110px" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/avatars/labs/alternative_logo/'.$labSettings->alternative_logo) }}" />
@endif
</th>
</tr>
<tr>
<th style="padding-bottom: 10px !important;">
@if($labSettings->result_header_id==1)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" width="15%" style=" padding-top:1px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="25%" style="padding-top:1px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color" width="15%" style="padding-left:0cm; padding-top:1px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:1px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="15%" style="line-height:17px; font-weight:bold;">{{__('sample.form_patient_agesex')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} ({{\App\Helpers\Helpers::getGenderfull($sample->patient->gender)}})</td>
<td class="header-label-title-color" width="15%" style="padding-left:0cm; line-height:20px; font-weight:bold;">{{__('sample.table_sample_source')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{@$sample->sample_source->name_en}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="15%" style="line-height:17px; font-weight:bold;">{{__('patient.table_phon')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
<td class="header-label-title-color" width="15%" style="padding-left:0cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="15%" style="padding-bottom:1px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="25%" style="padding-bottom:1px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
<td class="header-label-title-color" width="15%" style="padding-left:0cm; padding-bottom:1px;line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="25%" style="padding-bottom:1px; line-height:20px;" align="left">: {{explode("-",@$samplePhysician->name_en)[0]}}</td>
</tr>
</tbody>
</table>
@elseif($labSettings->result_header_id==2)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
</tr>
</tbody>
</table>
@elseif($labSettings->result_header_id==3)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
<td width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
</tr>
<tr>
<td width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
<td width="25%" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.request_by')}}</td>
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
</tr>
</tbody>
</table>
@elseif($labSettings->result_header_id==4)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color" width="25%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} , <b class="header-label-title-color">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
<td class="header-label-title-color" width="25%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.table_sample_source')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{@$sample->sample_source->name_en}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
</tbody>
</table>
@elseif($labSettings->result_header_id==5)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_code')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->patient->patient_uuid}}</td>
</tr>
<tr>
<td width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
<td width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
</tr>
<tr>
<td width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
<td width="25%" rowspan="2" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.request_by')}}</td>
<td width="25%" rowspan="2" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
</tr>
<tr>
<td width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
</tbody>
</table>
@elseif($labSettings->result_header_id==6)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color" width="25%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} , <b class="header-label-title-color">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
<td class="header-label-title-color" width="25%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
</tr>
</tbody>
</table>
@else
<table width="100%" style="border-collapse: collapse;border-top: 2px solid #000000;border-bottom: 2px solid #000000;">
<tbody>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" width="13%" style="padding-top:2px; line-height:20px;">{{__('ឈ្មោះ/Name')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" width="19%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color font-changable-base-on-localize" width="15%" style="line-height:20px;">{{__('អាយុ/Age')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" width="21%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}}</td>
<td class="header-label-title-color font-changable-base-on-localize" width="13%" style="line-height:20px;">{{__('ភេទ/Sex')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="line-height:20px;" align="left">: {{$sample->patient->gender==1 ? 'Male':'Female'}}</td>
</tr>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" style="line-height:20px;">{{__('Patient ID')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="line-height:20px;" align="left">: {{$sample->patient->patient_uuid}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-top:2px; line-height:20px;">{{__('Lab ID')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('ទូរស័ព្ទ/Phone')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
</tr>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('Requested By')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('Requested Date')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('Analysis Date')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;" align="left">: {{date('d-M-Y H:i');}}</td>
</tr>
</tbody>
</table>
@endif
</th>
</tr>
<tr>
<td bgcolor="#1100ff" class="text-top text-center" style="padding-top:0" valign="top">
<div style="color:white; font-size: 13.5pt; text-transform: uppercase; font-weight: bold;" class="header-label-title-color header-label-font">{{__('sample.print_title')}}</div>
</td>
</tr>
</thead>
<tfoot>
<tr>
<td width="100%">
<table width="100%" border="0">
<tbody><tr>
<td colspan="4" style="/*height: 240px;*/ height: 150px;">&nbsp;</td>
</tr>
</tbody></table>
</td>
</tr>
</tfoot>
<tbody class="sample-result" id="sample-result-print" style="font-size: 12pt;">
<!-- Comment -->
</tbody>
<!-- Note -->
</table>
<table id="footer" width="100%" border="0" style="margin-top:0px !important;">
<tbody>
<tr style="height:40px !important;"><td colspan="3">&nbsp;<br></td></tr>
<tr>
<td class="text-center text-no-wrap" style="width: 6.2cm"></td>
<td style="width: 6.3cm"></td>
<td class="text-center text-no-wrap result-font" style="width: 7.0cm; font-size:15px; padding-top:0px !important;">
{{__('sample.report_date')}} :{{date('d-M-Y H:i')}} </td>
</tr>
<tr class="result-footer-signature" id="def-signature">
<td class="text-center text-no-wrap result-font" style="font-size:15px" valign="bottom">
{{__('sample.verify_by')}}
<br>
@if(!empty($labSettings->verify_label))
<img id="signature-preview" style="width: 150px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->verify_label)}}">
@else
<br>
@endif
</td>
<td class="text-center text-no-wrap">
</td>
<td class="text-center text-no-wrap result-font" style="font-size:15px">
{{__('sample.lab_technician')}} <br>
@if(!empty(\App\Helpers\Helpers::getPrinterSignature($sample->id)))
<img id="signature-preview" style="width: 150px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">
@else
<br>
<img style="width: 150px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->alter_labtech_sign)}}">
<!--
<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p> -->
@endif
<span class="page" style="position:fixed; bottom:12px; right: 10px; font-weight:bold;"></span>
</td>
</tr>
<tr class="result-footer-signature" id="dyn-signature" style="display:none;">
<td class="text-center text-no-wrap result-font" style="font-size:15px" valign="bottom">
{{__('sample.verify_by')}} .
<br>
@if(!empty($labSettings->alter_verify_sign))
<img style="width: 200px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->alter_verify_sign)}}">
@else
<br>
@endif
</td>
<td class="text-center text-no-wrap">
</td>
<td class="text-center text-no-wrap result-font" style="font-size:15px">
{{__('sample.lab_technician')}} .<br>
@if(!empty($labSettings->alter_labtech_sign))
<!--<img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">-->
<img style="width: 200px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->alter_labtech_sign)}}">
@else
<br>
<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>
@endif
<span class="page" style="position:fixed; bottom:12px; right: 10px; font-weight:bold;"></span>
</td>
</tr>
<tr id="def-footer" >
@if(request()->segment(1)!='shared')
<td colspan="3" id="footer_line" class="result-page-color" style="text-align:center; /*border-top:1px solid #000 !important;*/ padding-top:5px; letter-spacing: -0.5px !important;">
@if(!empty($samplePhysician->footer))
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->footer) }}?time={{time()}}" />
@endif
</td>
@else
<td colspan="3" class="result-page-color" style="text-align:center; /*border-top:1px solid #000 !important;*/ padding-top:5px; letter-spacing: -0.5px !important;">
@if(!empty($samplePhysician->footer))
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->footer) }}?time={{time()}}" />
@else
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/avatars/labs/default_footer/'.$labSettings->footer) }}" />
@endif
</td>
@endif
</tr>
<tr id="dyn-footer" style="display:none;">
<td colspan="3" id="footer_line" class="result-page-color" style="text-align:center; /*border-top:1px solid #000 !important;*/ padding-top:5px; letter-spacing: -0.5px !important;">
@if(!empty($labSettings->alternative_footer))
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/avatars/labs/alternative_footer/'.$labSettings->alternative_footer) }}" />
@endif
</td>
</tr>
</tbody></table>
</page>
</div></div>
</div>
<script>
function printTest() {
@if($sample->is_printed==0)
printRecorder()
@endif
printJS({
printable: "presult-1",
type: "html"
});
setTimeout(function(){ window.location.href=sample_base_url }, 10000)
}
function changeLogoAndPrint(){
$('#dyn-logo, #def-logo').toggle();
$('#dyn-footer, #def-footer').toggle();
$('#dyn-signature, #def-signature').toggle();
printJS({
printable: "presult-1",
type: "html"
});
setTimeout(function(){ window.location.href=sample_base_url }, 10000)
}
document.getElementById("doPrinting__").addEventListener("click", printTest)
@if(!empty($labSettings->alternative_logo))
document.getElementById("change_logo_print").addEventListener("click", changeLogoAndPrint);
@endif
</script>

View File

@@ -0,0 +1,764 @@
<div class="{{(request()->segment(1)!='shared' ? 'modal':'')}} fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
@if(request()->segment(1)!='shared')
<div class="print-preview-header">
<div class="presult-pagination d-none">
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
<span class="page-count">1</span>
</div>
<ul>
<li style="display: inline-block;" class="approve" reverify="1">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i>&nbsp;<b> {{__('sample.btn_approve')}} </b></a>
@endif
</li>
<li style="display: inline-block;" class="print">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
<a href="javascript:void(0)" id="doPrinting__"><i class="fa fa-print"></i>&nbsp;<b>{{__('sample.btn_print')}}</b></a>
@endif
</li>
@if(!empty($labSettings->alternative_logo))
<li style="display: inline-block;" class="print" title="Print with alternative logo">
<a href="javascript:void(0)" id="change_logo_print"><i class="fa fa-print"></i>&nbsp;<b>{{__('Print Alt-Logo')}}</b></a>
</li>
@endif
@if(!empty($sample->patient->telegramChatId) && $labSettings->shareable_lab_result==1)
<li style="display: inline-block;" class="print_" title="Share this result through patient's telegram">
<a href="javascript:void(0)" id="send_lab_result_patient" target_receiver="patient"><i class="fa fa-send"></i>&nbsp;<b>{{__('Send to Patient')}}</b></a>
</li>
@endif
@if(!empty($sample->sample_source->telegramChatId) && $labSettings->shareable_lab_result==1)
<li style="display: inline-block;" class="print_" title="Share this result through clinician's telegram">
<a href="javascript:void(0)" id="send_lab_result_clinician" target_receiver="clinician"><i class="fa fa-send"></i>&nbsp;<b>{{__('Send to Clinician')}}</b></a>
</li>
@endif
<li style=" position: absolute; top: 0; right: 50px;">
<a href="{{url('sample/search?kword=&sample_date=today')}}"><b>{{__('sidebar.view_sample')}}</b></a>
</li>
</ul>
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
</div>
@endif
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
<title>Result</title>
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
<style>
@font-face {
font-family: 'KhmerOS_muollight';
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
display:swap;
}
@php
$configures = collect($labConfigures);
$fontNameHeader = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
$fontSizeHeader = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
$resultColorHeader = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
$fontName = ($configures->where('atrribute_code', 'FONT_NAME_FOR_RESULT')->pluck('assigned_attribute_value')->first());
$fontSize = ($configures->where('atrribute_code', 'FONT_SIZE_FOR_RESULT')->pluck('assigned_attribute_value')->first());
$resultColor = ($configures->where('atrribute_code', 'COLOR_FOR_RESULT')->pluck('assigned_attribute_value')->first());
$lineHeight = ($configures->where('atrribute_code', 'LINE_HEIGHT_FOR_RESULT_HEADER')->pluck('assigned_attribute_value')->first());
@endphp
@if(!empty($lineHeight))
p{
line-height 0 !important;
}
._department-sample-info tr
,.line-height_{
line-height: {{$lineHeight}} !important;
}
@endif
@font-face {
font-family: 'result_font';
}
@font-face {
font-family: 'label_header_font';
}
.result-page-color{
color: {{empty($resultColor) ? '#000' : $resultColor}};
}
.patient-info tr td{
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
font-size:15px !important;
}
.header-label-title-color{
color: {{empty($resultColorHeader) ? '#0000ff' : $resultColorHeader}};
font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}';
}
.header-label-font{
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
}
.result-font, .name{
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
}
._department-sample-info tr td{
padding-top: 0px !important;
padding-bottom: 0px !important;
}
.result-font-size{
font-size: {{empty($fontSize) ? '13pt' : $fontSize}};
}
.KhmerOS {
font-family: 'SourceSerifPro-Regular', 'KhmerOS', 'serif';
}
.KhmerMoulLight {
font-family: 'SourceSerifPro-Regular', 'KhmerOS_muollight', 'serif';
}
.tacteng {
font-family: Tacteng !important;
}
.sourceserifpro-bold {
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
font-weight: bold;
}
page[size="A4"] {
background: white;
width: 21cm;
display: block;
margin: 10px auto;
{{(request()->segment(1)!='shared' ? 'margin-left: 0cm !important;':'')}}
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
padding: 0cm 1cm 1cm 1cm;
/*font-family: 'result_font';*/
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
font-size: 12pt;
line-height: 23px;
page-break-after: always;
}
page[size="A4"], th, td {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
page[size="A4"] table {
/*border-spacing: 2px !important;*/
/*border-collapse: separate !important;*/
}
table th, table td {
text-align: left;
}
table td {
font-weight: normal;
}
table.patient-info, table.department-sample-info {
border: 1px solid #7a7a7a;
line-height: 18px;
padding: 3px;
}
table.patient-info td, table.patient-info th {
vertical-align: top;
}
table.department-sample-info {
background-color: #ebebeb;
}
table.test-result {
font-family: 'SourceSerifPro-Regular', 'serif';
}
table.test-result tr th {
border-bottom: 1px solid black;
}
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
padding-right: .2cm;
}
table.test-result tr:first-child + tr td {
padding-top: 5px;
}
p.value-pair {
position: relative;
width: 100%;
margin: 0;
}
p.value-pair:before {
content: '';
display: block;
position: absolute;
width: 100%;
bottom: .25rem;
height: 0;
line-height: 0;
border-bottom: 2px dotted #858585;
}
p.value-pair .name {
background: white;
z-index: 1;
position: relative;
padding-right: 5px;
}
p.value-pair .value {
background: white;
z-index: 1;
right: 0;
position: absolute;
padding-left: 5px;
font-weight: bold;
}
.out-of-range {
font-family: 'SourceSerifPro-Bold', 'serif';
font-weight: bold;
font-size: 12pt;
}
.text-center {
text-align: center;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-top {
vertical-align: top;
}
.text-bottom {
vertical-align: bottom;
}
.text-middle {
vertical-align: middle;
}
.text-bold {
font-weight: bold;
}
.text-no-wrap {
white-space: nowrap;
}
table.test-result {
line-height: 16px;
}
#footer {
line-height: 17px;
}
#footer .laboratory-address td {
border-top: 1px solid black;
padding-top: 10px;
}
#footer .result-footer-signature td {
vertical-align: top;
padding-bottom: 0px;
}
@page {
margin: 1cm 1cm 0;
}
@media print {
@page {
margin-top: 1cm;
margin-left: 0.2cm !important;
margin-bottom: 0cm;
@bottom-left {
content: content
}
}
body,
page[size="A4"] {
margin-left: 0cm !important;
padding-right: 0cm !important;
box-shadow: none;
background-color: transparent;
}
body .sample-result .sample-type{
page-break-inside: avoid;
}
#footer {
display: block;
position: fixed;
bottom: 0px;
padding-bottom: 0px !important;
}
#footer .result-footer-signature td {
vertical-align: top;
padding-bottom: 0px;
}
@if(Auth::id()==1)
#footer .page{
counter-increment:listCounter;
}
#footer .page:after{
content: counter(listCounter);
}
@endif
table .tname{
width:360px !important;
}
}
table .tname{
width:360px !important;
}
/*table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
width:390px !important;
}*/
#print_invoice_modal .table-inv th, .table-inv td {
/*border: 1px solid black;*/
/*border-collapse: collapse;*/
}
.abnormal{
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
color: {{$labSettings->abnormal_text_color}} !important;
font-size: {{empty($fontSize) ? '13pt' : $fontSize}};
}
.patient-info{
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Time New Roman' : 'label_header_font' ): 'Khmer OS Siemreap')}}";
font-size: {{empty($fontSizeHeader) ? '13pt' : $fontSizeHeader}};
}
#footer{
font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";
}
.font-changable-base-on-localize{
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
}
</style>
<input type="hidden" name="verify" id="verify" value="">
<page size="A4">
<table border="0" width="100%">
<thead>
<tr id="def-logo">
<th style="width:100%" class="text-center">
@if(!empty($samplePhysician->logo))
<img width="98%" height="140px" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
@else
<table width="100%">
<tr>
<td style="width:120px; vertical-align: top;" class="text-center">
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
</td>
<td class="text-center">
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff; font-family: 'Times New Roman';" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
</td>
<td style="width:120px" >&nbsp;</td>
</tr>
</table>
@endif
</th>
</tr>
<tr id="dyn-logo" style="display:none;">
<th style="width:100%" class="text-center">
@if(!empty($labSettings->alternative_logo))
<img width="98%" height="140px" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/avatars/labs/alternative_logo/'.$labSettings->alternative_logo) }}" />
@endif
</th>
</tr>
<tr>
<td class="text-top text-center" style="padding-top:0" valign="top">
<div style="font-size: 13.5pt; text-transform: uppercase; font-weight: bold;" class="header-label-title-color header-label-font">{{__('sample.print_title')}}</div>
</td>
</tr>
<tr>
<th>
@if($labSettings->result_header_id==1)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style=" padding-top:1px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:1px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:1px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:1px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style="margin-left:30px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.table_sample_source')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{@$sample->sample_source->name_en}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:1px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="30%" style="padding-bottom:1px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-bottom:1px;line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="25%" style="padding-bottom:1px; line-height:20px;" align="left">: {{explode("-",@$samplePhysician->name_en)[0]}}</td>
</tr>
</tbody>
</table>
@elseif($labSettings->result_header_id==2)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b class="header-label-title-color" style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
<td class="header-label-title-color" width="25%" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
</tr>
</tbody>
</table>
@elseif($labSettings->result_header_id==3)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
<td width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
</tr>
<tr>
<td width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
<td width="25%" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.request_by')}}</td>
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
</tr>
</tbody>
</table>
@elseif($labSettings->result_header_id==4)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color" width="25%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} , <b class="header-label-title-color">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
<td class="header-label-title-color" width="25%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.table_sample_source')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{@$sample->sample_source->name_en}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
</tbody>
</table>
@elseif($labSettings->result_header_id==5)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td width="25%" style="padding-left:0.7cm; padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_code')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->patient->patient_uuid}}</td>
</tr>
<tr>
<td width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <b style=" margin-left:40px;">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
<td width="25%" style="padding-left:0.7cm; line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
</tr>
<tr>
<td width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('patient.table_phon')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
<td width="25%" rowspan="2" style="padding-left:0.7cm; padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.request_by')}}</td>
<td width="25%" rowspan="2" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
</tr>
<tr>
<td width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
</tbody>
</table>
@elseif($labSettings->result_header_id==6)
<table width="100%" border="0" class="patient-info">
<tbody>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color" width="25%" style="line-height:20px; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="25%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} , <b class="header-label-title-color">{{__('sample.form_patient_gender')}}</b> : {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="line-height:20px; font-weight:bold;">{{__('sample.requested_date')}}</td>
<td width="30%" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
<td class="header-label-title-color" width="25%" style="padding-top:2px; line-height:20px; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
<td width="25%" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
</tr>
<tr>
<td class="header-label-title-color" width="20%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.physician_name')}}</td>
<td width="30%" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
<td class="header-label-title-color" width="25%" style="padding-bottom:2px; line-height:20px; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="25%" style="padding-bottom:2px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
</tr>
</tbody>
</table>
@else
<table width="100%" style="border-collapse: collapse;border-top: 2px solid #000000;border-bottom: 2px solid #000000;">
<tbody>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" width="13%" style="padding-top:2px; line-height:20px;">{{__('ឈ្មោះ/Name')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" width="19%" style="padding-top:2px; line-height:20px; font-size: 12pt !important;" align="left">: {{$sample->patient->name_en}}</td>
<td class="header-label-title-color font-changable-base-on-localize" width="15%" style="line-height:20px;">{{__('អាយុ/Age')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" width="21%" style="line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}}</td>
<td class="header-label-title-color font-changable-base-on-localize" width="13%" style="line-height:20px;">{{__('ភេទ/Sex')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" width="20%" style="line-height:20px;" align="left">: {{$sample->patient->gender==1 ? 'Male':'Female'}}</td>
</tr>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" style="line-height:20px;">{{__('Patient ID')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="line-height:20px;" align="left">: {{$sample->patient->patient_uuid}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-top:2px; line-height:20px;">{{__('Lab ID')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-top:2px; line-height:20px;" align="left">: {{$sample->sample_number}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('ទូរស័ព្ទ/Phone')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
</tr>
<tr>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('Requested By')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;" align="left">: {!!$samplePhysician->name_en!!}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('Requested Date')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="line-height:20px;" align="left">: {{date('d-M-Y H:i',strtotime($sample->collected_date))}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;">{{__('Analysis Date')}}</td>
<td class="header-label-title-color font-changable-base-on-localize" style="padding-bottom:2px; line-height:20px;" align="left">: {{date('d-M-Y H:i');}}</td>
</tr>
</tbody>
</table>
@endif
</th>
</tr>
</thead>
<tfoot>
<tr>
<td width="100%">
<table width="100%" border="0">
<tbody><tr>
<td colspan="4" style="/*height: 240px;*/ height: 100px;">&nbsp;</td>
</tr>
</tbody></table>
</td>
</tr>
</tfoot>
<tbody class="sample-result" id="sample-result-print" style="font-size: 12pt;">
<!-- Comment -->
</tbody>
<!-- Note -->
</table>
<table id="footer" width="100%" border="0" style="margin-top:0px !important;">
<tbody>
<tr style="height:40px !important;"><td colspan="3">&nbsp;<br></td></tr>
<tr>
<td class="text-center text-no-wrap" style="width: 6.7cm"></td>
<td style="width: 6.3cm"></td>
<td class="text-center text-no-wrap" style="width: 6.7cm; font-size:15px">
{{__('sample.report_date')}} : {{date('d-M-Y H:i')}} </td>
</tr>
<tr class="result-footer-signature" id="def-signature">
<td class="text-center text-no-wrap" style="font-size:15px" valign="bottom">
{{__('sample.verify_by')}}
<br>
@if(!empty($labSettings->verify_label))
<img id="signature-preview" style="width: 200px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->verify_label)}}">
@else
<br>
@endif
</td>
<td class="text-center text-no-wrap">
</td>
<td class="text-center text-no-wrap" style="font-size:15px">
{{__('sample.lab_technician')}} <br>
@if(!empty(\App\Helpers\Helpers::getPrinterSignature($sample->id)))
<img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">
@else
<br>
<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>
@endif
<span class="page" style="position:fixed; bottom:12px; right: 10px; font-weight:bold;"></span>
</td>
</tr>
<tr class="result-footer-signature" id="dyn-signature" style="display:none;">
<td class="text-center text-no-wrap" style="font-size:15px" valign="bottom">
{{__('sample.verify_by')}} .
<br>
@if(!empty($labSettings->alter_verify_sign))
<img style="width: 200px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->alter_verify_sign)}}">
@else
<br>
@endif
</td>
<td class="text-center text-no-wrap">
</td>
<td class="text-center text-no-wrap" style="font-size:15px">
{{__('sample.lab_technician')}} .<br>
@if(!empty($labSettings->alter_labtech_sign))
<!--<img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">-->
<img style="width: 200px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->alter_labtech_sign)}}">
@else
<br>
<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>
@endif
<span class="page" style="position:fixed; bottom:12px; right: 10px; font-weight:bold;"></span>
</td>
</tr>
@if($labSettings->show_result_footer==1)
<tr>
<td colspan="3" id="footer_line" class="result-page-color" style="text-align:center; border-top:1px solid #000 !important; padding-top:0px; letter-spacing: -0.5px !important;">
@if($sample->lab_id!=22)
<span style="line-height: 10px !important; font-size:12px">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} <br>
{{$labSettings->phone_number}} {{$labSettings->email}}</span><br>
@endif
</td>
</tr>
@endif
</tbody></table>
</page>
</div></div>
</div>
<script>
function printTest() {
@if($sample->is_printed==0)
printRecorder()
@endif
printJS({
printable: "presult-1",
type: "html"
});
setTimeout(function(){ window.location.href=sample_base_url }, 10000)
}
function changeLogoAndPrint(){
$('#dyn-logo, #def-logo').toggle();
$('#dyn-signature, #def-signature').toggle();
printJS({
printable: "presult-1",
type: "html"
});
setTimeout(function(){ window.location.href=sample_base_url }, 10000)
}
document.getElementById("doPrinting__").addEventListener("click", printTest)
@if(!empty($labSettings->alternative_logo))
document.getElementById("change_logo_print").addEventListener("click", changeLogoAndPrint);
@endif
</script>

View File

@@ -0,0 +1,451 @@
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
<div class="print-preview-header">
<ul>
<li style="display: inline-block;" class="approve" reverify="1">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i>&nbsp;<b> {{__('sample.btn_approve')}} </b></a>
@endif
</li>
<li style="display: inline-block;" class="print">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html'); {{$sample->is_printed==0? 'printRecorder()':''}}" id="doPrinting"><i class="fa fa-print"></i>&nbsp;<b>{{__('sample.btn_print')}}</b></a>
@endif
</li>
</ul>
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
</div>
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
<title>Result</title>
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
<style>
page[size="A4"] {
background: white;
width: 21cm;
display: block;
margin: 10px auto;
margin-left: 0.5cm !important;
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
padding: 1cm;
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';
font-size: 11.5pt;
line-height: 23px;
page-break-after: always;
}
page[size="A4"], th, td {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
page[size="A4"] table {
border-spacing: 2px !important;
border-collapse: separate !important;
}
table th, table td {
text-align: left;
}
table td {
font-weight: normal;
}
table.patient-info, table.department-sample-info {
border: 1px solid #7a7a7a;
line-height: 18px;
padding: 3px;
}
table.patient-info td, table.patient-info th {
vertical-align: top;
}
table.department-sample-info {
background-color: #ebebeb;
}
table.test-result {
font-family: 'SourceSerifPro-Regular', 'serif';
}
table.test-result tr th {
border-bottom: 1px solid black;
}
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
padding-right: .2cm;
}
table.test-result tr:first-child + tr td {
padding-top: 5px;
}
p.value-pair {
position: relative;
width: 100%;
margin: 0;
}
p.value-pair:before {
content: '';
display: block;
position: absolute;
width: 100%;
bottom: .25rem;
height: 0;
line-height: 0;
border-bottom: 2px dotted #858585;
}
p.value-pair .name {
background: white;
z-index: 1;
position: relative;
padding-right: 5px;
}
p.value-pair .value {
background: white;
z-index: 1;
right: 0;
position: absolute;
padding-left: 5px;
font-weight: bold;
}
.out-of-range {
font-family: 'SourceSerifPro-Bold', 'serif';
font-weight: bold;
font-size: 12pt;
}
.text-center {
text-align: center;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-top {
vertical-align: top;
}
.text-bottom {
vertical-align: bottom;
}
.text-middle {
vertical-align: middle;
}
.text-bold {
font-weight: bold;
}
.text-no-wrap {
white-space: nowrap;
}
table.test-result {
line-height: 16px;
}
#footer {
line-height: 17px;
}
#footer .laboratory-address td {
border-top: 1px solid black;
padding-top: 10px;
}
#footer .result-footer-signature td {
vertical-align: top;
padding-bottom: 0px;
}
@page {
margin: 1cm 1cm 0;
}
@media print {
@page {
margin: 1cm;
margin-left: 0.5cm !important;
}
body,
page[size="A4"] {
margin: 0;
margin-left: 0.5cm !important;
padding: 0;
box-shadow: none;
background-color: transparent;
}
body .sample-result .sample-type{
page-break-inside: avoid;
}
#footer {
display: block;
position: fixed;
bottom: 0;
margin-top: 500px !important;
padding-bottom: 0px !important;
}
#footer .result-footer-signature td {
vertical-align: top;
padding-bottom: 0px;
}
table .tname{
width:360px !important;
}
table td, table th{
font-family:"Verdana" !important;
font-size:10pt !important;
padding-top: 0px;
padding-bottom: 0px;
}
.tbl-interpret tbody td{
border: 1px dashed #555 !important;
font-size: 10pt !important;
border-spacing: 0px !important;
padding-left: 5px;
}
}
table td, table th{
font-family:"Verdana" !important;
font-size:10.5pt !important;
border-collapse: collapse;
}
table .tname{
width:360px !important;
}
#print_invoice_modal .table-inv th, .table-inv td {
border: 1px solid black;
border-collapse: collapse;
}
.abnormal{
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
color: {{$labSettings->abnormal_text_color}} !important;
}
.tbl-interpret tbody td{
border: 1px dashed #555 !important;
font-size: 10pt !important;
border-collapse: collapse;
border-spacing: 0px !important;
padding-left: 5px;
}
</style>
<page size="A4">
<table border="0" width="100%" style="font-size: 11.5pt !important;">
<thead>
<tr>
<th style="width:100%" class="text-center">
@if(!empty($samplePhysician->logo))
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
@else
<table width="100%">
<tr>
<td style="width:120px; vertical-align: top;" class="text-center">
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
</td>
<td class="text-center">
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
</td>
<td style="width:120px" >&nbsp;</td>
</tr>
</table>
@endif
</th>
</tr>
<tr>
<th>
<table width="100%" border="0" class="patient-info_">
<tbody>
<tr style="height: 5px !important;">
<td colspan="4" style="border-bottom: 3px solid #555;"></td>
</tr>
<tr>
<td width="20%" style="padding-bottom:1px; font-size:12pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{('Name')}} : </td>
<td width="35%" style="font-size:11.5pt !important; padding-bottom:1px; line-height:20px;" align="left">{{$sample->patient->name_en}}</td>
<td width="25%" style="font-size:11.5pt !important; padding-top:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Reception date')}} : </td>
<td width="20%" style="font-size:11.5pt !important; padding-top:1px; line-height:20px;" align="left">{{date('d-m-Y',strtotime($sample->requested_date))}}</td>
</tr>
<tr>
<td width="20%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_age')}} : </td>
<td width="35%" style="font-size:11.5pt !important; line-height:20px;" align="left">{{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <span style="margin-left:10px;">{{__('sample.form_patient_gender')}} : </span><span style="margin-left:10px;">{{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</span></td>
<td width="25%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Report date')}} : </td>
<td width="20%" style="font-size:11.5pt !important; line-height:20px;" align="left">{{date('d-m-Y',strtotime($sample->received_date))}}</td>
</tr>
<tr>
<td width="20%" style="font-size:11.5pt !important; padding-bottom:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Clinic')}} : </td>
<td width="35%" style="font-size:11.5pt !important; padding-bottom:1px; line-height:20px;" align="left">{{$sample->sample_source->name_en}}</td>
<td width="25%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Clinic REF')}} : </td>
<td width="20%" style="font-size:11.5pt !important; line-height:20px;" align="left"></td>
</tr>
<tr>
<td width="20%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Doctor')}} : </td>
<td width="35%" style="font-size:11.5pt !important; line-height:20px;" align="left">{{$samplePhysician->name_en}}</td>
<td width="25%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Patient\'s contact')}} : </td>
<td width="20%" style="font-size:11.5pt !important; line-height:20px;" align="left">{{$sample->patient->phone_number}}</td>
</tr>
<tr>
<td width="20%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('PATH ID')}} : </td>
<td width="35%" style="font-size:11.5pt !important; line-height:20px;" align="left">{{$sample->sample_number}}</td>
<td width="25%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Remark')}} : </td>
<td width="20%" style="font-size:11.5pt !important; line-height:20px;" align="left"></td>
</tr>
<tr style="height: 5px !important;">
<td colspan="4" style="border-bottom: 3px solid #555;"></td>
</tr>
</tbody>
</table>
</th>
</tr>
</thead>
<tbody class="sample-result_" id="sample-result-print_">
<tr class="sample-type">
<td>
<table width="100%" border="0" class="_department-sample-info">
<thead>
<tr style="background: #eee;">
<td colspan="5" style="text-align: center; font-weight: bold; color: #0000ff !important;">PAP SMEAR REPORT</td>
</tr>
</thead>
<tbody>
<tr valign="top">
<td width="25%" class="pl-0" style="padding-left: 0px;"><b class="sourceserifpro-bold">Type of Sample:</b></td>
<td width="75%" ><span id="tchk-1433" style="font-size: 20px ">&#9744;</span> Conventional smear</td>
</tr>
<tr valign="top">
<td style="padding-left: 12.5px;"></td>
<td><span id="tchk-1434" style="font-size: 20px ">&#9744;</span> Liquid-based cytology (LBC)</td>
</tr>
<tr valign="top">
<td class="pl-0" style="padding-left: 0px;"><b class="sourceserifpro-bold">PAP smear quality:</b></td>
<td><span id="tchk-1436" style="font-size: 20px ">&#9744;</span> Satisfactory of evaluation</td>
</tr>
<tr valign="top">
<td style="padding-left: 12.5px;"></td>
<td><span id="tchk-1437" style="font-size: 20px ">&#9744;</span> Not satisfactory for evaluation (bloody smear smashing cellular details)</td>
</tr>
<tr valign="top">
<td style="padding-left: 12.5px;"></td>
<td><span id="tchk-1438" style="font-size: 20px ">&#9744;</span> PAP smear rejected, not analyzed</td>
</tr>
<tr valign="top">
<td colspan="2" class="pl-0" style="padding-left: 0px;"><b class="sourceserifpro-bold">Conclusion:</b></td>
</tr>
<tr valign="top">
<td colspan="2" class="pl-2" style="padding-left: 12.5px;">I. Negative for intraepithelial lesion or malignancy</td>
</tr>
<tr valign="top">
<td colspan="2" style="padding-left: 35.5px;"><span id="tchk-1440" style="font-size: 20px ">&#9744;</span> Normal</td>
</tr>
<tr valign="top">
<td colspan="2" style="padding-left: 35.5px;"><span id="tchk-1441" style="font-size: 20px ">&#9744;</span> Begin cellular modification:</td>
</tr>
<tr valign="top">
<table width="100%" border="0" class="_department-sample-info">
<tr>
<td width="50%" style="padding-left: 80px;"><span id="tchk-1442" style="font-size: 20px ">&#9744;</span> Infection:</td>
<td width="50%"><span id="tchk-1449" style="font-size: 20px ">&#9744;</span> Reactive changes:</td>
</tr>
<tr>
<td style="padding-left: 110px"><span id="tchk-1443" style="font-size: 20px ">&#9744;</span> Trichomonas Vaginalis</td>
<td style="padding-left: 30px"><span id="tchk-1450" style="font-size: 20px ">&#9744;</span> Inflammation</td>
</tr>
<tr>
<td style="padding-left: 110px"><span id="tchk-1444" style="font-size: 20px ">&#9744;</span> Mycosis</td>
<td style="padding-left: 30px"><span id="tchk-1451" style="font-size: 20px ">&#9744;</span> Atrophy</td>
</tr>
<tr>
<td style="padding-left: 110px"><span id="tchk-1446" style="font-size: 20px ">&#9744;</span> Herpes</td>
<td style="padding-left: 30px"><span id="tchk-1452" style="font-size: 20px ">&#9744;</span> Radiation</td>
</tr>
<tr>
<td style="padding-left: 110px"><span id="tchk-1447" style="font-size: 20px ">&#9744;</span> Actinomyces</td>
<td style="padding-left: 30px"><span id="tchk-1453" style="font-size: 20px ">&#9744;</span> IUD associated changes</td>
</tr>
<tr>
<td style="padding-left: 110px"><span id="tchk-1448" style="font-size: 20px ">&#9744;</span> Bacterial vaginosis</td>
<td><span id="tchk-191" style="font-size: 20px ">&#9744;</span> Others</td>
</tr>
</table>
</tr>
<tr valign="top">
<td colspan="2" class="pl-2" style="padding-left: 12.5px;">II. Epithelial abnormalities</td>
</tr>
<tr valign="top">
<td colspan="2" style="padding-left: 35.5px;">1. Squamous cell abnormalities</td>
</tr>
<tr valign="top">
<td colspan="2" style="padding-left: 60px;"><span id="tchk-1456" style="font-size: 20px ">&#9744;</span> ASC-US : Atypical Squamous Cells of Undetermined Significance.</td>
</tr>
<tr valign="top">
<td colspan="2" style="padding-left: 60px;"><span id="tchk-1457" style="font-size: 20px ">&#9744;</span> ASC-H : Atypical Squamous Cells - cannot exclude HSIL</td>
</tr>
<tr valign="top">
<td colspan="2" style="padding-left: 60px;"><span id="tchk-1458" style="font-size: 20px ">&#9744;</span> LSIL : Low grade squamous intraepithelial lesion (condyloma - HPV - CIN 1).</td>
</tr>
<tr valign="top">
<td colspan="2" style="padding-left: 60px;"><span id="tchk-1459" style="font-size: 20px ">&#9744;</span> HSIL : High grade squamous intraepithelial lesion (moderate or severe dysplasia encompassing carcinoma in situ, CIN 2, CIN 3)</td>
</tr>
<tr valign="top">
<td colspan="2" style="padding-left: 110px;"><span id="tchk-1460" style="font-size: 20px ">&#9744;</span> Supeious for invasion</td>
</tr>
<tr valign="top">
<td colspan="2" style="padding-left: 60px;"><span id="tchk-1461" style="font-size: 20px ">&#9744;</span> Squamous cell carcinoma (SCC)</td>
</tr>
<tr valign="top">
<td colspan="2" style="padding-left: 35.5px;">2. Glandular cells</td>
</tr>
<tr valign="top">
<td colspan="2" style="padding-left: 60px;"><span id="tchk-1463" style="font-size: 20px ">&#9744;</span> AGUS : atypical glandular cells, not otherwise specified.</td>
</tr>
<tr valign="top">
<td colspan="2" style="padding-left: 60px;">
<span id="tchk-1464" style="font-size: 20px ">&#9744;</span> Adenocarcinoma (specify the origin of the cells):
<span id="tchk-1465" style="font-size: 20px ">&#9744;</span> Endocervical
<span id="tchk-1466" style="font-size: 20px ">&#9744;</span> Endometrial
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
<!-- Note -->
</table>
<table id="footer" width="100%" border="0" style="margin-top:5px !important;">
<tr class="result-footer-signature">
<td class="text-no-wrap" style="width:60vh !important; text-align:center;">
@if(!empty(\App\Helpers\Helpers::getPrinterSignature($sample->id)))
<img id="signature-preview" style="width: 250px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">
@else
&nbsp;
@endif
</td>
</tr>
</table>
</page>
</div>
</div>
</div>

View File

@@ -0,0 +1,348 @@
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
<div class="print-preview-header">
<div class="presult-pagination d-none">
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
<span class="page-count">1</span>
</div>
<ul>
<li style="display: inline-block;" class="approve" reverify="1">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i>&nbsp;<b> {{__('sample.btn_approve')}} </b></a>
@endif
</li>
<li style="display: inline-block;" class="print">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html'); {{$sample->is_printed==0? 'printRecorder()':''}}" id="doPrinting"><i class="fa fa-print"></i>&nbsp;<b>{{__('sample.btn_print')}}</b></a>
@endif
</li>
</ul>
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
</div>
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
<title>Result</title>
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
<style>
page[size="A4"] {
background: white;
width: 21cm;
display: block;
margin: 10px auto;
margin-left: 0.5cm !important;
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
padding: 1cm;
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';
font-size: 12pt;
line-height: 23px;
page-break-after: always;
}
page[size="A4"], th, td {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
page[size="A4"] table {
border-spacing: 2px !important;
border-collapse: separate !important;
}
table th, table td {
text-align: left;
}
table td {
font-weight: normal;
}
table.patient-info, table.department-sample-info {
border: 1px solid #7a7a7a;
line-height: 18px;
padding: 3px;
}
table.patient-info td, table.patient-info th {
vertical-align: top;
}
table.department-sample-info {
background-color: #ebebeb;
}
table.test-result {
font-family: 'SourceSerifPro-Regular', 'serif';
}
table.test-result tr th {
border-bottom: 1px solid black;
}
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
padding-right: .2cm;
}
table.test-result tr:first-child + tr td {
padding-top: 5px;
}
p.value-pair {
position: relative;
width: 100%;
margin: 0;
}
p.value-pair:before {
content: '';
display: block;
position: absolute;
width: 100%;
bottom: .25rem;
height: 0;
line-height: 0;
border-bottom: 2px dotted #858585;
}
p.value-pair .name {
background: white;
z-index: 1;
position: relative;
padding-right: 5px;
}
p.value-pair .value {
background: white;
z-index: 1;
right: 0;
position: absolute;
padding-left: 5px;
font-weight: bold;
}
.out-of-range {
font-family: 'SourceSerifPro-Bold', 'serif';
font-weight: bold;
font-size: 12pt;
}
.text-center {
text-align: center;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-top {
vertical-align: top;
}
.text-bottom {
vertical-align: bottom;
}
.text-middle {
vertical-align: middle;
}
.text-bold {
font-weight: bold;
}
.text-no-wrap {
white-space: nowrap;
}
table.test-result {
line-height: 16px;
}
#footer {
line-height: 17px;
}
#footer .laboratory-address td {
border-top: 1px solid black;
padding-top: 10px;
}
#footer .result-footer-signature td {
vertical-align: top;
padding-bottom: 0px;
}
@page {
margin: 1cm 1cm 0;
}
@media print {
@page {
margin: 1cm;
margin-left: 0.5cm !important;
}
body,
page[size="A4"] {
margin: 0;
margin-left: 0.5cm !important;
padding: 0;
box-shadow: none;
background-color: transparent;
}
/*tbody .sample-result {
page-break-inside: avoid;
}*/
body .sample-result .sample-type{
page-break-inside: avoid;
}
#footer {
display: block;
position: fixed;
bottom: 0;
margin-top: 500px !important;
padding-bottom: 0px !important;
}
#footer .result-footer-signature td {
vertical-align: top;
padding-bottom: 0px;
}
/* table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
width:390px !important;
}*/
table .tname{
width:360px !important;
}
}
table .tname{
width:360px !important;
}
/*table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
width:390px !important;
}*/
#print_invoice_modal .table-inv th, .table-inv td {
border: 1px solid black;
border-collapse: collapse;
}
.abnormal{
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
color: {{$labSettings->abnormal_text_color}} !important;
}
</style>
<page size="A4">
<table border="0" width="100%">
<thead>
<tr>
<th style="width:100%" class="text-center">
@if(!empty($samplePhysician->logo))
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
@else
<table width="100%">
<tr>
<td style="width:120px; vertical-align: top;" class="text-center">
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
</td>
<td class="text-center">
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
</td>
<td style="width:120px" >&nbsp;</td>
</tr>
</table>
@endif
</th>
</tr>
<tr>
<th>
<table width="100%" border="0" class="patient-info_">
<tbody>
<tr>
<td width="50%" colspan="2" style="font-size:16px !important; padding-top:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Date Receive')}}: <span style="color: #0a0302;">{{date('d-M-Y H:i',strtotime($sample->collected_date))}}</span></td>
<td width="50%" colspan="2" style="font-size:16px !important; text-align: right; padding-top:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Patho N#')}}: <span style="color: #0a0302;">{{$sample->sample_number}}</span></td>
</tr>
<tr style="height: 5px !important;">
<td colspan="4" style="border-bottom: 2px solid #ccc;"></td>
</tr>
<tr>
<td width="20%" style="padding-bottom:1px; font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{('Physician')}}</td>
<td width="30%" style="font-size:16px !important; padding-bottom:1px; line-height:20px;" align="left">: {{$samplePhysician->name_en}}</td>
<td width="20%" style="font-size:16px !important; padding-top:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
<td width="30%" style="font-size:16px !important; padding-top:1px; line-height:20px;" align="left">: {{$sample->patient->name_en}}</td>
</tr>
<tr>
<td width="20%" style="font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Telephone')}}</td>
<td width="30%" style="font-size:16px !important; line-height:20px;" align="left">: {{$sample->patient->phone_number}}</td>
<td width="20%" style="font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
<td width="30%" style="font-size:16px !important; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}}</td>
</tr>
<tr>
<td width="20%" style="font-size:16px !important; padding-bottom:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
<td width="30%" style="font-size:16px !important; padding-bottom:1px; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
<td width="20%" style="font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_gender')}}</td>
<td width="30%" style="font-size:16px !important; line-height:20px;" align="left">: {{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</td>
</tr>
<tr>
<td width="20%" style="font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Email')}}</td>
<td width="30%" style="font-size:16px !important; line-height:20px;" align="left">: #N/A</td>
<td width="20%" style="font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Other/Info')}}</td>
<td width="30%" style="font-size:16px !important; line-height:20px;" align="left">: #N/A</td>
</tr>
<tr style="height: 5px !important;">
<td colspan="4" style="border-bottom: 2px solid #ccc;"></td>
</tr>
</tbody>
</table>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td width="100%">
<table width="100%" border="0">
<tbody><tr>
<td colspan="4" style="height: 240px;">&nbsp;</td>
</tr>
</tbody></table>
</td>
</tr>
</tfoot>
<tbody class="sample-result" id="sample-result-print" style="font-size: 12pt;">
<!-- Comment -->
</tbody>
<!-- Note -->
</table>
<table id="footer" width="100%" border="0" style="margin-top:20px !important;">
<tbody>
<tr style="height:40px !important;">&nbsp;<br><td colspan="3"></td></tr>
<tr>
<td class="text-center text-no-wrap" style="width: 7cm">
</td>
<td style="width: 7cm"></td>
<td class="text-center text-no-wrap" style="width: 7cm">
{{__('Date Issue')}} : {{date('d-M-Y')}} </td>
</tr>
<tr class="result-footer-signature">
<td class="text-center text-no-wrap" valign="bottom">
</td>
<td class="text-center text-no-wrap"></td>
<td class="text-center text-no-wrap">
@if(!empty(Auth::user()->signature))
<img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature/'.Auth::user()->signature)}}">
@endif
</td>
</tr>
</tbody></table>
</page>
</div></div>
<button class="previous d-none"><i class="fa fa-chevron-left"></i></button>
<button class="next d-none"><i class="fa fa-chevron-right"></i></button>
</div>

View File

@@ -0,0 +1,356 @@
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
<div class="print-preview-header">
<div class="presult-pagination d-none">
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
<span class="page-count">1</span>
</div>
<ul>
<li style="display: inline-block;" class="approve" reverify="1">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i>&nbsp;<b> {{__('sample.btn_approve')}} </b></a>
@endif
</li>
<li style="display: inline-block;" class="print">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html'); {{$sample->is_printed==0? 'printRecorder()':''}}" id="doPrinting"><i class="fa fa-print"></i>&nbsp;<b>{{__('sample.btn_print')}}</b></a>
@endif
</li>
</ul>
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
</div>
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
<title>Result</title>
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
<style>
page[size="A4"] {
background: white;
width: 21cm;
display: block;
margin: 10px auto;
margin-left: 0.5cm !important;
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
padding: 1cm;
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';
font-size: 12pt;
line-height: 23px;
page-break-after: always;
}
page[size="A4"], th, td {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
page[size="A4"] table {
border-spacing: 2px !important;
border-collapse: separate !important;
}
table th, table td {
text-align: left;
}
table td {
font-weight: normal;
}
table.patient-info, table.department-sample-info {
border: 1px solid #7a7a7a;
line-height: 18px;
padding: 3px;
}
table.patient-info td, table.patient-info th {
vertical-align: top;
}
table.department-sample-info {
background-color: #ebebeb;
}
table.test-result {
font-family: 'SourceSerifPro-Regular', 'serif';
}
table.test-result tr th {
border-bottom: 1px solid black;
}
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
padding-right: .2cm;
}
table.test-result tr:first-child + tr td {
padding-top: 5px;
}
p.value-pair {
position: relative;
width: 100%;
margin: 0;
}
p.value-pair:before {
content: '';
display: block;
position: absolute;
width: 100%;
bottom: .25rem;
height: 0;
line-height: 0;
border-bottom: 2px dotted #858585;
}
p.value-pair .name {
background: white;
z-index: 1;
position: relative;
padding-right: 5px;
}
p.value-pair .value {
background: white;
z-index: 1;
right: 0;
position: absolute;
padding-left: 5px;
font-weight: bold;
}
.out-of-range {
font-family: 'SourceSerifPro-Bold', 'serif';
font-weight: bold;
font-size: 12pt;
}
.text-center {
text-align: center;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-top {
vertical-align: top;
}
.text-bottom {
vertical-align: bottom;
}
.text-middle {
vertical-align: middle;
}
.text-bold {
font-weight: bold;
}
.text-no-wrap {
white-space: nowrap;
}
table.test-result {
line-height: 16px;
}
#footer {
line-height: 17px;
}
#footer .laboratory-address td {
border-top: 1px solid black;
padding-top: 10px;
}
#footer .result-footer-signature td {
vertical-align: top;
padding-bottom: 0px;
}
@page {
margin: 1cm 1cm 0;
}
@media print {
@page {
margin: 1cm;
margin-left: 0.5cm !important;
}
body,
page[size="A4"] {
margin: 0;
margin-left: 0.5cm !important;
padding: 0;
box-shadow: none;
background-color: transparent;
}
/*tbody .sample-result {
page-break-inside: avoid;
}*/
body .sample-result .sample-type{
page-break-inside: avoid;
}
#footer {
display: block;
position: fixed;
bottom: 0;
margin-top: 500px !important;
padding-bottom: 0px !important;
}
#footer .result-footer-signature td {
vertical-align: top;
padding-bottom: 0px;
}
/* table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
width:390px !important;
}*/
table .tname{
width:360px !important;
}
table td, table th{
font-family:"Verdana" !important;
font-size:12pt !important;
}
}
table td, table th{
font-family:"Verdana" !important;
font-size:12pt !important;
}
table .tname{
width:360px !important;
}
/*table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
width:390px !important;
}*/
#print_invoice_modal .table-inv th, .table-inv td {
border: 1px solid black;
border-collapse: collapse;
}
.abnormal{
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
color: {{$labSettings->abnormal_text_color}} !important;
}
</style>
<page size="A4">
<table border="0" width="100%">
<thead>
<tr>
<th style="width:100%" class="text-center">
@if(!empty($samplePhysician->logo))
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
@else
<table width="100%">
<tr>
<td style="width:120px; vertical-align: top;" class="text-center">
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
</td>
<td class="text-center">
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
</td>
<td style="width:120px" >&nbsp;</td>
</tr>
</table>
@endif
</th>
</tr>
<tr>
<th>
<table width="100%" border="0" class="patient-info_">
<tbody>
<tr style="height: 5px !important;">
<td colspan="4" style="border-bottom: 3px solid #555;"></td>
</tr>
<tr>
<td width="20%" style="padding-bottom:1px; font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{('Nom')}} : </td>
<td width="35%" style="font-size:16px !important; padding-bottom:1px; line-height:20px;" align="left">{{$sample->patient->name_en}}</td>
<td width="25%" style="font-size:16px !important; padding-top:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Date de réception')}} : </td>
<td width="20%" style="font-size:16px !important; padding-top:1px; line-height:20px;" align="left">{{date('d-m-Y',strtotime($sample->requested_date))}}</td>
</tr>
<tr>
<td width="20%" style="font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_age')}} : </td>
<td width="35%" style="font-size:16px !important; line-height:20px;" align="left">{{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <span style="margin-left:10px;">{{__('sample.form_patient_gender')}} : </span><span style="margin-left:10px;">{{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</span></td>
<td width="25%" style="font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Date du rapport')}} : </td>
<td width="20%" style="font-size:16px !important; line-height:20px;" align="left">{{date('d-m-Y',strtotime($sample->received_date))}}</td>
</tr>
<tr>
<td width="20%" style="font-size:16px !important; padding-bottom:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Clinique')}} : </td>
<td width="35%" style="font-size:16px !important; padding-bottom:1px; line-height:20px;" align="left">{{$sample->sample_source->name_en}}</td>
<td width="25%" style="font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Clinique REF')}} : </td>
<td width="20%" style="font-size:16px !important; line-height:20px;" align="left"></td>
</tr>
<tr>
<td width="20%" style="font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Docteur')}} : </td>
<td width="35%" style="font-size:16px !important; line-height:20px;" align="left">{{$samplePhysician->name_en}}</td>
<td width="25%" style="font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Contacte du patient')}} : </td>
<td width="20%" style="font-size:16px !important; line-height:20px;" align="left">{{$sample->patient->phone_number}}</td>
</tr>
<tr>
<td width="20%" style="font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('PATH ID')}} : </td>
<td width="35%" style="font-size:16px !important; line-height:20px;" align="left">{{$sample->sample_number}}</td>
<td width="25%" style="font-size:16px !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Remarques')}} : </td>
<td width="20%" style="font-size:16px !important; line-height:20px;" align="left"></td>
</tr>
<tr style="height: 5px !important;">
<td colspan="4" style="border-bottom: 3px solid #555;"></td>
</tr>
</tbody>
</table>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td width="100%">
<table width="100%" border="0">
<tbody><tr>
<td colspan="4" style="height: 240px;">&nbsp;</td>
</tr>
</tbody></table>
</td>
</tr>
</tfoot>
<tbody class="sample-result" id="sample-result-print" style="font-size: 12pt;">
<!-- Comment -->
</tbody>
<!-- Note -->
</table>
<table id="footer" width="100%" border="0" style="margin-top:5px !important; display:none;">
<tr class="result-footer-signature">
<td class="text-no-wrap" style="width:60vh !important; text-align:center;" valign="bottom">
@if(!empty($labSettings->verify_label))
<img id="signature-preview" style="width: 250px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->verify_label)}}">
@else
&nbsp;
@endif
</td>
<td class="text-no-wrap" style="width:60vh !important; text-align:center;">
@if(!empty(\App\Helpers\Helpers::getPrinterSignature($sample->id)))
<img id="signature-preview" style="width: 250px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">
@else
&nbsp;
@endif
</td>
</tr>
</table>
</page>
</div></div>
<button class="previous d-none"><i class="fa fa-chevron-left"></i></button>
<button class="next d-none"><i class="fa fa-chevron-right"></i></button>
</div>

View File

@@ -0,0 +1,392 @@
<div class="modal fade" id="print_preview_modal" style="padding-top: 40px; background: rgba(0, 0, 0, 0.54); overflow: auto; padding-left: 17px;">
<div class="print-preview-header">
<div class="presult-pagination d-none">
<input type="text" class="page-number" value="1" onfocus="this.select()"> /
<span class="page-count">1</span>
</div>
<ul>
<li style="display: inline-block;" class="approve" reverify="1">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['approve_result']) && empty($sample->approved_by))
<a href="javascript:void(0)" onclick="approveSample({{$sample->id}})" id="approve"><i class="fa fa-check"></i>&nbsp;<b> {{__('sample.btn_approve')}} </b></a>
@endif
</li>
<li style="display: inline-block;" class="print">
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_result']))
<a href="javascript:void(0)" onclick="printJS('presult-1', 'html'); {{$sample->is_printed==0? 'printRecorder()':''}}" id="doPrinting"><i class="fa fa-print"></i>&nbsp;<b>{{__('sample.btn_print')}}</b></a>
@endif
</li>
</ul>
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
</div>
<div class="modal-dialog modal-xxl A4-portrait"><div class="psample-result active" id="presult-1">
<title>Result</title>
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
<style>
page[size="A4"] {
background: white;
width: 21cm;
display: block;
margin: 10px auto;
margin-left: 0.5cm !important;
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
padding: 1cm;
font-family: 'SourceSerifPro-Regular', 'Noto Sans Khmer', 'serif';
font-size: 11.5pt;
line-height: 23px;
page-break-after: always;
}
page[size="A4"], th, td {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
page[size="A4"] table {
border-spacing: 2px !important;
border-collapse: separate !important;
}
table th, table td {
text-align: left;
}
table td {
font-weight: normal;
}
table.patient-info, table.department-sample-info {
border: 1px solid #7a7a7a;
line-height: 18px;
padding: 3px;
}
table.patient-info td, table.patient-info th {
vertical-align: top;
}
table.department-sample-info {
background-color: #ebebeb;
}
table.test-result {
font-family: 'SourceSerifPro-Regular', 'serif';
}
table.test-result tr th {
border-bottom: 1px solid black;
}
table.test-result tr th:not(:last-child), table.test-result tr td:not(:last-child) {
padding-right: .2cm;
}
table.test-result tr:first-child + tr td {
padding-top: 5px;
}
p.value-pair {
position: relative;
width: 100%;
margin: 0;
}
p.value-pair:before {
content: '';
display: block;
position: absolute;
width: 100%;
bottom: .25rem;
height: 0;
line-height: 0;
border-bottom: 2px dotted #858585;
}
p.value-pair .name {
background: white;
z-index: 1;
position: relative;
padding-right: 5px;
}
p.value-pair .value {
background: white;
z-index: 1;
right: 0;
position: absolute;
padding-left: 5px;
font-weight: bold;
}
.out-of-range {
font-family: 'SourceSerifPro-Bold', 'serif';
font-weight: bold;
font-size: 12pt;
}
.text-center {
text-align: center;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-top {
vertical-align: top;
}
.text-bottom {
vertical-align: bottom;
}
.text-middle {
vertical-align: middle;
}
.text-bold {
font-weight: bold;
}
.text-no-wrap {
white-space: nowrap;
}
table.test-result {
line-height: 16px;
}
#footer {
line-height: 17px;
}
#footer .laboratory-address td {
border-top: 1px solid black;
padding-top: 10px;
}
#footer .result-footer-signature td {
vertical-align: top;
padding-bottom: 0px;
}
@page {
margin: 1cm 1cm 0;
}
@media print {
@page {
margin: 1cm;
margin-left: 0.5cm !important;
}
body,
page[size="A4"] {
margin: 0;
margin-left: 0.5cm !important;
padding: 0;
box-shadow: none;
background-color: transparent;
}
/*tbody .sample-result {
page-break-inside: avoid;
}*/
body .sample-result .sample-type{
page-break-inside: avoid;
}
#footer {
display: block;
position: fixed;
bottom: 0;
margin-top: 500px !important;
padding-bottom: 0px !important;
}
#footer .result-footer-signature td {
vertical-align: top;
padding-bottom: 0px;
}
/* table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
width:390px !important;
}*/
table .tname{
width:360px !important;
}
table td, table th{
font-family:"Verdana" !important;
font-size:11.5pt !important;
}
.tbl-interpret tbody td{
border: 1px dashed #555 !important;
font-size: 10pt !important;
border-spacing: 0px !important;
padding-left: 5px;
}
}
table td, table th{
font-family:"Verdana" !important;
font-size:11.5pt !important;
border-collapse: collapse;
}
table .tname{
width:360px !important;
}
/*table ._department-sample-info tr th:first-child, table ._department-sample-info tr td:first-child{
width:390px !important;
}*/
#print_invoice_modal .table-inv th, .table-inv td {
border: 1px solid black;
border-collapse: collapse;
}
.abnormal{
font-weight: {{$labSettings->abnormal_result_font_weight==1?'bold':'normal'}} !important;
color: {{$labSettings->abnormal_text_color}} !important;
}
.tbl-interpret tbody td{
border: 1px dashed #555 !important;
font-size: 10pt !important;
border-collapse: collapse;
border-spacing: 0px !important;
padding-left: 5px;
}
</style>
<page size="A4">
<table border="0" width="100%" style="font-size: 11.5pt !important;">
<thead>
<tr>
<th style="width:100%" class="text-center">
@if(!empty($samplePhysician->logo))
<img width="100%" class="rounded-0" src="{{ url(env("APP_URL").'storage/images/physician/'.$samplePhysician->logo) }}" />
@else
<table width="100%">
<tr>
<td style="width:120px; vertical-align: top;" class="text-center">
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 120px;">
</td>
<td class="text-center">
<p style="line-height: 13px !important; font-size: 15pt; font-weight: bold; color: #0000ff;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
</td>
<td style="width:120px" >&nbsp;</td>
</tr>
</table>
@endif
</th>
</tr>
<tr>
<th>
<table width="100%" border="0" class="patient-info_">
<tbody>
<tr style="height: 5px !important;">
<td colspan="4" style="border-bottom: 3px solid #555;"></td>
</tr>
<tr>
<td width="20%" style="padding-bottom:1px; font-size:12pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{('Name')}} : </td>
<td width="35%" style="font-size:11.5pt !important; padding-bottom:1px; line-height:20px;" align="left">{{$sample->patient->name_en}}</td>
<td width="25%" style="font-size:11.5pt !important; padding-top:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Reception date')}} : </td>
<td width="20%" style="font-size:11.5pt !important; padding-top:1px; line-height:20px;" align="left">{{date('d-m-Y',strtotime($sample->requested_date))}}</td>
</tr>
<tr>
<td width="20%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_age')}} : </td>
<td width="35%" style="font-size:11.5pt !important; line-height:20px;" align="left">{{\App\Helpers\Helpers::getAge($sample->patient->dob, $sample->admission_date)}} <span style="margin-left:10px;">{{__('sample.form_patient_gender')}} : </span><span style="margin-left:10px;">{{\App\Helpers\Helpers::getGender($sample->patient->gender)}}</span></td>
<td width="25%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Report date')}} : </td>
<td width="20%" style="font-size:11.5pt !important; line-height:20px;" align="left">{{date('d-m-Y',strtotime($sample->received_date))}}</td>
</tr>
<tr>
<td width="20%" style="font-size:11.5pt !important; padding-bottom:1px; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Clinic')}} : </td>
<td width="35%" style="font-size:11.5pt !important; padding-bottom:1px; line-height:20px;" align="left">{{$sample->sample_source->name_en}}</td>
<td width="25%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Clinic REF')}} : </td>
<td width="20%" style="font-size:11.5pt !important; line-height:20px;" align="left"></td>
</tr>
<tr>
<td width="20%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Doctor')}} : </td>
<td width="35%" style="font-size:11.5pt !important; line-height:20px;" align="left">{{$samplePhysician->name_en}}</td>
<td width="25%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Patient\'s contact')}} : </td>
<td width="20%" style="font-size:11.5pt !important; line-height:20px;" align="left">{{$sample->patient->phone_number}}</td>
</tr>
<tr>
<td width="20%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('PATH ID')}} : </td>
<td width="35%" style="font-size:11.5pt !important; line-height:20px;" align="left">{{$sample->sample_number}}</td>
<td width="25%" style="font-size:11.5pt !important; line-height:20px; color: #0000ff; font-weight:bold;">{{__('Remark')}} : </td>
<td width="20%" style="font-size:11.5pt !important; line-height:20px;" align="left"></td>
</tr>
<tr style="height: 5px !important;">
<td colspan="4" style="border-bottom: 3px solid #555;"></td>
</tr>
</tbody>
</table>
</th>
</tr>
</thead>
<tbody class="sample-result" id="sample-result-print">
<!-- Comment -->
</tbody>
<!-- Note -->
</table>
<table class="tbl-interpret" width="100%" border="0" style="border-spacing: 0px !important; border-collapse: collapse !important;">
<thead>
<tr><th colspan="2" class="text-no-wrap">Interpretation</th></tr>
</thead>
<tbody>
<tr>
<td width="35%">RESULTS</td>
<td width="65%">REMARKS</td>
</tr>
<tr>
<td>Positive</td>
<td>Sample provided contains HPV DNA</td>
</tr>
<tr>
<td>Indeterminate</td>
<td>Presence of inhibitors in the sample</td>
</tr>
<tr>
<td>Negative</td>
<td>Sample provided does not contain HPV DNA or number of viral DNA copies are below the detection limit of the assay</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="2" style="font-size:11.5pt;">
<b>Note</b><br>
<p>1. High risk Human papilloma viruses detected are 16, 18, 31, 33, 35, 39, 45, 51, 52, 56, 58 & 59. The low risk genotypes detected
are 6 and 11.</p>
<p>2. All Indeterminate results should be retested.</p>
</td>
</tr>
</tfoot>
</table>
<table id="footer" width="100%" border="0" style="margin-top:5px !important;">
<tr class="result-footer-signature">
<td class="text-no-wrap" style="width:60vh !important; text-align:center;" valign="bottom">
@if(!empty($labSettings->verify_label))
<img id="signature-preview" style="width: 250px !important;" src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->verify_label)}}">
@else
&nbsp;
@endif
</td>
<td class="text-no-wrap" style="width:60vh !important; text-align:center;">
@if(!empty(\App\Helpers\Helpers::getPrinterSignature($sample->id)))
<img id="signature-preview" style="width: 250px !important;" src="{{url(env("APP_URL").'storage/images/signature')}}/{{\App\Helpers\Helpers::getPrinterSignature($sample->id)}}">
@else
&nbsp;
@endif
</td>
</tr>
</table>
</page>
</div></div>
<button class="previous d-none"><i class="fa fa-chevron-left"></i></button>
<button class="next d-none"><i class="fa fa-chevron-right"></i></button>
</div>