modified assests
This commit is contained in:
@@ -1,210 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<link href="{{url(env("APP_URL").'storage/assets/libs/bootstrap-datepicker/css/bootstrap-datepicker.min.css')}}" rel="stylesheet" type="text/css" />
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/lightgallery/lightgallery.css')}}" >
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.css')}}" >
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.min.js')}}"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('report.summary_rpt_tittle')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-12 py-2 inv-search">
|
||||
<form method="get" action="{{url('report/summary-report')}}">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-12 col-md-10 col-lg-8 pr-0">
|
||||
<div class="form-group mb-1">
|
||||
|
||||
<label for="start-invoice-date">{{__('invoice.table_date_filter')}}</label>
|
||||
<div class="input-group">
|
||||
<input id="start-invoice-date" value="{{isset($_GET['start_date']) ? $_GET['start_date'] : ''}}" name="start_date" class="form-control rounded-top-left-25 rounded-bottom-left-25 rounded-right-0" onfocus="(this.type='date')" onblur="(this.type='text')" placeholder="{{__('general.type_date_placeholder')}}">
|
||||
<input id="to-invoice-date" value="{{isset($_GET['end_date']) ? $_GET['end_date'] : ''}}" name="end_date" class="form-control rounded-left-0 rounded-right-0" onfocus="(this.type='date')" onblur="(this.type='text')" placeholder="{{__('general.type_date_placeholder')}}">
|
||||
|
||||
<button class="btn btn-sm btn-inverse-secondary rounded-left-0 rounded-right-0 px-3" title="Search" type="submit"><i class="fa fa-search"></i> {{__('report.btn_view')}}</button>
|
||||
<a href="{{url('report/summary-report')}}" class="btn btn-sm btn-inverse-warning rounded-left-0 rounded-right-0 pt-3" title="Clear Search Filter"><i class="mdi mdi-filter-remove-outline"></i>{{__('general.btn_clear')}}</a>
|
||||
<button type="button" class="btn btn-sm btn-inverse-secondary rounded-left-0 rounded-top-right-25 rounded-bottom-right-25 dropdown-toggle" data-toggle="dropdown" aria-expanded="true">{{__('report.btn_action')}}</button>
|
||||
<div class="dropdown-menu btn-light" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 44px, 0px);" x-placement="bottom-start">
|
||||
<button type="button" data-toggle="modal" data-target="#print_preview_modal" data-backdrop="static" class="dropdown-item font-14">{{__('report.btn_action_print')}}</button>
|
||||
<button type="submit" value="true" name="export" class="dropdown-item font-14">{{__('report.btn_action_export')}}</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<h6>{{__('report.summary_report_section_by_sample_source')}}</h6>
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive--">
|
||||
<table class="table table-bordered" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<th class="py-2">{{__('report.summary_clinic_name')}}</th>
|
||||
<th class="py-2 text-right" width="250px">{{__('report.summary_male_patient')}}</th>
|
||||
<th class="py-2 text-right" width="250px">{{__('report.summary_female_patient')}}</th>
|
||||
<th class="py-2 text-right" width="250px">{{__('report.summary_total_sample')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($report_data['sample_source_data'] as $j=>$l)
|
||||
<tr>
|
||||
<td class="py-2 pl-4">{{$l['clinic_name']}}</td>
|
||||
<td class="py-2 text-right">{{$l['total_male_patient']}}</td>
|
||||
<td class="py-2 text-right">{{$l['total_female_patient']}}</td>
|
||||
<td class="py-2 text-right">{{$l['total_patient']}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h6>{{__('report.summary_report_section_by_test')}}</h6>
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive--">
|
||||
<table class="table table-bordered" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<th class="py-2">{{__('report.summary_rpt_test_type')}}</th>
|
||||
<th class="py-2 text-right" width="250px">{{__('report.summary_male_patient')}}</th>
|
||||
<th class="py-2 text-right" width="250px">{{__('report.summary_female_patient')}}</th>
|
||||
<th class="py-2 text-right" width="250px">{{__('report.summary_total_patient')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($report_data['report_data'] as $k=>$val)
|
||||
@if(!is_array($val))
|
||||
<tr class="bg-white">
|
||||
<td class="py-2 font-weight-medium pl-3 text-left" colspan="4"><u>{{$val}}</u></td>
|
||||
</tr>
|
||||
@else
|
||||
@foreach($val as $v)
|
||||
<tr>
|
||||
<td class="py-2 pl-4">{{$v['group_result']}}</td>
|
||||
<td class="py-2 text-right">{{$v['total_male_patient']}}</td>
|
||||
<td class="py-2 text-right">{{$v['total_female_patient']}}</td>
|
||||
<td class="py-2 text-right">{{$v['total_patient']}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h6>{{__('report.summary_report_section_by_category')}}</h6>
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive--">
|
||||
<table class="table table-bordered" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<th class="py-2">{{__('report.summary_category_name')}}</th>
|
||||
<th class="py-2 text-right" width="250px">{{__('report.summary_male_patient')}}</th>
|
||||
<th class="py-2 text-right" width="250px">{{__('report.summary_female_patient')}}</th>
|
||||
<th class="py-2 text-right" width="250px">{{__('report.summary_total_patient')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$total_male = 0;
|
||||
$total_female = 0;
|
||||
$total_patient = 0;
|
||||
?>
|
||||
@foreach($report_data['test_category_data'] as $raw=>$v)
|
||||
<?php
|
||||
$total_male += $v['total_male_patient'];
|
||||
$total_female += $v['total_female_patient'];
|
||||
$total_patient += $v['total_patient'];
|
||||
?>
|
||||
<tr>
|
||||
<td class="py-2 pl-4">{{$v['category']}}</td>
|
||||
<td class="py-2 text-right">{{$v['total_male_patient']}}</td>
|
||||
<td class="py-2 text-right">{{$v['total_female_patient']}}</td>
|
||||
<td class="py-2 text-right">{{$v['total_patient']}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr class="bg-light">
|
||||
<td class="py-2 pl-4">{{__('report.total')}}</td>
|
||||
<td class="py-2 text-right">{{$total_male}}</td>
|
||||
<td class="py-2 text-right">{{$total_female}}</td>
|
||||
<td class="py-2 text-right">{{$total_patient}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
|
||||
@include('modal.summary_report_print')
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js')}}"></script>
|
||||
<script>
|
||||
|
||||
|
||||
var base_url = "{{url('invoice')}}";
|
||||
let invoice_id = 0;
|
||||
|
||||
$(".datepicker").datepicker({
|
||||
format:'dd-mm-yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(".monthpicker").datepicker({
|
||||
format:'mm-yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(".yearpicker").datepicker({
|
||||
format:'yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
</script>
|
||||
{{--<script src="{{url(env("APP_URL").'storage/assets/js/admin/invoice.js')}}"></script>--}}
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,162 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('antibiotic.table_title')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
|
||||
<form method="get" action="{{url('antibiotic/search')}}">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control rounded-top-left-25 rounded-bottom-left-25 rounded-right-0" value="{{isset($_GET['kword']) ? $_GET['kword'] : ''}}" name="kword" id="kword" placeholder="{{__('antibiotic.search_placeholder')}}">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-inverse-secondary px-3 rounded-top-right-25 rounded-bottom-right-25" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_antibiotic']))
|
||||
<button class="btn btn-inverse-success waves-effect px-3 ml-2 rounded-25" type="button" data-action="new" data-toggle="modal" data-target="#modal-antibiotic" data-backdrop="static"><i class="typcn typcn-plus"></i> {{__('general.btn_add_new')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2" width="50px">{{__('antibiotic.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('antibiotic.table_action')}}</th>
|
||||
<th class="py-2">{{__('antibiotic.table_name')}}</th>
|
||||
{{-- <th class="py-2">Laboratory</th>--}}
|
||||
{{-- <th class="py-2 text-center" width="100px">{{__('antibiotic.table_status')}}</th>--}}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($antibiotics as $k=>$antibiotic)
|
||||
<tr>
|
||||
<td class="py-1 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_antibiotic']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-info mr-2 py-1" title="{{__('general.btn_edit')}}" data-action="edit" data-uid="{{$antibiotic->id}}" data-toggle="modal" data-target="#modal-antibiotic" data-backdrop="static">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if($antibiotic->record_status_id==0)
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary " title="Restore" onclick="restore_data({{$antibiotic->id}})"><i class="typcn typcn-plus"></i></button>
|
||||
@else
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_antibiotic']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger py-1" title="{{__('general.btn_delete')}}" onclick="delete_data({{$antibiotic->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-1">{{$antibiotic->name_en}}</td>
|
||||
{{-- <td class="py-1">{{$antibiotic->lab->name_en}}</td>--}}
|
||||
{{-- <td class="py-1 text-center">--}}
|
||||
{{-- <i class="mdi {{$antibiotic->record_status_id == 1 ? 'mdi-check-circle text-primary' : 'mdi-checkbox-blank-circle-outline'}}"></i>--}}
|
||||
{{-- </td>--}}
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $antibiotics->appends($_GET)->links('pagination.custom') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<div class="modal fade modal-primary" id="modal-antibiotic">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title new">{{__('Sample Source')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form method="post" action="#" id="form" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('antibiotic.form_name')}} <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" name="name_en" id="name-en" placeholder="Antibiotic name">
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('antibiotic.form_sort')}}</label>
|
||||
<input type="number" class="form-control" value="0" name="weight" id="weight">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info rounded-25" id="btnSave"><i class="fa fa-floppy-o"></i> <span class="save">{{__('general.btn_save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-secondary rounded-25 mx-3" data-dismiss='modal'>{{__('general.btn_cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script>
|
||||
|
||||
var save_url = "{{url('antibiotic.save')}}";
|
||||
var update_url = "{{url('antibiotic.update')}}";
|
||||
var delete_url = "{{url('antibiotic.delete')}}";
|
||||
var restore_url = "{{url('antibiotic.restore')}}";
|
||||
var get_url = "{{url('antibiotic.get')}}";
|
||||
|
||||
let modal_add_title = "{{__('antibiotic.form_add_tittle')}}";
|
||||
let modal_edit_title = "{{__('antibiotic.form_edit_tittle')}}";
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/antibiotic.js')}}"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,272 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('sidebar.appointment')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
|
||||
<form method="get" action="{{url('appointment/search')}}">
|
||||
<div class="row">
|
||||
<div class="col-sm-7">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<input type="date" value="{{isset($_GET['appointment_date']) ? $_GET['appointment_date'] : ''}}" class="form-control rounded-top-left-25 rounded-bottom-left-25 rounded-right-0" name="appointment_date">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-inverse-secondary px-3 rounded-top-right-25 rounded-bottom-right-25" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_appointment']))
|
||||
<button class="btn btn-sm btn-inverse-success rounded-25 waves-effect px-3 ml-3" type="button" data-action="new" data-toggle="modal" data-target="#modal-appointment" data-backdrop="static"><i class="typcn typcn-plus"></i> {{__('general.btn_add_new')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<hr class="my-3 d-none">
|
||||
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="quantity_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2" width="50px">{{__('comment.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('comment.table_action')}}</th>
|
||||
<th class="py-2">{{__('appointment.patient')}}</th>
|
||||
<th class="py-2">{{__('appointment.date')}}</th>
|
||||
<th class="py-2">{{__('appointment.type')}}</th>
|
||||
<th class="py-2">{{__('appointment.doctor')}}</th>
|
||||
<th class="py-2">{{__('appointment.description')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($appointments as $k=>$appointment)
|
||||
<tr>
|
||||
<td class="py-2 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_sample']))
|
||||
<a href="{{url('sample/patient/'.$appointment->patient->id)}}/new" class="btn btn-sm btn-inverse-success mr-2 pt-1" title="{{__('sample.form_btn_new_sample')}}"><i class="mdi mdi-test-tube"></i> <i class="mdi mdi-plus" style="margin-left: -10px;"></i></a>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_appointment']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-info mr-2" title="{{__('general.btn_edit')}}" data-action="edit" data-uid="{{$appointment->id}}" data-toggle="modal" data-target="#modal-appointment" data-backdrop="static">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_appointment']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger " title="{{__('general.btn_delete')}}" onclick="delete_data({{$appointment->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-2">{{$appointment->patient->name_en . ' - ' .$appointment->patient->phone_number}}</td>
|
||||
<td class="py-2">{{date('d-M-Y h:i A', strtotime($appointment->appointment_date))}}</td>
|
||||
<td class="py-1">{{$appointment->appointment_type}}</td>
|
||||
<td class="py-1">{{$appointment->doctor->name_en ?? ''}}</td>
|
||||
<td class="py-1">{{$appointment->description}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $appointments->appends($_GET)->links('pagination.custom') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('modal.appointment')
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script>
|
||||
|
||||
let base_url = "{{url('appointment')}}";
|
||||
|
||||
$('#patient-id').select2({
|
||||
tags: false,
|
||||
allowClear: true,
|
||||
ajax: {
|
||||
url: '{{url('patient/live-search')}}',
|
||||
dataType: 'json',
|
||||
delay: 10
|
||||
}
|
||||
});
|
||||
|
||||
$("#btnSaveAppointment").on('click',function(e){
|
||||
e.preventDefault();
|
||||
data_id = $('#data-id').val();
|
||||
let url = base_url.toString() + (data_id < 1 ? '/save' : '/update').toString();
|
||||
$.ajax({
|
||||
url: url,
|
||||
type:"POST",
|
||||
data :{
|
||||
"_token": csrf_token,
|
||||
uid : data_id,
|
||||
patient_id: $('#patient-id').val(),
|
||||
appointment_type: $('#appointment_type').val(),
|
||||
appointment_date: $('#appointment_date').val(),
|
||||
doctor_id: $('#doctor_id').val(),
|
||||
description : $('#description').val()
|
||||
},
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
if(res.success) setTimeout(function () {location.reload()}, messageDuration)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function delete_data(uid){
|
||||
Swal.fire({
|
||||
text: confirm_delete_record,
|
||||
icon: 'question',
|
||||
showCancelButton: true,
|
||||
cancelButtonClass:'danger',
|
||||
confirmButtonText: confirm_ok_delete,
|
||||
cancelButtonText: confirm_cancel
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
$.ajax({
|
||||
url: base_url.toString() + '/delete',
|
||||
method:'POST',
|
||||
data:{
|
||||
"_token": csrf_token,
|
||||
uid : uid,
|
||||
},
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
if(res.success) setTimeout(function () {location.reload()}, messageDuration)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('#modal-appointment').on('show.bs.modal', function (event) {
|
||||
var button = $(event.relatedTarget) // Button that triggered the modal
|
||||
var action = button.data('action') // Extract info from data-* attributes
|
||||
var modal = $(this);
|
||||
$('#comment-desc').val("");
|
||||
if(action === "new"){
|
||||
// Clear inputs
|
||||
modal.find('.modal-body input[name="uid"]').val(0);
|
||||
modal.find('.modal-body select[name="patient_id"]').val('').trigger('change')
|
||||
modal.find('.modal-body select[name="appointment_type"]').val('').trigger('change')
|
||||
modal.find('.modal-body select[name="doctor_id"]').val('').trigger('change')
|
||||
$('#description').val('')
|
||||
}else if(action === "edit"){
|
||||
uid = button.data('uid');
|
||||
modal.find('.modal-body input[name="uid"]').val(uid);
|
||||
$.ajax({
|
||||
url: base_url.toString() + '/get',
|
||||
type:"POST",
|
||||
data:{
|
||||
"_token": csrf_token,
|
||||
uid: uid,
|
||||
},
|
||||
success:function(res){
|
||||
let data = res.data;
|
||||
modal.find('.modal-body select[name="patient_id"]').val(data.patient_id).trigger('change');
|
||||
modal.find('.modal-body select[name="appointment_type"]').val(data.appointment_type).trigger('change');
|
||||
modal.find('.modal-body select[name="doctor_id"]').val(data.doctor_id).trigger('change');
|
||||
modal.find('.modal-body input[name="appointment_date"]').val(data.appointment_date);
|
||||
$('#description').val(data.description)
|
||||
if(!res.success) handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
function searchPatientToForm(patientElementId){
|
||||
Swal.fire({
|
||||
html:"<p style='text-align: left;'>Search the patient with their name, phone, Khmer ID, or patient ID</p>",
|
||||
input: "text",
|
||||
showCancelButton: !0,
|
||||
confirmButtonText: "<i class='fa fa-search mr-2'></i>Search",
|
||||
cancelButtonText: "Close",
|
||||
position: 'top',
|
||||
showLoaderOnConfirm: !1,
|
||||
confirmButtonColor: "#4fb51a",
|
||||
preConfirm: function (n) {
|
||||
return new Promise(function (t) {
|
||||
$.ajax({
|
||||
url: patient_base_url + "/async",
|
||||
method:'get',
|
||||
dataType:'json',
|
||||
data:{kword: n},
|
||||
success:function(response)
|
||||
{
|
||||
if(response.data.length<1 || !response.success){
|
||||
Swal.showValidationMessage('No patient found!')
|
||||
Swal.enableButtons()
|
||||
}
|
||||
else {
|
||||
t(response.data)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
allowOutsideClick:!1,
|
||||
}).then(function (t) {
|
||||
if(!t.dismiss){
|
||||
$('#'+patientElementId).html('');
|
||||
t.value.map(item =>{
|
||||
var patientOption = document.createElement('OPTION');
|
||||
patientOption.setAttribute('value',item.id);
|
||||
patientOption.text = item.patient_uuid + ' - ' + item.name_en;
|
||||
$('#'+patientElementId).append(patientOption);
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$("#searchPatientAddForm").click(function () {
|
||||
searchPatientToForm('patient-id')
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">Bacteriology Report</h4>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="start_date" class="col-sm-5 col-form-label">Start Date (dd/mm/yyyy)</label>
|
||||
<input type="text" class="form-control form-control-sm col-sm-7" id="start_date" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="end_date" class="col-sm-5 col-form-label">End Date (dd/mm/yyyy)</label>
|
||||
<input type="text" class="form-control form-control-sm col-sm-7" id="end_date" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="sample_source" class="col-sm-5 col-form-label">Sample Type</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="sample_source">
|
||||
<option value="none">Select</option>
|
||||
<option>Blood Culture</option>
|
||||
<option>Urine</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="physician_name" class="col-sm-5 col-form-label">Organism</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="physician_name">
|
||||
<option value="none">Select</option>
|
||||
<option>Burkhudorial</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row float-right">
|
||||
<div class="col-md-12">
|
||||
<button type="button" class="btn btn-info btn-icon-text">
|
||||
<i class="typcn typcn-eye btn-icon-prepend"></i>
|
||||
Preview
|
||||
</button>
|
||||
<button type="button" class="btn btn-info btn-icon-text">
|
||||
<i class="typcn typcn-printer btn-icon-prepend"></i>
|
||||
Print
|
||||
</button>
|
||||
|
||||
<button type="button" class="btn btn-warning btn-icon-text">
|
||||
<i class="typcn typcn-refresh-outline btn-icon-prepend"></i>
|
||||
Reset
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
}
|
||||
|
||||
.container-box {
|
||||
background: #37ff761c;
|
||||
background: #ffffffa1;
|
||||
border-radius: 15px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 0 20px rgba(0, 0, 0, 0.24);
|
||||
@@ -160,10 +160,10 @@
|
||||
<i class="mdi mdi-hospital-building position-absolute" style="top:10px; left:15px;"></i>
|
||||
</div>
|
||||
<div class="form-group" style="flex: 1 !important;">
|
||||
<select class="form-control select2 form-control-lg text-dark" name="lab_id" style=" width: 100% !important;">
|
||||
<select class="form-control select2 form-control-lg text-dark" name="organization_id" style=" width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($labs as $lab)
|
||||
<option value="{{$lab->id}}">{{ $lab->name}}</option>
|
||||
@foreach($organizations as $organization)
|
||||
<option value="{{$organization->id}}">{{ $organization->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -1,159 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<style>
|
||||
.center {
|
||||
height:100%;
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
|
||||
}
|
||||
.form-input {
|
||||
width:250px;
|
||||
padding:20px;
|
||||
}
|
||||
.form-input img {
|
||||
width:100%;
|
||||
display:{{''==''?'none':'block'}};
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.form-input input {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.form-input label {
|
||||
height:25px;
|
||||
background:#cdcdcd26;
|
||||
color:#c9c9c9;
|
||||
cursor:pointer;
|
||||
width: 75px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('laboratory.clone_lab')}}</h4>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<form method="post" action="{{url('laboratory/clone-data')}}" class="p-2" id="form-test-sample">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('laboratory.source_lab')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group" id="testItem">
|
||||
<div class="form-group" style="flex: 1 !important;">
|
||||
<select class="form-control rounded-0 select2" required name="source_lab" id="source-lab" style=" width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($labs as $department)
|
||||
@if($department->id == Session::get('base_lab_id'))
|
||||
<option value="{{$department->id}}">{{$department->name_en }}</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
{{-- <div class="input-group-append">--}}
|
||||
{{-- <button id="btnViewLabData" class="btn btn-sm rounded-0 btn-info px-3" type="button">View Data</button>--}}
|
||||
{{-- </div>--}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="data">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('laboratory.target_lab')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control rounded-0 select2" required name="target_lab" id="target-lab" style=" width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($labs as $department)
|
||||
@if($department->id != Session::get('base_lab_id'))
|
||||
<option value="{{$department->id}}">{{$department->name_en}}</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 text-right">
|
||||
<button class="btn rounded-0 btn-info px-3" type="submit"><i class="mdi mdi-content-duplicate"></i> {{__('laboratory.start_clone')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
</body>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
var base_url = "{{url('laboratory-profile')}}";
|
||||
|
||||
|
||||
$("#btnViewLabData").on('click',function(e){
|
||||
e.preventDefault();
|
||||
data_id = $('#data-id').val();
|
||||
let url = "{{url('laboratory/get-data')}}/"+$('#source-lab').val();
|
||||
$.ajax({
|
||||
url: url,
|
||||
type:"get",
|
||||
success:function(res){
|
||||
if(res.success){
|
||||
let data = (res.data)
|
||||
data.map(item =>{
|
||||
console.log(item)
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('comment.table_title')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
|
||||
<form method="get" action="{{url('comment/search')}}">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control rounded-top-left-25 rounded-bottom-left-25 rounded-right-0" value="{{isset($_GET['kword']) ? $_GET['kword'] : ''}}" name="kword" id="kword" placeholder="{{__('comment.search_placeholder')}}">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-inverse-secondary px-3 rounded-top-right-25 rounded-bottom-right-25" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_comment']))
|
||||
<button class="btn btn-inverse-success waves-effect px-3 ml-2 rounded-25" type="button" data-action="new" data-toggle="modal" data-target="#modal-comment" data-backdrop="static"><i class="typcn typcn-plus"></i> {{__('general.btn_add_new')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover" id="quantity_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2" width="50px">{{__('comment.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('comment.table_action')}}</th>
|
||||
<th class="py-2">{{__('comment.table_name')}}</th>
|
||||
<th class="py-2" width="250px">{{__('comment.table_sample_type')}}</th>
|
||||
<th class="py-2" width="250px">{{__('comment.table_department')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('comment.table_status')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($comments as $k=>$comment)
|
||||
<tr>
|
||||
<td class="py-2 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_comment']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-info mr-2 py-1" title="{{__('general.btn_edit')}}" data-action="edit" data-uid="{{$comment->id}}" data-toggle="modal" data-target="#modal-comment" data-backdrop="static">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if($comment->record_status_id==0)
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary " title="Restore" onclick="restore_data({{$comment->id}})"><i class="typcn typcn-plus"></i></button>
|
||||
@else
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_comment']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger py-1" title="{{__('general.btn_delete')}}" onclick="delete_data({{$comment->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-2">{{substr($comment->comment_desc,0,50)}}...</td>
|
||||
<td class="py-2">{{$comment->sample_type->name_en}}</td>
|
||||
<td class="py-1">{{$comment->sample_type->department->name_en}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<i class="mdi {{$comment->record_status_id == 1 ? 'mdi-check-circle text-primary' : 'mdi-checkbox-blank-circle-outline'}}"></i>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $comments->appends($_GET)->links('pagination.custom') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<div class="modal fade modal-primary" id="modal-comment">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title new">{{__('comment.form_add_tittle')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form method="post" action="#" id="form" onkeydown="return (event.key != 'Enter' || (event.target.matches('textarea')));">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-code" class="control-label">{{__('comment.form_department')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control select2" name="department_id" id="department-id" style="width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($departments as $department)
|
||||
<option value="{{$department->id}}">{{$department->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-code" class="control-label">{{__('comment.form_sample_type')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control select2" name="sample_type_id" multiple id="sample-type-id" style="width: 100% !important;">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('comment.form_name')}} <span class="text-danger">*</span></label>
|
||||
<!--<input type="text" class="form-control" name="comment_desc" id="comment-desc" placeholder="{{__('comment.form_name')}}">-->
|
||||
<textarea class="form-control" rows="3" style="line-height:25px" name="comment_desc" id="comment-desc" placeholder="{{__('comment.form_name')}}"></textarea>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info rounded-25" id="btnSave"><i class="fa fa-floppy-o"></i> <span class="save">{{__('general.btn_save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-secondary rounded-25 mx-3" data-dismiss='modal'>{{__('general.btn_cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script>
|
||||
|
||||
let base_comment_url = "{{url('comment')}}";
|
||||
let modal_add_title = "{{__('comment.form_add_tittle')}}";
|
||||
let modal_edit_title = "{{__('comment.form_edit_tittle')}}";
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/comment.js')}}"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,532 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<style>
|
||||
.content-wrapper .card {
|
||||
border: 0px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 mb-0 grid-margin stretch-card flex-column">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3 grid-margin stretch-card">
|
||||
<div class="card shadow rounded" style="border-radius: 25px" >
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dropdown pull-right">
|
||||
<button class="btn bg-white p-0 pb-1 text-muted btn-sm dropdown-toggle" type="button" id="dropdownMenuSizeButton4" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuSizeButton4">
|
||||
<a class="dropdown-item" href="#" onclick="filterSample('today')">{{__('general.chart_filter_today')}}</a>
|
||||
<a class="dropdown-item" href="#" onclick="filterSample('this_month')">{{__('general.chart_filter_this_month')}}</a>
|
||||
<a class="dropdown-item" href="#" onclick="filterSample('this_year')">{{__('general.chart_filter_this_year')}}</a>
|
||||
{{-- <a class="dropdown-item" href="#" onclick="filterSample('last_year')">{{__('general.chart_filter_last_year')}}</a> --}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col mr-2">
|
||||
<div class="text-xs font-weight-bold text-uppercase mb-1"> {{ __('general.total_samples') }}</div>
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
<h5 class="mb- font-weight-bold text-info" id="totalSample">{{number_format($totalSample,0)}}</h5>
|
||||
<div class="d-flex align-items-baseline" id="growthSampleBox">
|
||||
@if($growthSample>=0)
|
||||
<i class="typcn typcn-arrow-up-thick text-primary"></i>
|
||||
<p class="text-primary mb-0">{{$growthSample}}%</p>
|
||||
@else
|
||||
<i class="typcn typcn-arrow-down-thick text-danger"></i>
|
||||
<p class="text-danger mb-0">{{$growthSample}}%</p>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<p class="font-weight-bold ml-2 text-info" id="sampleData">{{__($displaySample)}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 grid-margin stretch-card">
|
||||
<div class="card shadow rounded" style="border-radius: 25px" >
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dropdown pull-right">
|
||||
<button class="btn bg-white p-0 pb-1 text-muted btn-sm dropdown-toggle" type="button" id="dropdownMenuSizeButton4" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuSizeButton4">
|
||||
<a class="dropdown-item" href="#" onclick="filterIncome('today')">{{__('general.chart_filter_today')}}</a>
|
||||
<a class="dropdown-item" href="#" onclick="filterIncome('this_month')">{{__('general.chart_filter_this_month')}}</a>
|
||||
<a class="dropdown-item" href="#" onclick="filterIncome('this_year')">{{__('general.chart_filter_this_year')}}</a>
|
||||
{{-- <a class="dropdown-item" href="{{url('dashboard?filter=income&dt=last_year')}}">{{__('general.chart_filter_last_year')}}</a> --}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col mr-2">
|
||||
<div class="text-xs font-weight-bold text-uppercase mb-1"> {{ __('general.total_income') }}</div>
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
<h5 class="mb- font-weight-bold text-info" id="totalIncome">$ {{number_format($totalIncome,2)}}</h5>
|
||||
<div class="d-flex align-items-baseline" id="growthIncomeBox">
|
||||
@if($growthIncome>=0)
|
||||
<i class="typcn typcn-arrow-up-thick text-primary"></i>
|
||||
<p class="text-primary mb-0">{{$growthIncome}}%</p>
|
||||
@else
|
||||
<i class="typcn typcn-arrow-down-thick text-danger"></i>
|
||||
<p class="text-danger mb-0">{{$growthIncome}}%</p>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<p class="text-info font-weight-bold ml-2" id="displayIncome">{{__($displayIncome)}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 grid-margin stretch-card">
|
||||
<div class="card shadow rounded" style="border-radius: 25px" >
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dropdown pull-right">
|
||||
<button class="btn bg-white p-0 pb-1 text-muted btn-sm dropdown-toggle" type="button" id="dropdownMenuSizeButton4" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuSizeButton4">
|
||||
<a class="dropdown-item" href="#" onclick="filterPatient('today')">{{__('general.chart_filter_today')}}</a>
|
||||
<a class="dropdown-item" href="#" onclick="filterPatient('this_month')">{{__('general.chart_filter_this_month')}}</a>
|
||||
<a class="dropdown-item" href="#" onclick="filterPatient('this_year')">{{__('general.chart_filter_this_year')}}</a>
|
||||
{{-- <a class="dropdown-item" href="#" onclick="filterPatient('last_year')">{{__('general.chart_filter_last_year')}}</a> --}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col mr-2">
|
||||
<div class="text-xs font-weight-bold text-uppercase mb-1"> {{ __('general.total_patient') }}</div>
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
<h5 class="mb- font-weight-bold text-info" id="totalPatient">{{number_format($totalPatient,0)}}</h5>
|
||||
<div class="d-flex align-items-baseline" id="growthPatientBox">
|
||||
@if($growthPatient>=0)
|
||||
<i class="typcn typcn-arrow-up-thick text-primary"></i>
|
||||
<p class="text-primary mb-0">{{$growthPatient}}%</p>
|
||||
@else
|
||||
<i class="typcn typcn-arrow-down-thick text-danger"></i>
|
||||
<p class="text-danger mb-0">{{$growthPatient}}%</p>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<p class="text-info font-weight-bold ml-2" id="displayPatient">{{__($displayPatient)}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 grid-margin stretch-card">
|
||||
<div class="card shadow rounded" style="border-radius: 25px" >
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dropdown pull-right">
|
||||
<button class="btn bg-white p-0 pb-1 text-muted btn-sm dropdown-toggle" type="button" id="dropdownMenuSizeButton4" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuSizeButton4">
|
||||
<a class="dropdown-item" href="#" onclick="filterRejectedSample('today')">{{__('general.chart_filter_today')}}</a>
|
||||
<a class="dropdown-item" href="#" onclick="filterRejectedSample('this_month')">{{__('general.chart_filter_this_month')}}</a>
|
||||
<a class="dropdown-item" href="#" onclick="filterRejectedSample('this_year')">{{__('general.chart_filter_this_year')}}</a>
|
||||
{{-- <a class="dropdown-item" href="#" onclick="filterRejectedSample('last_year')">{{__('general.chart_filter_last_year')}}</a> --}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col mr-2">
|
||||
<div class="text-xs font-weight-bold text-uppercase mb-1"> {{ __('general.total_rejected_sample') }}</div>
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
<h5 class="mb- font-weight-bold text-info" id="totalRejectedSample">{{number_format($totalRejectedSample,0)}}</h5>
|
||||
<div class="d-flex align-items-baseline" id="growthRejectedSampleBox">
|
||||
@if($growthRejectedSample>=0)
|
||||
<i class="typcn typcn-arrow-up-thick text-primary"></i>
|
||||
<p class="text-primary mb-0">{{$growthRejectedSample}}%</p>
|
||||
@else
|
||||
<i class="typcn typcn-arrow-down-thick text-danger"></i>
|
||||
<p class="text-danger mb-0">{{$growthRejectedSample}}%</p>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<p class="text-info font-weight-bold ml-2" id="displayRejectedSample">{{($displayRejectedSample)}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xl-6 grid-margin stretch-card">
|
||||
<div class="card bg-inverse-light shadow rounded" style="border-radius:25px">
|
||||
<div class="card-body border-bottom">
|
||||
<div class="d-flex justify-content-between align-items-center flex-wrap">
|
||||
<h6 class="mb-2 mb-md-0 text-uppercase font-weight-medium">{{ __('general.monthly_sample_trend') }}</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<canvas id="samplesCompare"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-xl-6 grid-margin stretch-card">
|
||||
<div class="card bg-inverse-light shadow rounded" style="border-radius:25px">
|
||||
<div class="card-body border-bottom">
|
||||
<div class="d-flex justify-content-between align-items-center flex-wrap">
|
||||
<h6 class="mb-2 mb-md-0 text-uppercase font-weight-medium">{{ __('general.monthly_income_trend') }}</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<canvas id="revenueCompare"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xl-6 grid-margin stretch-card">
|
||||
<div class="card bg-inverse-light shadow rounded" style="border-radius:25px">
|
||||
<div class="card-body border-bottom">
|
||||
<div class="d-flex justify-content-between align-items-center flex-wrap">
|
||||
<h6 class="mb-2 mb-md-0 text-uppercase font-weight-medium">{{ __('general.sample_source_distribution') }}</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<canvas id="sourceDistributor"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-xl-6 grid-margin stretch-card">
|
||||
<div class="card bg-inverse-light shadow rounded" style="border-radius:25px">
|
||||
<div class="card-body border-bottom">
|
||||
<div class="d-flex justify-content-between align-items-center flex-wrap">
|
||||
<h6 class="mb-2 mb-md-0 text-uppercase font-weight-medium">{{ __('general.panel_distribution') }}</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<canvas id="topTests"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/chart.js/Chart.min.js')}}"></script>
|
||||
{{-- <script src="{{url(env("APP_URL").'storage/assets/js/chart.js')}}"></script> --}}
|
||||
<script>
|
||||
function generateColorCodeByYear(year) {
|
||||
const seed = parseInt(year.toString().slice(-2));
|
||||
const red = (Math.sin(seed * 1) * 127 + 128) | 0;
|
||||
const green = (Math.sin(seed * 2) * 127 + 128) | 0;
|
||||
const blue = (Math.sin(seed * 3) * 127 + 128) | 0;
|
||||
|
||||
return `#${red.toString(16).padStart(2, '0')}${green.toString(16).padStart(2, '0')}${blue.toString(16).padStart(2, '0')}`;
|
||||
}
|
||||
|
||||
function generateColors(count) {
|
||||
const baseColors = [
|
||||
'#2563eb',
|
||||
'#16a34a',
|
||||
'#f59e0b',
|
||||
'#dc2626',
|
||||
'#8b5cf6',
|
||||
'#14b8a6',
|
||||
'#e11d48',
|
||||
'#10b981',
|
||||
'#f97316',
|
||||
'#3b82f6',
|
||||
'#22c55e',
|
||||
'#fbbf24',
|
||||
'#ef4444',
|
||||
'#a855f7',
|
||||
'#06b6d4',
|
||||
'#e53935',
|
||||
];
|
||||
|
||||
return Array.from({ length: count }, (_, i) =>
|
||||
baseColors[i % baseColors.length]
|
||||
);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var urlSourceDistribution = "{{url('dashboard/source-distribution')}}";
|
||||
fetch(urlSourceDistribution)
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
const labels = data.map(d => d.sample_source);
|
||||
const counts = data.map(d => d.total_samples);
|
||||
|
||||
const colors = generateColors(labels.length);
|
||||
|
||||
new Chart(document.getElementById('sourceDistributor'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: labels,
|
||||
datasets: [{
|
||||
label: '{{__("general.total_samples")}}',
|
||||
data: counts,
|
||||
backgroundColor: colors
|
||||
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
legend: { position: 'bottom' }
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var urlTopTests = "{{url('dashboard/panel-distribution')}}";
|
||||
fetch(urlTopTests)
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
const labels = data.map(d => d.panel);
|
||||
const counts = data.map(d => d.total_samples);
|
||||
|
||||
const panelDisColors = generateColors(labels.length);
|
||||
|
||||
new Chart(document.getElementById('topTests'), {
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
labels: labels,
|
||||
datasets: [{
|
||||
label: '{{__("general.total_samples")}}',
|
||||
data: counts,
|
||||
backgroundColor: panelDisColors
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
legend: { position: 'bottom' },
|
||||
scales: {
|
||||
y: { beginAtZero: true }
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
function renderGrowth(growthData, boxId) {
|
||||
let icon = '';
|
||||
let colorClass = '';
|
||||
|
||||
if (growthData>= 0) {
|
||||
icon = '<i class="typcn typcn-arrow-up-thick text-primary"></i>';
|
||||
colorClass = 'text-primary';
|
||||
} else {
|
||||
icon = '<i class="typcn typcn-arrow-down-thick text-danger"></i>';
|
||||
colorClass = 'text-danger';
|
||||
}
|
||||
|
||||
boxId.innerHTML = `
|
||||
${icon}
|
||||
<p class="${colorClass} mb-0">${growthData}%</p>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
var urlFilterSample = "{{url('dashboard/filter/samples')}}";
|
||||
function filterSample(filter) {
|
||||
fetch(`${urlFilterSample}?dt=${filter}`)
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
renderGrowth(data.growthSample, document.getElementById('growthSampleBox'));
|
||||
$('#sampleData').text(data.displaySample);
|
||||
$('#totalSample').text(data.displaySampleResult);
|
||||
});
|
||||
}
|
||||
|
||||
var urlFilterIncome = "{{url('dashboard/filter/income')}}";
|
||||
function filterIncome(filter) {
|
||||
fetch(`${urlFilterIncome}?dt=${filter}`)
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
renderGrowth(data.growthIncome, document.getElementById('growthIncomeBox'));
|
||||
$('#displayIncome').text(data.displayIncome);
|
||||
$('#totalIncome').text('$ ' + data.displayIncomeResult);
|
||||
});
|
||||
}
|
||||
|
||||
var urlFilterPatient = "{{url('dashboard/filter/patient')}}";
|
||||
function filterPatient(filter) {
|
||||
fetch(`${urlFilterPatient}?dt=${filter}`)
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
renderGrowth(data.growthPatient, document.getElementById('growthPatientBox'));
|
||||
$('#displayPatient').text(data.displayPatient);
|
||||
$('#totalPatient').text(data.displayPatientResult);
|
||||
});
|
||||
}
|
||||
|
||||
var urlFilterRejectedSample = "{{url('dashboard/filter/rejected-sample')}}";
|
||||
function filterRejectedSample(filter) {
|
||||
fetch(`${urlFilterRejectedSample}?dt=${filter}`)
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
renderGrowth(data.growthRejectedSample, document.getElementById('growthRejectedSampleBox'));
|
||||
$('#displayRejectedSample').text(data.displayRejectedSample);
|
||||
$('#totalRejectedSample').text(data.displayRejectedSampleResult);
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
const now = new Date();
|
||||
|
||||
const trend_thisYear = now.getFullYear();
|
||||
const trend_lastYear = trend_thisYear - 1;
|
||||
var urlTrend = "{{url('dashboard/trend/samples-comparison')}}";
|
||||
fetch(urlTrend)
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
|
||||
const labels = data.map(d => d.month);
|
||||
const thisYear = data.map(d => d.this_year);
|
||||
const lastYear = data.map(d => d.last_year);
|
||||
|
||||
new Chart(document.getElementById('samplesCompare'), {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: labels,
|
||||
datasets: [
|
||||
{
|
||||
label: trend_thisYear,
|
||||
data: thisYear,
|
||||
borderColor: '#ffffff', //green
|
||||
backgroundColor: 'rgba(235,156,37,0.85)',
|
||||
tension: 0.4,
|
||||
fill: true
|
||||
},
|
||||
{
|
||||
label: trend_lastYear,
|
||||
data: lastYear,
|
||||
borderColor: '#ffffff', //green
|
||||
backgroundColor: 'rgba(4,100,144,0.96)',
|
||||
tension: 0.4,
|
||||
fill: true
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
legend: { position: 'bottom' },
|
||||
scales: {
|
||||
y: { beginAtZero: true }
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var urlRevenueTrend = "{{url('dashboard/trend/revenue-comparison')}}";
|
||||
fetch(urlRevenueTrend)
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
|
||||
const labels = data.map(d => d.month);
|
||||
const thisYear = data.map(d => d.this_year);
|
||||
const lastYear = data.map(d => d.last_year);
|
||||
|
||||
new Chart(document.getElementById('revenueCompare'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: labels,
|
||||
datasets: [
|
||||
{
|
||||
label: trend_thisYear,
|
||||
data: thisYear,
|
||||
borderColor: '#2563eb', // blue
|
||||
backgroundColor: 'rgba(37, 99, 235, 0.1)',
|
||||
tension: 0.4,
|
||||
fill: true
|
||||
},
|
||||
{
|
||||
label: trend_lastYear,
|
||||
data: lastYear,
|
||||
borderColor: '#10b981', //green
|
||||
backgroundColor: 'rgba(16, 185, 129, 0.1)',
|
||||
tension: 0.4,
|
||||
fill: true
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
legend: { position: 'bottom' },
|
||||
scales: {
|
||||
y: { beginAtZero: true }
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,164 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('department.table_title')}}</h4>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form method="get" action="{{url('department/search')}}">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control rounded-top-left-25 rounded-bottom-left-25 rounded-right-0" value="{{isset($_GET['kword']) ? $_GET['kword'] : ''}}" name="kword" id="kword" placeholder="{{__('department.search_placeholder')}}">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-inverse-secondary px-3 rounded-top-right-25 rounded-bottom-right-25" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_department']))
|
||||
<button class="btn btn-inverse-success waves-effect px-3 ml-2 rounded-25" type="button" data-action="new" data-toggle="modal" data-target="#modal-department" data-backdrop="static"><i class="typcn typcn-plus"></i> {{__('general.btn_add_new')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2" width="50px">{{__('department.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('department.table_action')}}</th>
|
||||
<th class="py-2">{{__('department.table_name')}}</th>
|
||||
<th class="py-2">{{__('department.table_sample_type')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($departments as $k=>$department)
|
||||
<tr>
|
||||
<td class="py-1 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_department']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-info mr-2 py-1" title="{{__('general.btn_edit')}}" data-action="edit" data-uid="{{$department->id}}" data-toggle="modal" data-target="#modal-department" data-backdrop="static">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if($department->record_status_id==0)
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary " title="Restore" onclick="restore_lab({{$department->id}})"><i class="typcn typcn-plus"></i></button>
|
||||
@else
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_department']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger py-1" title="{{__('general.btn_delete')}}" onclick="delete_lab({{$department->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-1">{{$department->name}}</td>
|
||||
<td class="py-1">
|
||||
@foreach($department->samples as $sample)
|
||||
<label style="font-size: 9px" class="badge badge-outline-info rounded-25">{{$sample->name_en}}</label>
|
||||
@endforeach
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $departments->appends($_GET)->links('pagination.custom') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<div class="modal fade modal-primary" id="modal-department">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title">{{__('department.form_add_tittle')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form method="post" action="#" id="form" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('department.form_name')}} <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" name="name_en" id="name_en" />
|
||||
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-kh">{{__('department.form_sort')}}</label>
|
||||
<input type="number" class="form-control" name="weight" id="weight" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info rounded-25" id="btnSave"><i class="fa fa-floppy-o"></i> <span class="save">{{__('general.btn_save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-secondary rounded-25 mx-3" data-dismiss='modal'>{{__('general.btn_cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
var save_url = "{{url('department.save')}}";
|
||||
var update_url = "{{url('department.update')}}";
|
||||
var delete_url = "{{url('department.delete')}}";
|
||||
var restore_url = "{{url('department.restore')}}";
|
||||
var get_url = "{{url('department.get')}}";
|
||||
|
||||
let modal_add_title = "{{__('department.form_add_tittle')}}";
|
||||
let modal_edit_title = "{{__('department.form_edit_tittle')}}";
|
||||
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/department.js')}}"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,207 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<link href="{{url(env("APP_URL").'storage/assets/libs/bootstrap-datepicker/css/bootstrap-datepicker.min.css')}}" rel="stylesheet" type="text/css" />
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/lightgallery/lightgallery.css')}}" >
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.css')}}" >
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.min.js')}}"></script>
|
||||
|
||||
<style>
|
||||
.main-panel{
|
||||
width: calc(100% - 306px) !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('sidebar.doctor_report')}}</h4>
|
||||
{{-- <small><code>*</code> is generated based on number of test selected</small>--}}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-12 py-2 inv-search">
|
||||
<form method="get" action="{{url('report/doctor-report')}}">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-5 col-lg-3">
|
||||
<div class="form-group mb-1">
|
||||
<label for="start-invoice-date">{{__('report.doctor_date_range_filter')}}</label>
|
||||
<div class="input-group">
|
||||
<input name="start_date" value="{{isset($_GET['start_date']) ? date('Y-m-d',strtotime($_GET['start_date'])) : ''}}" onfocus="(this.type='date')" onblur="(this.type='text')" placeholder="{{__('general.type_date_placeholder')}}" class="form-control rounded-right-0">
|
||||
<input name="end_date" value="{{isset($_GET['end_date']) ? date('Y-m-d',strtotime($_GET['end_date'])) : ''}}" onfocus="(this.type='date')" onblur="(this.type='text')" placeholder="{{__('general.type_date_placeholder')}}" class="form-control rounded-left-0 ">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-3 col-lg-2">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('report.doctor_sample_source_filter')}}</label>
|
||||
<select class="form-control " name="sample_source">
|
||||
<option></option>
|
||||
@foreach($sampleSources as $sampleSource)
|
||||
<option {{$sampleSource->id==@$_GET['sample_source'] ? 'selected':''}} value="{{$sampleSource->id}}">{{$sampleSource->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-3 col-lg-2">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('report.doctor_physician_filter')}}</label>
|
||||
<select class="form-control select2" name="physician">
|
||||
<option></option>
|
||||
<option {{'All'==@$_GET['physician'] ? 'selected':''}} value="All">All</option>
|
||||
@foreach($physicians as $physician)
|
||||
<option {{$physician->id==@$_GET['physician'] ? 'selected':''}} value="{{$physician->id}}">{{$physician->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-7 col-lg-5">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en"> </label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-inverse-secondary rounded-25" title="Search" type="submit"><i class="fa fa-search"></i> {{__('report.btn_view')}}</button>
|
||||
<a href="{{url('report/doctor-report')}}" class="btn rounded-25 btn-inverse-warning ml-1 mx-3 " title="Clear Search Filter"><i class="mdi mdi-filter-remove-outline"></i>{{__('general.btn_clear')}}</a>
|
||||
<button type="button" class="btn btn-light rounded-25 dropdown-toggle ml-1" data-toggle="dropdown" aria-expanded="true">{{__('report.btn_action')}}</button>
|
||||
<div class="dropdown-menu" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 44px, 0px);" x-placement="bottom-start">
|
||||
<button type="button" data-toggle="modal" data-target="#print_preview_modal" data-backdrop="static" class="dropdown-item font-14">{{__('report.btn_action_print')}}</button>
|
||||
<button type="button" data-toggle="modal" data-target="#print_preview_modal_detail" data-backdrop="static" class="dropdown-item font-14">{{__('report.btn_action_print')}} Detail Report</button>
|
||||
<button type="submit" value="true" name="export" class="dropdown-item font-14">{{__('report.btn_action_export')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
</div>
|
||||
<br>
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="department_dt">
|
||||
<thead>
|
||||
@if($report_data['report_id']==3)
|
||||
<tr class="bg-light">
|
||||
<th class="py-2">Date</th>
|
||||
<th class="py-2">Patient Name</th>
|
||||
<th class="py-2" >Sample No</th>
|
||||
<th class="py-2">Test Name</th>
|
||||
<th class="py-2">Physician Name</th>
|
||||
<th class="py-2" >Total Amount</th>
|
||||
<th class="py-2">Net Amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($report_data['report_data'] as $v)
|
||||
<tr>
|
||||
<td class="py-2 text-center">{{$v['date']}}</td>
|
||||
<td class="py-2">{{$v['patient']}}</td>
|
||||
<td class="py-2 text-center">{{$v['sample_number']}}</td>
|
||||
<td class="py-2" style="word-wrap: break-word; width:250px !important;">{{$v['test_name']}}</td>
|
||||
<td class="py-2">{{$v['physician']}}</td>
|
||||
<td class="py-2 text-right">{{$v['total_amount']}}</td>
|
||||
<td class="py-2 text-right">{{$v['total_net_amount']}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@elseif($report_data['report_id']==1)
|
||||
<tr class="bg-light">
|
||||
<th class="py-2">{{__('report.summary_clinic_name')}}</th>
|
||||
<th class="py-2 text-right" width="250px">{{__('report.doctor_exam')}}</th>
|
||||
<th class="py-2 text-right" width="250px">{{__('report.doctor_net_amount')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($report_data['report_data'] as $v)
|
||||
<tr>
|
||||
<td class="py-2">{{$v['sample_source_name']}}</td>
|
||||
<td class="py-2 text-right">{{$v['total_exam']}}</td>
|
||||
<td class="py-2 text-right">{{$v['total_net_amount']}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@else
|
||||
<tr class="bg-light">
|
||||
<th class="py-2">Physician</th>
|
||||
<th class="py-2 text-right" width="250px">Exam</th>
|
||||
<th class="py-2 text-right" width="250px">Net Amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach($report_data['report_data'] as $v)
|
||||
<tr>
|
||||
<td class="py-2">{{$v['physician_name']}}</td>
|
||||
<td class="py-2 text-right">{{$v['total_exam']}}</td>
|
||||
<td class="py-2 text-right">{{$v['total_net_amount']}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tbody>
|
||||
</tbody>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('modal.doctor_report_print')
|
||||
|
||||
@include('modal.doctor_report_detail_print')
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js')}}"></script>
|
||||
<script>
|
||||
|
||||
var base_url = "{{url('invoice')}}";
|
||||
let invoice_id = 0;
|
||||
|
||||
$(".datepicker").datepicker({
|
||||
format:'dd-mm-yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(".monthpicker").datepicker({
|
||||
format:'mm-yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(".yearpicker").datepicker({
|
||||
format:'yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
</script>
|
||||
{{--<script src="{{url(env("APP_URL").'storage/assets/js/admin/invoice.js')}}"></script>--}}
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,633 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/lightgallery/lightgallery.css')}}" >
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.css')}}" >
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.min.js')}}"></script>
|
||||
<style>
|
||||
#form-test-sample .form-group label {
|
||||
line-height: 0.2rem !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card min-vh-70">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('vaccination.edit_title')}}</h4>
|
||||
<hr>
|
||||
<form method="post" class="p-2" action="{{route('vaccination.update')}}" id="form-test-sample">
|
||||
@csrf
|
||||
<input type="hidden" name="uid" required value="{{$vaccinations->id}}">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="form-vertical sample-creation-form">
|
||||
<div class="row ">
|
||||
<div class="col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('invoice.form_patient')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group" id="testItem">
|
||||
<div class="form-group" style="flex: 1 !important;">
|
||||
<select class="form-control select2" name="patient_id" id="patient-id" style=" width: 100% !important;">
|
||||
<option {{$vaccinations->patient_id==1?'selected':''}} value="1">Walk In Patient</option>
|
||||
@foreach($patients as $patient)
|
||||
<option {{$vaccinations->patient_id==$patient->id?'selected':''}} value="{{$patient->id}}">{{($patient->patient_uuid . ' - ' . $patient->name_en) . ((!empty($patient->phone_number) ? ' - '.$patient->phone_number: ''))}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-inverse-secondary px-3" id="searchPatientAddForm" type="button"><i class="fa fa-search"></i> {{__('general.btn_search')}} </button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_patient']))
|
||||
<button class="btn btn-info waves-effect rounded-0 px-3 ml-2" type="button" data-action="new" data-toggle="modal" data-target="#modal-patient" data-backdrop="static"><i class="typcn typcn-plus"></i>
|
||||
{{__('patient.form_add_title')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-lg-3">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('vaccination.date')}} <span class="text-danger">*</span></label>
|
||||
<input type="date" value="{{date('Y-m-d',strtotime($vaccinations->vaccination_date))}}" class="form-control rounded-0" name="vaccination_date" id="invoice_date" placeholder="Invoice Date">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-lg-3">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('vaccination.next_visit')}} <span class="text-danger">*</span></label>
|
||||
<input type="date" value="{{date('Y-m-d',strtotime($vaccinations->next_visit_date))}}" class="form-control rounded-0" name="next_visit_date" id="invoice_date" placeholder="Invoice Date">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row border p-0">
|
||||
<div class="col-sm-8 p-0">
|
||||
<table class="table table-bordered" >
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<th class="py-2">{{__('vaccination.name')}}</th>
|
||||
<th width="15%" class="py-2 text-center">{{__('vaccination.unit_price')}} ($)</th>
|
||||
<th width="15%" class="py-2 text-center">{{__('vaccination.qty')}}</th>
|
||||
<th width="15%" class="py-2 text-center">{{__('vaccination.subtotal')}}</th>
|
||||
<th width="50px" class="py-2 text-right">
|
||||
<button class="btn btn-info btn-md waves-effect rounded-0" id="btn-add-new-med-item" type="button"><i class="typcn typcn-plus"></i></button>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="vaccination-item">
|
||||
@foreach($vaccinations->vaccinationDetail as $vaccination_item)
|
||||
<tr>
|
||||
<td class="py-2">
|
||||
<select name="medicine_item_id[]" class="form-control vaccine-item form-control-xxs select2" style="width: 100%;">
|
||||
<option></option>
|
||||
@foreach($medicineItems as $medicineItem)
|
||||
<option {{$vaccination_item->medicine_item_id == $medicineItem->id ? 'selected' :'' }} data-price="{{$medicineItem->sale_price}}" value="{{$medicineItem->id}}"> {{$medicineItem->medicine->name}} </option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
<td class="py-2">
|
||||
<input type="number" name="unit_price[]" value="{{$vaccination_item->unit_price}}" min="0" step="0" class="form-control unit-price">
|
||||
</td>
|
||||
<td class="py-2">
|
||||
<input type="number" name="quantity[]" value="{{$vaccination_item->qty}}" min="1" step="1" class="form-control quantity">
|
||||
</td>
|
||||
<td class="py-2">
|
||||
<input type="hidden" name="sub_total[]" class="form-control sub-total">
|
||||
<input type="number" readonly value="{{($vaccination_item->unit_price * $vaccination_item->qty) }}" class="form-control bg-white sub-total-to-display">
|
||||
</td>
|
||||
<td class="py-2">
|
||||
<button class="btn btn-danger btn-remove-vaccine-item btn-md waves-effect rounded-0" type="button"><i class="typcn typcn-trash"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-sm-4 p-4 border-left">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.exchange_rate')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" required step="any" class="form-control bg-white form-control-xxs rounded-0" value="{{($vaccinations->exchange_rate<=0 ? $labSettings->exchange_rate : $vaccinations->exchange_rate)}}" name="exchange_rate" id="exchange_rate">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.table_total_cost')}} <span class="text-danger">($)</span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" readonly required step="any" value="{{$vaccinations->total}}" class="form-control bg-white form-control-xxs rounded-0" name="total" id="total-amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.table_discount')}} <span class="text-danger">(%)</span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" required maxlength="2" step="any" value="{{$vaccinations->discount}}" class="form-control form-control-xxs rounded-0" name="discount" id="discount-amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.table_net_cost')}} <span class="text-danger"></span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" required step="any" readonly value="{{$vaccinations->gross_total}}" class="form-control bg-white form-control-xxs rounded-0" name="gross_total" id="net-amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 bg-light px-0 pt-2">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.pay_type')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-sm-7">
|
||||
<select class="form-control form-control-xxs select2_ rounded-0 py-0" name="pay_type" id="pay_type" style=" width: 100% !important;">
|
||||
<option value="1" {{$vaccinations->pay_type==1 ? 'selected' : ''}}>{{__('invoice.cash_paid')}}</option>
|
||||
<option value="2" {{$vaccinations->pay_type==2 ? 'selected' : ''}}>{{__('invoice.bank_paid')}}</option>
|
||||
<option value="3" {{$vaccinations->pay_type==3 ? 'selected' : ''}}>{{__('invoice.cash_paid')}} + {{__('invoice.bank_paid')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.table_paid')}} <small class="text-info">({{__('invoice.cash_paid')}})</small></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" required step="any" value="{{$vaccinations->deposit}}" class="form-control form-control-xxs rounded-0" name="deposit" id="paid-amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.table_paid')}} <small class="text-ifno">({{__('invoice.bank_paid')}})</small></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" required step="any" value="{{$vaccinations->bank_deposit}}" class="form-control form-control-xxs rounded-0" name="bank_deposit" id="bank-amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.form_paid_date')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="datetime-local" value="{{date('Y-m-d\TH:i:s', strtotime($vaccinations->first_paid_date))}}" class="form-control form-control-xxs rounded-0" name="first_paid_date" id="paid-date" placeholder="DD-MM-YYYY">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.bank_name')}}</label>
|
||||
<div class="col-sm-7">
|
||||
<input type="text" value="{{$vaccinations->bank_name}}" class="form-control form-control-xxs rounded-0" name="bank_name" id="bank_name">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.transaction_no')}}</label>
|
||||
<div class="col-sm-7">
|
||||
<input type="text" value="{{$vaccinations->transaction_ref}}" class="form-control form-control-xxs rounded-0" name="transaction_ref" id="transaction_ref">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.form_owe_amount')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" readonly step="any" value="{{$vaccinations->balance}}" class="form-control bg-white form-control-xxs rounded-0" name="balance" id="owe-amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 pt-4 text-right">
|
||||
<button type="button" class="btn btn-inverse-success mr-2 ml-5 btn-print-invoice" data-toggle="modal" data-target="#print_invoice_modal" data-backdrop="static"><i class="mdi mdi-printer"></i> <span>{{__('sample.btn_print')}}</span></button>
|
||||
<button class="btn btn-info" type="submit"><i class="mdi mdi-content-save"></i> {{__('vaccination.btn_save')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Patient -->
|
||||
<div class="modal fade modal-primary" id="modal-patient">
|
||||
<div class="modal-dialog show modal-semi-xxl">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title">{{__('patient.form_add_title')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form method="post" action="#" id="form" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-6 px-3">
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="patient-code">{{__('patient.form_code')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" {{$labSettings->patient_code == 1 ? ' disabled readonly ' : ''}} name="patient_code" id="patient-code" placeholder="{{__('patient.form_code')}}">
|
||||
<div class="input-group-append">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_name')}} <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" name="patient_name" id="patient-name" placeholder="{{__('patient.form_name')}}">
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-kh">{{__('patient.form_dob')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-append mr-3" style="flex: 5 !important;">
|
||||
<input class="form-control datepicker" name="dob" type="text" id="dob" placeholder="{{__('general.date_placeholder')}}" required="" autocomplete="off">
|
||||
</div>
|
||||
<input class="form-control" name="year" onkeypress="return isNumber(event);" maxlength="2" type="text" id="year" autocomplete="off">
|
||||
<div class="input-group-append" style="">
|
||||
<button class="btn btn-sm btn-light" disabled type="button">{{__('patient_type.form_input_year')}}</button>
|
||||
</div>
|
||||
|
||||
<input class="form-control" name="month" onkeypress="return isNumber(event);" maxlength="2" type="text" id="month" autocomplete="off">
|
||||
<div class="input-group-append" style="">
|
||||
<button class="btn btn-sm btn-light" disabled type="button">{{__('patient_type.form_input_month')}}</button>
|
||||
</div>
|
||||
|
||||
<input class="form-control" name="month" onkeypress="return isNumber(event);" maxlength="2" type="text" id="day" autocomplete="off">
|
||||
<div class="input-group-append" style="">
|
||||
<button class="btn btn-sm btn-light" disabled type="button">{{__('patient_type.form_input_day')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_gender')}} <span class="text-danger">*</span></label>
|
||||
<div class="form-group pl-3">
|
||||
<div class="row">
|
||||
<div class="form-check col-sm-12 col-md-12 col-lg-3" style="margin-bottom: 6px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" checked name="gender" data-id="1" value="1">
|
||||
{{__('patient.form_sex_male')}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-12 col-md-12 col-lg-3" style="margin-bottom: 6px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="gender" data-id="2" value="2"> {{__('patient.form_sex_female')}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-12 col-md-12 col-lg-3" style="margin-bottom: 6px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="gender" data-id="3" value="3"> {{__('patient.form_sex_other')}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_khid')}}</label>
|
||||
<input type="text" class="form-control" name="khid_number" id="khid-number" placeholder="{{__('patient.form_khid')}}">
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_phone')}}</label>
|
||||
<input type="text" class="form-control" name="phone_number" id="phone-number" placeholder="{{__('patient.form_phone')}}">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-6 px-3">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_house')}}</label>
|
||||
<input type="text" class="form-control" name="house_number" id="house-number" placeholder="{{__('patient.form_house')}}">
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_street')}}</label>
|
||||
<input type="text" class="form-control" name="street_number" id="street-number" placeholder="{{__('patient.form_street')}}">
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_province')}} </label>
|
||||
<select class="form-control select2" name="province_id" id="province-id" style="width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($provinces as $province)
|
||||
<option value="{{$province->id}}">{{$province->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_district')}}</label>
|
||||
<select class="form-control select2" name="district_id" id="district-id" style="width: 100% !important;">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_commune')}}</label>
|
||||
<select class="form-control select2" name="commune_id" id="commune-id" style="width: 100% !important;">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_village')}}</label>
|
||||
<select class="form-control select2" name="village_id" id="village-id" style="width: 100% !important;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info" id="savePatient"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-light" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(Auth::id()==199999999)
|
||||
@include('modal.preview_vaccination_invoice')
|
||||
@else
|
||||
@include('modal.preview_vaccination_invoice_')
|
||||
@endif
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
<script>
|
||||
|
||||
|
||||
var patient_base_url = "{{url('patient')}}";
|
||||
var get_refs_base_url = "{{url('refs')}}";
|
||||
|
||||
var is_print_invoice = "{{isset($_GET['print'])? true : false}}";
|
||||
if(is_print_invoice){
|
||||
$('.btn-print-invoice').trigger('click');
|
||||
}
|
||||
|
||||
$(function(){
|
||||
var message = '{!! session('message') !!}';
|
||||
if(message=='success')
|
||||
{
|
||||
alertify.success("@lang('vaccination.update_success')");
|
||||
}
|
||||
if(message=='error')
|
||||
{
|
||||
alertify.error("@lang('vaccination.update_fail')");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/moment/moment.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/moment/moment-precise-range.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.min.js')}}"></script>
|
||||
<script>
|
||||
|
||||
$(document).on('change','.vaccine-item', function () {
|
||||
let unit_price = $('option:selected', this).attr('data-price');
|
||||
let quantity = $(this).closest('tr').find('.quantity').val();
|
||||
let total = unit_price * quantity
|
||||
$(this).closest('tr').find('.unit-price').val(unit_price);
|
||||
$(this).closest('tr').find('.sub-total').val(total);
|
||||
calculateVaccineData();
|
||||
})
|
||||
|
||||
$(document).on('change','#vaccination-item .unit-price, #vaccination-item .quantity', function () {
|
||||
calculateVaccineData();
|
||||
})
|
||||
|
||||
$(document).on('click','.btn-remove-vaccine-item', function () {
|
||||
if($('#vaccination-item tr').length>1){
|
||||
Swal.fire({
|
||||
text: confirm_delete_record,
|
||||
icon: 'question',
|
||||
showCancelButton: true,
|
||||
cancelButtonClass:'danger',
|
||||
confirmButtonText: confirm_ok_delete,
|
||||
cancelButtonText: confirm_cancel
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
$(this).closest('tr').remove()
|
||||
calculateVaccineData();
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
$('#btn-add-new-med-item').click(function () {
|
||||
var $tr = $('#vaccination-item').find('tr:last');
|
||||
var $clone = $tr.clone();
|
||||
$clone.find('td:eq(0) span').remove()
|
||||
$clone.find('.unit-price').val(0);
|
||||
$clone.find('.quantity').val(1);
|
||||
$clone.find('.vaccine-item').val('');
|
||||
$clone.find('.sub-total').val(0);
|
||||
$clone.find('.sub-total-to-display').val(0);
|
||||
$('#vaccination-item').append($clone)
|
||||
|
||||
$(".select2").select2({
|
||||
placeholder: '',
|
||||
allowClear: true,
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
function calculateVaccineData() {
|
||||
let total_amt = 0;
|
||||
$('#vaccination-item').find('tr').each(function () {
|
||||
let unit_price = $(this).find('.unit-price').val()
|
||||
let quantity = $(this).find('.quantity').val()
|
||||
let total = unit_price * quantity
|
||||
$(this).closest('tr').find('.sub-total').val(total)
|
||||
$(this).closest('tr').find('.sub-total-to-display').val(total.toFixed(2))
|
||||
total_amt +=total
|
||||
})
|
||||
$('#total-amount').val(total_amt)
|
||||
let discount_amt =$('#discount-amount').val()
|
||||
$('#net-amount').val((total_amt * (1-(discount_amt/100))).toFixed(2))
|
||||
let own_amount = parseFloat($('#net-amount').val()) - (parseFloat( $('#paid-amount').val()) + parseFloat( $('#bank-amount').val()) )
|
||||
$('#owe-amount').val(toFixedNumber(own_amount,2))
|
||||
}
|
||||
|
||||
$('#discount-amount').change(function () {
|
||||
if($('#discount-amount').val()>100) $('#discount-amount').val(100)
|
||||
calculateVaccineData()
|
||||
})
|
||||
|
||||
$('#paid-amount, #bank-amount').keyup(function () {
|
||||
let own_amount = parseFloat($('#net-amount').val()) - (parseFloat( $('#paid-amount').val()) + parseFloat( $('#bank-amount').val()) )
|
||||
$('#owe-amount').val(toFixedNumber(own_amount,2))
|
||||
});
|
||||
|
||||
function searchPatientToForm(patientElementId){
|
||||
Swal.fire({
|
||||
html:"<p style='text-align: left;'>Search the patient with their name, phone, Khmer ID, or patient ID</p>",
|
||||
input: "text",
|
||||
showCancelButton: !0,
|
||||
confirmButtonText: "<i class='fa fa-search mr-2'></i>Search",
|
||||
cancelButtonText: "Close",
|
||||
position: 'top',
|
||||
showLoaderOnConfirm: !1,
|
||||
confirmButtonColor: "#4fb51a",
|
||||
preConfirm: function (n) {
|
||||
return new Promise(function (t) {
|
||||
$.ajax({
|
||||
url: patient_base_url + "/async",
|
||||
method:'get',
|
||||
dataType:'json',
|
||||
data:{kword: n},
|
||||
success:function(response)
|
||||
{
|
||||
if(response.data.length<1 || !response.success){
|
||||
Swal.showValidationMessage('No patient found!')
|
||||
Swal.enableButtons()
|
||||
}
|
||||
else {
|
||||
t(response.data)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
allowOutsideClick:!1,
|
||||
}).then(function (t) {
|
||||
if(!t.dismiss){
|
||||
$('#'+patientElementId).html('');
|
||||
t.value.map(item =>{
|
||||
var patientOption = document.createElement('OPTION');
|
||||
patientOption.setAttribute('value',item.id);
|
||||
patientOption.text = item.patient_uuid + ' - ' + item.name_en;
|
||||
$('#'+patientElementId).append(patientOption);
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$("#searchPatientAddForm").click(function () {
|
||||
searchPatientToForm('patient-id')
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function calculateAge(dob, current_date) {
|
||||
dob = moment(dob);
|
||||
current_date = current_date ? moment(current_date) : moment();
|
||||
return moment.preciseDiff(dob, current_date, true)
|
||||
}
|
||||
|
||||
var $patient_info_form = $("#modal-patient");
|
||||
$patient_info_form.find("#dob").on("change", function() {
|
||||
var dob_split = $(this).val().split("-")
|
||||
var dob = new Date(dob_split[1]+'-'+dob_split[0]+'-'+dob_split[2]);
|
||||
|
||||
if (dob) {
|
||||
current_date = moment();
|
||||
var age = calculateAge(dob);
|
||||
$patient_info_form.find("#year").val(age.years);
|
||||
$patient_info_form.find("#month").val(age.months);
|
||||
var days = age.days === 0 && age.months === 0 && age.years === 0 ? 1 : age.days;
|
||||
$patient_info_form.find("#day").val(days);
|
||||
}
|
||||
});
|
||||
|
||||
$patient_info_form.on("keyup change", "#year, #month, #day", function (evt) {
|
||||
var years = $patient_info_form.find("#year").val() || 0;
|
||||
var months = $patient_info_form.find("#month").val() || 0;
|
||||
var days = $patient_info_form.find("#day").val() || 0;
|
||||
var dob = moment();
|
||||
dob.subtract(days, 'days');
|
||||
dob.subtract(months, 'months');
|
||||
dob.subtract(years, 'years');
|
||||
var dob_split = dob.toDate().toLocaleDateString().split("/")
|
||||
var dob = dob_split[1].padStart(2,"0")+'-'+dob_split[0].padStart(2,"0")+'-'+dob_split[2];
|
||||
$patient_info_form.find("#dob").val(dob);
|
||||
});
|
||||
|
||||
|
||||
$('#province-id').change(function () {
|
||||
getDistrictsByProvinceId('district-id', $(this).val())
|
||||
})
|
||||
|
||||
$('#district-id').change(function () {
|
||||
getCommunesByDistrictId('commune-id', $(this).val())
|
||||
})
|
||||
|
||||
$('#commune-id').change(function () {
|
||||
getVillagesByCommuneId('village-id', $(this).val())
|
||||
})
|
||||
|
||||
|
||||
$("#savePatient").on('click',function(e){
|
||||
e.preventDefault();
|
||||
$.ajax({
|
||||
url: patient_base_url.toString()+'.save',
|
||||
type:"POST",
|
||||
dataType:"JSON",
|
||||
data :{
|
||||
"_token": csrf_token,
|
||||
name_en: $('#patient-name').val(),
|
||||
patient_uuid: $('#patient-code').val(),
|
||||
dob: $('#dob').val(),
|
||||
gender: $("input[name='gender']:checked").attr('data-id'),
|
||||
marital_status: $("input[name='marital_status']:checked").attr('data-id'),
|
||||
phone_number: $('#phone-number').val(),
|
||||
province_id: $('#province-id').val(),
|
||||
district_id : $('#district-id').val(),
|
||||
commune_id: $('#commune-id').val(),
|
||||
village_id: $('#village-id').val(),
|
||||
khid_number: $('#khid-number').val(),
|
||||
house_number: $('#house-number').val(),
|
||||
street_number: $('#street-number').val()
|
||||
},
|
||||
success:function(res){
|
||||
if(res.success){
|
||||
var patient = res.data
|
||||
var patientOption = document.createElement('OPTION');
|
||||
patientOption.setAttribute('value',patient.id);
|
||||
patientOption.setAttribute('selected','selected');
|
||||
patientOption.text = patient.patient_uuid + ' - ' + patient.name_en;
|
||||
$('#patient-id').append(patientOption);
|
||||
|
||||
$('#modal-patient .close').click();
|
||||
$('#patient-id').trigger('change')
|
||||
|
||||
}else{
|
||||
alertify.error("Can't create patient.")
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<h1>Expired item</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,256 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<link href="{{url(env("APP_URL").'storage/assets/libs/bootstrap-datepicker/css/bootstrap-datepicker.min.css')}}" rel="stylesheet" type="text/css" />
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/lightgallery/lightgallery.css')}}" >
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.css')}}" >
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.min.js')}}"></script>
|
||||
<style>
|
||||
#report_tb tr td{
|
||||
padding: 10px !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('sidebar.financial_report')}}</h4>
|
||||
{{-- <small><code>*</code> is generated based on the invoice</small>--}}
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-12 py-2 inv-search">
|
||||
<form method="get" action="{{url('report/financial-report')}}">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="form-group mb-1">
|
||||
<label for="start-invoice-date">{{__('report.doctor_date_range_filter')}}</label>
|
||||
<div class="input-group">
|
||||
<input name="start_date" value="{{isset($_GET['start_date']) ? date('Y-m-d',strtotime($_GET['start_date'])) : ''}}" onfocus="(this.type='date')" onblur="(this.type='text')" placeholder="{{__('general.type_date_placeholder')}}" class="form-control rounded-right-0">
|
||||
<input name="end_date" value="{{isset($_GET['end_date']) ? date('Y-m-d',strtotime($_GET['end_date'])) : ''}}" onfocus="(this.type='date')" onblur="(this.type='text')" placeholder="{{__('general.type_date_placeholder')}}" class="form-control rounded-left-0">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-3 col-lg-2">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('report.doctor_sample_source_filter')}}</label>
|
||||
<select class="form-control" name="sample_source">
|
||||
<option></option>
|
||||
<option {{ isset($_GET['sample_source']) && $_GET['sample_source'] == -1 ? 'selected':''}} value="-1">{{__('Vaccination ')}}</option>
|
||||
<option {{ isset($_GET['sample_source']) && $_GET['sample_source'] == -2 ? 'selected':''}} value="-2">{{__('Dialy Report')}}</option>
|
||||
@foreach($sampleSources as $sampleSource)
|
||||
<option {{$sampleSource->id==@$_GET['sample_source'] ? 'selected':''}} value="{{$sampleSource->id}}">{{$sampleSource->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-3 col-lg-2">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('report.doctor_physician_filter')}}</label>
|
||||
<select class="form-control select2" name="physician">
|
||||
<option></option>
|
||||
<option {{'All'==@$_GET['physician'] ? 'selected':''}} value="All">All</option>
|
||||
@foreach($physicians as $physician)
|
||||
<option {{$physician->id==@$_GET['physician'] ? 'selected':''}} value="{{$physician->id}}">{{$physician->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-7 col-lg-5 p-0 m-0">
|
||||
<div class="form-group">
|
||||
<label for="lab-name-en"> </label>
|
||||
<div class="input-group p-0 m-0">
|
||||
<div class="input-group-append p-0 m-0">
|
||||
<button class="btn btn-inverse-secondary rounded-25" title="Search" type="submit"><i class="fa fa-search"></i> {{__('report.btn_view')}}</button>
|
||||
<a href="{{url('report/financial-report')}}" class="btn rounded-25 btn-inverse-warning ml-1 mx-3 " title="Clear Search Filter"><i class="mdi mdi-filter-remove-outline"></i>{{__('general.btn_clear')}}</a>
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 dropdown-toggle" data-toggle="dropdown" aria-expanded="true">{{__('report.btn_action')}}</button>
|
||||
<div class="dropdown-menu" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 44px, 0px);" x-placement="bottom-start">
|
||||
<button type="button" data-toggle="modal" data-target="#print_preview_modal" data-backdrop="static" class="dropdown-item font-14">{{__('report.btn_action_print')}}</button>
|
||||
<button type="submit" value="true" name="export" class="dropdown-item font-14">{{__('report.btn_action_export')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
</div>
|
||||
<br>
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="report_tb">
|
||||
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<td style="padding-left: 10px; text-align:center;">Invoice Date</td>
|
||||
<td style="padding-left: 10px; text-align:center;">Sample No</td>
|
||||
<td style="padding-left: 10px;">Patient Name</td>
|
||||
<td style="padding-left: 10px; text-align:center;">Physician</td>
|
||||
<td style="padding-right: 10px;">Exchange Rate</td>
|
||||
<td style="padding-right: 10px;">Total</td>
|
||||
<td style="padding-right: 10px;">Discount</td>
|
||||
<td style="padding-right: 10px;">Net Amount</td>
|
||||
<td style="padding-right: 10px;">Cash Pay</td>
|
||||
<td style="padding-right: 10px;">Bank Pay</td>
|
||||
<td style="padding-right: 10px;">Owe</td>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$i=1;
|
||||
$totalPrice = 0;
|
||||
$totalPriceRiel = 0;
|
||||
$total = 0;
|
||||
$totalRiel = 0;
|
||||
$total_discount = 0;
|
||||
$total_discountRiel = 0;
|
||||
$total_paid = 0;
|
||||
$total_paidRiel = 0;
|
||||
$total_bank_paid = 0;
|
||||
$total_bank_paidRiel = 0;
|
||||
$total_owe = 0;
|
||||
$total_oweRiel = 0;
|
||||
|
||||
@endphp
|
||||
@foreach($financialReport as $row)
|
||||
<tr>
|
||||
<td style="text-align:center;">{{$row['date']}}</td>
|
||||
<td style="padding-left: 5px">{{$row['sample_number']}}</td>
|
||||
<td style="padding-left: 5px">{{$row['patient']}}</td>
|
||||
<td style="padding-left: 5px">{{$row['physician']}}</td>
|
||||
<td style="padding-right: 5px; text-align: right">{{@$row['exchange_rate']}}</td>
|
||||
<td style="padding-right: 5px; text-align: right">{{$row['total_amount']}}</td>
|
||||
<td style="padding-right: 5px; text-align: right">{{$row['total_discount']}}</td>
|
||||
<td style="padding-right: 5px; text-align: right">{{$row['total_net_amount']}}</td>
|
||||
<td style="padding-right: 5px; text-align: right">{{$row['total_paid']}}</td>
|
||||
<td style="padding-right: 5px; text-align: right">{{$row['total_bank_paid']}}</td>
|
||||
<td style="padding-right: 5px; text-align: right">{{$row['total_owe']}}</td>
|
||||
|
||||
</tr>
|
||||
@php
|
||||
$totalPrice+=$row['total_net_amount'];
|
||||
$totalPriceRiel+=($row['total_net_amount'] * @$row['exchange_rate']);
|
||||
$total += $row['total_amount'];
|
||||
$totalRiel += ($row['total_amount'] * @$row['exchange_rate']);
|
||||
$total_discount += $row['total_discount'];
|
||||
$total_discountRiel += ($row['total_discount'] * @$row['exchange_rate']);
|
||||
$total_paid += $row['total_paid'];
|
||||
$total_paidRiel += ($row['total_paid'] * @$row['exchange_rate']);
|
||||
$total_bank_paid+=$row['total_bank_paid'];
|
||||
$total_bank_paidRiel+=($row['total_bank_paid'] * @$row['exchange_rate']);
|
||||
$total_owe += $row['total_owe'];
|
||||
$total_oweRiel += ($row['total_owe'] * @$row['exchange_rate']);
|
||||
@endphp
|
||||
@endforeach
|
||||
|
||||
<tr><td colspan="11" style="padding-left:20px"></td></tr>
|
||||
|
||||
<tr>
|
||||
<td style="text-align: right; font-weight: bold" class="border-0" colspan="5">{{__('TOTAL')}} </td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total),2)}}<br><b style="float: left"> ៛ </b> {{number_format(($totalRiel))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_discount),2)}}<br><b style="float: left"> ៛ </b> {{number_format(($total_discountRiel))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($totalPrice),2)}}<br><b style="float: left"> ៛ </b> {{number_format(($totalPriceRiel))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_paid),2)}}<br><b style="float: left"> ៛ </b> {{number_format(($total_paidRiel))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_bank_paid),2)}}<br><b style="float: left"> ៛ </b> {{number_format(($total_bank_paidRiel))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_owe),2)}}<br><b style="float: left"> ៛ </b> {{number_format(($total_oweRiel))}}</td>
|
||||
|
||||
</tr>
|
||||
|
||||
@if($labSettings->is_hide_comission_percentage>0)
|
||||
@php
|
||||
$ownBenefitRate = ((100 - $labSettings->is_hide_comission_percentage));
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
<td style="text-align: right; font-weight: bold" class="border-0" colspan="5">{{$labSettings->is_hide_comission_percentage}}% {{__('Percent')}} </td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total * ($labSettings->is_hide_comission_percentage/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($totalRiel * ($labSettings->is_hide_comission_percentage/100))))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_discount * ($labSettings->is_hide_comission_percentage/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_discountRiel * ($labSettings->is_hide_comission_percentage/100))))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($totalPrice * ($labSettings->is_hide_comission_percentage/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($totalPriceRiel * ($labSettings->is_hide_comission_percentage/100))))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_paid * ($labSettings->is_hide_comission_percentage/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_paidRiel * ($labSettings->is_hide_comission_percentage/100))))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_bank_paid * ($labSettings->is_hide_comission_percentage/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_bank_paidRiel * ($labSettings->is_hide_comission_percentage/100))))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_owe * ($labSettings->is_hide_comission_percentage/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_oweRiel * ($labSettings->is_hide_comission_percentage/100))))}}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td style="text-align: right; font-weight: bold" class="border-0" colspan="5">{{$ownBenefitRate}}% {{__('Percent')}} </td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total * ($ownBenefitRate/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($totalRiel * ($ownBenefitRate/100))))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_discount * ($ownBenefitRate/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_discountRiel * ($ownBenefitRate/100))))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($totalPrice * ($ownBenefitRate/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($totalPriceRiel * ($ownBenefitRate/100))))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_paid * ($ownBenefitRate/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_paidRiel * ($ownBenefitRate/100))))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_bank_paid * ($ownBenefitRate/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_bank_paidRiel * ($ownBenefitRate/100))))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_owe * ($ownBenefitRate/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_oweRiel * ($ownBenefitRate/100))))}}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('modal.financial_report_print')
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js')}}"></script>
|
||||
<script>
|
||||
|
||||
|
||||
var patient_base_url = "{{url('patient')}}";
|
||||
var get_refs_base_url = "{{url('refs')}}";
|
||||
var base_url = "{{url('invoice')}}";
|
||||
let invoice_id = 0;
|
||||
|
||||
$(".datepicker").datepicker({
|
||||
format:'dd-mm-yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(".monthpicker").datepicker({
|
||||
format:'mm-yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(".yearpicker").datepicker({
|
||||
format:'yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
</script>
|
||||
{{--<script src="{{url(env("APP_URL").'storage/assets/js/admin/invoice.js')}}"></script>--}}
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">Individual Report</h4>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="patient_name" class="col-sm-5 col-form-label">Patient Name</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="patient_name">
|
||||
<option value="none">Select</option>
|
||||
<option>Mr A</option>
|
||||
<option>Mr B</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="labid" class="col-sm-5 col-form-label">Patient Hospital ID</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="lab_id">
|
||||
<option value="none">Select</option>
|
||||
<option>001-30082022</option>
|
||||
<option>002-30082022</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="phonenumber" class="col-sm-5 col-form-label">Phone Number</label>
|
||||
<input type="text" class="form-control form-control-sm col-sm-7" id="phone_number" placeholder="Phone number">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="exampleInputUsername2" class="col-sm-5 col-form-label">Sample Number</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="sample_number">
|
||||
<option value="">Select</option>
|
||||
<option>001-09082022</option>
|
||||
<option>002-09082022</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row float-right">
|
||||
<div class="col-md-12">
|
||||
<button type="button" class="btn btn-info btn-icon-text">
|
||||
<i class="typcn typcn-eye btn-icon-prepend"></i>
|
||||
Preview
|
||||
</button>
|
||||
<button type="button" class="btn btn-info btn-icon-text">
|
||||
<i class="typcn typcn-printer btn-icon-prepend"></i>
|
||||
Print
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning btn-icon-text">
|
||||
<i class="typcn typcn-refresh-outline btn-icon-prepend"></i>
|
||||
Reset
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,203 +0,0 @@
|
||||
'<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<link href="{{url(env("APP_URL").'storage/assets/libs/bootstrap-datepicker/css/bootstrap-datepicker.min.css')}}" rel="stylesheet" type="text/css" />
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/lightgallery/lightgallery.css')}}" >
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.css')}}" >
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.min.js')}}"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('Inventory Report')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-12 bg-gradient-light border-1 border-solid border-gray p-4 inv-search">
|
||||
<form method="get" action="{{url('inventory/report/view')}}">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Report Type')}}</label>
|
||||
<select class="form-control" id="report_type_filter" name="report_type">
|
||||
<option></option>
|
||||
<option {{(isset($_GET['report_type']) && $_GET['report_type']==1 ? 'selected' : '')}} value="1">Inventory On hand</option>
|
||||
<option {{(isset($_GET['report_type']) && $_GET['report_type']==2 ? 'selected' : '')}} value="2">Expire Report</option>
|
||||
{{-- <option {{(isset($_GET['report_type']) && $_GET['report_type']==3 ? 'selected' : '')}} value="2">Need Restock</option>--}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="report_date_range" class="col-sm-12 col-md-5 col-lg-4 {{(isset($_GET['report_type']) && $_GET['report_type']!=1 ? 'd-block' : 'd-none')}}">
|
||||
<div class="form-group mb-1">
|
||||
<label for="start-invoice-date">{{__('Report Date')}}</label>
|
||||
<div class="input-group">
|
||||
<input name="start_date" value="{{isset($_GET['start_date']) && !empty($_GET['start_date']) ? date('Y-m-d',strtotime($_GET['start_date'])) : date('Y-m-01')}}" onfocus="(this.type='date')" onblur="(this.type='text')" placeholder="{{__('general.type_date_placeholder')}}" class="form-control">
|
||||
<input name="end_date" value="{{isset($_GET['end_date']) && !empty($_GET['end_date']) ? date('Y-m-d',strtotime($_GET['end_date'])) : date('Y-m-d')}}" onfocus="(this.type='date')" onblur="(this.type='text')" placeholder="{{__('general.type_date_placeholder')}}" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-7 col-lg-5">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en"> </label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-info ml-4 px-3" title="Search" type="submit"><i class="fa fa-search"></i>{{__('report.btn_view')}}</button>
|
||||
<a href="{{url('report/doctor-report')}}" class="btn btn-inverse-warning px-3 ml-4" title="Clear Search Filter"><i class="mdi mdi-filter-remove-outline"></i>{{__('general.btn_clear')}}</a>
|
||||
<button type="button" class="btn btn-white rounded-0 dropdown-toggle ml-4" data-toggle="dropdown" aria-expanded="true">{{__('report.btn_action')}}</button>
|
||||
<div class="dropdown-menu" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 44px, 0px);" x-placement="bottom-start">
|
||||
<button type="button" data-toggle="modal" data-target="#print_preview_modal" data-backdrop="static" class="dropdown-item font-14">{{__('report.btn_action_print')}}</button>
|
||||
<button type="submit" value="true" name="export" class="dropdown-item font-14">{{__('report.btn_action_export')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
</div>
|
||||
<br>
|
||||
@if(!empty($report_data['report_data']) && $report_data['report_id']==1)
|
||||
<p>{{$report_data['report_name']}}</p>
|
||||
<div class="col-sm-12 p-0 mb-1 mt-1">
|
||||
<div class="table-responsive--">
|
||||
<table class="table table-bordered" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<th class="p-1">Item Group</th>
|
||||
<th class="p-1">Item Name</th>
|
||||
<th class="p-1">On hand</th>
|
||||
<th class="p-1">Last Stock In</th>
|
||||
<th class="p-1">Last Stock Out</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($report_data['report_data'] as $v)
|
||||
<tr>
|
||||
<td class="p-1">{{$v->item_group}}</td>
|
||||
<td class="p-1">{{$v->item_name}}</td>
|
||||
<td class="p-1 text-right">{{floatval($v->available_quantity)}}</td>
|
||||
<td class="p-1 text-center">{{!empty($v->stock_in_date) ? date('d-m-Y',strtotime($v->stock_in_date)) : ''}}</td>
|
||||
<td class="p-1 text-center">{{!empty($v->stock_out_date) ? date('d-m-Y',strtotime($v->stock_out_date)) : ''}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(!empty($report_data['report_data']) && $report_data['report_id']==2)
|
||||
<p>{{$report_data['report_name']}}</p>
|
||||
<div class="col-sm-12 p-0 mb-1 mt-1">
|
||||
<div class="table-responsive--">
|
||||
<table class="table table-bordered" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<th class="p-1">Item Group</th>
|
||||
<th class="p-1">Item Name</th>
|
||||
<th class="p-1">Stock In</th>
|
||||
<th class="p-1">Stock In Date</th>
|
||||
<th class="p-1">Expire Date</th>
|
||||
<th class="p-1"># Month</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($report_data['report_data'] as $v)
|
||||
<tr>
|
||||
<td class="p-1">{{$v->item_group}}</td>
|
||||
<td class="p-1">{{$v->item_name}}</td>
|
||||
<td class="p-1 text-right">{{$v->stock_in}}</td>
|
||||
<td class="p-1 text-center">{{!empty($v->stock_in_date) ? date('d-m-Y',strtotime($v->stock_in_date)) : ''}}</td>
|
||||
<td class="p-1 text-center">{{!empty($v->expiry_date) ? date('d-m-Y',strtotime($v->expiry_date)) : ''}}</td>
|
||||
<td class="p-1 text-right">{{$v->months}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(isset($_GET['report_type']))
|
||||
@include('modal.inventory_onhand_print')
|
||||
@endif
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js')}}"></script>
|
||||
<script>
|
||||
|
||||
|
||||
var patient_base_url = "{{url('patient')}}";
|
||||
var get_refs_base_url = "{{url('refs')}}";
|
||||
var base_url = "{{url('invoice')}}";
|
||||
let invoice_id = 0;
|
||||
|
||||
$(".datepicker").datepicker({
|
||||
format:'dd-mm-yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(".monthpicker").datepicker({
|
||||
format:'mm-yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(".yearpicker").datepicker({
|
||||
format:'yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$('#report_type_filter').change(function(){
|
||||
let reportTypeId = $(this).val();
|
||||
if(reportTypeId==1){
|
||||
//$('#report_date_range').css('display','none');
|
||||
$('#report_date_range').removeClass("d-block");
|
||||
$('#report_date_range').addClass('d-none');
|
||||
}
|
||||
else{
|
||||
$('#report_date_range').removeClass("d-none");
|
||||
$('#report_date_range').addClass('d-block');
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<h1>Invoice List</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,16 +1,7 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<style>
|
||||
.item-config {
|
||||
background: #feffff;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #e1edfc;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
@@ -33,730 +24,281 @@
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card" style="min-height: 80vh;">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('general.laboratory_settings')}}</h4>
|
||||
|
||||
<div class="col-sm-12">
|
||||
<h6 class="text-muted"><span class="mdi mdi-square-rounded text-muted"></span> {{__('general.general_settings')}}</h6>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 p-2">
|
||||
<div class="col-sm-12 py-3 item-config">
|
||||
<p class="font-weight-bold mb-3">{{__('lab_profile.sample_numner_conf')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 text-info float-right" style="font-size: 12px !important; padding: 5px;" onclick="toggleElements('.sample-number-mode-setter','.sample-number-mode-getter')"><i class="fa fa-gear text-muted"></i> {{__('lab_profile.btn_change')}}</button>
|
||||
@endif
|
||||
</p>
|
||||
<div class="sample-number-mode-getter">
|
||||
<label class="badge badge-outline-secondary rounded-25">{{$info->sample_number==0? __('lab_profile.manual') :__('lab_profile.system_generate')}}</label>
|
||||
</div>
|
||||
<div class="sample-number-mode-setter" style="display: none">
|
||||
<div class="form-check col-sm-9">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->sample_number==0? 'checked':''}} data-id="0" name="sample_number"> {{__('lab_profile.manual')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
<div class="form-check col-sm-9">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->sample_number==1? 'checked':''}} data-id="1" name="sample_number"> {{__('lab_profile.system_generate')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
<button class="btn btn-xs btn-inverse-info rounded-25 px-3" type="button" style="font-size: 12px; padding: 5px" onclick="postLabSettingSetter()"><i class="fa fa-save"></i> {{__('lab_profile.btn_save')}} </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 p-2">
|
||||
<div class="col-sm-12 py-3 item-config">
|
||||
<p class="font-weight-bold mb-3">{{__('lab_profile.patient_numner_conf')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 text-info float-right" style="font-size: 12px !important; padding: 5px;" onclick="toggleElements('.patient-number-mode-setter','.patient-number-mode-getter')"><i class="fa fa-gear text-muted"></i> {{__('lab_profile.btn_change')}}</button>
|
||||
@endif
|
||||
</p>
|
||||
<div class="patient-number-mode-getter">
|
||||
<label class="badge badge-outline-secondary rounded-25">{{$info->patient_code==0? __('lab_profile.manual'):__('lab_profile.system_generate')}}</label>
|
||||
</div>
|
||||
<div class="patient-number-mode-setter" style="display: none">
|
||||
<div class="form-check col-sm-12">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->patient_code==0? 'checked':''}} data-id="0" name="patient_number"> {{__('lab_profile.manual')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
<div class="form-check col-sm-12">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->patient_code==1? 'checked':''}} data-id="1" name="patient_number"> {{__('lab_profile.system_generate')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
<button class="btn btn-xs btn-inverse-info rounded-25 px-3" type="button" style="font-size: 12px; padding: 5px" onclick="postLabSettingSetter()"><i class="fa fa-save"></i> {{__('lab_profile.btn_save')}} </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 p-2">
|
||||
<div class="col-sm-12 py-3 item-config">
|
||||
<p class="font-weight-bold mb-3">{{__('lab_profile.based_currency')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 text-info float-right" style="font-size: 12px !important; padding: 5px;" onclick="toggleElements('.base-currency-mode-setter','.base-currency-mode-getter')"><i class="fa fa-gear text-muted"></i> {{__('lab_profile.btn_change')}}</button>
|
||||
@endif
|
||||
</p>
|
||||
<div class="base-currency-mode-getter">
|
||||
<label class="badge badge-outline-secondary rounded-25">{{$info->currency==0? __('USD ($)') :__('Riel (៛)')}}</label>
|
||||
</div>
|
||||
<div class="base-currency-mode-setter" style="display: none">
|
||||
<div class="form-check col-sm-3">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->currency==0? 'checked':''}} data-id="0" name="currency"> {{__('USD ($)')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
<div class="form-check col-sm-9">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->currency==1? 'checked':''}} data-id="1" name="currency"> {{__('Riel (៛)')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
<button class="btn btn-xs btn-inverse-info rounded-25 px-3" type="button" style="font-size: 12px; padding: 5px" onclick="postLabSettingSetter()"><i class="fa fa-save"></i> {{__('lab_profile.btn_save')}} </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 p-2">
|
||||
<div class="col-sm-12 py-3 item-config">
|
||||
<p class="font-weight-bold mb-3">{{__('lab_profile.type_of_discount_conf')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 text-info float-right" style="font-size: 12px !important; padding: 5px;" onclick="toggleElements('.discount-type-setter','.discount-type-getter')"><i class="fa fa-gear text-muted"></i> {{__('lab_profile.btn_change')}}</button>
|
||||
@endif
|
||||
</p>
|
||||
<div class="discount-type-getter">
|
||||
<label class="badge badge-outline-secondary rounded-25">{{$info->discount_type == 1 ? '(%) '.__('lab_profile.percentage'):'($) '.__('lab_profile.price')}}</label>
|
||||
</div>
|
||||
<div class="discount-type-setter" style="display: none">
|
||||
<div class="form-check col-sm-3">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->discount_type==1? 'checked':''}} data-id="1" name="discount_type"> (%) {{__('lab_profile.percentage')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
<div class="form-check col-sm-9">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->discount_type==2? 'checked':''}} data-id="2" name="discount_type"> ($) {{__('lab_profile.price')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
<button class="btn btn-xs btn-inverse-info rounded-25 px-3" type="button" style="font-size: 12px; padding: 5px" onclick="postLabSettingSetter()"><i class="fa fa-save"></i> {{__('lab_profile.btn_save')}} </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 p-2">
|
||||
<div class="col-sm-12 py-3 item-config">
|
||||
<p class="font-weight-bold mb-3">{{__('lab_profile.exchange_rate')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 text-info float-right" style="font-size: 12px !important; padding: 5px;" onclick="toggleElements('.exchange-rate-setter','.exchange-rate-getter')"><i class="fa fa-gear text-muted"></i> {{__('lab_profile.btn_change')}}</button>
|
||||
@endif
|
||||
</p>
|
||||
<div class="exchange-rate-getter">
|
||||
<label class="badge badge-outline-secondary rounded-25">1 USD = {{$info->exchange_rate}} </label>
|
||||
</div>
|
||||
<div class="exchange-rate-setter" style="display: none">
|
||||
<h4 class="card-title"><i class="mdi text-info mdi-apps"></i> {{__('laboratory.table_title')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form method="get" action="{{url('laboratory/search')}}">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<div class="input-group">
|
||||
<input type="number" class="form-control rounded-right-0 form-control-sm" id="exchange-rate" value="{{$info->exchange_rate}}" placeholder="{{__('Exchange Rate')}}">
|
||||
<input type="text" class="form-control form-control-md rounded-left-25 rounded-right-0" value="{{isset($_GET['kword']) ? $_GET['kword'] : ''}}" name="kword" id="kword" placeholder="{{__('laboratory.search_placeholder')}}">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-xs btn-inverse-info px-3" type="button" style="font-size: 12px; padding: 5px" onclick="postLabSettingSetter()"><i class="fa fa-save"></i> {{__('lab_profile.btn_save')}} </button>
|
||||
<button class="btn btn-md btn-inverse-secondary rounded-right-25 px-3" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
<button class="btn btn-md btn-inverse-success waves-effect rounded-25 px-4 ml-3" type="button" data-action="new" data-toggle="modal" data-target="#modal-laboratory" data-backdrop="static"><i class="typcn typcn-plus"></i> {{__('general.btn_add_new')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6 p-2">
|
||||
<div class="col-sm-12 py-3 item-config">
|
||||
<p class="font-weight-bold mb-3">{{__('sidebar.invoice')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 text-info float-right" style="font-size: 12px !important; padding: 5px;" onclick="toggleElements('.invoice-template-mode-setter','.invoice-template-mode-getter')"><i class="fa fa-gear text-muted"></i> {{__('lab_profile.btn_change')}}</button>
|
||||
@endif
|
||||
</p>
|
||||
<div class="invoice-template-mode-getter">
|
||||
<label class="badge badge-outline-secondary rounded-25"> {{$info->is_auto_make_invoice==0? __('lab_profile.manual'):__('lab_profile.system_generate')}}</label>
|
||||
|
||||
<label class="badge badge-outline-secondary rounded-25"> {{$info->invoice_template_id==1? __('lab_profile.invoice_detail'): ($info->invoice_template_id==2 ? __('lab_profile.invoice_summary') : ($info->invoice_template_id==3 ? __('lab_profile.detail_with_panel') : ''))}}</label>
|
||||
</div>
|
||||
<div class="invoice-template-mode-setter" style="display: none">
|
||||
<p class="text-muted">{{__('invoice.form_btn_generate_invoice')}}</p>
|
||||
<div class="form-check col-sm-12">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->is_auto_make_invoice==0? 'checked':''}} data-id="0" name="is_auto_make_invoice"> {{__('lab_profile.manual')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
<div class="form-check col-sm-12">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->is_auto_make_invoice==1? 'checked':''}} data-id="1" name="is_auto_make_invoice"> {{__('lab_profile.system_generate')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
|
||||
<p class="text-muted">{{__('lab_profile.invoice_template')}}</p>
|
||||
<div class="form-check col-sm-12">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->invoice_template_id==1? 'checked':''}} data-id="1" name="invoice_template_id"> {{__('lab_profile.invoice_detail')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
<div class="form-check col-sm-12">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->invoice_template_id==3? 'checked':''}} data-id="3" name="invoice_template_id"> {{__('lab_profile.detail_with_panel')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
<div class="form-check col-sm-12">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" {{$info->invoice_template_id==2? 'checked':''}} data-id="2" name="invoice_template_id"> {{__('lab_profile.invoice_summary')}}
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-xs btn-inverse-info rounded-25 px-3" type="button" style="font-size: 12px; padding: 5px" onclick="postLabSettingSetter()"><i class="fa fa-save"></i> {{__('lab_profile.btn_save')}} </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h6 class="mt-3 text-muted"><span class="mdi mdi-square-rounded text-muted"></span> {{__('general.result_settings')}}</h6>
|
||||
|
||||
@php
|
||||
$configures = collect($info->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());
|
||||
|
||||
$resultTemplateId = ($configures->where('atrribute_code', 'RESULT_TEMPLATE')->pluck('assigned_attribute_value')->first());
|
||||
|
||||
@endphp
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6 p-2">
|
||||
<div class="col-sm-12 py-3 item-config">
|
||||
<p class="font-weight-bold mb-3">{{__('lab_profile.header_font_name')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 text-info float-right" style="font-size: 12px !important; padding: 5px;" onclick="toggleElements('.header-font-name-mode-setter','.header-font-name-mode-getter')"><i class="fa fa-gear text-muted"></i> {{__('lab_profile.btn_change')}}</button>
|
||||
@endif
|
||||
</p>
|
||||
<div class="header-font-name-mode-getter">
|
||||
<label class="badge badge-outline-secondary rounded-25">{{$fontNameHeader}}</label>
|
||||
</div>
|
||||
<div class="header-font-name-mode-setter" style="display: none">
|
||||
<div class="input-group ml-1">
|
||||
<select class="form-control form-control-sm rounded-right-0" id="result-font-name-header">
|
||||
<option {{$fontNameHeader=='Times New Roman'?'selected' : ''}} value="Times New Roman">Times New Roman</option>
|
||||
<option {{$fontNameHeader=='Nimbus Mono'?'selected' : ''}} value="Nimbus Mono">Nimbus Mono</option>
|
||||
<option {{$fontNameHeader=='Calibri'?'selected' : ''}} value="Calibri">Calibri</option>
|
||||
<option {{$fontNameHeader=='Courier New'?'selected' : ''}} value="Courier New">Courier New</option>
|
||||
</select>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-xs btn-inverse-info px-3" type="button" style="font-size: 12px; padding: 5px" onclick="postLabConfigure('FONT_NAME_FOR_RESULT_HEADER', $('#result-font-name-header').val())"><i class="fa fa-save"></i> {{__('lab_profile.btn_save')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 p-2">
|
||||
<div class="col-sm-12 py-3 item-config">
|
||||
<p class="font-weight-bold mb-3">{{__('lab_profile.header_font_size')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 text-info float-right" style="font-size: 12px !important; padding: 5px;" onclick="toggleElements('.header-font-size-mode-setter','.header-font-size-mode-getter')"><i class="fa fa-gear text-muted"></i> {{__('lab_profile.btn_change')}}</button>
|
||||
@endif
|
||||
</p>
|
||||
<div class="header-font-size-mode-getter">
|
||||
<label class="badge badge-outline-secondary rounded-25">{{$fontSizeHeader}}</label>
|
||||
</div>
|
||||
<div class="header-font-size-mode-setter" style="display: none">
|
||||
<div class="input-group ml-1">
|
||||
<select class="form-control form-control-sm rounded-right-0" id="result-font-size-header">
|
||||
<option {{$fontSizeHeader=='8.5pt' ? 'selected':''}} value="8.5pt">8.5pt</option>
|
||||
<option {{$fontSizeHeader=='9pt' ? 'selected':''}} value="9pt">9pt</option>
|
||||
<option {{$fontSizeHeader=='10pt' ? 'selected':''}} value="10pt">10pt</option>
|
||||
<option {{$fontSizeHeader=='11pt' ? 'selected':''}} value="11pt">11pt</option>
|
||||
<option {{$fontSizeHeader=='12pt' ? 'selected':''}} value="12pt">12pt</option>
|
||||
<option {{$fontSizeHeader=='13pt' ? 'selected':''}} value="13pt">13pt</option>
|
||||
<option {{$fontSizeHeader=='14pt' ? 'selected':''}} value="14pt">14pt</option>
|
||||
<option {{$fontSizeHeader=='15pt' ? 'selected':''}} value="15pt">15pt</option>
|
||||
</select>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-xs btn-inverse-info px-3" type="button" style="font-size: 12px; padding: 5px" onclick="postLabConfigure('FONT_SIZE_FOR_RESULT_HEADER', $('#result-font-size-header').val())"><i class="fa fa-save"></i> {{__('lab_profile.btn_save')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 p-2">
|
||||
<div class="col-sm-12 py-3 item-config">
|
||||
<p class="font-weight-bold mb-3">{{__('lab_profile.body_font_name')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 text-info float-right" style="font-size: 12px !important; padding: 5px;" onclick="toggleElements('.body-font-name-mode-setter','.body-font-name-mode-getter')"><i class="fa fa-gear text-muted"></i> {{__('lab_profile.btn_change')}}</button>
|
||||
@endif
|
||||
</p>
|
||||
<div class="body-font-name-mode-getter">
|
||||
<label class="badge badge-outline-secondary rounded-25">{{$fontName}}</label>
|
||||
</div>
|
||||
<div class="body-font-name-mode-setter" style="display: none">
|
||||
<div class="input-group ml-1">
|
||||
<select class="form-control form-control-sm rounded-right-0" id="result-font-name">
|
||||
<option {{$fontName=='Times New Roman'?'selected' : ''}} value="Times New Roman">Times New Roman</option>
|
||||
<option {{$fontName=='Nimbus Mono'?'selected' : ''}} value="Nimbus Mono">Nimbus Mono</option>
|
||||
<option {{$fontName=='Calibri'?'selected' : ''}} value="Calibri">Calibri</option>
|
||||
<option {{$fontName=='Courier New'?'selected' : ''}} value="Courier New">Courier New</option>
|
||||
</select>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-xs btn-inverse-info px-3" type="button" style="font-size: 12px; padding: 5px" onclick="postLabConfigure('FONT_NAME_FOR_RESULT', $('#result-font-name').val())"><i class="fa fa-save"></i> {{__('lab_profile.btn_save')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 p-2">
|
||||
<div class="col-sm-12 py-3 item-config">
|
||||
<p class="font-weight-bold mb-3">{{__('lab_profile.body_font_size')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 text-info float-right" style="font-size: 12px !important; padding: 5px;" onclick="toggleElements('.body-font-size-mode-setter','.body-font-size-mode-getter')"><i class="fa fa-gear text-muted"></i> {{__('lab_profile.btn_change')}}</button>
|
||||
@endif
|
||||
</p>
|
||||
<div class="body-font-size-mode-getter">
|
||||
<label class="badge badge-outline-secondary rounded-25">{{$fontSize}}</label>
|
||||
</div>
|
||||
<div class="body-font-size-mode-setter" style="display: none">
|
||||
<div class="input-group ml-1">
|
||||
<select class="form-control form-control-sm rounded-right-0" id="result-font-size">
|
||||
<option {{$fontSize=='8.5pt' ? 'selected':''}} value="8.5pt">8.5pt</option>
|
||||
<option {{$fontSize=='9pt' ? 'selected':''}} value="9pt">9pt</option>
|
||||
<option {{$fontSize=='10pt' ? 'selected':''}} value="10pt">10pt</option>
|
||||
<option {{$fontSize=='11pt' ? 'selected':''}} value="11pt">11pt</option>
|
||||
<option {{$fontSize=='12pt' ? 'selected':''}} value="12pt">12pt</option>
|
||||
<option {{$fontSize=='13pt' ? 'selected':''}} value="13pt">13pt</option>
|
||||
<option {{$fontSize=='14pt' ? 'selected':''}} value="14pt">14pt</option>
|
||||
<option {{$fontSize=='15pt' ? 'selected':''}} value="15pt">15pt</option>
|
||||
</select>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-xs btn-inverse-info px-3" type="button" style="font-size: 12px; padding: 5px" onclick="postLabConfigure('FONT_SIZE_FOR_RESULT', $('#result-font-size').val())"><i class="fa fa-save"></i> {{__('lab_profile.btn_save')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 p-2">
|
||||
<div class="col-sm-12 py-3 item-config">
|
||||
<p class="font-weight-bold mb-3">{{__('lab_profile.abnormal_result')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 text-info float-right" style="font-size: 12px !important; padding: 5px;" onclick="toggleElements('.abr-font-weight-mode-setter','.abr-font-weight-mode-getter')"><i class="fa fa-gear text-muted"></i> {{__('lab_profile.btn_change')}}</button>
|
||||
@endif
|
||||
</p>
|
||||
<div class="abr-font-weight-mode-getter">
|
||||
<label class="badge badge-outline-secondary rounded-25">{{$info->abnormal_result_font_weight == 1 ? __('lab_profile.font_bold') : __('lab_profile.font_normal') }}</label>
|
||||
<label class="badge badge-outline-secondary rounded-25"><span class="rounded-25" style="width: 50px; height: 10px; background: {{$info->abnormal_text_color}}; float: left;"></span>.</label>
|
||||
</div>
|
||||
<div class="abr-font-weight-mode-setter" style="display: none">
|
||||
<p>{{__('lab_profile.font_weight')}}</p>
|
||||
<div class="form-check form-check-primary d-flex ml-1">
|
||||
<label class="form-check-label ">
|
||||
<input onclick="postLabSettingSetter()" {{$info->abnormal_result_font_weight==1 ? 'checked':''}} type="radio" class="checkbox" data-id="1" value="1" name="abnormal_result_font_weight" id="font-weight-bold"> {{__('lab_profile.font_bold')}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check form-check-primary d-flex ml-1">
|
||||
<label class="form-check-label">
|
||||
<input onclick="postLabSettingSetter()" {{$info->abnormal_result_font_weight==0 ? 'checked':''}} type="radio" class="checkbox" data-id="0" value="0" name="abnormal_result_font_weight" id="font-weight-normal"> {{__('lab_profile.font_normal')}}
|
||||
</label>
|
||||
</div>
|
||||
<p>{{__('lab_profile.text_color')}}</p>
|
||||
<div class="input-group ml-1">
|
||||
<input type="color" id="abnormal-text-color" class="rounded-right-0 form-control form-control-sm p-0" value="{{$info->abnormal_text_color}}">
|
||||
<div class="input-group-append">
|
||||
<button onclick="postLabSettingSetter()" type="button" class="btn btn-xs btn-inverse-info px-3" style="font-size: 12px; padding: 5px"><i class="fa fa-save"></i> {{__('lab_profile.btn_save')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 p-2">
|
||||
<div class="col-sm-12 py-3 item-config">
|
||||
<p class="font-weight-bold mb-3">{{__('lab_profile.verify_label')}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<button type="button" class="btn btn-xs btn-light rounded-25 text-info float-right" style="font-size: 12px !important; padding: 5px;" onclick="toggleElements('.verify-label-mode-setter','.verify-label-mode-getter')"><i class="fa fa-gear text-muted"></i> {{__('lab_profile.btn_change')}}</button>
|
||||
@endif
|
||||
</p>
|
||||
<div class="verify-label-mode-getter">
|
||||
<img style="height: 33px !important;" src="{{!empty($info->verify_label) ? url(env("APP_URL").'storage/images/avatars/labs/'.$info->verify_label) :''}}">
|
||||
</div>
|
||||
<div class="verify-label-mode-setter" style="display: none">
|
||||
<form id="verify-image-upload-form" method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="center_">
|
||||
<div class="form-input">
|
||||
<div class="preview" style="width: 120px;">
|
||||
<img id="verify-image-preview" src="{{!empty($info->verify_label) ? url(env("APP_URL").'storage/images/avatars/labs/'.$info->verify_label) :''}}">
|
||||
</form> <hr class="my-3 d-none">
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="lab_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2" width="50px">{{__('laboratory.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('laboratory.table_action')}}</th>
|
||||
<th class="py-2">{{__('laboratory.table_name_en')}}</th>
|
||||
<th class="py-2">{{__('laboratory.table_name_kh')}}</th>
|
||||
<th class="py-2">{{__('lab_profile.short_name')}}</th>
|
||||
<th class="py-2 text-center">{{__('lab_profile.sample_numner_conf')}}</th>
|
||||
<th class="py-2 text-center">{{__('lab_profile.patient_numner_conf')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('laboratory.table_status')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($laboratories as $k=>$laboratory)
|
||||
<tr>
|
||||
<td class="py-1 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="text-center py-1">
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary mr-2" title="Edit" data-action="edit" data-labid="{{$laboratory->id}}" data-toggle="modal" data-target="#modal-laboratory" data-backdrop="static"><i class="typcn typcn-edit"></i></button>
|
||||
@if($laboratory->record_status_id==0)
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary" title="Restore" onclick="restore_lab({{$laboratory->id}})"><i class="typcn typcn-plus"></i></button>
|
||||
@else
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger " title="Delete" onclick="delete_lab({{$laboratory->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
</div>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<label for="verify-image" class="rounded btn-light">
|
||||
<i class="mdi mdi-image-filter"></i> <span style="font-size: 12px">{{__('physician.form_logo_upload')}}</span>
|
||||
</label>
|
||||
<button type="button" id="btn-remove-verify-label" class="btn btn-xs btn-danger ml-2" style="padding: 2px !important; margin-top: -3px !important;"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
<input type="file" name="image" id="verify-image" accept="image/*" onchange="showPreviewVerifyImage(event);">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-1">{{$laboratory->name_en}}</td>
|
||||
<td class="py-1">{{$laboratory->name_kh}}</td>
|
||||
<td class="py-1">{{$laboratory->short_name}}</td>
|
||||
<td class="text-center py-1">
|
||||
<label class="badge badge-success">
|
||||
{{$laboratory->sample_number == 1 ? __('lab_profile.system_generate') : __('lab_profile.manual')}}
|
||||
</label>
|
||||
</td>
|
||||
<td class="text-center py-1">
|
||||
<label class="badge badge-success">
|
||||
{{$laboratory->patient_code == 1 ? __('lab_profile.system_generate') : __('lab_profile.manual')}}
|
||||
</label>
|
||||
</td>
|
||||
<td class="py-1 text-center">
|
||||
<i class="mdi {{$laboratory->record_status_id == 1 ? 'mdi-check-circle text-primary' : 'mdi-checkbox-blank-circle-outline'}}"></i>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $laboratories->links('pagination.custom') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- Modal Laboratory -->
|
||||
<div class="modal mt-5 fade modal-primary" id="modal-laboratory">
|
||||
<div class="modal-dialog modal-xl">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title">{{__('_')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form method="post" action="#" id="form" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="lab_id" id="lab-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('laboratory.table_name_en')}} <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control form-control-sm" name="lab_name_en" id="lab-name-en" placeholder="{{__('laboratory.table_name_en')}}">
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-kh">{{__('laboratory.table_name_kh')}} </label>
|
||||
<input type="text" class="form-control form-control-sm" name="lab_name_kh" id="lab-name-kh" placeholder="{{__('laboratory.table_name_kh')}}"/>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-code" class="control-label">{{__('lab_profile.short_name')}} <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control form-control-sm" name="lab_code" id="lab-code" maxlength="5" placeholder="{{__('lab_profile.short_name')}}">
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-kh">{{__('patient.table_phon')}} </label>
|
||||
<input type="text" class="form-control form-control-sm" name="phone_number" id="phone-number" placeholder="{{__('patient.table_phon')}}"/>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-kh">{{__('lab_profile.emial')}} </label>
|
||||
<input type="email" class="form-control form-control-sm" name="email" id="email" placeholder="{{__('lab_profile.emial')}}"/>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-kh">{{__('Laboratory Type')}} </label>
|
||||
<select name="lab_category_id" class="form-control form-control-sm" id="lab-category-id">
|
||||
<option value="0">General Medical Laboratory</option>
|
||||
<option value="1">Anapathology Laboratory</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-kh">{{__('Fixed Comission Rate')}} </label>
|
||||
<input type="number" class="form-control form-control-sm" name="is_hide_comission_percentage" id="is_hide_comission_percentage" value="0"/>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="address-en">{{__('laboratory.form_address_en')}}</label>
|
||||
<input type="text" class="form-control form-control-sm" name="address_en" id="address-en" placeholder="{{__('laboratory.form_address_en')}}">
|
||||
</div>
|
||||
|
||||
<div class="row form-group mb-1">
|
||||
<div class="col-sm-12">
|
||||
<label for="address-kh" class="control-label">{{__('laboratory.form_address_kh')}}</label>
|
||||
<input type="text" class="form-control form-control-sm" name="address_kh" id="address-kh" placeholder="{{__('laboratory.form_address_kh')}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-code" class="control-label">{{__('lab_profile.start_date') . ' & '.__('lab_profile.usage_period')}} </label>
|
||||
<div class="input-group">
|
||||
<input class="form-control form-control-sm" name="start_date" onfocus="(this.type='date')" onblur="(this.type='text')" id="start-date" placeholder="{{__('general.type_date_placeholder')}}">
|
||||
<input class="form-control form-control-sm" onfocus="(this.type='date')" onblur="(this.type='text')" name="end_date" id="end-date" placeholder="{{__('general.type_date_placeholder')}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{{-- <div class="form-group mb-1">--}}
|
||||
{{-- <label for="lab-code" class="control-label">{{__('lab_profile.start_date') }} <span class="text-danger">*</span></label>--}}
|
||||
{{-- <input class="form-control form-control-sm" name="start_date" onfocus="(this.type='date')" onblur="(this.type='text')" id="start-date" placeholder="{{__('general.type_date_placeholder')}}">--}}
|
||||
{{-- </div>--}}
|
||||
|
||||
{{-- <div class="form-group mb-1">--}}
|
||||
{{-- <label for="lab-code" class="control-label">{{__('lab_profile.usage_period')}} </label>--}}
|
||||
{{-- <input class="form-control form-control-sm" onfocus="(this.type='date')" onblur="(this.type='text')" name="end_date" id="end-date" placeholder="{{__('general.type_date_placeholder')}}">--}}
|
||||
{{-- </div>--}}
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('lab_profile.sample_numner_conf')}} <span class="text-danger">*</span></label>
|
||||
<div class="form-group pl-3">
|
||||
<div class="row">
|
||||
<div class="form-check col-sm-3">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="sample_number" data-id="0" value="0"> {{__('lab_profile.manual')}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-9">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="sample_number" checked data-id="1" value="1"> {{__('lab_profile.system_generate')}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('lab_profile.patient_numner_conf')}} <span class="text-danger">*</span></label>
|
||||
<div class="form-group pl-3">
|
||||
<div class="row">
|
||||
<div class="form-check col-sm-3">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="patient_number" data-id="0" value="0"> {{__('lab_profile.manual')}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-9">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="patient_number" checked data-id="1" value="1"> {{__('lab_profile.system_generate')}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-0">
|
||||
<label for="lab-name-en">{{__('Make Invoice')}} <span class="text-danger">*</span></label>
|
||||
<div class="form-group pl-3">
|
||||
<div class="row">
|
||||
<div class="form-check col-sm-3">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="is_auto_make_invoice" checked data-id="0" value="0"> {{__('lab_profile.manual')}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-9">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="is_auto_make_invoice" data-id="1" value="1"> {{__('lab_profile.system_generate')}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-check form-check-flat form-check-primary mb-1 mt-1">
|
||||
<div class="form-check form-check-primary">
|
||||
<label class="form-check-label">
|
||||
<input type="checkbox" class="checkbox" data-id="1" name="shareable_lab_result" id="shareable_lab_result"> {{__('Share Laboratory Result')}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-check form-check-flat form-check-primary mb-1 mt-1">
|
||||
<div class="form-check form-check-primary">
|
||||
<label class="form-check-label">
|
||||
<input type="checkbox" class="checkbox" data-id="1" name="allow_external_request" id="allow_external_request"> {{__('Allow External Request Test')}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info" id="btnSave"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-light" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.common_script')
|
||||
|
||||
</body>
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/vendors/js/org.vendor.bundle.base.js')}}"></script>
|
||||
|
||||
<script>
|
||||
var save_lab_url = "{{url('laboratory.save')}}";
|
||||
var update_lab_url = "{{url('laboratory.update')}}";
|
||||
var delete_lab_url = "{{url('laboratory.delete')}}";
|
||||
var restore_lab_url = "{{url('laboratory.restore')}}";
|
||||
var get_lab_url = "{{url('laboratory.get')}}";
|
||||
|
||||
let base_url = "{{url('laboratory-profile')}}";
|
||||
|
||||
let sample_number = "{{$info->sample_number}}";
|
||||
let patient_code = "{{$info->patient_code}}";
|
||||
let technician_label = "{{$info->technician_label}}";
|
||||
let discount_type = "{{$info->discount_type}}";
|
||||
let phone_number = "{{$info->phone_number}}";
|
||||
let email = "{{$info->email}}";
|
||||
|
||||
let currency = "{{$info->currency}}";
|
||||
|
||||
let exchange_rate = "{{$info->exchange_rate}}";
|
||||
let abnormal_text_color = "{{$info->abnormal_text_color}}";
|
||||
let show_result_footer = "{{$info->show_result_footer}}";
|
||||
let abnormal_result_font_weight = "{{$info->abnormal_result_font_weight}}";
|
||||
let result_header_id = "{{$info->result_header_id}}";
|
||||
let invoice_template_id = "{{$info->invoice_template_id}}";
|
||||
let is_auto_make_invoice = "{{$info->is_auto_make_invoice}}";
|
||||
|
||||
function generateSlug(text) {
|
||||
return text
|
||||
.trim()
|
||||
.split(/\s+/)
|
||||
.slice(0, 3)
|
||||
.map(word => word[0])
|
||||
.join('')
|
||||
.toUpperCase().padEnd(3, 'X');
|
||||
}
|
||||
|
||||
|
||||
function showPreview(event){
|
||||
if(event.target.files.length > 0){
|
||||
var src = URL.createObjectURL(event.target.files[0]);
|
||||
var preview = document.getElementById("file-ip-1-preview");
|
||||
preview.src = src;
|
||||
preview.style.display = "block";
|
||||
$('#image-upload-form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* alternative logo start */
|
||||
|
||||
function showAlternativeLogo(event){
|
||||
if(event.target.files.length > 0){
|
||||
var src = URL.createObjectURL(event.target.files[0]);
|
||||
var preview = document.getElementById("file-ip-2-preview");
|
||||
preview.src = src;
|
||||
preview.style.display = "block";
|
||||
$('#alternative-logo-upload-form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$('#alternative-logo-upload-form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData(this);
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/alternative-logo/upload'}}',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#btn-remove-alternative-logo').click(function(e) {
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/alternative-logo/remove'}}',
|
||||
type: 'POST',
|
||||
data: {"_token": "{{ csrf_token() }}"},
|
||||
success:function(res){
|
||||
$('#file-ip-2-preview').attr('src',"")
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
/* alterntive logo end */
|
||||
|
||||
/* default_footer start */
|
||||
|
||||
function showDefaultFooter(event){
|
||||
if(event.target.files.length > 0){
|
||||
var src = URL.createObjectURL(event.target.files[0]);
|
||||
var preview = document.getElementById("file-ip-4-preview");
|
||||
preview.src = src;
|
||||
preview.style.display = "block";
|
||||
$('#default-footer-upload-form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$('#default-footer-upload-form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData(this);
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/default-footer/upload'}}',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#btn-remove-default-footer').click(function(e) {
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/default-footer/remove'}}',
|
||||
type: 'POST',
|
||||
data: {"_token": "{{ csrf_token() }}"},
|
||||
success:function(res){
|
||||
$('#file-ip-4-preview').attr('src',"")
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/* default_footer end */
|
||||
|
||||
/* alternative footer start */
|
||||
|
||||
function showAlternativeFooter(event){
|
||||
if(event.target.files.length > 0){
|
||||
var src = URL.createObjectURL(event.target.files[0]);
|
||||
var preview = document.getElementById("file-ip-3-preview");
|
||||
preview.src = src;
|
||||
preview.style.display = "block";
|
||||
$('#alternative-footer-upload-form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
$('#alternative-footer-upload-form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData(this);
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/alternative-footer/upload'}}',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#btn-remove-alternative-footer').click(function(e) {
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/alternative-footer/remove'}}',
|
||||
type: 'POST',
|
||||
data: {"_token": "{{ csrf_token() }}"},
|
||||
success:function(res){
|
||||
$('#file-ip-3-preview').attr('src',"")
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/* alternative footer end */
|
||||
|
||||
|
||||
function showPreviewAlterVerifyImage(event){
|
||||
if(event.target.files.length > 0){
|
||||
var src = URL.createObjectURL(event.target.files[0]);
|
||||
var preview = document.getElementById("alter-verify-image-preview");
|
||||
preview.src = src;
|
||||
preview.style.display = "block";
|
||||
$('#alter-verify-image-upload-form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
$('#alter-verify-image-upload-form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData(this);
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/alter-verify-sign/upload'}}',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#btn-remove-alter-verify-label').click(function(e) {
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/alter-verify-sign/remove'}}',
|
||||
type: 'POST',
|
||||
data: {"_token": "{{ csrf_token() }}"},
|
||||
success:function(res){
|
||||
$('#alter-verify-image-preview').attr('src',"")
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#image-upload-form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData(this);
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/avatar/upload'}}',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function postLabConfigure(attr_code, attr_value) {
|
||||
let url = base_url + '/configure/save';
|
||||
$.ajax({
|
||||
url: url,
|
||||
type:"POST",
|
||||
data :{
|
||||
"_token": csrf_token,
|
||||
attribute_code : attr_code,
|
||||
attribute_value: attr_value
|
||||
},
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function postLabSettingSetter() {
|
||||
let url = base_url + '/save';
|
||||
|
||||
technician_label = $('#technician-label').val()
|
||||
sample_number = $("input[name='sample_number']:checked").attr('data-id')
|
||||
patient_code = $("input[name='patient_number']:checked").attr('data-id')
|
||||
discount_type = $("input[name='discount_type']:checked").attr('data-id')
|
||||
exchange_rate = $('#exchange-rate').val()
|
||||
abnormal_text_color = $('#abnormal-text-color').val()
|
||||
show_result_footer = 1
|
||||
abnormal_result_font_weight = $('input[name="abnormal_result_font_weight"]:checked').attr('data-id')
|
||||
result_header_id = 1 //$('input[name="result_header_id"]:checked').attr('data-id')
|
||||
invoice_template_id = $('input[name="invoice_template_id"]:checked').attr('data-id')
|
||||
is_auto_make_invoice = $('input[name="is_auto_make_invoice"]:checked').attr('data-id')
|
||||
|
||||
if($('#phone-number').val()!='') phone_number = $('#phone-number').val()
|
||||
if($('#email').val()!='') email = $('#email').val()
|
||||
|
||||
currency = $("input[name='currency']:checked").attr('data-id')
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
type:"POST",
|
||||
data :{
|
||||
"_token": csrf_token,
|
||||
sample_number : sample_number,
|
||||
patient_code: patient_code,
|
||||
discount_type: discount_type,
|
||||
technician_label: technician_label,
|
||||
phone_number: phone_number,
|
||||
email: email,
|
||||
exchange_rate: exchange_rate,
|
||||
abnormal_text_color: abnormal_text_color,
|
||||
show_result_footer: show_result_footer,
|
||||
abnormal_result_font_weight: abnormal_result_font_weight,
|
||||
result_header_id: result_header_id,
|
||||
currency:currency,
|
||||
invoice_template_id: invoice_template_id,
|
||||
is_auto_make_invoice: is_auto_make_invoice
|
||||
},
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
if(res.success) setTimeout(function () {location.reload()}, messageDuration)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** verify label image */
|
||||
|
||||
$('#verify-image-upload-form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData(this);
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/verifies/upload'}}',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function showPreviewVerifyImage(event){
|
||||
if(event.target.files.length > 0){
|
||||
var src = URL.createObjectURL(event.target.files[0]);
|
||||
var preview = document.getElementById("verify-image-preview");
|
||||
preview.src = src;
|
||||
preview.style.display = "block";
|
||||
$('#verify-image-upload-form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
$('#btn-remove-verify-label').click(function(e) {
|
||||
$.ajax({
|
||||
url: '{{'laboratory-profile/verifies/remove'}}',
|
||||
type: 'POST',
|
||||
data: {"_token": "{{ csrf_token() }}"},
|
||||
success:function(res){
|
||||
$('#verify-image-preview').attr('src',"")
|
||||
handleMessage(res.success, res.message)
|
||||
}
|
||||
});
|
||||
});
|
||||
let modal_add_title = "{{__('laboratory.form_add_tittle')}}";
|
||||
let modal_edit_title = "{{__('laboratory.form_edit_tittle')}}";
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/laboratory.js?_').time()}}"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
@@ -147,25 +147,25 @@
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$.ajax({
|
||||
url: "{{ route('alert-notifications') }}",
|
||||
type: "GET",
|
||||
success: function(res){
|
||||
if(res.success){
|
||||
let notify = $('#notify');
|
||||
notify.addClass('rounded-bottom-right-15')
|
||||
notify.addClass('rounded-bottom-left-15')
|
||||
notify.empty();
|
||||
notify.append('<p class="mb-0 font-weight-normal font-13 float-left dropdown-header text-muted" style="margin-right: 150px">{{__('general.notification')}}</p>');
|
||||
res.data.forEach(function(appointment){
|
||||
notify.append('<a class="dropdown-item preview-item app-modal" data-info="Patient: '+appointment.patient.name_en+', Phone: '+appointment.patient.phone_number+', Description: '+appointment.description+', Date: '+appointment.appointment_date+', Doctor: '+appointment.doctor.name_en+', Ap-Type: ' + appointment.appointment_type+'" href="#"><span class="mdi mdi-bell-outline fa"></span><div class="preview-item-content flex-grow"><p class="font-weight-light small-text text-success mb-0">'+appointment.patient.name_en+' - '+appointment.appointment_date+'</p></div></a>');
|
||||
})
|
||||
}
|
||||
$('#app_notify').text(res.count > 0 ? res.count : '').toggleClass('d-none', res.count < 1);
|
||||
}
|
||||
})
|
||||
</script>
|
||||
{{-- <script>--}}
|
||||
{{-- $.ajax({--}}
|
||||
{{-- url: "{{ route('alert-notifications') }}",--}}
|
||||
{{-- type: "GET",--}}
|
||||
{{-- success: function(res){--}}
|
||||
{{-- if(res.success){--}}
|
||||
{{-- let notify = $('#notify');--}}
|
||||
{{-- notify.addClass('rounded-bottom-right-15')--}}
|
||||
{{-- notify.addClass('rounded-bottom-left-15')--}}
|
||||
{{-- notify.empty();--}}
|
||||
{{-- notify.append('<p class="mb-0 font-weight-normal font-13 float-left dropdown-header text-muted" style="margin-right: 150px">{{__('general.notification')}}</p>');--}}
|
||||
{{-- res.data.forEach(function(appointment){--}}
|
||||
{{-- notify.append('<a class="dropdown-item preview-item app-modal" data-info="Patient: '+appointment.patient.name_en+', Phone: '+appointment.patient.phone_number+', Description: '+appointment.description+', Date: '+appointment.appointment_date+', Doctor: '+appointment.doctor.name_en+', Ap-Type: ' + appointment.appointment_type+'" href="#"><span class="mdi mdi-bell-outline fa"></span><div class="preview-item-content flex-grow"><p class="font-weight-light small-text text-success mb-0">'+appointment.patient.name_en+' - '+appointment.appointment_date+'</p></div></a>');--}}
|
||||
{{-- })--}}
|
||||
{{-- }--}}
|
||||
{{-- $('#app_notify').text(res.count > 0 ? res.count : '').toggleClass('d-none', res.count < 1);--}}
|
||||
{{-- }--}}
|
||||
{{-- })--}}
|
||||
{{-- </script>--}}
|
||||
|
||||
<div class="modal" id="appointment-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
<footer class="footer position-fixed w-100" style="bottom: 0; /*width: calc(100% - 236px);*/ z-index: 2;">
|
||||
<div class="card border-0" style="background-color: #29c6ff0f !important; border-top: 1px solid #c0dfe9 !important;">
|
||||
<div class="card border-0" style="background-color: #29ff680f !important; border-top: 1px solid #c1ebd2 !important;">
|
||||
<div class="card-body py-2">
|
||||
<div class="d-sm-flex justify-content-right justify-content-sm-between_ text-center">
|
||||
<span class="text-center text-sm-left d-block d-sm-inline-block">{{__('© '.date('Y').' ' . env('APP_NAME'))}}</span>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}"/>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{env('APP_TITLE', 'Laboratory Information System')}}</title>
|
||||
<title>{{env('APP_TITLE', 'Organization Information System')}}</title>
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/vendors/typicons/typicons.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/vendors/css/vendor.bundle.base.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/css/vertical-layout-light/style.css') }}">
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
@php
|
||||
$current_locale= App::currentLocale();
|
||||
$baseLab = (array) Session::get('base_lab');
|
||||
$labName = $baseLab['name_'.$current_locale];
|
||||
$baseOrganization = (array) Session::get('base_organization');
|
||||
$organizationName = $baseOrganization['name_'.$current_locale];
|
||||
@endphp
|
||||
|
||||
<nav class="navbar col-lg-12 col-12 p-0 fixed-top d-flex flex-row">
|
||||
@@ -11,7 +11,7 @@
|
||||
<a class="navbar-brand brand-logo" href="javascript:void(0)"><img style="width: 100% !important;" src="{{ url(env("APP_URL").'storage/assets/images/logo.png') }}" alt="logo"/></a>
|
||||
<a class="navbar-brand brand-logo-mini pl-3" href="javascript:void(0)"><img style="width: 65px !important; height: 65px !important;" src="{{url(env("APP_URL").'storage/assets/images/logo-mini.png')}}" alt="logo"/></a>
|
||||
<button class="navbar-toggler text-success navbar-toggler align-self-center" type="button" data-toggle="minimize" style="/*position: absolute; left: 14.5rem; color: #fff !important;*/">
|
||||
<span class="mdi mdi-backburger text-success position-absolute" style="font-size: 20pt; top: 20px; background: #fff; margin-left: 5px; padding: 3px;"></span>
|
||||
<span class="mdi mdi-menu-swap-outline text-primary position-absolute" style="font-size: 20pt; top: 20px; background: #fff; margin-left: 18px; padding: 3px; rotate:90deg;"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
<li class="nav-item nav-profile dropdown">
|
||||
<a class="nav-link" href="#" data-toggle="dropdown" id="profileDropdown">
|
||||
<span class="nav-profile-name" style="font-size:20px !important; font-weight: 600; ">{{$labName}}</span>
|
||||
<span class="nav-profile-name" style="font-size:20px !important; font-weight: 600; ">{{$organizationName}}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -54,19 +54,19 @@
|
||||
<div class="dropdown-menu dropdown-menu-right navbar-dropdown preview-list rounded-bottom-left-15 rounded-bottom-right-15" aria-labelledby="messageDropdown">
|
||||
<a class="dropdown-item preview-item" href="{{url('my-profile')}}">
|
||||
<div class="preview-item-content flex-grow">
|
||||
<p class="font-weight-light small-text text-success mb-0 pr-5"><i class="mdi mdi-account-circle fa"></i> {{ __('general.profile') }}</p>
|
||||
<p class="font-weight-light small-text text-dark mb-0 pr-5"><i class="mdi mdi-account-circle fa"></i> {{ __('general.profile') }}</p>
|
||||
</div>
|
||||
</a>
|
||||
@if(count(Auth::user()->lab_covers)!=1)
|
||||
@if(count(Auth::user()->userOrganizations)!=1)
|
||||
<a class="dropdown-item preview-item" href="{{route('base.change')}}">
|
||||
<div class="preview-item-content flex-grow">
|
||||
<p class="font-weight-light small-text text-success mb-0 pr-5"><i class="mdi mdi-swap-horizontal fa"></i> {{ __('laboratory.change_base') }}</p>
|
||||
<p class="font-weight-light small-text text-dark mb-0 pr-5"><i class="mdi mdi-swap-horizontal fa"></i> {{ __('laboratory.change_base') }}</p>
|
||||
</div>
|
||||
</a>
|
||||
@endif
|
||||
<a class="dropdown-item preview-item" href="{{route('logout')}}">
|
||||
<div class="preview-item-content flex-grow">
|
||||
<p class="font-weight-light small-text text-success mb-0 pr-5"><i class="mdi mdi-logout fa"></i> {{ __('general.logout') }}</p>
|
||||
<p class="font-weight-light small-text text-dark mb-0 pr-5"><i class="mdi mdi-logout fa"></i> {{ __('general.logout') }}</p>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
@@ -82,35 +82,35 @@
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_laboratory_information']))
|
||||
<a class="dropdown-item preview-item" href="{{url('laboratory-profile')}}">
|
||||
<div class="preview-item-content flex-grow">
|
||||
<p class="font-weight-light small-text text-success mb-0 pr-5"><i class="mdi mdi-hospital-building fa"></i> {{__('laboratory.info')}}</p>
|
||||
<p class="font-weight-light small-text text-dark mb-0 pr-5"><i class="mdi mdi-home-circle fa"></i> {{__('laboratory.info')}}</p>
|
||||
</div>
|
||||
</a>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['view_user_account','create_user_account','update_user_account', 'delete_user_account']))
|
||||
<a class="dropdown-item preview-item" href="{{ route('user') }}">
|
||||
<div class="preview-item-content flex-grow">
|
||||
<p class="font-weight-light small-text text-success mb-0 pr-5"><i class="mdi mdi-account-group fa"></i> {{ __('general.manage_user_accounts') }}</p>
|
||||
<p class="font-weight-light small-text text-dark mb-0 pr-5"><i class="mdi mdi-account-group fa"></i> {{ __('general.manage_user_accounts') }}</p>
|
||||
</div>
|
||||
</a>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['view_user_role','create_user_role','update_user_role', 'delete_user_role']))
|
||||
<a class="dropdown-item preview-item" href="{{route('role')}}">
|
||||
<div class="preview-item-content flex-grow">
|
||||
<p class="font-weight-light small-text text-success mb-0 pr-5"><i class="mdi mdi-account-key fa"></i> {{ __('general.manage_user_roles') }}</p>
|
||||
<p class="font-weight-light small-text text-dark mb-0 pr-5"><i class="mdi mdi-account-key fa"></i> {{ __('general.manage_user_roles') }}</p>
|
||||
</div>
|
||||
</a>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['system_settings']))
|
||||
<a class="dropdown-item preview-item" href="{{url('laboratory')}}">
|
||||
<div class="preview-item-content flex-grow">
|
||||
<p class="font-weight-light small-text text-success mb-0 pr-5"><i class="fa fa-cog fa"></i> {{ __('general.laboratory_settings') }}</p>
|
||||
<p class="font-weight-light small-text text-dark mb-0 pr-5"><i class="mdi mdi-hospital-building"></i> {{ __('general.laboratory_settings') }}</p>
|
||||
</div>
|
||||
</a>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['view_audit_logs']))
|
||||
<a class="dropdown-item preview-item" href="{{url('activity-logs')}}">
|
||||
<div class="preview-item-content flex-grow">
|
||||
<p class="font-weight-light small-text text-success mb-0 pr-5"><i class="mdi mdi-history fa"></i> {{ __('general.activity_logs') }}</p>
|
||||
<p class="font-weight-light small-text text-dark mb-0 pr-5"><i class="mdi mdi-history fa"></i> {{ __('general.activity_logs') }}</p>
|
||||
</div>
|
||||
</a>
|
||||
@endif
|
||||
|
||||
@@ -10,14 +10,7 @@
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['view_patient']))
|
||||
<li class="nav-item {{ request()->segment(1) == 'patient' ? 'active' : '' }}">
|
||||
<a class="nav-link" href="{{ route('patient') }}">
|
||||
<i class="mdi mdi-clipboard-account menu-icon"></i>
|
||||
<span class="menu-title text-uppercase">{{ __('sidebar.patients') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['view_sample','create_sample']))
|
||||
<li class="nav-item {{ request()->segment(1) == 'sample' ? 'active' : '' }}">
|
||||
@@ -49,15 +42,7 @@
|
||||
</a>
|
||||
<div class="collapse {{ in_array(request()->segment(1), ['report']) ? 'show' : '' }}" id="reports">
|
||||
<ul class="nav flex-column sub-menu">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['generate_summary_report']))
|
||||
<li class="nav-item"> <a class="nav-link {{ (request()->segment(2) == 'summary-report') ? 'active' : '' }}" href="{{ url('report/summary-report') }}">{{ __('sidebar.aggregate_report') }}</a></li>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['generate_doctor_report']))
|
||||
<li class="nav-item"> <a class="nav-link {{ (request()->segment(2) == 'doctor-report') ? 'active' : '' }}" href="{{ url('report/doctor-report') }}">{{ __('sidebar.doctor_report') }}</a></li>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['generate_financial_report']))
|
||||
<li class="nav-item"> <a class="nav-link {{ (request()->segment(2) == 'financial-report') ? 'active' : '' }}" href="{{ url('report/financial-report') }}">{{ __('sidebar.financial_report') }}</a></li>
|
||||
@endif
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
}
|
||||
|
||||
.container-box {
|
||||
background: #37ff761c;
|
||||
background: #ffffffa1;
|
||||
border-radius: 15px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 0 20px rgba(0, 0, 0, 0.24);
|
||||
|
||||
@@ -1,289 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<style>
|
||||
.center {
|
||||
height:100%;
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
|
||||
}
|
||||
.form-input {
|
||||
width:50%;
|
||||
padding:0px 0px 0px 0;
|
||||
}
|
||||
.form-input img {
|
||||
width:100%;
|
||||
display:none;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.form-input input {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.form-input label {
|
||||
height:25px;
|
||||
background:#cdcdcd26;
|
||||
color:#c9c9c9;
|
||||
cursor:pointer;
|
||||
width: 75px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('sidebar.medicine')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form method="get" action="{{url('/inventory/medicine/search')}}">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" value="{{isset($_GET['kword']) ? $_GET['kword'] : ''}}" name="kword" id="kword" placeholder="{{__('Medical item name')}}">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-inverse-secondary px-3" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['add_medicine']))
|
||||
<button class="btn btn-info waves-effect px-3 ml-2" type="button" data-action="new" data-toggle="modal" data-target="#modal-medicine-item" data-backdrop="static"><i class="typcn typcn-plus"></i> {{__('general.btn_add_new')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2" width="50px">{{__('physician.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('physician.table_action')}}</th>
|
||||
<th class="py-2">{{__('Code')}}</th>
|
||||
<th class="py-2">{{__('Medical Item')}}</th>
|
||||
<th class="py-2">{{__('Medical Item Group')}}</th>
|
||||
<th class="py-2">{{__('Unit Price')}}</th>
|
||||
<th class="py-2">{{__('Sale Price')}}</th>
|
||||
{{-- <th class="py-2" width="100px">{{__('Is Vaccination')}}</th>--}}
|
||||
<th class="py-2 text-center" width="100px">{{__('physician.table_status')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($medicineItems as $k=>$medicineItem)
|
||||
<tr>
|
||||
<td class="py-1 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_medicine']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary mr-2" title="{{__('general.btn_edit')}}" data-action="edit" data-uid="{{$medicineItem->id}}" data-toggle="modal" data-target="#modal-medicine-item" data-backdrop="static">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if($medicineItem->record_status_id==0)
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary " title="Restore" onclick="restore_data({{$medicineItem->id}})"><i class="typcn typcn-plus"></i></button>
|
||||
@else
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_medicine']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger " title="{{__('general.btn_delete')}}" onclick="delete_data({{$medicineItem->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-1">{{$medicineItem->code}}</td>
|
||||
<td class="py-1">{{$medicineItem->medicine->name}}</td>
|
||||
<td class="py-1">{{@$medicineItem->medicineGroup->name_en}}</td>
|
||||
<td class="py-1">{{$medicineItem->unit_price}}</td>
|
||||
<td class="py-1">{{$medicineItem->sale_price}}</td>
|
||||
{{-- <td class="py-1 text-center"><i class="mdi {{$medicineItem->is_vaccination == 1 ? 'mdi-check-circle text-primary' : 'mdi-checkbox-blank-circle-outline_'}}"></i></td>--}}
|
||||
<td class="py-1 text-center">
|
||||
<i class="mdi {{$medicineItem->record_status_id == 1 ? 'mdi-check-circle text-primary' : 'mdi-checkbox-blank-circle-outline'}}"></i>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $medicineItems->links('pagination.custom') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<div class="modal fade modal-primary" id="modal-medicine-item">
|
||||
<div class="modal-dialog modal-xl">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title new">{{__('New Supplier')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form method="POST" action="#" id="form-physician" enctype="multipart/form-data" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="lab-name-en">{{__('Medical Item')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group" id="testItem">
|
||||
<div class="form-group" style="flex: 1 !important;">
|
||||
<select class="form-control rounded-0 select2" name="medicine_id" id="medicine-id" style=" width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($medicines as $medicine)
|
||||
<option value="{{$medicine->id}}">{{$medicine->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_medicine']))
|
||||
<button class="btn btn-sm btn-inverse-warning px-3" type="button" onclick="editMedicine()"><i class="mdi mdi-table-edit"></i> </button>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['add_medicine']))
|
||||
<button class="btn btn-sm rounded-0 btn-inverse-info px-3" type="button" onclick="addNewMedicine('medicine-id')"><i class="typcn typcn-plus"></i> </button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('test_sample.code')}}</label>
|
||||
<input type="text" class="form-control rounded-0" name="medicine_code" id="medicine-code" placeholder="{{__('test_sample.code')}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Medical Item Group')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control rounded-0 select2" name="medicine_group_id" id="medicine-group-id" style=" width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($medicineGroups as $medicineGroup)
|
||||
<option value="{{$medicineGroup->id}}">{{$medicineGroup->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Description')}}</label>
|
||||
<input type="text" class="form-control rounded-0" name="dosage" id="dosage" placeholder="{{__('Description or dosage in case item is medicine')}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Unit Price')}}</label>
|
||||
<input type="number" class="form-control rounded-0" name="unit_price" id="unit-price" placeholder="{{__('Unit Price')}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Sale Price')}}</label>
|
||||
<input type="number" class="form-control rounded-0" name="sale_price" id="sale-price" placeholder="{{__('Sale Price')}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-check form-check-flat form-check-primary mb-1 mt-1">
|
||||
<div class="form-check form-check-primary">
|
||||
<label class="form-check-label">
|
||||
<input type="checkbox" data-id="1" class="checkbox" value="1" name="is_vaccination" id="is-vaccination"> {{__('Is Vaccination')}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info" id="btnSave"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-light" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script>
|
||||
|
||||
var save_url = "{{url('inventory/medicine/save')}}";
|
||||
var update_url = "{{url('inventory/medicine/update')}}";
|
||||
var delete_url = "{{url('inventory/medicine/delete')}}";
|
||||
var restore_url = "{{url('inventory/medicine/restore')}}";
|
||||
|
||||
var get_url = "{{url('inventory/medicine/get')}}";
|
||||
|
||||
var medicine_base_url = "{{url('inventory/ref-medicine')}}";
|
||||
|
||||
let modal_add_title = "{{__('Add Medical Item')}}";
|
||||
let modal_edit_title = "{{__('Edit Medical Item')}}";
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/medicine.js')}}"></script>
|
||||
|
||||
<script>
|
||||
function editMedicine(){
|
||||
let selectedOption = $('#medicine-id option:selected');
|
||||
let selectedText = selectedOption.text();
|
||||
let selectedVal = selectedOption.val();
|
||||
if(selectedVal>0){
|
||||
editMedicineName(selectedVal, selectedText, 'medicine-id')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,204 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<style>
|
||||
.center {
|
||||
height:100%;
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
|
||||
}
|
||||
.form-input {
|
||||
width:50%;
|
||||
padding:0px 0px 0px 0;
|
||||
}
|
||||
.form-input img {
|
||||
width:100%;
|
||||
display:none;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.form-input input {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.form-input label {
|
||||
height:25px;
|
||||
background:#cdcdcd26;
|
||||
color:#c9c9c9;
|
||||
cursor:pointer;
|
||||
width: 75px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('Medical Item Group')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form method="get" action="{{url('/inventory/medicine-group/search')}}">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" value="{{isset($_GET['kword']) ? $_GET['kword'] : ''}}" name="kword" id="kword" placeholder="{{__('Medical item group name...')}}">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-inverse-secondary px-3" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['add_medicine_group']))
|
||||
<button class="btn btn-info waves-effect px-3 ml-2" type="button" data-action="new" data-toggle="modal" data-target="#modal-medicine-group" data-backdrop="static"><i class="typcn typcn-plus"></i> {{__('general.btn_add_new')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2" width="50px">{{__('physician.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('physician.table_action')}}</th>
|
||||
<th class="py-2">{{__('Medical Item Group')}}</th>
|
||||
{{-- <th class="py-2" width="100px">{{__('Is Vaccination')}}</th>--}}
|
||||
<th class="py-2" width="500px">{{__('Description')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('physician.table_status')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($medicineGroups as $k=>$medicineGroup)
|
||||
<tr>
|
||||
<td class="py-1 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_medicine_group']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary mr-2" title="{{__('general.btn_edit')}}" data-action="edit" data-uid="{{$medicineGroup->id}}" data-toggle="modal" data-target="#modal-medicine-group" data-backdrop="static">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if($medicineGroup->record_status_id==0)
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary " title="Restore" onclick="restore_data({{$medicineGroup->id}})"><i class="typcn typcn-plus"></i></button>
|
||||
@else
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_medicine_group']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger " title="{{__('general.btn_delete')}}" onclick="delete_data({{$medicineGroup->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-1">{{$medicineGroup->name_en}}</td>
|
||||
{{-- <td class="py-1 text-center"><i class="mdi {{$medicineGroup->is_gvaccination == 1 ? 'mdi-check-circle text-primary' : 'mdi-checkbox-blank-circle-outline_'}}"></i></td>--}}
|
||||
<td class="py-1">{{$medicineGroup->description}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<i class="mdi {{$medicineGroup->record_status_id == 1 ? 'mdi-check-circle text-primary' : 'mdi-checkbox-blank-circle-outline'}}"></i>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $medicineGroups->links('pagination.custom') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<div class="modal fade modal-primary" id="modal-medicine-group">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title new">{{__('New Medical Item Group')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form method="POST" action="#" id="form-physician" enctype="multipart/form-data" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Medical Item Group')}} <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" name="name_en" id="name-en" placeholder="{{__('Medical item group name...')}}">
|
||||
</div>
|
||||
|
||||
<div class="form-check form-check-flat form-check-primary mb-1 mt-1 d-none">
|
||||
<div class="form-check form-check-primary">
|
||||
<label class="form-check-label">
|
||||
<input type="checkbox" data-id="1" class="checkbox" value="1" name="is_vaccination" id="is-vaccination"> {{__('Is Vaccination')}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="label-description">{{__('Description')}} <span class="text-danger"></span></label>
|
||||
<textarea id="description" rows="8" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info" id="btnSave"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-light" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script>
|
||||
|
||||
var save_url = "{{url('inventory/medicine-group/save')}}";
|
||||
var update_url = "{{url('inventory/medicine-group/update')}}";
|
||||
var delete_url = "{{url('inventory/medicine-group/delete')}}";
|
||||
var restore_url = "{{url('inventory/medicine-group/restore')}}";
|
||||
|
||||
var get_url = "{{url('inventory/medicine-group/get')}}";
|
||||
|
||||
let modal_add_title = "{{__('Add Medical Item Group')}}";
|
||||
let modal_edit_title = "{{__('Edit Medical Item Group')}}";
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/medicine_group.js')}}"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,193 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<style>
|
||||
.center {
|
||||
height:100%;
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
|
||||
}
|
||||
.form-input {
|
||||
width:50%;
|
||||
padding:0px 0px 0px 0;
|
||||
}
|
||||
.form-input img {
|
||||
width:100%;
|
||||
display:none;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.form-input input {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.form-input label {
|
||||
height:25px;
|
||||
background:#cdcdcd26;
|
||||
color:#c9c9c9;
|
||||
cursor:pointer;
|
||||
width: 75px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('Medical Item Unit')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form method="get" action="{{url('/inventory/medicine-unit/search')}}">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" value="{{isset($_GET['kword']) ? $_GET['kword'] : ''}}" name="kword" id="kword" placeholder="{{__('Medical item unit name')}}">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-inverse-secondary px-3" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['add_medicine_unit']))
|
||||
<button class="btn btn-info waves-effect px-3 ml-2" type="button" data-action="new" data-toggle="modal" data-target="#modal-medicine-unit" data-backdrop="static"><i class="typcn typcn-plus"></i> {{__('general.btn_add_new')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2" width="50px">{{__('physician.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="150px">{{__('physician.table_action')}}</th>
|
||||
<th class="py-2">{{__('Medical Item Unit Name')}}</th>
|
||||
<th class="py-2" width="300px">{{__('Packaged Item')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('physician.table_status')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($medicineUnits as $k=>$medicineUnit)
|
||||
<tr>
|
||||
<td class="py-1 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_medicine_unit']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary mr-2" title="{{__('general.btn_edit')}}" data-action="edit" data-uid="{{$medicineUnit->id}}" data-toggle="modal" data-target="#modal-medicine-unit" data-backdrop="static">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if($medicineUnit->record_status_id==0)
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary " title="Restore" onclick="restore_data({{$medicineUnit->id}})"><i class="typcn typcn-plus"></i></button>
|
||||
@else
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_medicine_unit']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger " title="{{__('general.btn_delete')}}" onclick="delete_data({{$medicineUnit->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-1">{{$medicineUnit->name_en}}</td>
|
||||
<td class="py-1">{{$medicineUnit->unit_packing}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<i class="mdi {{$medicineUnit->record_status_id == 1 ? 'mdi-check-circle text-primary' : 'mdi-checkbox-blank-circle-outline'}}"></i>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $medicineUnits->links('pagination.custom') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<div class="modal fade modal-primary" id="modal-medicine-unit">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title new">{{__('New Medicine Unit')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form method="POST" action="#" id="form-physician" enctype="multipart/form-data" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Medicine Unit Name')}} <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" name="name_en" id="name-en" placeholder="{{__('Medicine Unit Name')}}">
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="label-description">{{__('Unit Packing')}} <span class="text-danger"></span></label>
|
||||
<input type="number" value="1" step="0.5" class="form-control" name="unit_packing" id="unit-packing" placeholder="{{__('Unit Packing')}}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info" id="btnSave"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-light" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script>
|
||||
|
||||
var save_url = "{{url('inventory/medicine-unit/save')}}";
|
||||
var update_url = "{{url('inventory/medicine-unit/update')}}";
|
||||
var delete_url = "{{url('inventory/medicine-unit/delete')}}";
|
||||
var restore_url = "{{url('inventory/medicine-unit/restore')}}";
|
||||
|
||||
var get_url = "{{url('inventory/medicine-unit/get')}}";
|
||||
|
||||
let modal_add_title = "{{__('Add Medical Item Unit')}}";
|
||||
let modal_edit_title = "{{__('Edit Medical Item Unit')}}";
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/medicine_unit.js')}}"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
margin-top: 0.1cm;
|
||||
margin-left: 0.5cm !important;
|
||||
}
|
||||
|
||||
|
||||
@page :second {
|
||||
margin-top: 2cm;
|
||||
}
|
||||
@@ -193,8 +193,8 @@
|
||||
|
||||
|
||||
<page size="A4">
|
||||
|
||||
|
||||
|
||||
|
||||
<table border="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -219,7 +219,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div class="" style="font-size: 13pt; font-weight: 600;">{{__('Laboratory Total Billing Report')}}</div>
|
||||
<div class="" style="font-size: 13pt; font-weight: 600;">{{__('Organization Total Billing Report')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -232,7 +232,7 @@
|
||||
<p style="text-align: center">{{__('From Date:') . date('d/m/Y',strtotime($_GET['start_date'])) . ' To Date: '.date('d/m/Y',strtotime($_GET['end_date']))}}</p>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
|
||||
<table class="table-inv" width="100%" border="0" style="border-collapse: collapse !important; font-size: 11pt">
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
@@ -259,7 +259,7 @@
|
||||
$totalPrice+=$row['total_net_amount'];
|
||||
@endphp
|
||||
@endforeach
|
||||
|
||||
|
||||
<tr><td colspan="4" style="padding-left:20px">Exchange Rate : 1 USD = {{$labSettings->exchange_rate}}</td></tr>
|
||||
|
||||
<tr>
|
||||
@@ -267,27 +267,27 @@
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> ($):</b> {{number_format(($totalPrice),2)}} </td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> (៛):</b> {{number_format(($totalPrice * $labSettings->exchange_rate))}} </td>
|
||||
</tr>
|
||||
|
||||
|
||||
@if($labSettings->is_hide_comission_percentage>0)
|
||||
@php
|
||||
$ownBenefitRate = ((100 - $labSettings->is_hide_comission_percentage));
|
||||
@endphp
|
||||
|
||||
|
||||
<tr>
|
||||
<td style="text-align: right; font-weight: bold" class="border-0" colspan="2">{{$labSettings->is_hide_comission_percentage}}% {{__('Percent')}} </td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> ($):</b> {{number_format(($totalPrice*($labSettings->is_hide_comission_percentage/100)),2)}} </td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> (៛):</b> {{number_format((($totalPrice*($labSettings->is_hide_comission_percentage/100)) * $labSettings->exchange_rate))}} </td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td style="text-align: right; font-weight: bold" class="border-0" colspan="2">{{$ownBenefitRate}}% {{__('Percent')}} </td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> ($):</b> {{number_format(($totalPrice*($ownBenefitRate/100)),2)}} </td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> (៛):</b> {{number_format((($totalPrice*($ownBenefitRate/100)) * $labSettings->exchange_rate))}} </td>
|
||||
</tr>
|
||||
|
||||
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
margin-top: 0.1cm;
|
||||
margin-left: 0.5cm !important;
|
||||
}
|
||||
|
||||
|
||||
@page :second {
|
||||
margin-top: 2cm;
|
||||
}
|
||||
@@ -217,7 +217,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div class="" style="font-size: 13pt; font-weight: 600;">{{__('Laboratory Total Billing Report')}}</div>
|
||||
<div class="" style="font-size: 13pt; font-weight: 600;">{{__('Organization Total Billing Report')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
$totalPrice+=$row['total_price'];
|
||||
@endphp
|
||||
@endforeach
|
||||
|
||||
|
||||
<tr><td colspan="8" style="padding-left:20px">Exchange Rate : 1 USD = {{$labSettings->exchange_rate}}</td></tr>
|
||||
|
||||
<tr>
|
||||
@@ -278,23 +278,23 @@
|
||||
@php
|
||||
$ownBenefitRate = ((100 - $labSettings->is_hide_comission_percentage));
|
||||
@endphp
|
||||
|
||||
|
||||
<tr>
|
||||
<td style="text-align: right; font-weight: bold" class="border-0" colspan="4">{{$labSettings->is_hide_comission_percentage}}% {{__('Percent')}} </td>
|
||||
<td style="text-align: right;" class="bg-light" colspan="2"><b style="float: left"> ($):</b> {{number_format(($totalPrice*($labSettings->is_hide_comission_percentage/100)),2)}} </td>
|
||||
<td style="text-align: right;" colspan="2" class="bg-light"><b style="float: left"> (Riel):</b> {{number_format((($totalPrice*($labSettings->is_hide_comission_percentage/100)) * $labSettings->exchange_rate))}} </td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td style="text-align: right; font-weight: bold" class="border-0" colspan="4">{{$ownBenefitRate}}% {{__('Percent')}} </td>
|
||||
<td style="text-align: right;" class="bg-light" colspan="2"><b style="float: left"> ($):</b> {{number_format(($totalPrice*($ownBenefitRate/100)),2)}} </td>
|
||||
<td style="text-align: right;" colspan="2" class="bg-light"><b style="float: left"> (Riel):</b> {{number_format((($totalPrice*($ownBenefitRate/100)) * $labSettings->exchange_rate))}} </td>
|
||||
</tr>
|
||||
|
||||
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{{-- <td style="text-align: right;" class="text-right border-0" colspan="7">{{__('Balance')}} :</td>--}}
|
||||
{{-- <td style="text-align: right;" class="text-right bg-light">$ {{number_format(($totalPrice - ($totalPrice*0.5)) ,2)}}</td>--}}
|
||||
{{-- </tr>--}}
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
margin-top: 0.1cm;
|
||||
margin-left: 0.5cm !important;
|
||||
}
|
||||
|
||||
|
||||
@page :second {
|
||||
margin-top: 2cm;
|
||||
}
|
||||
@@ -188,7 +188,7 @@
|
||||
.border-0{
|
||||
border:none !important;
|
||||
}
|
||||
|
||||
|
||||
#print_preview_modal .modal-dialog.A4-portrait {
|
||||
width: 29.7cm !important;
|
||||
}
|
||||
@@ -197,8 +197,8 @@
|
||||
|
||||
|
||||
<page size="A4">
|
||||
|
||||
|
||||
|
||||
|
||||
<table border="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -216,7 +216,7 @@
|
||||
<p style="line-height: 13px !important; font-size: 13.5pt; font-weight: bold; color: #0000ff;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
<p style="line-height: 10px !important;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </p>
|
||||
<p style="line-height: 10px !important;">{{$labSettings->phone_number}} {{$labSettings->email}}</p>
|
||||
|
||||
|
||||
</td>
|
||||
<td style="width:120px" > </td>
|
||||
</tr>
|
||||
@@ -226,7 +226,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div class="" style="font-size: 13pt; font-weight: 600;text-decoration: underline;">{{__('Laboratory Financial Report')}}</div>
|
||||
<div class="" style="font-size: 13pt; font-weight: 600;text-decoration: underline;">{{__('Organization Financial Report')}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
<p style="text-align: center">{{__('From Date:') . date('d-M-Y',strtotime($_GET['start_date'])) . ' To Date: '.date('d-M-Y',strtotime($_GET['end_date']))}}</p>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
|
||||
<table class="table-inv" width="100%" border="0" style="border-collapse: collapse !important; font-size: 9pt">
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
@@ -256,7 +256,7 @@
|
||||
<td width="70px" style="padding-right: 1px; text-align:center;">Bank Pay</td>
|
||||
<td width="70px" style="padding-right: 1px; text-align:center;">Owe</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
@@ -293,7 +293,7 @@
|
||||
$i++;
|
||||
@endphp
|
||||
@endforeach
|
||||
|
||||
|
||||
<tr><td colspan="12" style="padding-left:20px">Exchange Rate : 1 USD = {{$labSettings->exchange_rate}}</td></tr>
|
||||
|
||||
<tr>
|
||||
@@ -304,7 +304,7 @@
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_paid),2)}}<br><b style="float: left"> ៛ </b> {{number_format(($total_paid * $labSettings->exchange_rate))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_bank_paid),2)}}<br><b style="float: left"> ៛ </b> {{number_format(($total_bank_paid * $labSettings->exchange_rate))}}</td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_owe),2)}}<br><b style="float: left"> ៛ </b> {{number_format(($total_owe * $labSettings->exchange_rate))}}</td>
|
||||
|
||||
|
||||
</tr>
|
||||
@if($labSettings->is_hide_comission_percentage>0)
|
||||
@php
|
||||
@@ -321,7 +321,7 @@
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total_owe * ($labSettings->is_hide_comission_percentage/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total_owe * ($labSettings->is_hide_comission_percentage/100)) * $labSettings->exchange_rate))}}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td style="text-align: right; font-weight: bold" class="border-0" colspan="6">{{$ownBenefitRate}}% {{__('Percent')}} </td>
|
||||
<td style="text-align: right;" class="bg-light"><b style="float: left"> $ </b> {{number_format(($total * ($ownBenefitRate/100)),2)}}<br><b style="float: left"> ៛ </b> {{number_format((($total * ($ownBenefitRate/100)) * $labSettings->exchange_rate))}}</td>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
<style>
|
||||
|
||||
|
||||
@php
|
||||
$configures = collect($labConfigures);
|
||||
|
||||
@@ -33,18 +33,18 @@
|
||||
$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
|
||||
|
||||
|
||||
.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:10px !important;
|
||||
}
|
||||
|
||||
|
||||
.font-changeable{
|
||||
/*font-family: '{{(empty($fontName) ? 'Times New Roman':$fontName)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
|
||||
table td, table th{
|
||||
padding: 3px !important; font-size:10pt !important;
|
||||
}
|
||||
@@ -119,7 +119,7 @@
|
||||
margin: 0.5cm;
|
||||
}
|
||||
@media print {
|
||||
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
box-shadow: none;
|
||||
@@ -148,7 +148,7 @@
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
|
||||
.font-changable{
|
||||
/*font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";*/
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
@@ -169,18 +169,18 @@
|
||||
.border-0{
|
||||
border:none !important;
|
||||
}
|
||||
|
||||
|
||||
.font-changable{
|
||||
/*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')}}";
|
||||
}
|
||||
|
||||
|
||||
.table-inv tr td{
|
||||
font-size:11px !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
<page size="A4">
|
||||
<div style="width: 297mm; padding: 0px; background-image: linear-gradient(#fafafa, #fafafa); background-size: 1px 100%; background-repeat: no-repeat; background-position: 49.6% center;">
|
||||
@@ -224,8 +224,8 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
|
||||
<div style="font-size: 11.5pt; font-weight: 700;" class="font-changeable">{{$sample->lab_id != 21 ? __('invoice.tittle') : 'Laboratory' }}</div>
|
||||
|
||||
<div style="font-size: 11.5pt; font-weight: 700;" class="font-changeable">{{$sample->organization_id != 21 ? __('invoice.tittle') : 'Organization' }}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -233,7 +233,7 @@
|
||||
<table width="100%" class="patient-info font-changable" style="line-height: 15px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{$sample->lab_id != 21 ? __('invoice.form_invoice_number') : 'Reference No' }}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{$sample->organization_id != 21 ? __('invoice.form_invoice_number') : 'Reference No' }}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="30%">: {{$invoice->invoice_code}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{__('sample.table_sample_number')}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="30%">: {{$sample->sample_number}}</td>
|
||||
@@ -291,7 +291,7 @@
|
||||
<td style="padding:0 5px;" class="text-right font-changable">$ {{$invItem->unit_price}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
|
||||
@for($i=$total; $i<=11; $i++)
|
||||
<tr>
|
||||
<td class=" text-center font-changable" style="padding:0 5px;">{{$i+1}}</td>
|
||||
@@ -325,10 +325,10 @@
|
||||
</tr>
|
||||
|
||||
<tr class="font-changable">
|
||||
|
||||
|
||||
<td class="text-left border-0" colspan="2">
|
||||
<span style="padding-left: {{ $sample->lab_id != 21 ? '70px' : '45px' }} !important;">
|
||||
{{ $sample->lab_id != 21 ? __('invoice.received_by') : 'Lab. Tech' }}
|
||||
<span style="padding-left: {{ $sample->organization_id != 21 ? '70px' : '45px' }} !important;">
|
||||
{{ $sample->organization_id != 21 ? __('invoice.received_by') : 'Lab. Tech' }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost_riel')}} :</td>
|
||||
@@ -403,7 +403,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-top text-center">
|
||||
<div style="font-size: 11.5pt; font-weight: 700;" class="font-changeable">{{$sample->lab_id != 21 ? __('invoice.tittle') : 'Laboratory' }}</div>
|
||||
<div style="font-size: 11.5pt; font-weight: 700;" class="font-changeable">{{$sample->organization_id != 21 ? __('invoice.tittle') : 'Organization' }}</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
@@ -412,7 +412,7 @@
|
||||
<table width="100%" class="patient-info font-changable" style="line-height: 15px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{$sample->lab_id != 21 ? __('invoice.form_invoice_number') : 'Reference No' }}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{$sample->organization_id != 21 ? __('invoice.form_invoice_number') : 'Reference No' }}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="30%">: {{$invoice->invoice_code}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="20%">{{__('sample.table_sample_number')}}</td>
|
||||
<td class="text-left" style="font-size:10pt !important;" width="30%">: {{$sample->sample_number}}</td>
|
||||
@@ -460,9 +460,9 @@
|
||||
<td width="15%" class="text-center" style="width:110px !important;">{{__('invoice.form_qty')}}</td>
|
||||
<td width="15%" class="text-center" style="width:110px !important;">{{__('invoice.form_unit_price')}}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@foreach($invoice->invoiceDetail->sortBy('weight') as $k=>$invItem)
|
||||
|
||||
|
||||
<tr>
|
||||
<td class=" text-center font-changable">{{$k+1}}</td>
|
||||
<td class="font-changable">{{$invItem->test_name}}</td>
|
||||
@@ -488,7 +488,7 @@
|
||||
<td class="text-right border-0">{{__('invoice.table_total_cost')}} ($) :</td>
|
||||
<td class="text-right bg-light"> {{number_format($invoice->total,2)}}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@if($invoice->is_hide_discount == 0)
|
||||
|
||||
<tr class="font-changable">
|
||||
@@ -497,18 +497,18 @@
|
||||
<td class="text-right bg-light"> {{ ($invoice->discount_type==1 ? $invoice->discount : number_format($invoice->discount,2))}}</td>
|
||||
<!--<td class="text-right bg-light"> {{ ($invoice->discount_type==1 ? ($invoice->discount > 0? number_format($invoice->total * (1-($invoice->discount/100))) : 0) : number_format($invoice->discount,2))}}</td>-->
|
||||
</tr>
|
||||
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format(($invoice->gross_total) ,2)}}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr class="font-changable">
|
||||
|
||||
|
||||
<td class="text-left border-0" colspan="2">
|
||||
<span style="padding-left: {{ $sample->lab_id != 21 ? '70px' : '45px' }} !important;">
|
||||
{{ $sample->lab_id != 21 ? __('invoice.received_by') : 'Lab. Tech' }}
|
||||
<span style="padding-left: {{ $sample->organization_id != 21 ? '70px' : '45px' }} !important;">
|
||||
{{ $sample->organization_id != 21 ? __('invoice.received_by') : 'Lab. Tech' }}
|
||||
</span>
|
||||
</td>
|
||||
|
||||
@@ -516,13 +516,13 @@
|
||||
<td class="text-right bg-light"> {{number_format((($invoice->gross_total) * ($invoice->exchange_rate <=0 ? $labSettings->exchange_rate : $invoice->exchange_rate)),2)}}</td>
|
||||
</tr>
|
||||
@else
|
||||
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost')}} :</td>
|
||||
<td class="text-right bg-light"> {{number_format(($invoice->total) ,2)}}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr class="font-changable">
|
||||
<td class="text-left border-0" colspan="2"><span style="padding-left: 70px !important;">{{__('invoice.received_by')}}</span></td>
|
||||
<td class="text-right border-0">{{__('invoice.table_net_cost_riel')}} :</td>
|
||||
@@ -573,8 +573,8 @@
|
||||
|
||||
setTimeout(function(){ window.location.href=sample_base_url }, 10000)
|
||||
}
|
||||
|
||||
|
||||
@if(!empty($labSettings->alternative_logo))
|
||||
document.getElementById("change_logo_print").addEventListener("click", changeLogoAndPrint);
|
||||
@endif
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<li style="display: inline-block;" class="print">
|
||||
<a href="javascript:void(0)" onclick="printJS('presult-a4', 'html')" id="doPrinting"><i class="fa fa-print"></i> <b>{{__('invoice.print')}}</b></a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
<span class="close-preview" data-dismiss="modal" title="Close"><i class="fa fa-times"></i></span>
|
||||
</div>
|
||||
@@ -17,7 +17,7 @@
|
||||
<title>Result</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes">
|
||||
<style>
|
||||
|
||||
|
||||
@php
|
||||
$configures = collect($labConfigures);
|
||||
|
||||
@@ -29,18 +29,18 @@
|
||||
$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
|
||||
|
||||
|
||||
.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:10px !important;
|
||||
}
|
||||
|
||||
|
||||
#print_invoice_modal_a4 .font-changeable{
|
||||
/*font-family: '{{(empty($fontName) ? 'Times New Roman':$fontName)}}' !important;*/
|
||||
font-family: "{{(App::isLocale('en') ? (empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader) : 'Khmer OS Siemreap')}}";
|
||||
}
|
||||
|
||||
|
||||
#print_invoice_modal_a4 table td, #print_invoice_modal_a4 table th{
|
||||
padding: 3px !important; font-size:10pt !important;
|
||||
}
|
||||
@@ -115,7 +115,7 @@
|
||||
margin: 0.5cm;
|
||||
}
|
||||
#print_invoice_modal_a4 @media print {
|
||||
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
box-shadow: none;
|
||||
@@ -144,7 +144,7 @@
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
|
||||
.font-changable{
|
||||
/*font-family: "{{(App::isLocale('en') ? 'Times New Roman' : 'Khmer OS Siemreap')}}";*/
|
||||
/*font-family: '{{(empty($fontNameHeader) ? 'Times New Roman':$fontNameHeader)}}' !important;*/
|
||||
@@ -168,18 +168,18 @@
|
||||
.border-1{
|
||||
border: 1px solid #ffffff !important;
|
||||
}
|
||||
|
||||
|
||||
.font-changable{
|
||||
/*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')}}";
|
||||
}
|
||||
|
||||
|
||||
#print_invoice_modal_a4 .table-inv tr td{
|
||||
font-size:11px !important;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
p.value-pair {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
@@ -198,45 +198,45 @@
|
||||
line-height: 0;
|
||||
border-bottom: 2px dotted #858585;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
<page size="A4">
|
||||
<div style="width: 21cm; padding: 0px; background-image: linear-gradient(#fafafa, #fafafa); background-size: 1px 100%; background-repeat: no-repeat; background-position: 49.6% center;">
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
$grouped = [];
|
||||
|
||||
|
||||
foreach($invoice->invoiceDetail->sortBy('weight') as $r=>$d)
|
||||
{
|
||||
|
||||
|
||||
$departmentId = $d->testSample->sample->department->name_en;
|
||||
$sampleTypeId = $d->testSample->sample->name_en;
|
||||
|
||||
|
||||
if (!isset($grouped[$departmentId])) {
|
||||
$grouped[$departmentId] = [];
|
||||
}
|
||||
if (!isset($grouped[$departmentId][$sampleTypeId])) {
|
||||
$grouped[$departmentId][$sampleTypeId] = [];
|
||||
}
|
||||
|
||||
|
||||
// Add the item to the appropriate group
|
||||
$grouped[$departmentId][$sampleTypeId][] = $d->toArray();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<div style="width: 100%; display: inline-block; clear: both; vertical-align: top;">
|
||||
<table border="0" width="100%" style="font-size: 8pt !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width:100%; text-align: center">
|
||||
@if((!empty($sample->physician->logo)) && ($sample->lab_id!=22))
|
||||
@if((!empty($sample->physician->logo)) && ($sample->organization_id!=22))
|
||||
<img width="100%" class="rounded-0" src="{{url(env("APP_URL").'storage/images/physician/'.$sample->physician->logo)}}" />
|
||||
@else
|
||||
|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width:70px; vertical-align: top;" class="text-center">
|
||||
@@ -258,7 +258,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -335,7 +335,7 @@
|
||||
@endforeach
|
||||
@endforeach
|
||||
@endforeach
|
||||
|
||||
|
||||
@for($i=$total; $i<=19; $i++)
|
||||
<tr>
|
||||
<td style="padding:0 5px; padding-left:15px !important;" class="font-changable border-1"><i style="position: absolute;"> </td>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</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>
|
||||
@@ -56,12 +56,12 @@
|
||||
$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;
|
||||
@@ -71,7 +71,7 @@
|
||||
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))}}');*/
|
||||
@@ -84,7 +84,7 @@
|
||||
/*display:swap;*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
.result-page-color{
|
||||
color: {{empty($resultColor) ? '#0000ff' : $resultColor}};
|
||||
}
|
||||
@@ -107,9 +107,9 @@
|
||||
.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;
|
||||
@@ -274,7 +274,7 @@
|
||||
|
||||
@page {
|
||||
margin: 1cm 1cm 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@media print {
|
||||
@@ -284,7 +284,7 @@
|
||||
margin-left: 0.2cm !important;
|
||||
margin-bottom: 0cm;
|
||||
}
|
||||
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
margin-left: 0cm !important;
|
||||
@@ -309,15 +309,15 @@
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
|
||||
@if(Auth::id()==1)
|
||||
|
||||
|
||||
#footer .page{
|
||||
counter-increment:listCounter;
|
||||
}
|
||||
|
||||
|
||||
#footer .page:after{
|
||||
|
||||
|
||||
content: counter(listCounter);
|
||||
}
|
||||
@endif
|
||||
@@ -352,11 +352,11 @@
|
||||
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')}}";
|
||||
}
|
||||
@@ -508,7 +508,7 @@
|
||||
<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>
|
||||
@@ -586,8 +586,8 @@
|
||||
|
||||
<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="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>
|
||||
@@ -595,10 +595,10 @@
|
||||
|
||||
<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>
|
||||
|
||||
@@ -609,7 +609,7 @@
|
||||
|
||||
<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>
|
||||
@@ -674,8 +674,8 @@
|
||||
<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')}} .
|
||||
@@ -700,12 +700,12 @@
|
||||
<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)
|
||||
@if($sample->organization_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
|
||||
@@ -725,16 +725,16 @@
|
||||
@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();
|
||||
@@ -745,14 +745,14 @@
|
||||
|
||||
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>
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@@ -32,12 +32,12 @@
|
||||
</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
|
||||
@@ -46,7 +46,7 @@
|
||||
<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')}}');
|
||||
@@ -63,12 +63,12 @@
|
||||
$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;
|
||||
@@ -78,9 +78,9 @@
|
||||
line-height: {{$lineHeight}} !important;
|
||||
}
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: 'result_font';
|
||||
}
|
||||
@@ -108,7 +108,7 @@
|
||||
.result-font, .name{
|
||||
font-family: '{{empty($fontName) ? 'Times New Roman': $fontName }}';
|
||||
}
|
||||
|
||||
|
||||
._department-sample-info tr td{
|
||||
padding-top: 0px !important;
|
||||
padding-bottom: 0px !important;
|
||||
@@ -116,7 +116,7 @@
|
||||
|
||||
.result-font-size{
|
||||
font-size: {{empty($fontSize) ? '13pt' : $fontSize}};
|
||||
|
||||
|
||||
}
|
||||
|
||||
.KhmerOS {
|
||||
@@ -138,7 +138,7 @@
|
||||
width: 21cm;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
{{(request()->segment(1)!='shared' ? 'margin-left: 0cm !important;':'')}}
|
||||
{{(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';*/
|
||||
@@ -270,7 +270,7 @@
|
||||
|
||||
@page {
|
||||
margin: 1cm 1cm 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@media print {
|
||||
@@ -283,11 +283,11 @@
|
||||
content: content
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
body,
|
||||
page[size="A4"] {
|
||||
margin-left: 0cm !important;
|
||||
@@ -312,15 +312,15 @@
|
||||
vertical-align: top;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
|
||||
@if(Auth::id()==1)
|
||||
|
||||
|
||||
#footer .page{
|
||||
counter-increment:listCounter;
|
||||
}
|
||||
|
||||
|
||||
#footer .page:after{
|
||||
|
||||
|
||||
content: counter(listCounter);
|
||||
}
|
||||
@endif
|
||||
@@ -355,11 +355,11 @@
|
||||
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')}}";
|
||||
}
|
||||
@@ -371,7 +371,7 @@
|
||||
<input type="hidden" name="verify" id="verify" value="">
|
||||
|
||||
<page size="A4">
|
||||
|
||||
|
||||
<table border="0" width="100%">
|
||||
<thead>
|
||||
<tr id="def-logo">
|
||||
@@ -403,7 +403,7 @@
|
||||
</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>
|
||||
@@ -514,7 +514,7 @@
|
||||
<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>
|
||||
@@ -592,8 +592,8 @@
|
||||
|
||||
<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="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>
|
||||
@@ -601,10 +601,10 @@
|
||||
|
||||
<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>
|
||||
|
||||
@@ -615,7 +615,7 @@
|
||||
|
||||
<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>
|
||||
@@ -656,7 +656,7 @@
|
||||
<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')}}
|
||||
@@ -680,8 +680,8 @@
|
||||
<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')}} .
|
||||
@@ -706,12 +706,12 @@
|
||||
<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)
|
||||
@if($sample->organization_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
|
||||
@@ -731,16 +731,16 @@
|
||||
@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();
|
||||
@@ -751,14 +751,14 @@
|
||||
|
||||
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>
|
||||
|
||||
@@ -110,13 +110,11 @@
|
||||
@csrf
|
||||
|
||||
<div class="mb-3">
|
||||
|
||||
<label>{{__('general.signature_image')}}</label>
|
||||
|
||||
<input type="file"
|
||||
class="form-control"
|
||||
name="signature">
|
||||
|
||||
</div>
|
||||
|
||||
@if(auth()->user()->signature)
|
||||
@@ -128,7 +126,7 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<button class="btn btn-md btn-inverse-info rounded-25">
|
||||
<button class="btn btn-md btn-inverse-success rounded-25">
|
||||
<i class="fa fa-floppy-o"></i> <span class="save">{{__('general.btn_save')}}</span>
|
||||
</button>
|
||||
|
||||
@@ -157,10 +155,10 @@
|
||||
name="current_password"
|
||||
class="form-control rounded-right-0">
|
||||
|
||||
<button class="btn btn-secondary rounded-left-0 btn-sm px-3"
|
||||
<button class="btn btn-light rounded-left-0 btn-sm px-3"
|
||||
type="button"
|
||||
onclick="togglePassword('current_password')">
|
||||
<i class="mdi mdi-looks"></i>
|
||||
<i class="mdi mdi-lightbulb-on-outline"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -174,10 +172,10 @@
|
||||
name="new_password"
|
||||
class="form-control rounded-right-0">
|
||||
|
||||
<button class="btn btn-secondary rounded-left-0 btn-sm px-3"
|
||||
<button class="btn btn-light rounded-left-0 btn-sm px-3"
|
||||
type="button"
|
||||
onclick="togglePassword('new_password')">
|
||||
<i class="mdi mdi-looks"></i>
|
||||
<i class="mdi mdi-lightbulb-on-outline"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -190,15 +188,15 @@
|
||||
name="new_password_confirmation"
|
||||
class="form-control rounded-right-0">
|
||||
|
||||
<button class="btn btn-sm btn-secondary rounded-left-0 px-3"
|
||||
<button class="btn btn-sm btn-light rounded-left-0 px-3"
|
||||
type="button"
|
||||
onclick="togglePassword('new_password_confirmation')">
|
||||
<i class="mdi mdi-looks"></i>
|
||||
<i class="mdi mdi-lightbulb-on-outline"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-md btn-inverse-info rounded-25">
|
||||
<button class="btn btn-md btn-inverse-success rounded-25">
|
||||
<i class="fa fa-floppy-o"></i> <span class="save">{{__('general.btn_save')}}</span>
|
||||
</button>
|
||||
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<h1>Need Restock</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,238 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> Patient Register</h4><hr class="my-3">
|
||||
<div class="col-12">
|
||||
<form class="form">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-6">
|
||||
<div class="form-group row my-2">
|
||||
<label for="patient_name" class="col-sm-12 col-md-3 col-form-label">Patient-Code<code> *</code></label>
|
||||
<div class="col-12 col-sm-12 col-md-9">
|
||||
<input id="patient_name" class="form-control" name="patient_name" type="text" placeholder="Patient code" required="" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row my-2">
|
||||
<label for="patient_name" class="col-sm-12 col-md-3 col-form-label">Patient-Name<code> *</code></label>
|
||||
<div class="col-12 col-sm-12 col-md-9">
|
||||
<input id="patient_name" class="form-control" name="patient_name" type="text" placeholder="Patient name" required="" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row my-2">
|
||||
<label for="example-text-input" class="col-sm-12 col-md-3 col-form-label">Dob <b>or</b> Age<code> *</code></label>
|
||||
<div class="col-12 col-sm-12 col-md-9">
|
||||
<div class="input-group">
|
||||
<div class="input-group-append">
|
||||
<input class="form-control" name="dob" type="text" id="dob" placeholder="{{__('general.date_placeholder')}}" required="" autocomplete="off">
|
||||
</div>
|
||||
<input type="number" id="age" name="age" placeholder="Age" value="" class="form-control" autocomplete="off">
|
||||
<div class="input-group-append">
|
||||
<select class="form-control" name="age_from_unit" id="age-from-unit">
|
||||
<option value="1">Day</option>
|
||||
<option value="30">Month</option>
|
||||
<option value="365">Year</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row my-2">
|
||||
<label for="Gender" class="col-md-3 col-form-label">Gender<code> *</code></label>
|
||||
<div class="col-md-9 row pl-4" style="padding-top:7px;">
|
||||
<div class="form-check col-sm-4">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="gender" data-id="1" value="1"> Male
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-4">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="gender" data-id="2" value="2"> Female
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-4">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="gender" data-id="3" value="3"> Other
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row my-2">
|
||||
<label for="Gender" class="col-md-3 col-form-label">Marital Status<code> *</code></label>
|
||||
<div class="col-md-9 row pl-4" style="padding-top:7px;">
|
||||
<div class="form-check col-sm-4">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="marital_status" data-id="1" value="1"> Single
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-4">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="marital_status" data-id="2" value="2"> Married
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-4">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="marital_status" data-id="3" value="3"> Other
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-6 pb-4">
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="example-text-input" class="col-md-3 col-form-label">Phone Number<code> *</code></label>
|
||||
<div class="col-md-9">
|
||||
<input class="form-control" type="text" placeholder="099 999 999" name="phone" required="" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row my-2">
|
||||
<label for="example-text-input" class="col-md-3 col-form-label">Province<code></code></label>
|
||||
<div class="col-md-9">
|
||||
<select class="form-control select2" name="province_id" id="province-id" style="width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($provinces as $province)
|
||||
<option value="{{$province->id}}">{{$province->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row my-2">
|
||||
<label for="example-text-input" class="col-md-3 col-form-label">District<code></code></label>
|
||||
<div class="col-md-9">
|
||||
<select class="form-control select2" name="district_id" id="district-id" style="width: 100% !important;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row my-2">
|
||||
<label for="example-text-input" class="col-md-3 col-form-label">Commune</label>
|
||||
<div class="col-md-9">
|
||||
<select class="form-control select2" name="commune_id" id="commune-id" style="width: 100% !important;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row my-2">
|
||||
<label for="example-text-input" class="col-md-3 col-form-label">Village</label>
|
||||
<div class="col-md-9">
|
||||
<select class="form-control select2" name="village_id" id="village-id" style="width: 100% !important;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 float-right">
|
||||
<button type="submit" class="btn btn-info"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-light" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script>
|
||||
|
||||
$('#province-id').change(function () {
|
||||
$.ajax({
|
||||
url:"{{url('districts/json')}}/"+$(this).val(),
|
||||
type:"GET",
|
||||
dataType:"json",
|
||||
success:function(response){
|
||||
$('#district-id').html('');
|
||||
response.map(item =>{
|
||||
var patientOption = document.createElement('OPTION');
|
||||
patientOption.setAttribute('value',item.id);
|
||||
patientOption.text = item.name_en;
|
||||
$('#district-id').append(patientOption);
|
||||
})
|
||||
$('#district-id').append('<option selected></option>');
|
||||
},
|
||||
error: function(response) {
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
$('#district-id').change(function () {
|
||||
$.ajax({
|
||||
url:"{{url('communes/json')}}/"+$(this).val(),
|
||||
type:"GET",
|
||||
dataType:"json",
|
||||
success:function(response){
|
||||
$('#commune-id').html('');
|
||||
response.map(item =>{
|
||||
var patientOption = document.createElement('OPTION');
|
||||
patientOption.setAttribute('value',item.id);
|
||||
patientOption.text = item.name_en;
|
||||
$('#commune-id').append(patientOption);
|
||||
})
|
||||
$('#commune-id').append('<option selected></option>');
|
||||
},
|
||||
error: function(response) {
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
$('#commune-id').change(function () {
|
||||
$.ajax({
|
||||
url:"{{url('villages/json')}}/"+$(this).val(),
|
||||
type:"GET",
|
||||
dataType:"json",
|
||||
success:function(response){
|
||||
$('#village-id').html('');
|
||||
response.map(item =>{
|
||||
var patientOption = document.createElement('OPTION');
|
||||
patientOption.setAttribute('value',item.id);
|
||||
patientOption.text = item.name_en;
|
||||
$('#village-id').append(patientOption);
|
||||
})
|
||||
$('#village-id').append('<option selected></option>');
|
||||
},
|
||||
error: function(response) {
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,204 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<link rel="stylesheet" href="{{ asset('assets/vendors/select2/select2.min.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> Patient Register</h4>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group row">
|
||||
<label for="patient_name" class="col-sm-5 col-form-label">Patient Name</label>
|
||||
<input type="text" class="form-control form-control-sm col-sm-7" id="patient_name" placeholder="Patient name">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group row">
|
||||
<label for="patient_id" class="col-sm-5 col-form-label">Patient ID</label>
|
||||
<input type="text" class="form-control form-control-sm col-sm-7" id="patient_id" placeholder="Patient ID">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group row">
|
||||
<label for="phonenumer" class="col-sm-5 col-form-label">Phone number</label>
|
||||
<input type="text" class="form-control form-control-sm col-sm-7" id="patient_id" placeholder="Phone number">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group row">
|
||||
<label for="gender" class="col-sm-5 col-form-label">Gender</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="exampleFormControlSelect3">
|
||||
<option>Select</option>
|
||||
<option>Female</option>
|
||||
<option>Male</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group row">
|
||||
<label for="exampleInputUsername2" class="col-sm-5 col-form-label">Request Date:</label>
|
||||
<input type="text" class="form-control form-control-sm col-sm-7" id="request_date" placeholder="">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group row">
|
||||
<label for="exampleInputUsername2" class="col-sm-5 col-form-label">Address</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="exampleFormControlSelect3">
|
||||
<option>Phnom Penh</option>
|
||||
<option>Takeo</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">Sample Information</h4>
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="gender" class="col-sm-5 col-form-label">Requester Name</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="requester_name">
|
||||
<option>Dr. A</option>
|
||||
<option>Dr. B</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="labid" class="col-sm-5 col-form-label">Lab ID</label>
|
||||
<input type="text" class="form-control form-control-sm col-sm-7" id="lab_id" placeholder="Sample number">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="labid" class="col-sm-5 col-form-label">Request Date/Time</label>
|
||||
<input type="text" class="form-control form-control-sm col-sm-7" id="request_date_time" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="received_date_time" class="col-sm-5 col-form-label">Receive Date/Time</label>
|
||||
<input type="text" class="form-control form-control-sm col-sm-7" id="received_date_time" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="sample_source" class="col-sm-5 col-form-label">Sample Source</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="sample_source">
|
||||
<option>ODP</option>
|
||||
<option>ICU</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="diagnosis" class="col-sm-5 col-form-label">Diagnosis</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="diagnosis">
|
||||
<option>A1</option>
|
||||
<option>None</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-check form-check-primary">
|
||||
<label class="form-check-label">
|
||||
<input type="checkbox" class="form-check-input" checked="">
|
||||
Urgent
|
||||
<i class="input-helper"></i></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<label for="sample_condition" class="col-sm-5 col-form-label">Sample condition</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="sample_condition">
|
||||
<option>Good</option>
|
||||
<option>Acceptable</option>
|
||||
<option>Rejected</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group row">
|
||||
<label for="diagnosis" class="col-sm-5 col-form-label">Rejection </label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="rejected_reason">
|
||||
<option>Reason 1</option>
|
||||
<option>Reason 2</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<button type="button" class="btn btn-info btn-icon-text btn-lg btn-block">
|
||||
<i class="typcn typcn-document btn-icon-prepend"></i>
|
||||
Assign Test
|
||||
</button>
|
||||
<button type="button" class="btn btn-danger btn-icon-text btn-lg btn-block">
|
||||
<i class="typcn typcn-document btn-icon-prepend"></i>
|
||||
Add Result
|
||||
</button>
|
||||
<button type="button" class="btn btn-info btn-icon-text btn-lg btn-block">
|
||||
<i class="typcn typcn-warning btn-icon-prepend"></i>
|
||||
Delete Sample
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
<!-- plugin js for this page -->
|
||||
<script src="{{url(env("APP_URL").'storage/assets/vendors/typeahead.js/typeahead.bundle.min.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/vendors/select2/select2.min.js')}}"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.15.1/moment.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.7.14/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('#datetimepicker').datetimepicker();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<h1>New payment</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,603 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<style>
|
||||
.form-group label {
|
||||
line-height: 0.2rem !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card min-vh-70">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('vaccination.new_title')}}</h4>
|
||||
<hr>
|
||||
<form method="post" class="p-2" action="{{route('vaccination.save')}}" id="form-test-sample">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="form-vertical sample-creation-form">
|
||||
<div class="row mb-0">
|
||||
<div class="col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('invoice.form_patient')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group" id="testItem">
|
||||
<div class="form-group" style="flex: 1 !important;">
|
||||
<select class="form-control select2" name="patient_id" id="patient-id" style=" width: 100% !important;">
|
||||
<option value="1">Walk In Patient</option>
|
||||
@foreach($patients as $patient)
|
||||
<option value="{{$patient->id}}">{{($patient->patient_uuid . ' - ' . $patient->name_en) . ((!empty($patient->phone_number) ? ' - '.$patient->phone_number: ''))}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-inverse-secondary px-3" id="searchPatientAddForm" type="button"><i class="fa fa-search"></i> {{__('general.btn_search')}} </button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_patient']))
|
||||
<button class="btn btn-info waves-effect rounded-0 px-3 ml-2" type="button" data-action="new" data-toggle="modal" data-target="#modal-patient" data-backdrop="static"><i class="typcn typcn-plus"></i>
|
||||
{{__('patient.form_add_title')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-lg-3">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('vaccination.date')}} <span class="text-danger">*</span></label>
|
||||
<input type="date" value="{{date('Y-m-d')}}" class="form-control rounded-0" name="vaccination_date" id="invoice_date" placeholder="Invoice Date">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-lg-3">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('vaccination.next_visit')}} <span class="text-danger">*</span></label>
|
||||
<input type="date" value="{{date('Y-m-d')}}" class="form-control rounded-0" name="next_visit_date" id="invoice_date" placeholder="Invoice Date">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row border p-0">
|
||||
<div class="col-sm-8 p-0">
|
||||
<table class="table table-bordered" >
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<th class="py-2">{{__('vaccination.name')}}</th>
|
||||
<th width="15%" class="py-2 text-center">{{__('vaccination.unit_price')}} ($)</th>
|
||||
<th width="15%" class="py-2 text-center">{{__('vaccination.qty')}}</th>
|
||||
<th width="15%" class="py-2 text-center">{{__('vaccination.subtotal')}}</th>
|
||||
<th width="50px" class="py-2 text-right">
|
||||
<button class="btn btn-info btn-md waves-effect rounded-0" id="btn-add-new-med-item" type="button"><i class="typcn typcn-plus"></i></button>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="vaccination-item">
|
||||
<tr>
|
||||
<td class="py-2">
|
||||
<select name="medicine_item_id[]" class="form-control vaccine-item form-control-xxs select2" style="width: 100%;">
|
||||
<option></option>
|
||||
@foreach($medicineItems as $medicineItem)
|
||||
<option data-price="{{$medicineItem->sale_price}}" value="{{$medicineItem->id}}"> {{$medicineItem->medicine->name}} </option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
<td class="py-2">
|
||||
<input type="number" name="unit_price[]" value="0" min="0" step="0" class="form-control unit-price">
|
||||
</td>
|
||||
<td class="py-2">
|
||||
<input type="number" name="quantity[]" value="1" min="1" step="1" class="form-control quantity">
|
||||
</td>
|
||||
<td class="py-2">
|
||||
<input type="hidden" name="sub_total[]" class="form-control sub-total">
|
||||
<input type="number" readonly class="form-control bg-white sub-total-to-display">
|
||||
</td>
|
||||
<td class="py-2">
|
||||
<button class="btn btn-danger btn-remove-vaccine-item btn-md waves-effect rounded-0" type="button"><i class="typcn typcn-trash"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-sm-4 p-4 border-left">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.exchange_rate')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" required step="any" class="form-control bg-white form-control-xxs rounded-0" value="{{$labSettings->exchange_rate}}" name="exchange_rate" id="exchange_rate">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.table_total_cost')}} <span class="text-danger">({{$labSettings->currency==1?'៛':'$'}})</span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" readonly required step="any" class="form-control bg-white form-control-xxs rounded-0" name="total" id="total-amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.table_discount')}} <span class="text-danger">(%)</span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" required value="0.00" maxlength="2" step="any" class="form-control form-control-xxs rounded-0" name="discount" id="discount-amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.table_net_cost')}} <span class="text-danger"></span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" required step="any" readonly class="form-control bg-white form-control-xxs rounded-0" name="gross_total" id="net-amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 bg-light px-0 pt-2">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.pay_type')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-sm-7">
|
||||
<select class="form-control form-control-xxs select2_ rounded-0 py-0" name="pay_type" id="pay_type" style=" width: 100% !important;">
|
||||
<option value="1">{{__('invoice.cash_paid')}}</option>
|
||||
<option value="2">{{__('invoice.bank_paid')}}</option>
|
||||
<option value="3">{{__('invoice.cash_paid')}} + {{__('invoice.bank_paid')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.table_paid')}} <small class="text-info">({{__('invoice.cash_paid')}})</small></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" required step="any" value="0.00" class="form-control form-control-xxs rounded-0" name="deposit" id="paid-amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.table_paid')}} <small class="text-info">({{__('invoice.bank_paid')}})</small></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" required step="any" value="0.00" class="form-control form-control-xxs rounded-0" name="bank_deposit" id="bank-amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.form_paid_date')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="datetime-local" value="{{date('Y-m-d\TH:i:s')}}" class="form-control form-control-xxs rounded-0" name="first_paid_date" id="paid-date" placeholder="DD-MM-YYYY">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.bank_name')}}</label>
|
||||
<div class="col-sm-7">
|
||||
<input type="text" value="" class="form-control form-control-xxs rounded-0" name="bank_name" id="bank_name">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.transaction_no')}}</label>
|
||||
<div class="col-sm-7">
|
||||
<input type="text" value="" class="form-control form-control-xxs rounded-0" name="transaction_ref" id="transaction_ref">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group row">
|
||||
<label for="paid-amount" class="col-sm-5 col-form-label">{{__('invoice.form_owe_amount')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-sm-7">
|
||||
<input type="number" readonly step="any" class="form-control bg-white form-control-xxs rounded-0" name="balance" id="owe-amount" placeholder="0.00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 pt-4 text-right">
|
||||
<button class="btn btn-inverse-success mr-2" name="save_print_invoice" type="submit" value="save_preview_invoice"><i class="mdi mdi-printer"></i> {{__('invoice.form_btn_save_preview')}}</button>
|
||||
<button class="btn btn-info" type="submit"><i class="mdi mdi-content-save"></i> {{__('vaccination.btn_save')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Patient -->
|
||||
<div class="modal fade modal-primary" id="modal-patient">
|
||||
<div class="modal-dialog show modal-semi-xxl">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title">{{__('patient.form_add_title')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form method="post" action="#" id="form" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-6 px-3">
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="patient-code">{{__('patient.form_code')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" {{$labSettings->patient_code == 1 ? ' disabled readonly ' : ''}} name="patient_code" id="patient-code" placeholder="{{__('patient.form_code')}}">
|
||||
<div class="input-group-append">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_name')}} <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" name="patient_name" id="patient-name" placeholder="{{__('patient.form_name')}}">
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-kh">{{__('patient.form_dob')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-append mr-3" style="flex: 5 !important;">
|
||||
<input class="form-control datepicker" name="dob" type="text" id="dob" placeholder="{{__('general.date_placeholder')}}" required="" autocomplete="off">
|
||||
</div>
|
||||
<input class="form-control" name="year" onkeypress="return isNumber(event);" maxlength="2" type="text" id="year" autocomplete="off">
|
||||
<div class="input-group-append" style="">
|
||||
<button class="btn btn-sm btn-light" disabled type="button">{{__('patient_type.form_input_year')}}</button>
|
||||
</div>
|
||||
|
||||
<input class="form-control" name="month" onkeypress="return isNumber(event);" maxlength="2" type="text" id="month" autocomplete="off">
|
||||
<div class="input-group-append" style="">
|
||||
<button class="btn btn-sm btn-light" disabled type="button">{{__('patient_type.form_input_month')}}</button>
|
||||
</div>
|
||||
|
||||
<input class="form-control" name="month" onkeypress="return isNumber(event);" maxlength="2" type="text" id="day" autocomplete="off">
|
||||
<div class="input-group-append" style="">
|
||||
<button class="btn btn-sm btn-light" disabled type="button">{{__('patient_type.form_input_day')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_gender')}} <span class="text-danger">*</span></label>
|
||||
<div class="form-group pl-3">
|
||||
<div class="row">
|
||||
<div class="form-check col-sm-12 col-md-12 col-lg-3" style="margin-bottom: 6px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" checked name="gender" data-id="1" value="1">
|
||||
{{__('patient.form_sex_male')}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-12 col-md-12 col-lg-3" style="margin-bottom: 6px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="gender" data-id="2" value="2"> {{__('patient.form_sex_female')}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-12 col-md-12 col-lg-3" style="margin-bottom: 6px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="gender" data-id="3" value="3"> {{__('patient.form_sex_other')}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_khid')}}</label>
|
||||
<input type="text" class="form-control" name="khid_number" id="khid-number" placeholder="{{__('patient.form_khid')}}">
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_phone')}}</label>
|
||||
<input type="text" class="form-control" name="phone_number" id="phone-number" placeholder="{{__('patient.form_phone')}}">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-6 px-3">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_house')}}</label>
|
||||
<input type="text" class="form-control" name="house_number" id="house-number" placeholder="{{__('patient.form_house')}}">
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_street')}}</label>
|
||||
<input type="text" class="form-control" name="street_number" id="street-number" placeholder="{{__('patient.form_street')}}">
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_province')}} </label>
|
||||
<select class="form-control select2" name="province_id" id="province-id" style="width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($provinces as $province)
|
||||
<option value="{{$province->id}}">{{$province->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_district')}}</label>
|
||||
<select class="form-control select2" name="district_id" id="district-id" style="width: 100% !important;">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_commune')}}</label>
|
||||
<select class="form-control select2" name="commune_id" id="commune-id" style="width: 100% !important;">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_village')}}</label>
|
||||
<select class="form-control select2" name="village_id" id="village-id" style="width: 100% !important;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info" id="savePatient"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-light" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
<script>
|
||||
|
||||
|
||||
var patient_base_url = "{{url('patient')}}";
|
||||
var get_refs_base_url = "{{url('refs')}}";
|
||||
|
||||
$(function(){
|
||||
var message = '{!! session('message') !!}';
|
||||
if(message=='success')
|
||||
{
|
||||
alertify.success("@lang('vaccination.create_success')");
|
||||
}
|
||||
if(message=='error')
|
||||
{
|
||||
alertify.error("@lang('vaccination.create_fail')");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/moment/moment.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/moment/moment-precise-range.js')}}"></script>
|
||||
<script>
|
||||
|
||||
$(document).on('change','.vaccine-item', function () {
|
||||
let unit_price = $('option:selected', this).attr('data-price');
|
||||
let quantity = $(this).closest('tr').find('.quantity').val();
|
||||
let total = unit_price * quantity
|
||||
$(this).closest('tr').find('.unit-price').val(unit_price);
|
||||
$(this).closest('tr').find('.sub-total').val(total);
|
||||
calculateVaccineData();
|
||||
})
|
||||
|
||||
$(document).on('change','#vaccination-item .unit-price, #vaccination-item .quantity', function () {
|
||||
calculateVaccineData();
|
||||
})
|
||||
|
||||
$(document).on('click','.btn-remove-vaccine-item', function () {
|
||||
if($('#vaccination-item tr').length>1){
|
||||
$(this).closest('tr').remove()
|
||||
}
|
||||
calculateVaccineData();
|
||||
})
|
||||
|
||||
$('#btn-add-new-med-item').click(function () {
|
||||
var $tr = $('#vaccination-item').find('tr:last');
|
||||
var $clone = $tr.clone();
|
||||
$clone.find('td:eq(0) span').remove()
|
||||
$clone.find('.unit-price').val(0);
|
||||
$clone.find('.quantity').val(1);
|
||||
$clone.find('.vaccine-item').val('');
|
||||
$clone.find('.sub-total').val(0);
|
||||
$clone.find('.sub-total-to-display').val(0);
|
||||
$('#vaccination-item').append($clone)
|
||||
|
||||
$(".select2").select2({
|
||||
placeholder: '',
|
||||
allowClear: true,
|
||||
});
|
||||
})
|
||||
|
||||
function calculateVaccineData() {
|
||||
let total_amt = 0;
|
||||
$('#vaccination-item').find('tr').each(function () {
|
||||
let unit_price = $(this).find('.unit-price').val()
|
||||
let quantity = $(this).find('.quantity').val()
|
||||
let total = unit_price * quantity
|
||||
$(this).closest('tr').find('.sub-total').val(total)
|
||||
$(this).closest('tr').find('.sub-total-to-display').val(total.toFixed(2))
|
||||
total_amt +=total
|
||||
})
|
||||
$('#total-amount').val(total_amt)
|
||||
let discount_amt =$('#discount-amount').val()
|
||||
$('#net-amount').val((total_amt * (1-(discount_amt/100))).toFixed(2))
|
||||
$('#owe-amount').val((total_amt * (1-(discount_amt/100))).toFixed(2))
|
||||
}
|
||||
|
||||
$('#discount-amount').change(function () {
|
||||
if($('#discount-amount').val()>100) $('#discount-amount').val(100)
|
||||
calculateVaccineData()
|
||||
})
|
||||
|
||||
$('#paid-amount, #bank-amount').keyup(function () {
|
||||
let own_amount = parseFloat($('#net-amount').val()) - (parseFloat( $('#paid-amount').val()) + parseFloat( $('#bank-amount').val()) )
|
||||
$('#owe-amount').val(toFixedNumber(own_amount,2))
|
||||
});
|
||||
|
||||
function searchPatientToForm(patientElementId){
|
||||
Swal.fire({
|
||||
html:"<p style='text-align: left;'>Search the patient with their name, phone, Khmer ID, or patient ID</p>",
|
||||
input: "text",
|
||||
showCancelButton: !0,
|
||||
confirmButtonText: "<i class='fa fa-search mr-2'></i>Search",
|
||||
cancelButtonText: "Close",
|
||||
position: 'top',
|
||||
showLoaderOnConfirm: !1,
|
||||
confirmButtonColor: "#4fb51a",
|
||||
preConfirm: function (n) {
|
||||
return new Promise(function (t) {
|
||||
$.ajax({
|
||||
url: patient_base_url + "/async",
|
||||
method:'get',
|
||||
dataType:'json',
|
||||
data:{kword: n},
|
||||
success:function(response)
|
||||
{
|
||||
if(response.data.length<1 || !response.success){
|
||||
Swal.showValidationMessage('No patient found!')
|
||||
Swal.enableButtons()
|
||||
}
|
||||
else {
|
||||
t(response.data)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
allowOutsideClick:!1,
|
||||
}).then(function (t) {
|
||||
if(!t.dismiss){
|
||||
$('#'+patientElementId).html('');
|
||||
t.value.map(item =>{
|
||||
var patientOption = document.createElement('OPTION');
|
||||
patientOption.setAttribute('value',item.id);
|
||||
patientOption.text = item.patient_uuid + ' - ' + item.name_en;
|
||||
$('#'+patientElementId).append(patientOption);
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$("#searchPatientAddForm").click(function () {
|
||||
searchPatientToForm('patient-id')
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function calculateAge(dob, current_date) {
|
||||
dob = moment(dob);
|
||||
current_date = current_date ? moment(current_date) : moment();
|
||||
return moment.preciseDiff(dob, current_date, true)
|
||||
}
|
||||
|
||||
var $patient_info_form = $("#modal-patient");
|
||||
$patient_info_form.find("#dob").on("change", function() {
|
||||
var dob_split = $(this).val().split("-")
|
||||
var dob = new Date(dob_split[1]+'-'+dob_split[0]+'-'+dob_split[2]);
|
||||
|
||||
if (dob) {
|
||||
current_date = moment();
|
||||
var age = calculateAge(dob);
|
||||
$patient_info_form.find("#year").val(age.years);
|
||||
$patient_info_form.find("#month").val(age.months);
|
||||
var days = age.days === 0 && age.months === 0 && age.years === 0 ? 1 : age.days;
|
||||
$patient_info_form.find("#day").val(days);
|
||||
}
|
||||
});
|
||||
|
||||
$patient_info_form.on("keyup change", "#year, #month, #day", function (evt) {
|
||||
var years = $patient_info_form.find("#year").val() || 0;
|
||||
var months = $patient_info_form.find("#month").val() || 0;
|
||||
var days = $patient_info_form.find("#day").val() || 0;
|
||||
var dob = moment();
|
||||
dob.subtract(days, 'days');
|
||||
dob.subtract(months, 'months');
|
||||
dob.subtract(years, 'years');
|
||||
var dob_split = dob.toDate().toLocaleDateString().split("/")
|
||||
var dob = dob_split[1].padStart(2,"0")+'-'+dob_split[0].padStart(2,"0")+'-'+dob_split[2];
|
||||
$patient_info_form.find("#dob").val(dob);
|
||||
});
|
||||
|
||||
|
||||
$('#province-id').change(function () {
|
||||
getDistrictsByProvinceId('district-id', $(this).val())
|
||||
})
|
||||
|
||||
$('#district-id').change(function () {
|
||||
getCommunesByDistrictId('commune-id', $(this).val())
|
||||
})
|
||||
|
||||
$('#commune-id').change(function () {
|
||||
getVillagesByCommuneId('village-id', $(this).val())
|
||||
})
|
||||
|
||||
|
||||
$("#savePatient").on('click',function(e){
|
||||
e.preventDefault();
|
||||
$.ajax({
|
||||
url: patient_base_url.toString()+'.save',
|
||||
type:"POST",
|
||||
dataType:"JSON",
|
||||
data :{
|
||||
"_token": csrf_token,
|
||||
name_en: $('#patient-name').val(),
|
||||
patient_uuid: $('#patient-code').val(),
|
||||
dob: $('#dob').val(),
|
||||
gender: $("input[name='gender']:checked").attr('data-id'),
|
||||
marital_status: $("input[name='marital_status']:checked").attr('data-id'),
|
||||
phone_number: $('#phone-number').val(),
|
||||
province_id: $('#province-id').val(),
|
||||
district_id : $('#district-id').val(),
|
||||
commune_id: $('#commune-id').val(),
|
||||
village_id: $('#village-id').val(),
|
||||
khid_number: $('#khid-number').val(),
|
||||
house_number: $('#house-number').val(),
|
||||
street_number: $('#street-number').val()
|
||||
},
|
||||
success:function(res){
|
||||
if(res.success){
|
||||
var patient = res.data
|
||||
var patientOption = document.createElement('OPTION');
|
||||
patientOption.setAttribute('value',patient.id);
|
||||
patientOption.setAttribute('selected','selected');
|
||||
patientOption.text = patient.patient_uuid + ' - ' + patient.name_en;
|
||||
$('#patient-id').append(patientOption);
|
||||
|
||||
$('#modal-patient .close').click();
|
||||
$('#patient-id').trigger('change')
|
||||
|
||||
}else{
|
||||
alertify.error("Can't create patient.")
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<!-- Modal Organization -->
|
||||
<div class="modal fade modal-primary" id="modal-organism">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
<div class="modal-body">
|
||||
<form method="post" action="{{url('laboratory-profile/update')}}" id="form" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="lab_id" id="lab-id" value="0" />
|
||||
<input type="hidden" class="form-control" name="organization_id" id="lab-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
@@ -123,7 +123,7 @@
|
||||
<input type="text" class="form-control form-control-sm rounded-right-0" name="name_en" id="lab-name-en" value="{{$info->name_en}}" placeholder="{{__('laboratory.table_name_en')}}">
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
<input type="text" class="form-control form-control-sm rounded-left-0" style="width: 100px !important;" name="short_name" id="lab-code" value="{{$info->short_name}}" maxlength="3" placeholder="{{__('lab_profile.short_name')}}">
|
||||
<input type="text" class="form-control form-control-sm rounded-left-0" style="width: 100px !important;" name="short_name" id="lab-code" value="{{$info->short_name}}" maxlength="10" placeholder="{{__('lab_profile.short_name')}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -132,8 +132,8 @@
|
||||
<div class="col-sm-6">
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-kh">{{__('patient.table_phon')}} </label>
|
||||
<input type="text" class="form-control form-control-sm" name="phone_number" id="phone-number" value="{{$info->phone_number}}" placeholder="{{__('patient.table_phon')}}"/>
|
||||
<label for="lab-name-kh">{{__('laboratory.phone')}} </label>
|
||||
<input type="text" class="form-control form-control-sm" name="phone_number" id="phone-number" value="{{$info->phone_number}}" placeholder="{{__('laboratory.phone')}}"/>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
@@ -163,7 +163,7 @@
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info rounded-25" onclick="$('#submit-data').click()" id="btnSave"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-inverse-success rounded-25" onclick="$('#submit-data').click()" id="btnSave"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-secondary rounded-25 mx-3" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -185,22 +185,9 @@
|
||||
|
||||
let base_url = "{{url('laboratory-profile')}}";
|
||||
|
||||
let sample_number = "{{$info->sample_number}}";
|
||||
let patient_code = "{{$info->patient_code}}";
|
||||
let technician_label = "{{$info->technician_label}}";
|
||||
let discount_type = "{{$info->discount_type}}";
|
||||
let phone_number = "{{$info->phone_number}}";
|
||||
let email = "{{$info->email}}";
|
||||
|
||||
let currency = "{{$info->currency}}";
|
||||
|
||||
let exchange_rate = "{{$info->exchange_rate}}";
|
||||
let abnormal_text_color = "{{$info->abnormal_text_color}}";
|
||||
let show_result_footer = "{{$info->show_result_footer}}";
|
||||
let abnormal_result_font_weight = "{{$info->abnormal_result_font_weight}}";
|
||||
let result_header_id = "{{$info->result_header_id}}";
|
||||
let invoice_template_id = "{{$info->invoice_template_id}}";
|
||||
|
||||
function generateSlug(text) {
|
||||
return text
|
||||
.trim()
|
||||
@@ -6,7 +6,7 @@
|
||||
@foreach($available_locales as $locale_name => $available_locale)
|
||||
<a class="dropdown-item preview-item" href="{{ url('lang/'.$available_locale) }}">
|
||||
<div class="preview-item-content flex-grow">
|
||||
<p class="font-weight-light small-text text-black mb-0 pr-5"><i class="fi fi-{{$available_locale=='en' ? 'gb':$available_locale}} flag-icon-squared mx-0 mr-2 rounded-25 "></i>{{ __('login.'.$available_locale) }}</p>
|
||||
<p class="font-weight-light small-text text-dark mb-0 pr-5"><i class="fi fi-{{$available_locale=='en' ? 'gb':$available_locale}} flag-icon-squared mx-0 mr-2 rounded-25 "></i>{{ __('login.'.$available_locale) }}</p>
|
||||
</div>
|
||||
</a>
|
||||
@endforeach
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2 text-center" width="50px">{{__('patient.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="220px">{{__('patient.table_action')}}</th>
|
||||
<th class="py-2 text-center" width="250px">{{__('patient.table_code')}}</th>
|
||||
<th class="py-2">{{__('patient.table_name')}}</th>
|
||||
<th class="py-2 text-right" width="120px">{{__('patient.form_age')}}</th>
|
||||
<th class="py-2 text-center" width="120px">{{__('patient.table_sex')}}</th>
|
||||
<th class="py-2" width="200px">{{__('patient.table_phon')}}</th>
|
||||
<th class="py-2 text-center" width="100px">Sample</th>
|
||||
|
||||
<!--<th class="py-2 text-center" width="100px">{{__('patient.table_status')}}</th>-->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="dynamic-patient-search-area__" >
|
||||
@foreach($patients as $k=>$patient)
|
||||
<tr>
|
||||
<td class="py-1 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
<input type="text" class="d-none" id="ivt-{{$patient->id}}" value="{{\App\Helpers\Helpers::generatePatientBotLink('patient',$patient->lab_id, $patient->id)}}"><button type="button" onclick="copyTgBotInviteLink('ivt-{{$patient->id}}')" class="btn btn-sm btn-inverse-warning mr-2 py-1"><i title="Copy {{\App\Helpers\Helpers::generatePatientBotLink('patient',$patient->lab_id, $patient->id)}} to clipboard" class="fa fa-telegram"></i></button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_patient']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-info mr-2 py-1" title="{{__('general.btn_edit')}}" data-action="edit" data-uid="{{$patient->id}}" data-toggle="modal" data-target="#modal-patient" data-backdrop="static">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if($patient->record_status_id==0)
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_patient']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary py-1" title="Restore" onclick="restore_data({{$patient->id}})"><i class="typcn typcn-plus"></i></button>
|
||||
@endif
|
||||
@else
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_patient']))
|
||||
<a href="{{url('sample/patient/'.$patient->id.'/new')}}" class="btn btn-sm btn-inverse-success mr-2 py-1" title="{{__('sample.form_btn_new_sample')}}">
|
||||
<i class="mdi mdi-test-tube"></i> <i class="mdi mdi-plus" style="margin-left: -10px;"></i>
|
||||
</a>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_patient']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger py-1" title="{{__('general.btn_delete')}}" onclick="delete_data({{$patient->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-1 text-center">{{$patient->patient_uuid}}</td>
|
||||
<td class="py-1">{{$patient->name_en}}</td>
|
||||
<td class="py-2 text-right" width="100px">{{\App\Helpers\Helpers::getAge($patient->dob, date('Y-m-d'))}}</td>
|
||||
<td class="py-1 text-center">{{$patient->gender == 1 ? 'M' : 'F'}}</td>
|
||||
<td class="py-1 text-left">{{$patient->phone_number}}</td>
|
||||
<td class="py-1 text-right">
|
||||
<label class="badge badge-outline-info rounded-25">
|
||||
{{$patient->samples->count()}} Sample{{$patient->samples->count()>=2?'s':''}}
|
||||
</label>
|
||||
</td>
|
||||
{{-- <td class="py-1 text-center"><input type="text" class="d-none" id="ivt-{{$patient->id}}" value="{{\App\Helpers\Helpers::generatePatientBotLink('patient',$patient->lab_id, $patient->id)}}"><button type="button" onclick="copyTgBotInviteLink('ivt-{{$patient->id}}')" class="btn btn-sm btn-light"><i title="Copy {{\App\Helpers\Helpers::generatePatientBotLink('patient',$patient->lab_id, $patient->id)}} to clipboard" class="mdi mdi-content-copy"></i></button> </td>--}}
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="float-right mt-3">
|
||||
{!! $patients->appends($_GET)->links('pagination.custom') !!}
|
||||
</div>
|
||||
@@ -1,229 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('patient_type.table_title')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form method="get" action="{{url('patient-type/search')}}">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control rounded-top-left-25 rounded-bottom-left-25 rounded-right-0" value="{{isset($_GET['kword']) ? $_GET['kword'] : ''}}" name="kword" id="kword" placeholder="{{__('patient_type.search_placeholder')}}">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-inverse-secondary px-3 rounded-top-right-25 rounded-bottom-right-25" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_patient_type']))
|
||||
<button class="btn btn-inverse-success waves-effect px-3 ml-2 rounded-25" type="button" data-action="new" data-toggle="modal" data-target="#modal-patient-type" data-backdrop="static"><i class="typcn typcn-plus"></i> {{__('general.btn_add_new')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover" id="patient-type-dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2" width="50px">{{__('patient_type.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('patient_type.table_action')}}</th>
|
||||
<th class="py-2">{{__('patient_type.table_name')}}</th>
|
||||
<th class="py-2" width="200px">{{__('patient_type.table_gender')}}</th>
|
||||
<th class="py-2">{{__('patient_type.table_age_from')}}</th>
|
||||
<th class="py-2">{{__('patient_type.table_age_to')}}</th>
|
||||
{{-- <th class="py-2 text-center" width="100px">{{__('patient_type.table_status')}}</th>--}}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($patientTypes as $k=>$patientType)
|
||||
<tr>
|
||||
<td class="py-1 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_patient_type']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-info mr-2 py-1" title="{{__('general.btn_edit')}}" data-action="edit" data-uid="{{$patientType->id}}" data-toggle="modal" data-target="#modal-patient-type" data-backdrop="static">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if($patientType->record_status_id==0)
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary " title="Restore" onclick="restore_data({{$patientType->id}})"><i class="typcn typcn-plus"></i></button>
|
||||
@else
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_patient_type']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger py-1" title="{{__('general.btn_delete')}}" onclick="delete_data({{$patientType->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-1">{{$patientType->name_en}}</td>
|
||||
<td class="py-1">{{($patientType->gender == 1 ? 'Male' : ($patientType->gender == 2 ? 'Female' : 'Male & Female'))}}</td>
|
||||
<td class="py-1">{{$patientType->range_start_sign . ' ' . $patientType->range_start . ($patientType->range_start_unit == 1 ? ' Day(s)' : ($patientType->range_start_unit == 30 ? ' Month(s)' : ' Year(s)'))}}</td>
|
||||
<td class="py-1">{{$patientType->range_end_sign . ' ' . $patientType->range_end . ($patientType->range_end_unit == 1 ? ' Day(s)' : ($patientType->range_end_unit == 30 ? ' Month(s)' : ' Year(s)'))}}</td>
|
||||
{{-- <td class="py-1 text-center">--}}
|
||||
{{-- <i class="mdi {{$patientType->record_status_id == 1 ? 'mdi-check-circle text-primary ' : 'mdi-checkbox-blank-circle-outline'}}"></i>--}}
|
||||
{{-- </td>--}}
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $patientTypes->links('pagination.custom') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<div class="modal fade modal-primary" id="modal-patient-type">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title new">{{__('patient_type.form_add_tittle')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body" style="padding: 1.7rem !important;">
|
||||
<form method="post" action="#" id="form" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
<div class="form-group mb-1">
|
||||
<label for="name-en">{{__('patient_type.form_name')}} <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control " name="name_en" id="name-en" />
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient_type.table_gender')}} <span class="text-danger">*</span></label>
|
||||
<div class="form-group pl-2">
|
||||
<div class="row">
|
||||
<div class="form-check col-sm-12 col-md-12 col-lg-3">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="gender" data-id="1" value="1"> {{__('patient.form_sex_male')}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-12 col-md-12 col-lg-3">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="gender" data-id="2" value="2"> {{__('patient.form_sex_female')}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-12 col-md-12 col-lg-3">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="gender" data-id="3" value="3"> {{__('patient.form_sex_male')}} & {{__('patient.form_sex_female')}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-kh">{{__('patient_type.form_min_age')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-append">
|
||||
<select class="form-control rounded-right-0" name="age_from_sign" id="age-from-sign" style="width: 90px; border-right: none !important;">
|
||||
<option value=">">></option>
|
||||
<option value=">=">>=</option>
|
||||
</select>
|
||||
</div>
|
||||
<input type="number" class="form-control rounded-left-0 rounded-right-0" value="0" min="0" name="age_from" id="age-from" />
|
||||
<div class="input-group-append">
|
||||
<select class="form-control rounded-left-0" name="age_from_unit" id="age-from-unit">
|
||||
<option value="1">{{__('patient_type.form_input_day')}}</option>
|
||||
<option value="30">{{__('patient_type.form_input_month')}}</option>
|
||||
<option value="365">{{__('patient_type.form_input_year')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-kh">{{__('patient_type.form_max_age')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-append">
|
||||
<select class="form-control rounded-right-0 border-right-0" name="age_to_sign" id="age-to-sign" style="width: 90px; border-right: none !important;">
|
||||
<option value="<"><</option>
|
||||
<option value="<="><=</option>
|
||||
</select>
|
||||
</div>
|
||||
<input type="number" class="form-control rounded-left-0 rounded-right-0" value="0" min="0" name="age_to" id="age-to" />
|
||||
<div class="input-group-append">
|
||||
<select class="form-control rounded-left-0" name="age_to_unit" id="age-to-unit">
|
||||
<option value="1">{{__('patient_type.form_input_day')}}</option>
|
||||
<option value="30">{{__('patient_type.form_input_month')}}</option>
|
||||
<option value="365">{{__('patient_type.form_input_year')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info rounded-25" id="btnSave"><i class="fa fa-floppy-o"></i> <span class="save">{{__('general.btn_save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-secondary rounded-25 mx-3" data-dismiss='modal'>{{__('general.btn_cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script>
|
||||
|
||||
var save_url = "{{url('patient-type.save')}}";
|
||||
var update_url = "{{url('patient-type.update')}}";
|
||||
var delete_url = "{{url('patient-type.delete')}}";
|
||||
var restore_url = "{{url('patient-type.restore')}}";
|
||||
var get_url = "{{url('patient-type.get')}}";
|
||||
|
||||
let modal_add_title = "{{__('patient_type.form_add_tittle')}}";
|
||||
let modal_edit_title = "{{__('patient_type.form_edit_tittle')}}";
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/patient_type.js')}}"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,359 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<link href="{{url(env("APP_URL").'storage/assets/libs/bootstrap-datepicker/css/bootstrap-datepicker.min.css')}}" rel="stylesheet" type="text/css" />
|
||||
<style>
|
||||
.datepicker{
|
||||
padding: 0.875rem 1.375rem !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card" style="min-height: 80vh;">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title text-bold"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('patient.table_title')}}</h4>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form method="get" action="{{url('patient/search')}}">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control rounded-top-left-25 rounded-bottom-left-25 rounded-right-0" value="{{isset($_GET['kword']) ? $_GET['kword'] : ''}}" name="kword" id="kword" placeholder="{{__('patient.search_placeholdolder')}}">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-inverse-secondary px-3 rounded-top-right-25 rounded-bottom-right-25" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_patient']))
|
||||
<button class="btn btn-sm btn-inverse-success waves-effect px-3 ml-2 rounded-25" type="button" data-action="new" data-toggle="modal" data-target="#modal-patient" data-backdrop="static"><i class="typcn typcn-plus"></i> {{__('patient.create_new')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3" id="dynamic-patient-search-area" >
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2 text-center" width="50px">{{__('patient.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="220px">{{__('patient.table_action')}}</th>
|
||||
<th class="py-2 text-center" width="250px">{{__('patient.table_code')}}</th>
|
||||
<th class="py-2">{{__('patient.table_name')}}</th>
|
||||
<th class="py-2 text-right" width="120px">{{__('patient.form_age')}}</th>
|
||||
<th class="py-2 text-center" width="120px">{{__('patient.table_sex')}}</th>
|
||||
<th class="py-2" width="200px">{{__('patient.table_phon')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('patient.sample')}}</th>
|
||||
|
||||
<!--<th class="py-2 text-center" width="100px">{{__('patient.table_status')}}</th>-->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="dynamic-patient-search-area__" >
|
||||
@foreach($patients as $k=>$patient)
|
||||
<tr>
|
||||
<td class="py-1 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
<input type="text" class="d-none" id="ivt-{{$patient->id}}" value="{{\App\Helpers\Helpers::generatePatientBotLink('patient',$patient->lab_id, $patient->id)}}"><button type="button" onclick="copyTgBotInviteLink('ivt-{{$patient->id}}')" class="btn btn-sm d-none btn-inverse-warning mr-2 py-1"><i title="Copy {{\App\Helpers\Helpers::generatePatientBotLink('patient',$patient->lab_id, $patient->id)}} to clipboard" class="fa fa-telegram"></i></button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_patient']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-info mr-2 py-1" title="{{__('general.btn_edit')}}" data-action="edit" data-uid="{{$patient->id}}" data-toggle="modal" data-target="#modal-patient" data-backdrop="static">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if($patient->record_status_id==0)
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_patient']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary py-1" title="Restore" onclick="restore_data({{$patient->id}})"><i class="typcn typcn-plus"></i></button>
|
||||
@endif
|
||||
@else
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_sample']))
|
||||
<a href="{{url('sample/patient/'.$patient->id.'/new')}}" class="btn btn-sm btn-inverse-success mr-2 py-1" title="{{__('sample.form_btn_new_sample')}}">
|
||||
<i class="mdi mdi-test-tube"></i> <i class="mdi mdi-plus" style="margin-left: -10px;"></i>
|
||||
</a>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_patient']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger py-1" title="{{__('general.btn_delete')}}" onclick="delete_data({{$patient->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-1 text-center">{{$patient->patient_uuid}}</td>
|
||||
<td class="py-1">{{$patient->name_en}}</td>
|
||||
<td class="py-2 text-right" width="100px">{{\App\Helpers\Helpers::getAge($patient->dob, date('Y-m-d'))}}</td>
|
||||
<td class="py-1 text-center">{{$patient->gender == 1 ? 'M' : 'F'}}</td>
|
||||
<td class="py-1 text-left">{{$patient->phone_number}}</td>
|
||||
<td class="py-1 text-right">
|
||||
<label class="badge badge-outline-info rounded-25 px-3">
|
||||
{{$patient->samples->count()}}
|
||||
</label>
|
||||
</td>
|
||||
{{-- <td class="py-1 text-center"><input type="text" class="d-none" id="ivt-{{$patient->id}}" value="{{\App\Helpers\Helpers::generatePatientBotLink('patient',$patient->lab_id, $patient->id)}}"><button type="button" onclick="copyTgBotInviteLink('ivt-{{$patient->id}}')" class="btn btn-sm btn-light"><i title="Copy {{\App\Helpers\Helpers::generatePatientBotLink('patient',$patient->lab_id, $patient->id)}} to clipboard" class="mdi mdi-content-copy"></i></button> </td>--}}
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="float-right mt-3">
|
||||
{!! $patients->appends($_GET)->links('pagination.custom') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<div class="modal fade modal-primary" id="modal-patient">
|
||||
<div class="modal-dialog modal-xl">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('patient.form_add_title')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form method="post" action="#" id="form" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-6 px-3">
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="patient-code">{{__('patient.form_code')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" {{$labSettings->patient_code == 1 ? ' disabled readonly ' : ''}} name="patient_code" id="patient-code" placeholder="{{__('patient.form_code')}}">
|
||||
<div class="input-group-append">
|
||||
{{--<button class="btn btn-sm btn-info px-3 shadow-none rounded-0" title="Auto generate patient code" type="button" onclick="generate_uuid('P','#patient-code')"><i class="mdi mdi-autorenew"></i> </button>--}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_name')}} <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" name="patient_name" id="patient-name" placeholder="{{__('patient.form_name')}}">
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-kh">{{__('patient.form_dob')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-append mr-3" style="flex: 5 !important;">
|
||||
<input class="form-control datepicker" name="dob" type="text" id="dob" placeholder="{{__('general.date_placeholder')}}" required="" autocomplete="off">
|
||||
</div>
|
||||
<input class="form-control" name="year" onkeypress="return isNumber(event);" maxlength="2" type="text" id="year" autocomplete="off">
|
||||
<div class="input-group-append" style="">
|
||||
<button class="btn btn-sm btn-white" disabled type="button">{{__('patient_type.form_input_year')}}</button>
|
||||
</div>
|
||||
|
||||
<input class="form-control" name="month" onkeypress="return isNumber(event);" maxlength="2" type="text" id="month" autocomplete="off">
|
||||
<div class="input-group-append" style="">
|
||||
<button class="btn btn-sm btn-white" disabled type="button">{{__('patient_type.form_input_month')}}</button>
|
||||
</div>
|
||||
|
||||
<input class="form-control" name="month" onkeypress="return isNumber(event);" maxlength="2" type="text" id="day" autocomplete="off">
|
||||
<div class="input-group-append" style="">
|
||||
<button class="btn btn-sm btn-white" disabled type="button">{{__('patient_type.form_input_day')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_gender')}} <span class="text-danger">*</span></label>
|
||||
<div class="form-group pl-3">
|
||||
<div class="row">
|
||||
<div class="form-check col-sm-12 col-md-12 col-lg-3" style="margin-bottom: 6px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="gender" data-id="1" value="1">
|
||||
{{__('patient.form_sex_male')}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-12 col-md-12 col-lg-3" style="margin-bottom: 6px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="gender" data-id="2" value="2"> {{__('patient.form_sex_female')}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-12 col-md-12 col-lg-3" style="margin-bottom: 6px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="gender" data-id="3" value="3"> {{__('patient.form_sex_other')}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_phone')}}</label>
|
||||
<input type="text" class="form-control" name="phone_number" id="phone-number" placeholder="{{__('patient.form_phone')}}">
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_khid')}}</label>
|
||||
<input type="text" class="form-control" name="khid_number" id="khid-number" placeholder="{{__('patient.form_khid')}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-6 px-3">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_house')}}</label>
|
||||
<input type="text" class="form-control" name="house_number" id="house-number" placeholder="{{__('patient.form_house')}}">
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_street')}}</label>
|
||||
<input type="text" class="form-control" name="street_number" id="street-number" placeholder="{{__('patient.form_street')}}">
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_province')}}</label>
|
||||
<select class="form-control select2" name="province_id" id="province-id" style="width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($provinces as $province)
|
||||
<option value="{{$province->id}}">{{$province->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_district')}}</label>
|
||||
<select class="form-control select2" name="district_id" id="district-id" style="width: 100% !important;">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_commune')}}</label>
|
||||
<select class="form-control select2" name="commune_id" id="commune-id" style="width: 100% !important;">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('patient.form_village')}}</label>
|
||||
<select class="form-control select2" name="village_id" id="village-id" style="width: 100% !important;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_sample']))
|
||||
<button type="button" class="btn btn-inverse-info rounded-25 mx-3" action-id="1" id="btnSaveAndAddSample"><i class="mdi mdi-test-tube"></i> <i class="mdi mdi-plus" style="margin-left: -10px;"></i> <span class="save">{{__('general.btn_save_patient_add_new_sample')}}</span></button>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_patient', 'update_patient']))
|
||||
<button type="button" class="btn btn-info rounded-25" id="btnSave" action-id="0"><i class="fa fa-floppy-o"></i> <span class="save">{{__('general.btn_save')}}</span></button>
|
||||
@endif
|
||||
<button type="button" class="btn btn-secondary rounded-25 mx-3" data-dismiss='modal'>{{__('general.btn_cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.common_script')
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js')}}"></script>
|
||||
|
||||
<script>
|
||||
|
||||
let modal_add_title = "{{__('patient.form_add_title')}}";
|
||||
let modal_edit_title = "{{__('patient.form_edit_title')}}";
|
||||
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/patient.js')}}"></script>
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/moment/moment.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/moment/moment-precise-range.js')}}"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
$('#kword').keyup(function(){
|
||||
var kword = $(this).val()
|
||||
if(kword){
|
||||
$.ajax({
|
||||
url: '{{url('patient/live-filter')}}?kword='+kword,
|
||||
type:"GET",
|
||||
dataType:"Text",
|
||||
//delay: 10,
|
||||
success:function(res){
|
||||
$('#dynamic-patient-search-area').html(res)
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
function copyTgBotInviteLink(tgLinkSelectorId) {
|
||||
// Get the text field
|
||||
var copyText = document.getElementById(tgLinkSelectorId);
|
||||
copyText.select();
|
||||
copyText.setSelectionRange(0, 99999); // For mobile devices
|
||||
navigator.clipboard.writeText(copyText.value);
|
||||
alertify.warning("Telegram Bot invitation link already copied!")
|
||||
}
|
||||
|
||||
function calculateAge(dob, current_date) {
|
||||
dob = moment(dob);
|
||||
current_date = current_date ? moment(current_date) : moment(new Date('{{date('m/d/Y')}}'));
|
||||
return moment.preciseDiff(dob, current_date, true)
|
||||
}
|
||||
|
||||
var $patient_info_form = $("#modal-patient");
|
||||
$patient_info_form.find("#dob").on("change", function() {
|
||||
var dob_split = $(this).val().split("-")
|
||||
var dob = new Date(dob_split[1]+'/'+dob_split[0]+'/'+dob_split[2]);
|
||||
|
||||
if (dob) {
|
||||
//current_date = moment('{{date('Y-m-d H:i:s')}}');
|
||||
var age = calculateAge(dob);
|
||||
$patient_info_form.find("#year").val(age.years);
|
||||
$patient_info_form.find("#month").val(age.months);
|
||||
var days = age.days === 0 && age.months === 0 && age.years === 0 ? 1 : age.days;
|
||||
$patient_info_form.find("#day").val(days);
|
||||
}
|
||||
});
|
||||
|
||||
$patient_info_form.on("keyup change", "#year, #month, #day", function (evt) {
|
||||
var years = $patient_info_form.find("#year").val() || 0;
|
||||
var months = $patient_info_form.find("#month").val() || 0;
|
||||
var days = $patient_info_form.find("#day").val() || 0;
|
||||
var dob = moment(new Date('{{date('m/d/Y')}}'))
|
||||
dob.subtract(days, 'days');
|
||||
dob.subtract(months, 'months');
|
||||
dob.subtract(years, 'years');
|
||||
var dob_split = dob.toDate().toLocaleDateString().split("/")
|
||||
var dob = dob_split[1].padStart(2,"0")+'-'+dob_split[0].padStart(2,"0")+'-'+dob_split[2];
|
||||
$patient_info_form.find("#dob").val(dob);
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,355 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<style>
|
||||
.center {
|
||||
height:100%;
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
|
||||
}
|
||||
.form-input {
|
||||
width:50%;
|
||||
padding:0px 0px 0px 0;
|
||||
}
|
||||
.form-input img {
|
||||
width:100%;
|
||||
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.form-input input {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.form-input label {
|
||||
height:25px;
|
||||
background:#cdcdcd26;
|
||||
color:#c9c9c9;
|
||||
cursor:pointer;
|
||||
width: 75px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('physician.table_title')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form method="get" action="{{url('physician/search')}}">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control rounded-top-left-25 rounded-bottom-left-25 rounded-right-0" value="{{isset($_GET['kword']) ? $_GET['kword'] : ''}}" name="kword" id="kword" placeholder="{{__('physician.search_placeholder')}}">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-inverse-secondary px-3 rounded-top-right-25 rounded-bottom-right-25" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_physician']))
|
||||
<button class="btn btn-inverse-success waves-effect px-3 ml-2 rounded-25" type="button" data-action="new" data-toggle="modal" data-target="#modal-physician" data-backdrop="static"><i class="typcn typcn-plus"></i> {{__('general.btn_add_new')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2" width="50px">{{__('physician.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('physician.table_action')}}</th>
|
||||
<th class="py-2">{{__('physician.table_name')}}</th>
|
||||
<th class="py-2">{{__('laboratory.phone')}}</th>
|
||||
<th class="py-2">{{__('physician.form_logo')}}</th>
|
||||
<th class="py-2">{{__('physician.form_footer')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('physician.default_select')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($physicians as $k=>$physician)
|
||||
<tr>
|
||||
<td class="py-1 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_physician']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-info mr-2 py-1" title="{{__('general.btn_edit')}}" data-action="edit" data-uid="{{$physician->id}}" data-toggle="modal" data-target="#modal-physician" data-backdrop="static">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if($physician->record_status_id==0)
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary " title="Restore" onclick="restore_data({{$physician->id}})"><i class="typcn typcn-plus"></i></button>
|
||||
@else
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_physician']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger py-1" title="{{__('general.btn_delete')}}" onclick="delete_data({{$physician->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-1" width="300px">{{$physician->name_en}}</td>
|
||||
<td class="py-1" width="100px">{{$physician->phone}}</td>
|
||||
<td class="py-1">
|
||||
@if(!empty($physician->logo))
|
||||
<a href="{{url(env("APP_URL").'storage/images/physician/'.$physician->logo)}}" target="_blank">
|
||||
<img style="width: 15% !important; height: auto !important;" class="rounded-0" src="{{url(env("APP_URL").'storage/images/physician/'.$physician->logo)}}"/>
|
||||
</a>
|
||||
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_physician']))
|
||||
<button type="button" class="btn btn-xs btn-white m-0 " title="{{__('general.btn_delete_physician_logo')}}" onclick="delete_physician_logo({{$physician->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
<td class="py-1">
|
||||
@if(!empty($physician->footer))
|
||||
<a href="{{url(env("APP_URL").'storage/images/physician/'.$physician->footer)}}" target="_blank">
|
||||
<img style="width: 15% !important; height: auto !important;" class="rounded-0" src="{{url(env("APP_URL").'storage/images/physician/'.$physician->footer)}}"/>
|
||||
</a>
|
||||
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_physician']))
|
||||
<button type="button" class="btn btn-xs btn-white " title="{{__('general.btn_delete_physician_logo')}}" onclick="delete_physician_footer({{$physician->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
<td class="py-1 text-center">
|
||||
<?php echo $physician->is_default == 1 ? '<i class="mdi mdi-check-circle text-primary"></i>' : '' ?>
|
||||
</td>
|
||||
{{-- <td class="py-1 text-center">--}}
|
||||
{{-- <i class="mdi {{$physician->record_status_id == 1 ? 'mdi-check-circle text-primary' : 'mdi-checkbox-blank-circle-outline'}}"></i>--}}
|
||||
{{-- </td>--}}
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $physicians->appends($_GET)->links('pagination.custom') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<div class="modal fade modal-primary" id="modal-physician">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title new">{{__('physician.form_add_tittle')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form method="POST" action="{{url('physician.save')}}" id="form-physician" enctype="multipart/form-data" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('physician.form_name')}} <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" name="name_en" id="name-en" placeholder="{{__('physician.form_name')}}">
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('laboratory.phone')}}</label>
|
||||
<input type="text" class="form-control" name="phone" id="phone" placeholder="{{__('laboratory.phone')}}">
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('physician.form_logo')}} <span class="text-danger">*</span></label>
|
||||
<div class="center_">
|
||||
<div class="form-input">
|
||||
<label for="file-ip-1" class="rounded btn-light">
|
||||
<i class="mdi mdi-image-filter"></i> <span style="font-size: 12px">{{__('physician.form_logo_upload')}}</span>
|
||||
</label>
|
||||
<div class="preview">
|
||||
<img id="file-ip-1-preview" style="width: 25%; height: auto" src="">
|
||||
</div>
|
||||
<input type="file" name="image" id="file-ip-1" accept="image/*" onchange="showPreview(event);">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('physician.form_footer')}} <span class="text-danger">*</span></label>
|
||||
<div class="center_">
|
||||
<div class="form-input">
|
||||
<label for="file-ip-2" class="rounded btn-light">
|
||||
<i class="mdi mdi-image-filter"></i> <span style="font-size: 12px">{{__('physician.form_logo_upload')}}</span>
|
||||
</label>
|
||||
<div class="preview">
|
||||
<img id="file-ip-2-preview" style="width: 25%; height: auto" src="">
|
||||
</div>
|
||||
<input type="file" name="imageFooter" id="file-ip-2" accept="image/*" onchange="showPreviewFooter(event);">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<div class="form-check" style="width: 250px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="checkbox" name="is_default" value="1" class="form-check-input" id="default-select">
|
||||
{{__('physician.default_select')}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-info d-none" id="submit-physician"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" onclick="$('#submit-physician').click()" class="btn btn-info rounded-25" id="btnSave"><i class="fa fa-floppy-o"></i> <span class="save">{{__('general.btn_save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-secondary rounded-25 mx-3" data-dismiss='modal'>{{__('general.btn_cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script>
|
||||
|
||||
var save_url = "{{url('physician.save')}}";
|
||||
var update_url = "{{url('physician.update')}}";
|
||||
var delete_url = "{{url('physician.delete')}}";
|
||||
var restore_url = "{{url('physician.restore')}}";
|
||||
var get_url = "{{url('physician.get')}}";
|
||||
|
||||
let modal_add_title = "{{__('physician.form_add_tittle')}}";
|
||||
let modal_edit_title = "{{__('physician.form_edit_tittle')}}";
|
||||
|
||||
let physician_logo_path = "{{asset('storage/images/physician')}}";
|
||||
|
||||
function showPreview(event){
|
||||
if(event.target.files.length > 0){
|
||||
var src = URL.createObjectURL(event.target.files[0]);
|
||||
var preview = document.getElementById("file-ip-1-preview");
|
||||
preview.src = src;
|
||||
preview.style.display = "block";
|
||||
//console.log(src)
|
||||
//$('#image-upload-form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
function showPreviewFooter(event){
|
||||
if(event.target.files.length > 0){
|
||||
var src = URL.createObjectURL(event.target.files[0]);
|
||||
var preview = document.getElementById("file-ip-2-preview");
|
||||
preview.src = src;
|
||||
preview.style.display = "block";
|
||||
}
|
||||
}
|
||||
|
||||
function delete_physician_logo(uid){
|
||||
Swal.fire({
|
||||
text: "{{__('physician.confirm_delete_photo')}}",
|
||||
icon: 'question',
|
||||
showCancelButton: true,
|
||||
cancelButtonClass:'danger',
|
||||
confirmButtonText: '{{__('physician.ok_delete')}}',
|
||||
cancelButtonText: '{{__('physician.cancel_delete')}}',
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
$.ajax({
|
||||
url: "{{url('physician/photo/delete')}}",
|
||||
method:'POST',
|
||||
data:{
|
||||
"_token": csrf_token,
|
||||
uid : uid,
|
||||
},
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
if(res.success) setTimeout(function () {location.reload()}, messageDuration)
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function delete_physician_footer(uid){
|
||||
Swal.fire({
|
||||
text: "{{__('physician.confirm_delete_photo')}}",
|
||||
icon: 'question',
|
||||
showCancelButton: true,
|
||||
cancelButtonClass:'danger',
|
||||
confirmButtonText: '{{__('physician.ok_delete')}}',
|
||||
cancelButtonText: '{{__('physician.cancel_delete')}}',
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
$.ajax({
|
||||
url: "{{url('physician/footer/delete')}}",
|
||||
method:'POST',
|
||||
data:{
|
||||
"_token": csrf_token,
|
||||
uid : uid,
|
||||
},
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
if(res.success) setTimeout(function () {location.reload()}, messageDuration)
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function delete_data(uid){
|
||||
Swal.fire({
|
||||
text: "{{__('physician.confirm_delete')}}",
|
||||
icon: 'question',
|
||||
showCancelButton: true,
|
||||
cancelButtonClass:'danger',
|
||||
confirmButtonText: '{{__('physician.ok_delete')}}',
|
||||
cancelButtonText: '{{__('physician.cancel_delete')}}',
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
$.ajax({
|
||||
url: delete_url,
|
||||
method:'POST',
|
||||
data:{
|
||||
"_token": csrf_token,
|
||||
uid : uid,
|
||||
},
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
if(res.success) setTimeout(function () {location.reload()}, messageDuration)
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/physician.js')}}"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<!-- Modal Organization -->
|
||||
<div class="modal fade modal-primary" id="modal-comment">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
@@ -133,7 +133,7 @@
|
||||
{{__('department.form_select_all_lab')}}
|
||||
</label>
|
||||
</div>
|
||||
<select class="form-control select2-multiple" multiple name="lab_ids" id="lab-ids" style="width: 100% !important;">
|
||||
<select class="form-control select2-multiple" multiple name="organization_ids" id="lab-ids" style="width: 100% !important;">
|
||||
@foreach($labs as $lab)
|
||||
<option value="{{$lab->id}}">{{$lab->name_en}}</option>
|
||||
@endforeach
|
||||
@@ -207,7 +207,7 @@
|
||||
start_date: $('#start-date').val(),
|
||||
end_date: $('#end-date').val(),
|
||||
description: $('#description').val(),
|
||||
lab_ids: $('#lab-ids').val()
|
||||
organization_ids: $('#lab-ids').val()
|
||||
},
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message.replace('Comment', 'Message'))
|
||||
@@ -298,7 +298,7 @@
|
||||
modal.find('.modal-body input[name="start_date"]').val(data.start_date);
|
||||
modal.find('.modal-body input[name="end_date"]').val(data.end_date);
|
||||
$('#description').val(data.description)
|
||||
modal.find('.modal-body #lab-ids').val(_.pluck(data.receivers, 'lab_id')).change();
|
||||
modal.find('.modal-body #lab-ids').val(_.pluck(data.receivers, 'organization_id')).change();
|
||||
|
||||
if(!res.success) handleMessage(res.success, res.message.replace('Comment', 'Message'))
|
||||
}
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('quantity.table_title')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
|
||||
<form method="get" action="{{url('quantity/search')}}">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control rounded-top-left-25 rounded-bottom-left-25 rounded-right-0" value="{{isset($_GET['kword']) ? $_GET['kword'] : ''}}" name="kword" id="kword" placeholder="{{__('quantity.search_placeholder')}}">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-inverse-secondary px-3 rounded-top-right-25 rounded-bottom-right-25" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_quantity']))
|
||||
<button class="btn btn-inverse-success waves-effect px-3 ml-2 rounded-25" type="button" data-action="new" data-toggle="modal" data-target="#modal-quantity" data-backdrop="static"><i class="typcn typcn-plus"></i> {{__('general.btn_add_new')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover" id="quantity_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2" width="50px">{{__('quantity.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('quantity.table_action')}}</th>
|
||||
<th class="py-2">{{__('quantity.table_name')}}</th>
|
||||
{{-- <th class="py-2 text-center" width="100px">{{__('quantity.table_status')}}</th>--}}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($quantities as $k=>$quantity)
|
||||
<tr>
|
||||
<td class="py-1 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_quantity']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-info mr-2 py-1" title="{{__('general.btn_edit')}}" data-action="edit" data-uid="{{$quantity->id}}" data-toggle="modal" data-target="#modal-quantity" data-backdrop="static">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if($quantity->record_status_id==0)
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary " title="Restore" onclick="restore_data({{$quantity->id}})"><i class="typcn typcn-plus"></i></button>
|
||||
@else
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_quantity']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger py-1" title="{{__('general.btn_delete')}}" onclick="delete_data({{$quantity->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-1">{{$quantity->quantity_name}}</td>
|
||||
{{-- <td class="py-1 text-center">--}}
|
||||
{{-- <i class="mdi {{$quantity->record_status_id == 1 ? 'mdi-check-circle text-primary' : 'mdi-checkbox-blank-circle-outline'}}"></i>--}}
|
||||
{{-- </td>--}}
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $quantities->links('pagination.custom') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<div class="modal fade modal-primary" id="modal-quantity">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title new">{{__('quantity.form_add_tittle')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form method="post" action="#" id="form" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('quantity.form_name')}} <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" name="quantity_name" id="quantity-name" placeholder="{{__('quantity.search_placeholder')}}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info rounded-25" id="btnSave"><i class="fa fa-floppy-o"></i> <span class="save">{{__('general.btn_save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-secondary rounded-25 mx-3" data-dismiss='modal'>{{__('general.btn_cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script>
|
||||
|
||||
var base_quantity_url = "{{url('quantity')}}";
|
||||
|
||||
let modal_add_title = "{{__('quantity.form_add_tittle')}}";
|
||||
let modal_edit_title = "{{__('quantity.form_edit_tittle')}}";
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/quantity.js')}}"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,153 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<link href="{{url(env("APP_URL").'storage/assets/libs/bootstrap-datepicker/css/bootstrap-datepicker.min.css')}}" rel="stylesheet" type="text/css" />
|
||||
<style>
|
||||
.form-group label {
|
||||
line-height: 0.4rem !important;
|
||||
}
|
||||
.select2-container .select2-selection--single, .select2-selection--multiple {
|
||||
min-height: 30px !important;
|
||||
}
|
||||
.select2-selection__arrow {
|
||||
height: 30px !important;
|
||||
}
|
||||
.form-control, .select2-container--default .select2-selection--single, .select2-container--default .select2-selection--single .select2-search__field, .typeahead, .tt-query, .tt-hint {
|
||||
padding: 0.4rem 1.375rem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card" style="min-height: 80vh">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('sidebar.payment')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-12 inv-search">
|
||||
<form method="get" action="{{url('invoice')}}">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-8 col-lg-4 pr-0">
|
||||
<div class="form-group mb-1">
|
||||
<label for="start-invoice-date">{{__('invoice.repayment_date')}}</label>
|
||||
<div class="input-group">
|
||||
<input id="start-invoice-date" value="{{isset($_GET['from_date']) ? $_GET['from_date'] : ''}}" name="from_date" class="form-control rounded-right-0 rounded-top-left-25 rounded-bottom-left-25" onfocus="(this.type='date')" onblur="(this.type='text')" placeholder="{{__('general.type_date_placeholder')}}">
|
||||
<input id="to-invoice-date" value="{{isset($_GET['to_date']) ? $_GET['to_date'] : ''}}" name="to_date" class="form-control rounded-left-0 rounded-right-0" onfocus="(this.type='date')" onblur="(this.type='text')" placeholder="{{__('general.type_date_placeholder')}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('invoice.table_textable_filter')}}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control rounded-right-0 rounded-left-0" value="{{isset($_GET['kword']) ? $_GET['kword'] : ''}}" name="kword" id="kword" placeholder="{{__('invoice.form_invoice_number')}}">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-inverse-secondary rounded-bottom-right-25 rounded-top-right-25 px-3" title="Search" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_repayment']))
|
||||
<button type="button" data-toggle="modal" data-action="new" data-target="#modal-repayment" data-backdrop="static" class="btn btn-sm btn-inverse-success rounded-25 rounded-0 waves-effect px-3 ml-5"><i class="typcn typcn-plus"></i>{{__('general.btn_add_new')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
</div>
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2 text-center" width="50px">{{__('invoice.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('invoice.table_action')}}</th>
|
||||
<th class="py-2" width="150px">{{__('invoice.table_patient_name')}}</th>
|
||||
<th class="py-2" width="100px">{{__('invoice.table_invoice_code')}}</th>
|
||||
<th class="py-2 text-center" width="120px">{{__('invoice.repayment_date')}}</th>
|
||||
<th class="py-2 text-center" width="90px">{{__('invoice.cash_paid')}}</th>
|
||||
<th class="py-2 text-center" width="90px">{{__('invoice.bank_paid')}}</th>
|
||||
<th class="py-2 text-center" width="90px">{{__('invoice.bank_name')}}</th>
|
||||
<th class="py-2 text-center" width="90px">{{__('invoice.transaction_no')}}</th>
|
||||
<th class="py-2 text-center" width="90px">{{__('invoice.exchange_rate')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($repayments as $k=>$repayment)
|
||||
<tr>
|
||||
<td class="py-1 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_repayment']))
|
||||
<button type="button" data-action="edit" data-uid="{{$repayment->id}}" data-toggle="modal" data-target="#modal-repayment" data-id="" class="btn btn-sm btn-inverse-primary mr-2" title="{{__('general.btn_edit')}}"><i class="typcn typcn-edit"></i></button>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_repayment']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger " title="{{__('general.btn_delete')}}" onclick="deleteRepayment({{$repayment->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-1">{{$repayment->invoice->sample->patient->name_en}}</td>
|
||||
<td class="py-1">{{$repayment->invoice->invoice_code}}</td>
|
||||
<td class="py-1 text-center">{{date('d-m-Y',strtotime($repayment->repayment_date))}}</td>
|
||||
<td class="py-1 text-right">{{$repayment->cash_repayment_amount}}</td>
|
||||
<td class="py-1 text-right">{{$repayment->bank_repayment_amount}}</td>
|
||||
<td class="py-1 text-right">{{$repayment->bank_name}}</td>
|
||||
<td class="py-1 text-right">{{$repayment->transaction_ref}}</td>
|
||||
<td class="py-1 text-right">{{$repayment->exchange_rate}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $repayments->appends($_GET)->links('pagination.custom') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('modal.repayment')
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js')}}"></script>
|
||||
<script>
|
||||
|
||||
|
||||
var repayment_base_url = "{{url('repayment')}}";
|
||||
let currency = {{$labSettings->currency}};
|
||||
let repayment_modal_title = "{{__('invoice.repayment')}}";
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/repayment.js?time='.time())}}"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<h1>Result Config</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<!-- Modal Organization -->
|
||||
<div class="modal fade modal-primary" id="modal-role">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
<div class="form-group mb-1 d-none">
|
||||
<label for="lab-code" class="control-label">{{__('Base-Page')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control select2" name="lab_id" id="lab_id" style="width: 100% !important;">
|
||||
<select class="form-control select2" name="organization_id" id="organization_id" style="width: 100% !important;">
|
||||
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<!-- Modal Organization -->
|
||||
<div class="modal fade modal-primary" id="modal-sample-type">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
|
||||
@@ -1,733 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
|
||||
<head>
|
||||
|
||||
@include('layout.header')
|
||||
|
||||
<style>
|
||||
|
||||
.btn-icon-prepend{
|
||||
|
||||
float: left;
|
||||
|
||||
}
|
||||
|
||||
.ui-widget{
|
||||
z-index: 900000!important;
|
||||
}
|
||||
|
||||
.ui-autocomplete {
|
||||
position: absolute;
|
||||
height: 400px;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
float: left;
|
||||
display: none;
|
||||
min-width: 160px;
|
||||
padding: 4px 0;
|
||||
margin: 0 0 10px 25px;
|
||||
list-style: none;
|
||||
background-color: #ffffff;
|
||||
border-color: #ccc;
|
||||
border-color: rgba(0, 0, 0, 0.2);
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
||||
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
||||
-webkit-background-clip: padding-box;
|
||||
-moz-background-clip: padding;
|
||||
background-clip: padding-box;
|
||||
*border-right-width: 2px;
|
||||
*border-bottom-width: 2px;
|
||||
}
|
||||
|
||||
.ui-menu-item > a.ui-corner-all {
|
||||
display: block;
|
||||
padding: 3px 15px;
|
||||
clear: both;
|
||||
font-weight: normal;
|
||||
line-height: 18px;
|
||||
color: #555555;
|
||||
white-space: nowrap;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.ui-state-hover, .ui-state-active {
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
background-color: #0088cc;
|
||||
border-radius: 0px;
|
||||
-webkit-border-radius: 0px;
|
||||
-moz-border-radius: 0px;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
|
||||
.input_container {
|
||||
border: 0px solid #e5e5e5;
|
||||
}
|
||||
|
||||
input[type=file]::file-selector-button {
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
border: 0px;
|
||||
border-right: 0px solid #e5e5e5;
|
||||
padding: 10px 15px;
|
||||
margin-right: 20px;
|
||||
transition: .5s;
|
||||
}
|
||||
|
||||
input[type=file]::file-selector-button:hover {
|
||||
background-color: #eee;
|
||||
border: 0px;
|
||||
border-right: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/lightgallery/lightgallery.css')}}" >
|
||||
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.css')}}" >
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.min.js')}}"></script>
|
||||
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/css/search_test.css')}}" >
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div class="container-scroller">
|
||||
|
||||
@include('layout.navbar')
|
||||
|
||||
<!-- partial -->
|
||||
|
||||
@include('layout.breadscrum')
|
||||
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
|
||||
<!-- partial -->
|
||||
|
||||
<div class="main-panel">
|
||||
|
||||
<div class="content-wrapper">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
|
||||
<div class="card" style="min-height: 83vh;">
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
<form method="post" action="{{url('sample/update/'.$sample->id)}}" enctype="multipart/form-data" onkeydown="return event.key != 'Enter';">
|
||||
|
||||
@csrf
|
||||
|
||||
<div class="row font-14">
|
||||
|
||||
<div class="col-lg-12 pl-4">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<h6 class="pb-2 font-weight-medium card-title">{{$sample->sample_number}}</h6>
|
||||
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="form-vertical pt-0">
|
||||
|
||||
<div class="row font-weight-normal">
|
||||
<div class="col-sm-3" style="height: 25px;">{{__('sample.form_patient_name')}}</div>
|
||||
<div class="col-sm-9" style="height: 25px;"> : {{$sample->patient->name_en}}</div>
|
||||
<div class="col-sm-3" style="height: 25px;">{{__('sample.form_patient_code')}}</div>
|
||||
<div class="col-sm-9 text-info" style="height: 25px;"> : {{$sample->patient->patient_uuid}}</div>
|
||||
<div class="col-sm-3" style="height: 25px;">{{__('sample.form_patient_age').' / '.__('sample.form_patient_gender')}}</div>
|
||||
<div class="col-sm-9" style="height: 25px;"> : {{date('Y') - date('Y',strtotime($sample->patient->dob))}} y / {{$sample->patient->gender == 1 ? 'Male' : 'Female'}}</div>
|
||||
<div class="col-sm-3" style="height: 25px;">{{__('sample.form_patient_mobile')}}</div>
|
||||
<div class="col-sm-9" style="height: 25px;"> : {{$sample->patient->phone_number}}</div>
|
||||
{{-- <div class="col-sm-3" style="height: 25px;">{{__('sample.form_patient_address')}}</div>--}}
|
||||
{{-- <div class="col-sm-9" style="height: 25px;"> : {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</div>--}}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-12 pl-3">
|
||||
|
||||
<div class="col-lg-12 border">
|
||||
|
||||
<div class="row bg-gradient-light font-14 py-2">
|
||||
|
||||
<span class="pl-3">{{__('sample.form_sample_number')}} : <b class="pl-1 sample-number text-info">{{$sample->sample_number}}</b></span>
|
||||
|
||||
{{-- <span class="pl-3">{{__('sample.form_collected_date')}} : <b class="pl-1 sample-source text-info">{{date('d-m-Y h:i A',strtotime($sample->collected_date))}}</b></span>--}}
|
||||
|
||||
{{-- <span class="pl-3">{{__('sample.form_received_date')}} : <b class="pl-1 sample-source text-info">{{date('d-m-Y h:i A',strtotime($sample->received_date))}}</b></span>--}}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row" id="sample-forms">
|
||||
|
||||
<div class="col-lg-12 pt-2">
|
||||
|
||||
<div class="form-vertical sample-creation-form p-2">
|
||||
|
||||
<div class="row p-0">
|
||||
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
|
||||
<div class="form-group mb-1">
|
||||
|
||||
<input type="hidden" name="id" value="{{$sample->id}}">
|
||||
|
||||
<input type="hidden" name="patient_id" value="{{$sample->patient_id}}">
|
||||
|
||||
<label for="lab-name-en">{{__('sample.form_sample_number')}} <span class="text-danger">*</span></label>
|
||||
|
||||
<div class="input-group">
|
||||
|
||||
<input type="text" readonly disabled class="form-control rounded-0" value="{{$sample->sample_number}}" name="sample_number" id="sample-number" placeholder="{{__('sample.form_sample_number')}}">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
|
||||
<div class="form-group mb-1">
|
||||
|
||||
<label for="lab-name-en">{{__('sample.form_sample_source')}} <span class="text-danger">*</span></label>
|
||||
|
||||
<select class="form-control select2 rounded-0" name="sample_source_id" id="sample-source-id" style="width: 100%">
|
||||
|
||||
<option></option>
|
||||
|
||||
@foreach($sampleSources as $sampleSource)
|
||||
|
||||
<option {{$sampleSource->id == $sample->sample_source_id ? 'selected': ''}} value="{{$sampleSource->id}}">{{$sampleSource->name_en}}</option>
|
||||
|
||||
@endforeach
|
||||
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
|
||||
<div class="form-group mb-1">
|
||||
|
||||
<label for="lab-name-en">{{__('sample.form_requester')}} <span class="text-danger">*</span></label>
|
||||
|
||||
<select class="form-control select2 rounded-0" name="physician_id" id="physician-id" style="width: 100%">
|
||||
|
||||
<option></option>
|
||||
|
||||
@foreach($physicians as $physician)
|
||||
|
||||
<option {{$physician->id == $sample->physician_id ? 'selected': ''}} value="{{$physician->id}}">{{$physician->name_en}}</option>
|
||||
|
||||
@endforeach
|
||||
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
|
||||
<div class="form-group mb-1">
|
||||
|
||||
<label for="lab-name-en">{{__('sample.form_collected_date')}} <span class="text-danger">*</span></label>
|
||||
|
||||
<input type="datetime-local" value="{{date('Y-m-d\TH:i:s',strtotime($sample->collected_date))}}" class="form-control" name="collected_date" id="collected-date">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
|
||||
<div class="form-group mb-1">
|
||||
|
||||
<label for="lab-name-en">{{__('sample.form_received_date')}} <span class="text-danger">*</span></label>
|
||||
|
||||
<input type="datetime-local" value="{{date('Y-m-d\TH:i:s',strtotime($sample->received_date))}}" class="form-control" name="received_date" id="received-date">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
|
||||
<div class="form-group mb-1">
|
||||
|
||||
<label for="lab-name-en">{{__('sample.form_admission_date')}} <span class="text-danger">*</span></label>
|
||||
|
||||
<input type="datetime-local" value="{{date('Y-m-d\TH:i:s', strtotime($sample->admission_date))}}" class="form-control" name="admission_date" id="admission-date">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
|
||||
<div class="form-group mb-1">
|
||||
|
||||
<label for="lab-name-en">{{__('sample.form_diagnisis')}}</label>
|
||||
|
||||
<input type="text" class="form-control rounded-0" value="{{$sample->diagnosis}}" name="diagnosis" id="diagnosis" placeholder="{{__('sample.form_diagnisis')}}">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
|
||||
<div class="form-group mb-1">
|
||||
|
||||
<label for="lab-name-en">{{__('sample.form_sample_condition')}} <span class="text-danger"></span></label>
|
||||
|
||||
<div class="input-group">
|
||||
|
||||
<div class="input-group-append">
|
||||
|
||||
<div class="form-check pr-4">
|
||||
|
||||
<label class="form-check-label">
|
||||
|
||||
<input {{$sample->is_urgent == 1 ? 'checked' : ''}} value="{{$sample->is_urgent}}" type="checkbox" name="is_urgent" id="is-urgent" class="form-check-input">
|
||||
|
||||
{{__('sample.form_is_urgent')}}
|
||||
|
||||
</label>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<select class="form-control rounded-0" name="sample_condition" id="sample-condition">
|
||||
<option selected value="2">{{__('sample.form_sample_condition')}}</option>
|
||||
|
||||
<option {{$sample->sample_condition == 1 ? 'selected' : ''}} value="1">{{__('sample.condition_good')}}</option>
|
||||
|
||||
<option {{$sample->sample_condition == 0 ? 'selected' : ''}} value="0">{{__('sample.condition_reject')}}</option>
|
||||
|
||||
<option {{$sample->sample_condition == 2 ? 'selected' : ''}} value="2">{{__('sample.condition_acceptable')}}</option>
|
||||
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
|
||||
<div class="form-group mb-1 " style="flex: 1 !important;">
|
||||
|
||||
<label for="lab-name-en">{{__('sample.form_reject_reason')}} <span class="text-danger text-small"></span></label>
|
||||
|
||||
<div class="input-group">
|
||||
|
||||
<div class="form-group" style="flex: 1 !important;">
|
||||
|
||||
<select class="form-control select2 rounded-right-0" style="width: 100%" disabled name="reject_comment_id" id="reject-comment-id">
|
||||
|
||||
<option></option>
|
||||
|
||||
@foreach($rejectComments as $rejectComment)
|
||||
|
||||
<option {{$rejectComment->id == $sample->reject_comment_id ? 'selected':''}} value="{{$rejectComment->id}}">{{$rejectComment->reject_comment}}</option>
|
||||
|
||||
@endforeach
|
||||
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-white rounded-left-0 px-3" type="button" onclick="addRejectComment('reject-comment-id')"><i class="typcn typcn-plus"></i> </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 py-3">
|
||||
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id,['delete_sample']))
|
||||
<button type="button" class="btn btn-md btn-inverse-danger float-right rounded-25 mb-3 mx-2 px-4" onclick="deleteSample({{$sample->id}})"><i class="mdi mdi-delete-forever mr-2"></i>
|
||||
{{__('sample.from_btn_remove')}}</button>
|
||||
@endif
|
||||
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_sample']))
|
||||
<a href="{{url('sample/patient/'. $sample->patient_id.'/new')}}" class="btn btn-md btn-inverse-success float-right rounded-25 mb-3 mx-2"><i class="typcn typcn-plus mr-2"></i> {{__('sample.form_btn_new_sample')}}</a>
|
||||
@endif
|
||||
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['view_result', 'print_result']))
|
||||
<a href="javascript:void(0)" class="btn btn-md btn-inverse-warning float-right rounded-25 mb-3 mx-2" id="previewResult" data-toggle="modal" data-target="#print_preview_modal" data-backdrop="static"><i class="mdi mdi-printer mr-2"></i> {{__('sample.form_btn_preview_result')}}</a>
|
||||
@endif
|
||||
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['add_result','update_result']))
|
||||
<button type="button" class="btn btn-md btn-inverse-info float-right rounded-25 mb-3 mx-2 px-4" id="btnAddTestResult" data-toggle="modal" data-target="#modal-add-test-result" data-backdrop="static"><i class="mdi mdi-table-plus mr-2"></i> {{__('sample.form_btn_add_result')}}</button>
|
||||
@endif
|
||||
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_sample']))
|
||||
<button type="button" class="btn btn-md btn-inverse-info float-right rounded-25 mb-3 mx-2 px-4 btnShowTestModal" data-toggle="modal" data-target="#modal-assign-test" data-backdrop="static"><i class="mdi mdi-format-list-bulleted-type mr-2"></i> {{__('sample.form_btn_assign_test')}}</button>
|
||||
<button type="submit" class="btn btn-md btn-inverse-info float-right mb-3 mx-2 rounded-25 px-5"><i class="mdi mdi-content-save mr-2"></i>
|
||||
{{__('sample.form_btn_update')}}</button>
|
||||
@endif
|
||||
|
||||
<button type="button" class="btn btn-md btn-danger d-none rounded-25 mb-2">Reject Sample</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@include('layout.footer')
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@include('modal.assign_test')
|
||||
|
||||
|
||||
@include('modal.organism_result')
|
||||
|
||||
@include('modal.invoice')
|
||||
@include('modal.sample_label_print')
|
||||
|
||||
|
||||
@include('modal.enter_result_forms.sample_result_'.$enter_form_id)
|
||||
|
||||
@include('modal.preview_result_forms.preview_result_'.$preview_form_id)
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@include('layout.common_script')
|
||||
|
||||
<script src="https://code.jquery.com/ui/1.14.1/jquery-ui.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
$('#form-add-test-result').delegate('.auto-complete-1', 'click', function() {
|
||||
$(".auto-complete-1").autocomplete({source: [<?php echo "'" . implode ( "', '", config('labis.auto_complete_items') ) . "'" ?>]}).click(function(){
|
||||
$(this).autocomplete('search', 't')
|
||||
});
|
||||
});
|
||||
|
||||
var file_path = "{{ url(env("APP_URL").'storage/images/attachment_lab_result') }}";
|
||||
|
||||
|
||||
|
||||
var is_auto_generate_sample_number = 0;
|
||||
|
||||
let sample_id = {{\Route::current()->parameter('id')}};
|
||||
|
||||
let first_prev_sample_id = {{$firstPrvSampleId}};
|
||||
|
||||
let previous_id = "<?php echo isset($_GET['previous_sample']) ? $_GET['previous_sample'] : 0?>";
|
||||
|
||||
let invoice_id = "{{($sample->invoice) ? $sample->invoice->id : 0}}";
|
||||
|
||||
let invoice_code = "{{($sample->invoice) ? $sample->invoice->invoice_code : 0}}";
|
||||
|
||||
let currency = {{$labSettings->currency}};
|
||||
let exchange_rate = {{$labSettings->exchange_rate}};
|
||||
|
||||
let testSamples = [];
|
||||
|
||||
let previous_sample_date = "{{$firstPrvSampleDate}}";
|
||||
let selected_previous_sample_date = "{{$selected_pre_sample_date}}";
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/sample.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/calculation_results/underscore-min.js')}}"></script>
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/calculation_results/test_script.js')}}"></script>
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/calculation_results/math-expression-evaluator.js')}}"></script>
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/calculation_results/calculateTestValue.js')}}"></script>
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/icheck/icheck.min.js')}}"></script>
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/assign_test.js')}}"></script>
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/invoice.js')}}"></script>
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/sample_lists.js')}}"></script>
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/search_test.js')}}"></script>
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/enter_result_forms/test_result_'.$enter_form_id.'.js?time='.time())}}"></script>
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/preview_result_forms/preview_result_'.$preview_form_id.'.js?time='.time())}}"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
var is_add_result = "{{isset($_GET['add-result'])? true : false}}";
|
||||
|
||||
var is_preview_result = "{{isset($_GET['print-result'])? true : false}}";
|
||||
|
||||
var is_edit_test = "{{isset($_GET['edit-test'])? true : false}}";
|
||||
|
||||
if(is_edit_test) $('.btnShowTestModal').trigger('click');
|
||||
|
||||
|
||||
var is_print_label = "{{isset($_GET['print-label'])? true : false}}";
|
||||
if(is_print_label) $('#print-label').trigger('click');
|
||||
|
||||
var is_add_invoice = "{{isset($_GET['add-invoice'])? true : false}}";
|
||||
if(is_add_invoice){
|
||||
$('.btnShowTestModal').trigger('click');
|
||||
//
|
||||
setTimeout(function() {
|
||||
$('#btnShowInvoice').trigger('click');
|
||||
}, 1000);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(is_preview_result) {
|
||||
|
||||
var $loading = $('#loadingDiv').hide();
|
||||
|
||||
$(document).ajaxStart(function () {$loading.fadeIn();})
|
||||
|
||||
setTimeout(function () {
|
||||
|
||||
$('#previewResult').trigger('click');
|
||||
|
||||
$(document).ajaxStop(function () {$loading.fadeOut();})
|
||||
|
||||
}, 500)
|
||||
|
||||
}
|
||||
|
||||
if(is_add_result) $('#btnAddTestResult').trigger('click');
|
||||
|
||||
|
||||
|
||||
$('#btnShowInvoice').click(function () {
|
||||
|
||||
generate_invoice()
|
||||
|
||||
})
|
||||
|
||||
|
||||
$('#result_neonetal_template').change(function(){
|
||||
if(this.checked) {
|
||||
setResultTemplate(4);
|
||||
}
|
||||
else{
|
||||
setResultTemplate(0);
|
||||
}
|
||||
})
|
||||
|
||||
function setResultTemplate(result_template_id) {
|
||||
$.ajax({
|
||||
url: sample_base_url.toString()+'/set-result-template',
|
||||
type:"POST",
|
||||
dataType:"JSON",
|
||||
data :{
|
||||
"_token": csrf_token,
|
||||
uid: sample_id,
|
||||
result_template_id : result_template_id
|
||||
},
|
||||
success:function(res) {
|
||||
if (res.success) window.location.reload()
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function printRecorder() {
|
||||
|
||||
$.ajax({
|
||||
|
||||
url: sample_base_url.toString()+'/print-record',
|
||||
|
||||
type:"POST",
|
||||
|
||||
dataType:"JSON",
|
||||
|
||||
data :{
|
||||
|
||||
"_token": csrf_token,
|
||||
|
||||
uid: sample_id
|
||||
|
||||
},
|
||||
|
||||
success:function(res) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function approveSample(sampleId) {
|
||||
|
||||
$.ajax({
|
||||
|
||||
url: sample_base_url.toString()+'/approve',
|
||||
type:"POST",
|
||||
dataType:"JSON",
|
||||
data :{
|
||||
"_token": csrf_token,
|
||||
uid: sampleId
|
||||
},
|
||||
success:function(res) {
|
||||
handleMessage(res.success, res.message)
|
||||
$('.approve').hide();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
$('#modal-organism-result #search-organism').keypress(_.debounce(function () {
|
||||
getOrganisms($(this).val())
|
||||
}, 500));
|
||||
|
||||
function getOrganisms(name = '') {
|
||||
$.ajax({
|
||||
url: get_refs_base_url+ '/test-sample-organism-search',
|
||||
type:"POST",
|
||||
data:{
|
||||
"_token": csrf_token,
|
||||
'sample_id' : sample_id,
|
||||
'test_sample_id' : $("#modal-organism-result").attr('data-test-sample-id'),
|
||||
'name' : name
|
||||
},
|
||||
dataType:"json",
|
||||
success:function(response){
|
||||
if (response.success) {
|
||||
$('#modal-organism-result-organism #orgn-result-area').empty();
|
||||
let fieldType = $("#modal-organism-result").attr('data-field-type');
|
||||
response.data.map(item =>{
|
||||
renderOrganismResultItemRow(item.test_sample_id, fieldType, item, response.qualities, response.selected_org);
|
||||
//console.log('qty ', response.selected_org)
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
error: function(response) {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$('#send_lab_result_patient, #send_lab_result_clinician').click(function(){
|
||||
let target_receiver = $(this).attr('target_receiver')
|
||||
$.ajax({
|
||||
url: sample_base_url + '/result/tg-webhook/{{$sample->patient->id}}/{{$sample->id}}',
|
||||
type:"POST",
|
||||
data :{
|
||||
"_token": csrf_token,
|
||||
"target_receiver": target_receiver
|
||||
},
|
||||
success:function(res){
|
||||
handleMessage(res.success, res.message)
|
||||
},
|
||||
error:function(res){
|
||||
handleMessage(true, 'Laboroatory results have been sent!')
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
@@ -1,199 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('sample_source.table_title')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
|
||||
<form method="get" action="{{url('sample-source/search')}}">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control rounded-top-left-25 rounded-bottom-left-25 rounded-right-0" value="{{isset($_GET['kword']) ? $_GET['kword'] : ''}}" name="kword" id="kword" placeholder="{{__('sample_source.search_placeholder')}}">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-inverse-secondary px-3 rounded-top-right-25 rounded-bottom-right-25" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_sample_source']))
|
||||
<button class="btn btn-inverse-success waves-effect px-3 ml-2 rounded-25" type="button" data-action="new" data-toggle="modal" data-target="#modal-sample-source" data-backdrop="static"><i class="typcn typcn-plus"></i> {{__('general.btn_add_new')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover " id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2" width="50px">{{__('sample_source.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="200px">{{__('sample_source.table_action')}}</th>
|
||||
<th class="py-2">{{__('sample_source.table_name_khmer')}}</th>
|
||||
<th class="py-2">{{__('sample_source.table_name_latin')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('physician.default_select')}}</th>
|
||||
{{-- <th class="py-2 text-center" width="100px">{{__('sample_source.table_status')}}</th>--}}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($sampleSources as $k=>$sampleSource)
|
||||
<tr>
|
||||
<td class="py-1 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
<input type="text" class="d-none" id="ivt-{{$sampleSource->id}}" value="{{\App\Helpers\Helpers::generatePatientBotLink('patient',$sampleSource->lab_id, $sampleSource->id)}}"><button type="button" onclick="copyTgBotInviteLink('ivt-{{$sampleSource->id}}')" class="btn btn-sm btn-inverse-warning mr-2 py-1"><i title="Copy telegram invitation link '{{\App\Helpers\Helpers::generatePatientBotLink('patient',$sampleSource->lab_id, $sampleSource->id)}}' to clipboard" class="fa fa-telegram"></i></button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_sample_source']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-info mr-2 py-1" title="{{__('general.btn_edit')}}" data-action="edit" data-uid="{{$sampleSource->id}}" data-toggle="modal" data-target="#modal-sample-source" data-backdrop="static">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if($sampleSource->record_status_id==0)
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary " title="Restore" onclick="restore_data({{$sampleSource->id}})"><i class="typcn typcn-plus"></i></button>
|
||||
@else
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_sample_source']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger py-1" title="{{__('general.btn_delete')}}" onclick="delete_data({{$sampleSource->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-1">{{$sampleSource->name_kh}}</td>
|
||||
<td class="py-1">{{$sampleSource->name_en}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<?php echo $sampleSource->is_default == 1 ? '<i class="mdi mdi-check-circle text-primary"></i>' : '' ?>
|
||||
</td>
|
||||
|
||||
{{-- <td class="py-1 text-center">--}}
|
||||
{{-- <i class="mdi {{$sampleSource->record_status_id == 1 ? 'mdi-check-circle text-primary' : 'mdi-checkbox-blank-circle-outline'}}"></i>--}}
|
||||
{{-- </td>--}}
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $sampleSources->links('pagination.custom') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<div class="modal fade modal-primary" id="modal-sample-source">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title new">{{__('sample_source.form_add_tittle')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form method="post" action="#" id="form" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('sample_source.table_name_latin')}} <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" name="name_en" id="name-en" placeholder="{{__('sample_source.table_name_latin')}}">
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('sample_source.table_name_khmer')}}</label>
|
||||
<input type="text" class="form-control" name="name_kh" id="name-kh" placeholder="{{__('sample_source.table_name_khmer')}}">
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<div class="form-check" style="width: 250px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="checkbox" class="form-check-input" id="default-select">
|
||||
{{__('physician.default_select')}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info rounded-25" id="btnSave"><i class="fa fa-floppy-o"></i> <span class="save">{{__('general.btn_save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-secondary rounded-25 mx-3" data-dismiss='modal'>{{__('general.btn_cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script>
|
||||
|
||||
var save_url = "{{url('sample-source.save')}}";
|
||||
var update_url = "{{url('sample-source.update')}}";
|
||||
var delete_url = "{{url('sample-source.delete')}}";
|
||||
var restore_url = "{{url('sample-source.restore')}}";
|
||||
|
||||
var get_url = "{{url('sample-source.get')}}";
|
||||
|
||||
let modal_add_title = "{{__('sample_source.form_add_tittle')}}";
|
||||
let modal_edit_title = "{{__('sample_source.form_edit_tittle')}}";
|
||||
|
||||
function copyTgBotInviteLink(tgLinkSelectorId) {
|
||||
// Get the text field
|
||||
var copyText = document.getElementById(tgLinkSelectorId);
|
||||
copyText.select();
|
||||
copyText.setSelectionRange(0, 99999); // For mobile devices
|
||||
navigator.clipboard.writeText(copyText.value);
|
||||
alertify.warning("Telegram Bot invitation link already copied!")
|
||||
}
|
||||
|
||||
$('#select-all-lab').click(function () {
|
||||
if( $('#select-all-lab').is(':checked')){
|
||||
$('#lab-ids > option').prop("selected", true)
|
||||
$('#lab-ids').trigger('change')
|
||||
}else{
|
||||
$('#lab-ids > option').prop("selected", false)
|
||||
$('#lab-ids').trigger('change')
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/sample_source.js')}}"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,193 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">Patient Information</h4>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group row">
|
||||
<label for="patient_name" class="col-sm-5 col-form-label">Patient Name</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="patient_name">
|
||||
<option value="none">Select</option>
|
||||
<option>Mr A</option>
|
||||
<option>Mr B</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group row">
|
||||
<label for="labid" class="col-sm-5 col-form-label">Lab ID</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="lab_id">
|
||||
<option value="none">Select</option>
|
||||
<option>001-30082022</option>
|
||||
<option>002-30082022</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group row">
|
||||
<label for="status" class="col-sm-5 col-form-label">Status</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="sample_status">
|
||||
<option value="none">All</option>
|
||||
<option>In progress</option>
|
||||
<option>Completed</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group row">
|
||||
<label for="phonenumber" class="col-sm-5 col-form-label">Phone Number</label>
|
||||
<input type="text" class="form-control form-control-sm col-sm-7" id="phone_number" placeholder="Phone number">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group row">
|
||||
<label for="example" class="col-sm-5 col-form-label">Request Date:</label>
|
||||
<input type="text" class="form-control form-control-sm col-sm-7" id="request_date" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group row">
|
||||
<label for="exampleInputUsername2" class="col-sm-5 col-form-label">Doctor</label>
|
||||
<select class="form-control form-control-sm col-sm-7" id="doctor">
|
||||
<option value="">Select</option>
|
||||
<option>Dr. A</option>
|
||||
<option>Dr. B</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row float-right">
|
||||
<div class="col-md-12">
|
||||
<button type="button" class="btn btn-info btn-icon-text">
|
||||
<i class="typcn typcn-search btn-icon-prepend"></i>
|
||||
Search
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="table-responsive pt-3">
|
||||
<table class="table table-striped project-orders-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Patient ID</th>
|
||||
<th>Lab ID</th>
|
||||
<th>Patient Name</th>
|
||||
<th>Age</th>
|
||||
<th>Sex</th>
|
||||
<th>Request Date</th>
|
||||
<th>Telephone</th>
|
||||
<th>Request by</th>
|
||||
<th>Status</th>
|
||||
<th>Price (Riel)</th>
|
||||
<th>Price ($)</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>210222004</td>
|
||||
<td>220221-01091</td>
|
||||
<td>ALY KRIYA</td>
|
||||
<td>26y</td>
|
||||
<td>Male</td>
|
||||
<td>21-Feb-2022</td>
|
||||
<td>098898989</td>
|
||||
<td>Chomnor Dara</td>
|
||||
<td><label class="badge badge-success">COMPLETED</label></td>
|
||||
<td></td>
|
||||
<td>19$</td>
|
||||
<td>
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
<button type="button" class="btn btn-sm btn-info " title="Edit">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-sm btn-info " title="Prview Result">
|
||||
<i class="typcn typcn-eye"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-sm btn-warning " title="Enter Result">
|
||||
<i class="typcn typcn-plus"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-sm btn-danger " title="Delete">
|
||||
<i class="typcn typcn-delete-outline"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>210222004</td>
|
||||
<td>220221-01091</td>
|
||||
<td>ALY KRIYA</td>
|
||||
<td>26y</td>
|
||||
<td>Male</td>
|
||||
<td>21-Feb-2022</td>
|
||||
<td>098898989</td>
|
||||
<td>Chomnor Dara</td>
|
||||
<td><label class="badge badge-primary">In progress</label></td>
|
||||
<td></td>
|
||||
<td>19$</td>
|
||||
<td>
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
<button type="button" class="btn btn-sm btn-info " title="Edit">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-sm btn-info " title="Prview Result">
|
||||
<i class="typcn typcn-eye"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-sm btn-warning " title="Enter Result">
|
||||
<i class="typcn typcn-plus"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-sm btn-danger " title="Delete">
|
||||
<i class="typcn typcn-delete-outline"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,272 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<title>ស្នើសុំសេវាមន្ទីរពិសោធន៍</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/vendors/typicons/typicons.css') }}">
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/vendors/mdi/css/materialdesignicons.min.css')}}">
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/vendors/css/vendor.bundle.base.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/css/vertical-layout-light/style.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/css/overwrite.css') }}">
|
||||
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/vendors/select2/select2.min.css')}}">
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/css/overwrite.select2.css')}}">
|
||||
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/alertifyjs/build/css/alertify.min.css')}}" type="text/css" />
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/sweetalert2/sweetalert2.min.css')}}" type="text/css" />
|
||||
|
||||
<style>
|
||||
body,h1,h2,h3,h4,h5,h6 {font-family: "Arial", sans-serif}
|
||||
.py-2{
|
||||
padding: 5px 0;
|
||||
}
|
||||
.table tr td, .table tr th{
|
||||
padding: 5px;
|
||||
font-size: 13px;
|
||||
}
|
||||
.text-center{
|
||||
text-align: center;
|
||||
}
|
||||
.select2-container .select2-selection--single, .select2-selection--multiple {
|
||||
min-height: 50px !important;
|
||||
}
|
||||
.select2-selection__rendered{
|
||||
font-size: 20px !important;
|
||||
}
|
||||
.select2-container--default .select2-search--dropdown .select2-search__field {
|
||||
height: 40px !important;
|
||||
font-size: 20px !important;
|
||||
}
|
||||
.select2-results__option {
|
||||
font-size: 15px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
<body class="w3-white w3-content" style="max-width:1600px">
|
||||
|
||||
<!-- !PAGE CONTENT! -->
|
||||
<div class="w3-main" style="margin-left:000px">
|
||||
|
||||
<!-- Header -->
|
||||
<header id="portfolio">
|
||||
<br>
|
||||
<div class="w3-container" style="overflow: auto">
|
||||
<table cellpadding="0" cellspacing="0" style="min-width: 100%">
|
||||
<tr>
|
||||
<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) }}" />
|
||||
@else
|
||||
<table width="100%" cellpadding="0" cellspacing="0" style="min-width: 100%">
|
||||
<tr>
|
||||
<td style="vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 70px;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center" align="center">
|
||||
<p style="line-height: 13px !important; font-size: 11pt; font-weight: bold; color: #3b86d1;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 9pt; font-weight: bold; color: #3b86d1;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
<hr style="margin: 10px 0;">
|
||||
<br>
|
||||
<h5 style="font-size: 18px"><b>គ្រប់គ្រង និងស្នើសុំសេវាមន្ទីរពិសោធន៍</b></h5>
|
||||
<br>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- First Photo Grid-->
|
||||
|
||||
<div class=" w3-container w3-margin-bottom" style="overflow-x: auto; margin-bottom: 20px">
|
||||
<div class="row">
|
||||
<div id="old-patient-section" class="col-sm-6 pr-4 pl-4 py-4" style="background: aliceblue;">
|
||||
<h6 style="font-size: 18px; line-height: 35px;"><b id="old-patient" style="padding: 6px; border-radius: 5px; color: #1676cb;"> អតិថិជនចាស់ - Existing Customer <i class="fa fa-hand-o-down" aria-hidden="true"></i></b></h6>
|
||||
<form enctype="multipart/form-data" action="{{url('customer/login/'.request()->route()->parameter('hashLabId'))}}" method="post">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<label style="font-size: 16px">សូមបញ្ចូលលេខទូរស័ព្ទរបស់អ្នក-Input your phone number:</label><br>
|
||||
<!--<input autocomplete="off" onclick="toogleSection(0)" placeholder="{{session()->has('message')? 'មិនមានលេខនេះនៅក្នុងប្រព័ន្ធយើងខ្ញុំទេ':'999 999 9999'}}" type=" text" id="phonenumber-login" name="phone_number" style="height: 50px;font-size:20px; width: 100%; border-radius: 0px; border: 1px solid #b1b1b1; outline: none; {{session()->has('message')? ' border:1px solid red; ':''}}" class="form-control phonenumber rounded" minlength="6" />-->
|
||||
|
||||
<select id="phonenumber-login" name="phone_number" onclick="toogleSection(0)" required style="height: 50px; font-size:18px; width: 100%; border-radius: 0px; border: 1px solid #b1b1b1; outline: none;" class="form-control select2-tags rounded">
|
||||
<option value="0"></option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<label style="font-size: 16px">ឬ ឈ្មោះរបស់អ្នក - Customer Name:</label><br>
|
||||
<select name="patient_id" id="patient_live_search" required style="height: 50px; font-size:18px; width: 100%; border-radius: 0px; border: 1px solid #b1b1b1; outline: none;" class="form-control select2-tags rounded">
|
||||
<option value="0"></option>
|
||||
</select>
|
||||
<!--<input autocomplete="off" type="text" required onclick="toogleSection(0)" name="name_en" style="height: 50px;font-size:20px; width: 100%; border-radius: 0px; border: 1px solid #b1b1b1; outline: none;text-transform: UPPERCASE;" class="form-control rounded" />-->
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<button class="btn btn-sm btn-success w-100" type="submit" style="width: 150px; height: 36px; float: right; margin: 10px 0; outline: none; border: none; font-size: 16px">ចូលប្រើប្រាស់ - Login</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="new-patient-section" class="col-sm-6 pl-4 pr-4 py-4" style="border-left:2px solid #002d9b; background: white;">
|
||||
<h6 style="font-size: 18px; line-height: 35px;"><b id="new-patient" style="padding: 6px; border-radius: 5px; color: #1676cb;"> អតិថិជនថ្មី - New Customer <i class="fa fa-hand-o-down" aria-hidden="true"></i></b></h6>
|
||||
<form enctype="multipart/form-data" id="register-patient" action="{{url('customer/register/'.request()->route()->parameter('hashLabId'))}}" method="post">
|
||||
@csrf
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<label style="font-size: 16px">ឈ្មោះរបស់អ្នក - Customer Name:<code>*</code></label><br>
|
||||
<input autocomplete="off" type="text" required onclick="toogleSection(1)" name="name_en" style="height: 50px;font-size:20px; width: 100%; border-radius: 0px; border: 1px solid #b1b1b1; outline: none;text-transform: UPPERCASE;" class="form-control rounded" />
|
||||
<input type="hidden" required value="{{$labSettings->id}}" name="lab_id">
|
||||
<input type="hidden" required value="{{$labSettings->short_name}}" name="short_name">
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<label style="font-size: 16px">ភេទ - Gender: <code>*</code></label><br>
|
||||
<select name="gender" required style="height: 50px; font-size:18px; width: 100%; border-radius: 0px; border: 1px solid #b1b1b1; outline: none;" class="form-control rounded">
|
||||
<option value="1">ប្រុស - Male</option>
|
||||
<option value="2">ស្រី - Female</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label style="font-size: 16px">អាយុ (ជាឆ្នាំ) - Age:<code>*</code></label><br>
|
||||
<input autocomplete="off" required type="number" id="year" style="height: 50px;font-size:20px; width: 100%; border-radius: 0px; border: 1px solid #b1b1b1; outline: none;" class="form-control rounded" />
|
||||
<input type="hidden" value="{{date('d-m-Y')}}" id="dob" name="dob">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label style="font-size: 16px">លេខទូរស័ព្ធ - Phone Number:<code>*</code></label><br>
|
||||
<input autocomplete="off" type="text" required name="phone_number" id="phonenumber" minlength="6" placeholder="999 999 9999" style="height: 50px;font-size:20px; width: 100%; border-radius: 0px; border: 1px solid #b1b1b1; outline: none;" class="form-control phonenumber rounded" />
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label style="font-size: 16px">ខេត្ត - Province:</label><br>
|
||||
<select name="province_id" style="height: 50px; font-size:18px; width: 100%; border-radius: 0px; border: 1px solid #b1b1b1; outline: none;" class="form-control rounded">
|
||||
<option value="0"> - </option>
|
||||
@foreach($provinces as $province)
|
||||
<option value="{{$province->id}}">{{$province->name_kh}} - {{$province->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-sm btn-info w-100" style="width: 150px; height: 36px; float: right; margin: 10px 0; outline: none; border: none; font-size: 16px">ចុះឈ្មោះថ្មី - Register</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- End page content -->
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<div class="w3-light w3-center" style="font-size: 13px; position: fixed; bottom: 0; width:80%; padding: 10px 0;">{{$labSettings->name_kh}}</div>
|
||||
|
||||
|
||||
@include('layout.common_script')
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/moment/moment.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/moment/moment-precise-range.js')}}"></script>
|
||||
|
||||
<script>
|
||||
|
||||
/*
|
||||
var phoneInput = document.getElementById('phonenumber');
|
||||
phoneInput.addEventListener('input', function (e) {
|
||||
var x = e.target.value.replace(/\D/g, '').match(/(\d{0,3})(\d{0,3})(\d{0,4})/);
|
||||
e.target.value = !x[2] ? x[1] : '' + x[1] + ' ' + x[2] + (x[3] ? ' ' + x[3] : '');
|
||||
});
|
||||
|
||||
var phoneLogin = document.getElementById('phonenumber-login');
|
||||
phoneLogin.addEventListener('input', function (e) {
|
||||
var x = e.target.value.replace(/\D/g, '').match(/(\d{0,3})(\d{0,3})(\d{0,4})/);
|
||||
e.target.value = !x[2] ? x[1] : '' + x[1] + ' ' + x[2] + (x[3] ? ' ' + x[3] : '');
|
||||
});
|
||||
*/
|
||||
let labId = "{{$labSettings->id}}";
|
||||
|
||||
$('#patient_live_search').select2({
|
||||
tags: true,
|
||||
ajax: {
|
||||
url: '{{url('shared/patient')}}/'+labId+'/search',
|
||||
dataType: 'json',
|
||||
delay: 250
|
||||
},
|
||||
placeholder: '',
|
||||
});
|
||||
|
||||
$('#phonenumber-login').select2({
|
||||
tags: true,
|
||||
ajax: {
|
||||
url: '{{url('shared/patient')}}/'+labId+'/search-by-phone',
|
||||
data: function (params) {
|
||||
if(params.term.length >=9) {
|
||||
var query = {
|
||||
term: params.term
|
||||
}
|
||||
}
|
||||
|
||||
// Query parameters will be ?search=[term]&type=public
|
||||
return query;
|
||||
},
|
||||
dataType: 'json',
|
||||
delay: 250
|
||||
},
|
||||
placeholder: '',
|
||||
});
|
||||
|
||||
|
||||
// 0 login, 1 register
|
||||
function toogleSection(sectionId = 0){
|
||||
if(sectionId == 0){
|
||||
/*$('#old-patient-section').removeClass("col-sm-6");
|
||||
$('#old-patient-section').removeClass("col-sm-5");
|
||||
$('#old-patient-section').addClass("col-sm-7");
|
||||
$('#new-patient-section').removeClass("col-sm-6");
|
||||
$('#new-patient-section').removeClass("col-sm-7");
|
||||
$('#new-patient-section').addClass("col-sm-5");*/
|
||||
$('#old-patient-section').css('background-color', 'aliceblue');
|
||||
$('#new-patient-section').css('background-color', 'white');
|
||||
}
|
||||
else{
|
||||
/*$('#old-patient-section').removeClass("col-sm-6");
|
||||
$('#old-patient-section').removeClass("col-sm-7");
|
||||
$('#old-patient-section').addClass("col-sm-5");
|
||||
$('#new-patient-section').removeClass("col-sm-6");
|
||||
$('#new-patient-section').removeClass("col-sm-5");
|
||||
$('#new-patient-section').addClass("col-sm-7");*/
|
||||
$('#old-patient-section').css('background-color', 'white');
|
||||
$('#new-patient-section').css('background-color', 'aliceblue');
|
||||
}
|
||||
}
|
||||
|
||||
$('#register-patient').on("keyup change", "#year", function (evt) {
|
||||
var years = $("#year").val() || 0;
|
||||
var months = 0;
|
||||
var days = 0;
|
||||
var dob = moment();
|
||||
dob.subtract(days, 'days');
|
||||
dob.subtract(months, 'months');
|
||||
dob.subtract(years, 'years');
|
||||
var dob_split = dob.toDate().toLocaleDateString().split("/")
|
||||
var dob = dob_split[1].padStart(2,"0")+'-'+dob_split[0].padStart(2,"0")+'-'+dob_split[2];
|
||||
$("#dob").val(dob);
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
</html>
|
||||
@@ -1,292 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<title>Customer Profile</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/vendors/typicons/typicons.css') }}">
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/vendors/mdi/css/materialdesignicons.min.css')}}">
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/vendors/css/vendor.bundle.base.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/css/vertical-layout-light/style.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/css/overwrite.css') }}">
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/vendors/select2/select2.min.css')}}">
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/alertifyjs/build/css/alertify.min.css')}}" type="text/css" />
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/sweetalert2/sweetalert2.min.css')}}" type="text/css" />
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/css/overwrite.select2.css')}}">
|
||||
|
||||
<style>
|
||||
body,h1,h2,h3,h4,h5,h6 {font-family: "Arial", sans-serif; font-size: 25px;}
|
||||
.py-2{
|
||||
padding: 5px 0;
|
||||
}
|
||||
.table tr td, .table tr th{
|
||||
padding: 5px;
|
||||
font-size: 25px !important;
|
||||
}
|
||||
.text-center{
|
||||
text-align: center;
|
||||
}
|
||||
.font-12{
|
||||
font-size: 15px !important;
|
||||
}
|
||||
.font-13{
|
||||
font-size: 20px !important;
|
||||
}
|
||||
.footer_fixed {
|
||||
padding-top: 7px !important;
|
||||
}
|
||||
.modal-content {
|
||||
border-top: 0px !important
|
||||
}
|
||||
.modal-content::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
display: block;
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
z-index: 1;
|
||||
}
|
||||
.font-weight-normal .form-check span{
|
||||
font-size: 15px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
<body class="w3-white w3-content" style="max-width:1600px">
|
||||
|
||||
<!-- !PAGE CONTENT! -->
|
||||
<div class="w3-main" style="margin-left:000px">
|
||||
|
||||
|
||||
<!-- Header -->
|
||||
<header id="portfolio">
|
||||
<br>
|
||||
<div class="w3-container" style="overflow: auto">
|
||||
<table cellpadding="0" cellspacing="0" style="min-width: 100%">
|
||||
<tr>
|
||||
<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) }}" />
|
||||
@else
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="0" style="min-width: 100%">
|
||||
<tr>
|
||||
<td style="vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 70px;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center" align="center">
|
||||
<p style="line-height: 13px !important; font-size: 11pt; font-weight: bold; color: #3b86d1;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 9pt; font-weight: bold; color: #3b86d1;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
<hr style="margin: 10px 0;">
|
||||
<h6 style="font-size:20px"><b>{{$patient->name_en}}</b></h6>
|
||||
<small style="color: #909090;">{{$patient->patient_uuid}} . {{\App\Helpers\Helpers::getAge($patient->dob, date('Y-m-d'))}} . {{\App\Helpers\Helpers::getGender($patient->gender)}}</small>
|
||||
<div class="w3-section w3-bottombar w3-padding-10" style="margin: 8px 0 !important;">
|
||||
<span class="w3-margin-right" style="font-size: 20px">ប្រវត្តិអ្នកជំងឺ:</span>
|
||||
<span style="float: right"><a style="text-decoration: none; color: #007bff; font-size: 20px;" href="{{url('customer/logout/'.md5($labSettings->id))}}">ចាកចេញ</a></span>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- First Photo Grid-->
|
||||
|
||||
<div class=" w3-container w3-margin-bottom" style="overflow-x: auto; margin-bottom: 20px">
|
||||
<button data-toggle="modal" data-target="#modal-assign-test" data-backdrop="static" id="btn-new-test" style="font-size:20px" class="btn btn-sm btn-success my-2"><i class="mdi mdi-plus"></i> សំណើថ្មី</button>
|
||||
<table class="table table-bordered table-striped" cellspacing="0" cellpadding="0" width="100%" border="1" id="department_dt" style="border-collapse: collapse">
|
||||
<thead>
|
||||
<tr class="" style="background: #dbebf5 !important;">
|
||||
<th class="py-2 text-center" width="30px">{{__('ល.រ')}}</th>
|
||||
<th class="py-2" width="120px">{{__('លេខកូដសំណាក')}}</th>
|
||||
<th class="py-2 text-center" width="70px">{{__('ស្ថានភាព')}}</th>
|
||||
<th class="py-2 text-center" width="70px"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($samples as $k=>$sample)
|
||||
<tr>
|
||||
<td class="py-1 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">{{$sample->sample_number}}</td>
|
||||
<td class="py-1 text-center">{{ $sample->progress}}</td>
|
||||
<td class="py-1 text-center" style="font-size: 14px">
|
||||
<a href="{{url('customer/result/'.md5($sample->lab_id).'/'.md5($sample->id))}}" class="btn btn-sm btn-info mr-1 pt-1 rounded" ><i class="mdi mdi-printer"></i></a> |
|
||||
<a href="javascript:void(0)" onclick="cloneLabRequest('{{url('customer/clone/'.md5($sample->lab_id).'/'.md5($sample->id))}}')" class="btn btn-sm btn-inverse-warning ml-1 pt-1 rounded" >
|
||||
<i class="mdi mdi-content-copy"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="float-right mt-3">
|
||||
{!! $samples->links('pagination.custom') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- End modal content -->
|
||||
<div class="modal slide modal-primary" id="modal-assign-test">
|
||||
<div class="modal-dialog modal-xxl">
|
||||
<div class="modal-content vh-100__" style="height:calc(100vh - 80px)">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title"> ជ្រើសរើសសេវាមន្ទីរពិសោធន៍ </h6>
|
||||
|
||||
<div class="col-sm-5 p-0 float-right">
|
||||
<div class="row">
|
||||
<div class="col-sm-3" style="font-size:19px;">
|
||||
គ្រូពេទ្យ/Physician
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control select2" id="physician_id" style="width:350px !important;">
|
||||
@foreach($physicians as $physician)
|
||||
<option {{$physician->is_default==1? 'selected':''}} value="{{$physician->id}}">{{$physician->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<button type="button" style="margin-left: 20px !important;" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body bg-white" style="/*min-height: 650px*/">
|
||||
<div class="row">
|
||||
<div class="col-sm-10" id="test-group-slot">
|
||||
@foreach($testGroups as $group)
|
||||
<div class="btn-group mr-2" id="tsg-{{$group->id}}" role="group">
|
||||
<button onclick="useTemplate({{$group->id}})" class="btn btn-sm btn-info rounded-0" type="button"><i class="mdi mdi-checkbox-marked-outline"></i> {{$group->group_name}}</button>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
<form id="form-assign-test" class="mb-5">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="sample_id" id="sample-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
<div class="row" id="test-item-list"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="row footer_fixed">
|
||||
<div class="col-sm-12 " >
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-sm-12 border-bottom font-13 py-0">
|
||||
<span class="pl-5">{{__('ចំនួនតេស្តស្នើសុំ')}} : <b id="total-test">0</b></span>
|
||||
<span class="pl-5">{{__('ចំនួនទឹកប្រាក់')}} : <b id="total-test-payment">$ 0.00</b></span>
|
||||
<span class="pl-5">{{__('អត្រាប្តូរប្រាក់')}} : <b id="exchange_rate">{{$labSettings->exchange_rate}}</b></span>
|
||||
</div>
|
||||
<div class="col-lg-6 col-sm-12 text-right pt-2" style="padding-right: 5rem !important">
|
||||
<button type="button" class="btn btn-md btn-info mr-2 btnAssignTest" style="font-size: 20px;" id="save-assign-test" value="save_test_only"><i class="fa fa-floppy-o"></i> <span class="save">{{__('រក្សាទុក')}}</span></button>
|
||||
<button type="button" class="btn btn-md btn-light ml-2" style="font-size: 20px;" data-dismiss='modal'>{{__('បោះបង់')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End modal content -->
|
||||
|
||||
<div class="w3-light-gray w3-center" style="font-size: 13px; position: fixed; bottom: 0; width: 100%; padding: 10px 0;">{{$labSettings->name_kh}}</div>
|
||||
|
||||
<!-- End page content -->
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
let choose_option ='ជ្រើសរើស';
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/vendors/js/vendor.bundle.base.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/alertifyjs/build/alertify.min.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/sweetalert2/sweetalert2.min.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/global_funs.js')}}"></script>
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/vendors/select2/select2.min.js')}}"></script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/select2.js')}}"></script>
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/anonymous_assign_test.js?time='.time())}}"></script>
|
||||
|
||||
<script>
|
||||
|
||||
var is_request_test = "{{isset($_GET['request-test'])? true : false}}";
|
||||
if(is_request_test){
|
||||
setTimeout(function() {
|
||||
$('#btn-new-test').trigger('click');
|
||||
}, 1500);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
var get_test_base_url = "{{url('lab-test')}}";
|
||||
let request_sample_base_url = "{{url('lab-request')}}";
|
||||
let sample_id = 0;
|
||||
|
||||
function cloneLabRequest(url){
|
||||
var success = false
|
||||
Swal.fire({
|
||||
text: 'តើអ្នកពិតជាចង់ស្នើសេវានេះម្តងទៀតមែនឬទេ?',
|
||||
icon: 'question',
|
||||
showCancelButton: true,
|
||||
cancelButtonClass:'danger btn-sm',
|
||||
confirmButtonText: 'បាទ/ចាស',
|
||||
confirmButtonClass: 'btn-sm',
|
||||
cancelButtonText: 'ទេ'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
$.ajax({
|
||||
url: url,
|
||||
method:'get',
|
||||
dataType:"JSON",
|
||||
success:function(response){
|
||||
handleMessage(response.success, response.message)
|
||||
setTimeout(function () {location.reload()}, '3000')
|
||||
success = true
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
return success
|
||||
}
|
||||
|
||||
function useTemplate(group_id){
|
||||
$.ajax({
|
||||
url: get_test_base_url + '/test-group/get/'+group_id+'/{{$labSettings->id}}',
|
||||
method:'get',
|
||||
dataType:'json',
|
||||
success:function(r)
|
||||
{
|
||||
if(r.success){
|
||||
$(".sample-type-wrapper input:checkbox").prop('checked', false);
|
||||
const templateItems = r.data
|
||||
var checkboxes = document.getElementsByClassName('sample-test');
|
||||
for (var i = 0; i < checkboxes.length; i++) {
|
||||
if(templateItems.includes(parseInt(checkboxes[i].getAttribute('value')))){
|
||||
//if(templateItems.includes(checkboxes[i].getAttribute('value'))){
|
||||
let sugg_id = checkboxes[i].getAttribute('value');
|
||||
$('.st-'+sugg_id).click();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
||||
@@ -1,91 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<title>Customer Register</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/vendors/typicons/typicons.css') }}">
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/vendors/mdi/css/materialdesignicons.min.css')}}">
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/vendors/css/vendor.bundle.base.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/css/vertical-layout-light/style.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/css/overwrite.css') }}">
|
||||
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/alertifyjs/build/css/alertify.min.css')}}" type="text/css" />
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/sweetalert2/sweetalert2.min.css')}}" type="text/css" />
|
||||
|
||||
<style>
|
||||
body,h1,h2,h3,h4,h5,h6 {font-family: "Arial", sans-serif}
|
||||
.py-2{
|
||||
padding: 5px 0;
|
||||
}
|
||||
.table tr td, .table tr th{
|
||||
padding: 5px;
|
||||
font-size: 13px;
|
||||
}
|
||||
.text-center{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
<body class="w3-white w3-content" style="max-width:1600px">
|
||||
|
||||
<!-- !PAGE CONTENT! -->
|
||||
<div class="w3-main" style="margin-left:000px">
|
||||
|
||||
<!-- Header -->
|
||||
<header id="portfolio">
|
||||
<br>
|
||||
<div class="w3-container" style="overflow: auto">
|
||||
<table cellpadding="0" cellspacing="0" style="min-width: 100%">
|
||||
<tr>
|
||||
<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) }}" />
|
||||
@else
|
||||
<table width="100%" cellpadding="0" cellspacing="0" style="min-width: 100%">
|
||||
<tr>
|
||||
<td style="vertical-align: top;" class="text-center">
|
||||
<img src="{{url(env("APP_URL").'storage/images/avatars/labs/'.$labSettings->logo)}}" alt="Logo" style="width: 70px;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center" align="center">
|
||||
<p style="line-height: 13px !important; font-size: 11pt; font-weight: bold; color: #3b86d1;" class="KhmerMoulLight py-1">{{$labSettings->name_kh}}</p>
|
||||
<p style="line-height: 13px !important; font-size: 9pt; font-weight: bold; color: #3b86d1;" class="text-uppercase py-1">{{$labSettings->name_en}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
<hr style="margin: 10px 0;">
|
||||
<br>
|
||||
<h6 style="font-size: 18px"><b>ចុះឈ្មោះថ្មី</b></h6>
|
||||
<br>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- First Photo Grid-->
|
||||
|
||||
<div class=" w3-container w3-margin-bottom" style="overflow-x: auto; margin-bottom: 20px">
|
||||
<form enctype="multipart/form-data" action="{{url('customer/login/'.request()->route()->parameter('hashLabId'))}}" method="post">
|
||||
@csrf
|
||||
<label style="font-size: 16px">សូមបញ្ចូលលេខទូរស័ព្ទរបស់អ្នក-Input your phone number:</label><br>
|
||||
<input autocomplete="off" placeholder="{{session()->has('message')? 'មិនមានលេខនេះនៅក្នុងប្រព័ន្ធយើងខ្ញុំទេ':''}}" type="text" name="patient_uuid" style="height: 50px;font-size:20px; width: 100%; border-radius: 0px; border: 1px solid #b1b1b1; outline: none; {{session()->has('message')? ' border:1px solid red; ':''}}" class="form-control rounded" />
|
||||
<button class="btn btn-sm btn-success w-100" type="submit" style="width: 150px; height: 36px; float: right; margin: 10px 0; outline: none; border: none; font-size: 16px">ចូលប្រើប្រាស់</button>
|
||||
<button class="btn btn-sm btn-info w-100" style="width: 150px; height: 36px; float: right; margin: 10px 0; outline: none; border: none; font-size: 16px">ចុះឈ្មោះថ្មី</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="w3-light-gray w3-center" style="font-size: 13px; position: fixed; bottom: 0; width: 100%; padding: 10px 0;">{{$labSettings->name_kh}}</div>
|
||||
|
||||
<!-- End page content -->
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,550 +0,0 @@
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/vendors/mdi/css/materialdesignicons.min.css')}}">
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/vendors/css/vendor.bundle.base.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(env("APP_URL").'storage/assets/css/vertical-layout-light/style.css') }}">
|
||||
|
||||
<div class=" A4-portrait">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<a href="{{url('customer/'.md5($labSettings->id))}}" class="btn btn-light btn-sm my-2 ml-2"> <i class="mdi mdi-chevron-left"></i> ត្រលប់ក្រោយ</a>
|
||||
</div>
|
||||
</div>
|
||||
<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/lightgallery.css')}}" >
|
||||
<style>
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
}
|
||||
|
||||
.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: 100%;
|
||||
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;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<input type="hidden" name="verify" id="verify" value="">
|
||||
<input type="hidden" name="patient_sample_id" id="patient_sample_id" value="4353911">
|
||||
|
||||
<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" > </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>
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:17px !important; padding-top:7px; line-height:25px; color: #0000ff; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; padding-top:7px; line-height:25px;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; padding-top:7px; font-size:17px !important; line-height:25px; color: #0000ff; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="font-size:17px !important; padding-top:7px; line-height:25px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:17px !important; line-height:25px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; line-height:25px;" 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>
|
||||
<td width="25%" style="padding-left:0.7cm; font-size:17px !important; line-height:25px; color: #0000ff; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="font-size:17px !important; line-height:25px;" 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:7px; line-height:25px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; padding-bottom:7px; line-height:25px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; padding-bottom:7px; font-size:17px !important; line-height:25px; color: #0000ff; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="25%" style="font-size:17px !important; padding-bottom:7px; line-height:25px;" align="left">: {{@$samplePhysician->name_en}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<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;"> <br><td colspan="3"></td></tr>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm">
|
||||
{{__('sample.last_test_date')}} : </td>
|
||||
<td style="width: 7cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 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>
|
||||
<br>
|
||||
@if(!empty($labSettings->verify_label))
|
||||
<img id="signature-preview" style="width: 120px !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(Auth::user()->signature))
|
||||
<img id="signature-preview" style="width: 120px !important;" src="{{url(env("APP_URL").'storage/images/signature/'.Auth::user()->signature)}}">
|
||||
@else
|
||||
<br>
|
||||
@endif
|
||||
<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
{{-- <tr>--}}
|
||||
{{-- <td colspan="3" style="text-align:center; color: #0000ff; border-top:1px solid #000 !important; padding-top:6px;">--}}
|
||||
{{-- <p style="line-height: 10px !important;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </p>--}}
|
||||
{{-- <p style="line-height: 10px !important;">{{$labSettings->phone_number}} {{$labSettings->email}}</p>--}}
|
||||
{{-- </td>--}}
|
||||
{{-- </tr>--}}
|
||||
</tbody></table>
|
||||
</page>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.common_script')
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
var patient_base_url = "{{url('patient')}}";
|
||||
|
||||
|
||||
var get_refs_base_url = "{{url('shared')}}";
|
||||
var sample_base_url = "{{url('sample')}}"
|
||||
var is_auto_generate_sample_number = 0;
|
||||
let sample_id = {{$sample->id}};
|
||||
let invoice_id = "{{($sample->invoice) ? $sample->invoice->id : 0}}";
|
||||
let invoice_code = "{{($sample->invoice) ? $sample->invoice->invoice_code : 0}}";
|
||||
|
||||
let testSamples = [];
|
||||
|
||||
let antibiotic_results = []
|
||||
|
||||
|
||||
|
||||
//$('#print_preview_modal').on('show.bs.modal', function (event) {
|
||||
$.ajax({
|
||||
url: get_refs_base_url + '/test-items/' + sample_id,
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
if(response.success){
|
||||
$('#sample-result-print').empty()
|
||||
let res = response.data
|
||||
antibiotic_results = res.antibiotic_results
|
||||
for (var i in res.sample_tests){
|
||||
let heading = {"sample": res.sample, "department": res.sample_tests[i].department_name}
|
||||
let samples_list = res.sample_tests[i].samples;
|
||||
for(var j in samples_list){
|
||||
renderPrintTestItemDepartmentRow(samples_list[j], heading,'sample-result-print')
|
||||
var tests = samples_list[j].tests
|
||||
var sampleTest = list_to_tree(tests)
|
||||
sampleTest.map(parent => {
|
||||
renderPrintTestItemRow(parent, '0' ,'test-dep-'+samples_list[j].sample_type_id,' sample-result-print')
|
||||
if(parent.children.length){
|
||||
var children = parent.children
|
||||
children.map(function (child) {
|
||||
renderPrintTestItemRow(child, '1' ,'test-dep-'+samples_list[j].sample_type_id,' sample-result-print')
|
||||
if(child.children.length){
|
||||
var grandchildren = child.children
|
||||
grandchildren.map(function (grandchild) {
|
||||
renderPrintTestItemRow(grandchild, '1' ,'test-dep-'+samples_list[j].sample_type_id,' sample-result-print')
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
} else{
|
||||
antibiotic_results = []
|
||||
}
|
||||
}
|
||||
});
|
||||
//})
|
||||
|
||||
function manipulateTableHeading(department, sample_type, sample_number, requester, collected_date, received_date, sample_tests) {
|
||||
let tableData = '<table width="100%" border="0" class="_department-sample-info"><thead>\n' +
|
||||
' <tr style="background: #eee;">' +
|
||||
' <td colspan="5" style="text-align: center; font-weight: bold; color: #0000ff !important;">'+sample_type+'</td>' +
|
||||
' </tr>\n' +
|
||||
'<tr>\n' +
|
||||
' <th class="sourceserifpro-bold" style="width: 52% !important; color: #0000ff;"><div style="width:380px !important; float:left; height:10px; "> </div></th>\n' +
|
||||
' <th class="sourceserifpro-bold" style="width: 15%; color: #0000ff;">Result</th>\n' +
|
||||
' <th class="sourceserifpro-bold" style="width: 5%; color: #0000ff;"></th>\n' +
|
||||
' <th class="sourceserifpro-bold" style="width: 10%; color: #0000ff;">Units</th>\n' +
|
||||
' <th class="sourceserifpro-bold" style="width: 18%; color: #0000ff; text-align: center">Reference Range</th>\n' +
|
||||
' </tr></thead>\n' +
|
||||
' <tbody id="test-dep-'+sample_tests.sample_type_id+'"></tbody>'+
|
||||
' </thead>' +
|
||||
' </table>'
|
||||
return tableData;
|
||||
}
|
||||
|
||||
function manipulateSubHeading(setSelectorId) {
|
||||
let subTableHeading = '<table width="100%" border="0" class="_test-result">\n' +
|
||||
' <thead><tr>\n' +
|
||||
' <th class="sourceserifpro-bold" style="/*width: 361px !important;*/ color: #0000ff;"></th>\n' +
|
||||
' <th class="sourceserifpro-bold" style="width: 2cm; color: #0000ff;">Result</th>\n' +
|
||||
' <th class="sourceserifpro-bold" style="width: 0.5cm; color: #0000ff;"></th>\n' +
|
||||
' <th class="sourceserifpro-bold" style="width: 1.5cm; color: #0000ff;">Units</th>\n' +
|
||||
' <th class="sourceserifpro-bold" style="width: 3.5cm; color: #0000ff; text-align: center">Reference Range</th>\n' +
|
||||
' </tr>\n' +
|
||||
' <tbody id='+setSelectorId+'></tbody>'+
|
||||
' </thead>' +
|
||||
'</table>'
|
||||
return subTableHeading
|
||||
}
|
||||
|
||||
function renderPrintTestItemDepartmentRow(sample_tests, department_heading, wrapperId)
|
||||
{
|
||||
let tableData = manipulateTableHeading(department_heading.department, sample_tests.sample_type_name, department_heading.sample.sample_number, (department_heading.sample.requested_by ? department_heading.sample.requested_by.name_en : ''), department_heading.sample.collected_date, department_heading.sample.received_date, sample_tests)
|
||||
var tr = document.createElement('TR');
|
||||
tr.setAttribute('class', 'sample-type');
|
||||
tr.insertCell(0).innerHTML = tableData;
|
||||
$('#'+wrapperId).append(tr);
|
||||
//var subtr = document.createElement('TR');
|
||||
//subtr.insertCell(0).innerHTML = manipulateSubHeading('test-dep-'+sample_tests.sample_type_id);
|
||||
//$('#'+wrapperId).append(subtr);
|
||||
}
|
||||
|
||||
function renderPrintTestItemRow(sample_tests, level, closet_parent_id)
|
||||
{
|
||||
if(sample_tests.is_show == 1) {
|
||||
|
||||
let IsAbnormal = computeRefRange(sample_tests);
|
||||
let tr = document.createElement('TR');
|
||||
tr.setAttribute('valign', 'top')
|
||||
tr.insertCell(0).innerHTML = '' + (sample_tests.field_type == 0 ? '<b class="sourceserifpro-bold">' + sample_tests.test_name + '</b>' : '<p class="value-pair"><span style="font-size:13pt !important;" class="name">' + sample_tests.test_name + '</span></p>') + ''; // + (sample_tests.description!="" ? '<p class="pl-4 pt-2">'+sample_tests.description+'</p>' : '');
|
||||
//tr.cells[0].classList.add('tname')
|
||||
if(["2","3"].includes(sample_tests.field_type)){
|
||||
tr.insertCell(1).innerHTML = (sample_tests.field_type == 0 ? '' : ': ') + manipulatePrintOrganismResult(sample_tests) // (sample_tests.field_type!=0 ? (sample_tests.test_result.length<1 ? 'Pending' : sample_tests.test_result) : '');
|
||||
tr.cells[1].colSpan=4
|
||||
}else{
|
||||
tr.insertCell(1).innerHTML = '<span class="name" style="font-family: \'Times New Roman\', Times, serif;">'+ (sample_tests.field_type == 0 ? '' : ': ') + manipulatePrintOrganismResult(sample_tests) +'</span>'; // (sample_tests.field_type!=0 ? (sample_tests.test_result.length<1 ? 'Pending' : sample_tests.test_result) : '');
|
||||
tr.insertCell(2).innerHTML = (IsAbnormal !="" ? '<b style="margin-right: 20px">'+IsAbnormal+'</b>' : '');
|
||||
tr.insertCell(3).innerHTML = sample_tests.unit_sign;
|
||||
tr.insertCell(4).innerHTML = '<span class="name" style="font-family: \'Times New Roman\', Times, serif;">'+ sample_tests.ref_range +'</span>';
|
||||
tr.cells[4].style.textAlign = 'center'
|
||||
}
|
||||
|
||||
tr.cells[0].style.paddingLeft = (5 * level * 5) + 'px'
|
||||
tr.cells[0].style.width="380px";
|
||||
|
||||
if(IsAbnormal!=''){
|
||||
tr.cells[1].style.fontWeight = 'bold'
|
||||
}
|
||||
if (sample_tests.field_type == 0) {
|
||||
tr.cells[0].classList.add('pl-' + (level * 2))
|
||||
}
|
||||
$('#' + closet_parent_id).append(tr);
|
||||
if(sample_tests.description!=""){
|
||||
renderPrintTestItemDescriptionRow(sample_tests, level, closet_parent_id);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function renderPrintTestItemDescriptionRow(sample_tests, level, closet_parent_id)
|
||||
{
|
||||
if(sample_tests.is_show == 1) {
|
||||
|
||||
let tr = document.createElement('TR');
|
||||
tr.setAttribute('valign', 'top');
|
||||
tr.insertCell(0).innerHTML = (sample_tests.description!=="" ? '<p class="pl-4 pt-2">'+sample_tests.description+'</p>' : '');
|
||||
tr.cells[0].style.paddingLeft = (5 * level * 5) + 'px'
|
||||
tr.cells[0].colSpan=5
|
||||
if (sample_tests.field_type == 0) {
|
||||
tr.cells[0].classList.add('pl-' + (level * 2))
|
||||
}
|
||||
$('#' + closet_parent_id).append(tr);
|
||||
}
|
||||
}
|
||||
|
||||
function computeRefRange(sample_tests) {
|
||||
if(sample_tests.min_ref_val=='' || sample_tests.max_ref_val=='' || sample_tests.test_result=='' || sample_tests.ref_range == '') return ''
|
||||
else if([">",">=","<","<=","-", "Neg <"].includes(sample_tests.sign)){
|
||||
if(parseFloat(sample_tests.test_result) > parseFloat(sample_tests.max_ref_val)) return 'H';
|
||||
if(parseFloat(sample_tests.test_result) < parseFloat(sample_tests.min_ref_val)) return 'L';
|
||||
else return ''
|
||||
} else return ''
|
||||
}
|
||||
|
||||
|
||||
function manipulatePrintOrganismResult(sample_tests) {
|
||||
|
||||
if(sample_tests.field_type == 0){
|
||||
return ''
|
||||
} else if(["2","3"].includes(sample_tests.field_type)){
|
||||
return (sample_tests.org_results.length<1 ? 'Pending' : sample_tests.org_results.map(function (value) {
|
||||
let anti_text =''
|
||||
antibiotic_results.map(function (anti) {
|
||||
if(anti.organism_id == value.organism_id && anti.test_organism_id == value.test_organism_id){
|
||||
anti_text+= '<p class="value-pair" style="width: 90% !important; position: relative;"><span class="name" style="padding-left: 10px; '+(anti.sensitive=='S' ? 'font-weight:bold':'')+'"> - '+anti.name_en+'</span> <span class="name" style="float: right; '+(anti.sensitive=='S' ? 'font-weight:bold':'')+'">'+anti.sensitive+'</span></p>';
|
||||
}
|
||||
});
|
||||
return ((value.is_bold==1) ? '<b>'+ value.organism_name+'</b>' : value.organism_name) +' '+ (value.quantity_name !=null ? value.quantity_name : '') + anti_text;
|
||||
}).join(' '))
|
||||
} else if(sample_tests.field_type == 1){
|
||||
return (sample_tests.test_result.length<1 ? 'Pending' : sample_tests.test_result)
|
||||
}
|
||||
else{
|
||||
return (sample_tests.test_result.length<1 ? 'Pending' : sample_tests.test_result)
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
|
||||
|
||||
@include('modal.preview_result_forms.preview_result_'. $preview_result_id)
|
||||
|
||||
|
||||
@include('layout.common_script')
|
||||
|
||||
<script src="https://labonak.com/labonak/public/storage/assets/js/admin/preview_result_forms/preview_result_{{$preview_result_id}}.js?time={{time()}}"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
var patient_base_url = "{{url('patient')}}";
|
||||
|
||||
var get_refs_base_url = "{{url('shared')}}";
|
||||
var sample_base_url = "{{url('sample')}}"
|
||||
var is_auto_generate_sample_number = 0;
|
||||
let sample_id = {{\Route::current()->parameter('id')}};
|
||||
let invoice_id = "{{($sample->invoice) ? $sample->invoice->id : 0}}";
|
||||
let invoice_code = "{{($sample->invoice) ? $sample->invoice->invoice_code : 0}}";
|
||||
|
||||
let first_prev_sample_id = {{$firstPrvSampleId}};
|
||||
let previous_sample_date = "{{$firstPrvSampleDate}}";
|
||||
|
||||
let testSamples = [];
|
||||
|
||||
$.ajax({
|
||||
url: get_refs_base_url + '/test-items/' + sample_id +'/'+first_prev_sample_id,
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
if(response.success){
|
||||
$('#sample-result-print').empty()
|
||||
let res = response.data
|
||||
antibiotic_results = res.antibiotic_results
|
||||
for (var i in res.sample_tests){
|
||||
let heading = {"sample": res.sample, "department": res.sample_tests[i].department_name}
|
||||
let samples_list = res.sample_tests[i].samples;
|
||||
for(var j in samples_list){
|
||||
renderPrintTestItemDepartmentRow(samples_list[j], heading,'sample-result-print')
|
||||
var tests = samples_list[j].tests
|
||||
var sampleTest = list_to_tree(tests)
|
||||
sampleTest.map(parent => {
|
||||
renderPrintTestItemRow(parent, '0' ,'test-dep-'+samples_list[j].sample_type_id,' sample-result-print')
|
||||
if(parent.children.length){
|
||||
var children = parent.children
|
||||
children.map(function (child) {
|
||||
renderPrintTestItemRow(child, '1' ,'test-dep-'+samples_list[j].sample_type_id,' sample-result-print')
|
||||
if(child.children.length){
|
||||
var grandchildren = child.children
|
||||
grandchildren.map(function (grandchild) {
|
||||
renderPrintTestItemRow(grandchild, '1' ,'test-dep-'+samples_list[j].sample_type_id,' sample-result-print')
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
} else{
|
||||
antibiotic_results = []
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,555 +0,0 @@
|
||||
|
||||
<div class=" 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/lightgallery.css')}}" >
|
||||
<style>
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: 'KhmerOS_muollight';
|
||||
|
||||
src: url('{{url(env("APP_URL").'storage/assets/fonts/KhmerOS_muollight.ttf')}}');
|
||||
}
|
||||
|
||||
.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: 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;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<input type="hidden" name="verify" id="verify" value="">
|
||||
<input type="hidden" name="patient_sample_id" id="patient_sample_id" value="4353911">
|
||||
|
||||
<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" > </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>
|
||||
<table width="100%" border="0" class="patient-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:17px !important; padding-top:7px; line-height:25px; color: #0000ff; font-weight:bold;">{{__('sample.table_patient_name')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; padding-top:7px; line-height:25px;" align="left">: {{$sample->patient->name_en}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; padding-top:7px; font-size:17px !important; line-height:25px; color: #0000ff; font-weight:bold;">{{__('sample.form_sample_number')}}</td>
|
||||
<td width="25%" style="font-size:17px !important; padding-top:7px; line-height:25px;" align="left">: {{$sample->sample_number}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" style="font-size:17px !important; line-height:25px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_age')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; line-height:25px;" 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>
|
||||
<td width="25%" style="padding-left:0.7cm; font-size:17px !important; line-height:25px; color: #0000ff; font-weight:bold;">{{__('sample.requested_date')}}</td>
|
||||
<td width="25%" style="font-size:17px !important; line-height:25px;" 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:7px; line-height:25px; color: #0000ff; font-weight:bold;">{{__('sample.form_patient_address')}}</td>
|
||||
<td width="30%" style="font-size:17px !important; padding-bottom:7px; line-height:25px;" align="left">: {{\App\Helpers\Helpers::getPatientAddress($sample->patient)}}</td>
|
||||
<td width="25%" style="padding-left:0.7cm; padding-bottom:7px; font-size:17px !important; line-height:25px; color: #0000ff; font-weight:bold;">{{__('sample.physician_name')}}</td>
|
||||
<td width="25%" style="font-size:17px !important; padding-bottom:7px; line-height:25px;" align="left">: {{$samplePhysician->name_en}}</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;"> </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;"> <br><td colspan="3"></td></tr>
|
||||
<tr>
|
||||
<td class="text-center text-no-wrap" style="width: 7cm">
|
||||
{{__('sample.last_test_date')}} : </td>
|
||||
<td style="width: 7cm"></td>
|
||||
<td class="text-center text-no-wrap" style="width: 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>
|
||||
<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>
|
||||
@endif
|
||||
<p style="text-transform: capitalize;">{{$labSettings->technician_label}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="text-align:center; color: #0000ff; border-top:1px solid #000 !important; padding-top:6px;">
|
||||
<p style="line-height: 10px !important;">{{ app()->getLocale()=='kh' ? $labSettings->address_kh : $labSettings->address_en}} </p>
|
||||
<p style="line-height: 10px !important;">{{$labSettings->phone_number}} {{$labSettings->email}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</page>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.common_script')
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
var patient_base_url = "{{url('patient')}}";
|
||||
|
||||
|
||||
var get_refs_base_url = "{{url('shared')}}";
|
||||
var sample_base_url = "{{url('sample')}}"
|
||||
var is_auto_generate_sample_number = 0;
|
||||
let sample_id = {{\Route::current()->parameter('id')}};
|
||||
let invoice_id = "{{($sample->invoice) ? $sample->invoice->id : 0}}";
|
||||
let invoice_code = "{{($sample->invoice) ? $sample->invoice->invoice_code : 0}}";
|
||||
|
||||
let testSamples = [];
|
||||
|
||||
let antibiotic_results = []
|
||||
|
||||
|
||||
|
||||
//$('#print_preview_modal').on('show.bs.modal', function (event) {
|
||||
$.ajax({
|
||||
url: get_refs_base_url + '/test-items/' + sample_id,
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
if(response.success){
|
||||
$('#sample-result-print').empty()
|
||||
let res = response.data
|
||||
antibiotic_results = res.antibiotic_results
|
||||
for (var i in res.sample_tests){
|
||||
let heading = {"sample": res.sample, "department": res.sample_tests[i].department_name}
|
||||
let samples_list = res.sample_tests[i].samples;
|
||||
for(var j in samples_list){
|
||||
renderPrintTestItemDepartmentRow(samples_list[j], heading,'sample-result-print')
|
||||
var tests = samples_list[j].tests
|
||||
var sampleTest = list_to_tree(tests)
|
||||
sampleTest.map(parent => {
|
||||
renderPrintTestItemRow(parent, '0' ,'test-dep-'+samples_list[j].sample_type_id,' sample-result-print')
|
||||
if(parent.children.length){
|
||||
var children = parent.children
|
||||
children.map(function (child) {
|
||||
renderPrintTestItemRow(child, '1' ,'test-dep-'+samples_list[j].sample_type_id,' sample-result-print')
|
||||
if(child.children.length){
|
||||
var grandchildren = child.children
|
||||
grandchildren.map(function (grandchild) {
|
||||
renderPrintTestItemRow(grandchild, '1' ,'test-dep-'+samples_list[j].sample_type_id,' sample-result-print')
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
} else{
|
||||
antibiotic_results = []
|
||||
}
|
||||
}
|
||||
});
|
||||
//})
|
||||
|
||||
function manipulateTableHeading(department, sample_type, sample_number, requester, collected_date, received_date, sample_tests) {
|
||||
let tableData = '<table width="100%" border="0" class="_department-sample-info"><thead>\n' +
|
||||
' <tr style="background: #eee;">' +
|
||||
' <td colspan="5" style="text-align: center; font-weight: bold; color: #0000ff !important;">'+sample_type+'</td>' +
|
||||
' </tr>\n' +
|
||||
'<tr>\n' +
|
||||
' <th class="sourceserifpro-bold" style="width: 52% !important; color: #0000ff;"><div style="width:380px !important; float:left; height:10px; "> </div></th>\n' +
|
||||
' <th class="sourceserifpro-bold" style="width: 15%; color: #0000ff;">Result</th>\n' +
|
||||
' <th class="sourceserifpro-bold" style="width: 5%; color: #0000ff;"></th>\n' +
|
||||
' <th class="sourceserifpro-bold" style="width: 10%; color: #0000ff;">Units</th>\n' +
|
||||
' <th class="sourceserifpro-bold" style="width: 18%; color: #0000ff; text-align: center">Reference Range</th>\n' +
|
||||
' </tr></thead>\n' +
|
||||
' <tbody id="test-dep-'+sample_tests.sample_type_id+'"></tbody>'+
|
||||
' </thead>' +
|
||||
' </table>'
|
||||
return tableData;
|
||||
}
|
||||
|
||||
function manipulateSubHeading(setSelectorId) {
|
||||
let subTableHeading = '<table width="100%" border="0" class="_test-result">\n' +
|
||||
' <thead><tr>\n' +
|
||||
' <th class="sourceserifpro-bold" style="/*width: 361px !important;*/ color: #0000ff;"></th>\n' +
|
||||
' <th class="sourceserifpro-bold" style="width: 2cm; color: #0000ff;">Result</th>\n' +
|
||||
' <th class="sourceserifpro-bold" style="width: 0.5cm; color: #0000ff;"></th>\n' +
|
||||
' <th class="sourceserifpro-bold" style="width: 1.5cm; color: #0000ff;">Units</th>\n' +
|
||||
' <th class="sourceserifpro-bold" style="width: 3.5cm; color: #0000ff; text-align: center">Reference Range</th>\n' +
|
||||
' </tr>\n' +
|
||||
' <tbody id='+setSelectorId+'></tbody>'+
|
||||
' </thead>' +
|
||||
'</table>'
|
||||
return subTableHeading
|
||||
}
|
||||
|
||||
function renderPrintTestItemDepartmentRow(sample_tests, department_heading, wrapperId)
|
||||
{
|
||||
let tableData = manipulateTableHeading(department_heading.department, sample_tests.sample_type_name, department_heading.sample.sample_number, department_heading.sample.requested_by.name_en, department_heading.sample.collected_date, department_heading.sample.received_date, sample_tests)
|
||||
var tr = document.createElement('TR');
|
||||
tr.setAttribute('class', 'sample-type');
|
||||
tr.insertCell(0).innerHTML = tableData;
|
||||
$('#'+wrapperId).append(tr);
|
||||
//var subtr = document.createElement('TR');
|
||||
//subtr.insertCell(0).innerHTML = manipulateSubHeading('test-dep-'+sample_tests.sample_type_id);
|
||||
//$('#'+wrapperId).append(subtr);
|
||||
}
|
||||
|
||||
function renderPrintTestItemRow(sample_tests, level, closet_parent_id)
|
||||
{
|
||||
if(sample_tests.is_show == 1) {
|
||||
|
||||
let IsAbnormal = computeRefRange(sample_tests);
|
||||
let tr = document.createElement('TR');
|
||||
tr.setAttribute('valign', 'top')
|
||||
tr.insertCell(0).innerHTML = '' + (sample_tests.field_type == 0 ? '<b class="sourceserifpro-bold">' + sample_tests.test_name + '</b>' : '<p class="value-pair"><span style="font-size:13pt !important;" class="name">' + sample_tests.test_name + '</span></p>') + ''; // + (sample_tests.description!="" ? '<p class="pl-4 pt-2">'+sample_tests.description+'</p>' : '');
|
||||
//tr.cells[0].classList.add('tname')
|
||||
if(["2","3"].includes(sample_tests.field_type)){
|
||||
tr.insertCell(1).innerHTML = (sample_tests.field_type == 0 ? '' : ': ') + manipulatePrintOrganismResult(sample_tests) // (sample_tests.field_type!=0 ? (sample_tests.test_result.length<1 ? 'Pending' : sample_tests.test_result) : '');
|
||||
tr.cells[1].colSpan=4
|
||||
}else{
|
||||
tr.insertCell(1).innerHTML = '<span class="name" style="font-family: \'Times New Roman\', Times, serif;">'+ (sample_tests.field_type == 0 ? '' : ': ') + manipulatePrintOrganismResult(sample_tests) +'</span>'; // (sample_tests.field_type!=0 ? (sample_tests.test_result.length<1 ? 'Pending' : sample_tests.test_result) : '');
|
||||
tr.insertCell(2).innerHTML = (IsAbnormal !="" ? '<b style="margin-right: 20px">'+IsAbnormal+'</b>' : '');
|
||||
tr.insertCell(3).innerHTML = sample_tests.unit_sign;
|
||||
tr.insertCell(4).innerHTML = '<span class="name" style="font-family: \'Times New Roman\', Times, serif;">'+ sample_tests.ref_range +'</span>';
|
||||
tr.cells[4].style.textAlign = 'center'
|
||||
}
|
||||
|
||||
tr.cells[0].style.paddingLeft = (5 * level * 5) + 'px'
|
||||
tr.cells[0].style.width="380px";
|
||||
|
||||
if(IsAbnormal!=''){
|
||||
tr.cells[1].style.fontWeight = 'bold'
|
||||
}
|
||||
if (sample_tests.field_type == 0) {
|
||||
tr.cells[0].classList.add('pl-' + (level * 2))
|
||||
}
|
||||
$('#' + closet_parent_id).append(tr);
|
||||
if(sample_tests.description!=""){
|
||||
renderPrintTestItemDescriptionRow(sample_tests, level, closet_parent_id);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function renderPrintTestItemDescriptionRow(sample_tests, level, closet_parent_id)
|
||||
{
|
||||
if(sample_tests.is_show == 1) {
|
||||
|
||||
let tr = document.createElement('TR');
|
||||
tr.setAttribute('valign', 'top');
|
||||
tr.insertCell(0).innerHTML = (sample_tests.description!=="" ? '<p class="pl-4 pt-2">'+sample_tests.description+'</p>' : '');
|
||||
tr.cells[0].style.paddingLeft = (5 * level * 5) + 'px'
|
||||
tr.cells[0].colSpan=5
|
||||
if (sample_tests.field_type == 0) {
|
||||
tr.cells[0].classList.add('pl-' + (level * 2))
|
||||
}
|
||||
$('#' + closet_parent_id).append(tr);
|
||||
}
|
||||
}
|
||||
|
||||
function computeRefRange(sample_tests) {
|
||||
if(sample_tests.min_ref_val=='' || sample_tests.max_ref_val=='' || sample_tests.test_result=='' || sample_tests.ref_range == '') return ''
|
||||
else if([">",">=","<","<=","-", "Neg <"].includes(sample_tests.sign)){
|
||||
if(parseFloat(sample_tests.test_result) > parseFloat(sample_tests.max_ref_val)) return 'H';
|
||||
if(parseFloat(sample_tests.test_result) < parseFloat(sample_tests.min_ref_val)) return 'L';
|
||||
else return ''
|
||||
} else return ''
|
||||
}
|
||||
|
||||
|
||||
function manipulatePrintOrganismResult(sample_tests) {
|
||||
|
||||
if(sample_tests.field_type == 0){
|
||||
return ''
|
||||
} else if(["2","3"].includes(sample_tests.field_type)){
|
||||
return (sample_tests.org_results.length<1 ? 'Pending' : sample_tests.org_results.map(function (value) {
|
||||
let anti_text =''
|
||||
antibiotic_results.map(function (anti) {
|
||||
if(anti.organism_id == value.organism_id && anti.test_organism_id == value.test_organism_id){
|
||||
anti_text+= '<p class="value-pair" style="width: 90% !important; position: relative;"><span class="name" style="padding-left: 10px; '+(anti.sensitive=='S' ? 'font-weight:bold':'')+'"> - '+anti.name_en+'</span> <span class="name" style="float: right; '+(anti.sensitive=='S' ? 'font-weight:bold':'')+'">'+anti.sensitive+'</span></p>';
|
||||
}
|
||||
});
|
||||
return ((value.is_bold==1) ? '<b>'+ value.organism_name+'</b>' : value.organism_name) +' '+ (value.quantity_name !=null ? value.quantity_name : '') + anti_text;
|
||||
}).join(' '))
|
||||
} else if(sample_tests.field_type == 1){
|
||||
return (sample_tests.test_result.length<1 ? 'Pending' : sample_tests.test_result)
|
||||
}
|
||||
else{
|
||||
return (sample_tests.test_result.length<1 ? 'Pending' : sample_tests.test_result)
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,695 +0,0 @@
|
||||
<div class=" A4-portrait report-container">
|
||||
<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/lightgallery.css')}}" >
|
||||
<style>
|
||||
|
||||
.A4-portrait {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
justify-content: center; /* center horizontally */
|
||||
}
|
||||
|
||||
.report-container {
|
||||
background: white;
|
||||
padding: 20px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
@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;
|
||||
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: 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: 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: '';*/
|
||||
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') ? '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="">
|
||||
<input type="hidden" name="patient_sample_id" id="patient_sample_id" value="4353911">
|
||||
|
||||
<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" > </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>
|
||||
<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="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>
|
||||
<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>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table width="100%" border="0">
|
||||
<tbody><tr>
|
||||
<td colspan="4" style="/*height: 240px;*/ height: 100px;"> </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"> <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 result-font" 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 result-font" 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 result-font" 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 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 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 result-font" 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: 14px !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>
|
||||
@@ -1,70 +0,0 @@
|
||||
|
||||
|
||||
@include('modal.preview_result_forms.preview_result'. $preview_form_id)
|
||||
|
||||
|
||||
|
||||
@include('layout.common_script')
|
||||
<script src="https://labonak.com/labonak/public/storage/assets/js/admin/preview_result_forms/preview_result_{{$preview_form_id}}.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
var patient_base_url = "{{url('patient')}}";
|
||||
|
||||
|
||||
var get_refs_base_url = "{{url('shared')}}";
|
||||
var sample_base_url = "{{url('sample')}}"
|
||||
var is_auto_generate_sample_number = 0;
|
||||
let sample_id = {{\Route::current()->parameter('id')}};
|
||||
let invoice_id = "{{($sample->invoice) ? $sample->invoice->id : 0}}";
|
||||
let invoice_code = "{{($sample->invoice) ? $sample->invoice->invoice_code : 0}}";
|
||||
|
||||
let first_prev_sample_id = {{$firstPrvSampleId}};
|
||||
let previous_sample_date = "{{$firstPrvSampleDate}}";
|
||||
|
||||
let testSamples = [];
|
||||
|
||||
$.ajax({
|
||||
url: get_refs_base_url + '/test-items/' + sample_id +'/'+first_prev_sample_id,
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
if(response.success){
|
||||
$('#sample-result-print').empty()
|
||||
let res = response.data
|
||||
antibiotic_results = res.antibiotic_results
|
||||
for (var i in res.sample_tests){
|
||||
let heading = {"sample": res.sample, "department": res.sample_tests[i].department_name}
|
||||
let samples_list = res.sample_tests[i].samples;
|
||||
for(var j in samples_list){
|
||||
renderPrintTestItemDepartmentRow(samples_list[j], heading,'sample-result-print')
|
||||
var tests = samples_list[j].tests
|
||||
var sampleTest = list_to_tree(tests)
|
||||
sampleTest.map(parent => {
|
||||
renderPrintTestItemRow(parent, '0' ,'test-dep-'+samples_list[j].sample_type_id,' sample-result-print')
|
||||
if(parent.children.length){
|
||||
var children = parent.children
|
||||
children.map(function (child) {
|
||||
renderPrintTestItemRow(child, '1' ,'test-dep-'+samples_list[j].sample_type_id,' sample-result-print')
|
||||
if(child.children.length){
|
||||
var grandchildren = child.children
|
||||
grandchildren.map(function (grandchild) {
|
||||
renderPrintTestItemRow(grandchild, '1' ,'test-dep-'+samples_list[j].sample_type_id,' sample-result-print')
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
} else{
|
||||
antibiotic_results = []
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,960 +0,0 @@
|
||||
|
||||
<div class=" A4-portrait report-container">
|
||||
<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/lightgallery.css')}}" >
|
||||
<style>
|
||||
|
||||
.A4-portrait {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
justify-content: center; /* center horizontally */
|
||||
}
|
||||
|
||||
.report-container {
|
||||
background: white;
|
||||
padding: 20px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
@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;
|
||||
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: 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: 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: '';*/
|
||||
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') ? '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="">
|
||||
<input type="hidden" name="patient_sample_id" id="patient_sample_id" value="4353911">
|
||||
|
||||
<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" > </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 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="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;"> </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"> <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 result-font" 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 result-font" 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 result-font" 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 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>
|
||||
|
||||
|
||||
@if($labSettings->show_result_footer==1)
|
||||
<tr>
|
||||
<td colspan="3" id="footer_line" class="result-page-color result-font" 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>
|
||||
|
||||
|
||||
@include('layout.common_script')
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
var patient_base_url = "{{url('patient')}}";
|
||||
|
||||
|
||||
var get_refs_base_url = "{{url('shared')}}";
|
||||
var sample_base_url = "{{url('sample')}}"
|
||||
var is_auto_generate_sample_number = 0;
|
||||
let sample_id = {{\Route::current()->parameter('id')}};
|
||||
let invoice_id = "{{($sample->invoice) ? $sample->invoice->id : 0}}";
|
||||
let invoice_code = "{{($sample->invoice) ? $sample->invoice->invoice_code : 0}}";
|
||||
|
||||
let first_prev_sample_id = {{$firstPrvSampleId}};
|
||||
let previous_sample_date = "{{$firstPrvSampleDate}}";
|
||||
|
||||
let testSamples = [];
|
||||
|
||||
|
||||
let antibiotic_results = []
|
||||
|
||||
//$('#print_preview_modal').on('show.bs.modal', function (event) {
|
||||
$.ajax({
|
||||
url: get_refs_base_url + '/test-items/' + sample_id +'/'+first_prev_sample_id,
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
if(response.success){
|
||||
$('#sample-result-print').empty()
|
||||
let res = response.data
|
||||
antibiotic_results = res.antibiotic_results
|
||||
for (var i in res.sample_tests){
|
||||
let heading = {"sample": res.sample, "department": res.sample_tests[i].department_name}
|
||||
let samples_list = res.sample_tests[i].samples;
|
||||
for(var j in samples_list){
|
||||
renderPrintTestItemDepartmentRow(samples_list[j], heading,'sample-result-print')
|
||||
var tests = samples_list[j].tests
|
||||
var sampleTest = list_to_tree(tests)
|
||||
sampleTest.map(parent => {
|
||||
renderPrintTestItemRow(parent, '0' ,'test-dep-'+samples_list[j].sample_type_id,' sample-result-print')
|
||||
if(parent.children.length){
|
||||
var children = parent.children
|
||||
children.map(function (child) {
|
||||
renderPrintTestItemRow(child, '1' ,'test-dep-'+samples_list[j].sample_type_id,' sample-result-print')
|
||||
if(child.children.length){
|
||||
var grandchildren = child.children
|
||||
grandchildren.map(function (grandchild) {
|
||||
renderPrintTestItemRow(grandchild, '1' ,'test-dep-'+samples_list[j].sample_type_id,' sample-result-print')
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
} else{
|
||||
antibiotic_results = []
|
||||
}
|
||||
}
|
||||
});
|
||||
//})
|
||||
|
||||
function manipulateTableHeading(department, sample_type, sample_number, requester, collected_date, received_date, sample_tests) {
|
||||
let tableData = '<table width="100%" border="0" class="_department-sample-info" style="border-collapse: collapse;"><thead>\n' +
|
||||
'<tr style="background: #7ccb7f; border:1px solid #4a4a4a;">\n' +
|
||||
' <th class="sourceserifpro-bold result-font-size result-page-color" style="width: 48%"><div style="width:370px !important; float:left;">Test Name</div></th>\n' +
|
||||
' <th class="sourceserifpro-bold result-font-size result-page-color" style="width: 17%;">Result</th>\n' +
|
||||
' <th class="sourceserifpro-bold result-font-size result-page-color" style="width: 11%;">Units</th>\n' +
|
||||
' <th class="sourceserifpro-bold result-font-size result-page-color" style="width: 20%; text-align: center">Ref. Ranges</th>\n' +
|
||||
' <th class="sourceserifpro-bold result-font-size result-page-color" style="width: 4%;"></th>\n' +
|
||||
' </tr>\n'+
|
||||
' <tr>' +
|
||||
' <td class="sourceserifpro-bold result-font-size result-page-color" colspan="5" style="text-align: center;">'+sample_type+'</td>' +
|
||||
' </tr>\n' +
|
||||
'</thead>\n' +
|
||||
' <tbody id="test-dep-'+sample_tests.sample_type_id+'"></tbody>'+
|
||||
' </thead>' +
|
||||
' </table>'
|
||||
return tableData;
|
||||
}
|
||||
|
||||
|
||||
function renderPrintTestItemDepartmentRow(sample_tests, department_heading, wrapperId)
|
||||
{
|
||||
let tableData = manipulateTableHeading(department_heading.department, sample_tests.sample_type_name, department_heading.sample.sample_number, department_heading.sample.requested_by.name_en, department_heading.sample.collected_date, department_heading.sample.received_date, sample_tests)
|
||||
var tr = document.createElement('TR');
|
||||
tr.setAttribute('class', 'sample-type');
|
||||
tr.insertCell(0).innerHTML = tableData;
|
||||
tr.cells[0].style.paddingTop = '0px'
|
||||
tr.cells[0].style.paddingBottom = '0px'
|
||||
$('#'+wrapperId).append(tr);
|
||||
}
|
||||
|
||||
function renderPrintTestItemRow(sample_tests, level, closet_parent_id)
|
||||
{
|
||||
if(sample_tests.is_show == 1) {
|
||||
let IsAbnormal = computeRefRange(sample_tests);
|
||||
console.log(sample_tests.test_name + ' = > ' + IsAbnormal, sample_tests)
|
||||
let tr = document.createElement('TR');
|
||||
tr.setAttribute('valign', 'top')
|
||||
tr.insertCell(0).innerHTML = '' + (sample_tests.field_type == 0 ? '<b class="sourceserifpro-bold result-font-size line-height">' + sample_tests.test_name + '</b>' : '<p class="value-pair line-height"><span style="'+(sample_tests.is_bold==1 ? ' font-weight:bold;' :'' )+'" class="name result-font-size line-height">' + sample_tests.test_name + '</span> </p>') + '';
|
||||
if(["2","3"].includes(sample_tests.field_type)){
|
||||
tr.insertCell(1).innerHTML = (sample_tests.field_type == 0 ? '' : '') + manipulatePrintOrganismResult(sample_tests)
|
||||
tr.cells[1].colSpan=4
|
||||
tr.cells[1].classList.add('result-font-size','line-height')
|
||||
}else{
|
||||
if(sample_tests.unit_sign.trim()!='' || (["0.0","0.00","0"].includes(sample_tests.sign))){
|
||||
tr.insertCell(1).innerHTML = ''+ (sample_tests.field_type == 0 ? '' : ':') + manipulatePrintOrganismResult(sample_tests) +'</span>';
|
||||
tr.insertCell(2).innerHTML = '<span class="name line-height" style="font-size: 10.5pt !important;">'+sample_tests.unit_sign + '</span>';
|
||||
tr.insertCell(3).innerHTML = '<span class="name line-height result-font_" style="font-size: 10.5pt !important;">'+ sample_tests.ref_range +'</span>';
|
||||
tr.insertCell(4).innerHTML = (IsAbnormal.trim() !='' ? '<span class="abnormal line-height">Abnormal</span>' : (sample_tests.test_result!='' ? 'Normal': ''));
|
||||
tr.cells[4].style.textAlign = 'right'
|
||||
}
|
||||
else{
|
||||
tr.insertCell(1).innerHTML = ''+ (sample_tests.field_type == 0 ? '' : ':') + manipulatePrintOrganismResult(sample_tests) +'</span>';
|
||||
tr.cells[1].colSpan=4
|
||||
tr.cells[1].classList.add('result-font-size')
|
||||
}
|
||||
}
|
||||
|
||||
tr.cells[0].style.paddingLeft = (5 * level * 2.5) + 'px'
|
||||
tr.cells[0].style.width="370px";
|
||||
|
||||
if(IsAbnormal.trim()!='' && sample_tests.test_result!=''){
|
||||
//tr.cells[1].classList.add('abnormal')
|
||||
tr.cells[1].childNodes[1].classList.add('abnormal')
|
||||
}
|
||||
if (sample_tests.field_type == 0) {
|
||||
tr.cells[0].classList.add('pl-' + (level * 2))
|
||||
}
|
||||
$('#' + closet_parent_id).append(tr);
|
||||
if(sample_tests.description!=""){
|
||||
renderPrintTestItemDescriptionRow(sample_tests, level, closet_parent_id);
|
||||
}
|
||||
if(sample_tests.comment!=""){
|
||||
renderPrintTestItemCommentRow(sample_tests, level, closet_parent_id);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function renderPrintTestItemDescriptionRow(sample_tests, level, closet_parent_id)
|
||||
{
|
||||
if(sample_tests.is_show == 1) {
|
||||
|
||||
let tr = document.createElement('TR');
|
||||
tr.setAttribute('valign', 'top');
|
||||
tr.insertCell(0).innerHTML = (sample_tests.description!=="" ? '<p class="pl-4 pt-2 line-height">'+sample_tests.description+'</p>' : '');
|
||||
tr.cells[0].style.paddingLeft = (5 * level * 5) + 'px'
|
||||
tr.cells[0].colSpan=5
|
||||
if (sample_tests.field_type == 0) {
|
||||
tr.cells[0].classList.add('pl-' + (level * 2))
|
||||
}
|
||||
$('#' + closet_parent_id).append(tr);
|
||||
}
|
||||
}
|
||||
|
||||
function renderPrintTestItemCommentRow(sample_tests, level, closet_parent_id)
|
||||
{
|
||||
if(sample_tests.is_show == 1) {
|
||||
|
||||
let tr = document.createElement('TR');
|
||||
tr.setAttribute('valign', 'top');
|
||||
tr.insertCell(0).innerHTML = (sample_tests.comment!=="" ? '<div style="padding-left: 15px; float:left; font-weight:bold; line-height">Comment: </div><div style="padding-left:85px; margin-top: 0px; margin-left:10px;">'+sample_tests.comment+'</div>' : '');
|
||||
tr.cells[0].style.paddingLeft = (5 * 0) + 'px'
|
||||
tr.cells[0].colSpan=5
|
||||
if (sample_tests.field_type == 0) {
|
||||
tr.cells[0].classList.add('pl-' + (0 * 2))
|
||||
}
|
||||
$('#' + closet_parent_id).append(tr);
|
||||
}
|
||||
}
|
||||
|
||||
function manipulatePrintOrganismPreviousResult(sample_tests) {
|
||||
|
||||
if(sample_tests.field_type == 0){
|
||||
return ''
|
||||
} else if(["2","3"].includes(sample_tests.field_type)){
|
||||
let orgCount = 0;
|
||||
return (sample_tests.prev_org_results.length<1 ? ': Pending' : sample_tests.prev_org_results.map(function (value) {
|
||||
let anti_text =''
|
||||
orgCount+=1;
|
||||
antibiotic_results.map(function (anti) {
|
||||
if(anti.organism_id == value.organism_id && anti.test_organism_id == value.test_organism_id && anti.sensitive!=''){
|
||||
anti_text+= '<p class="value-pair" style="width: 90% !important; position: relative;"><span class="name" style="padding-left: 10px; '+(anti.sensitive=='R' ? 'font-weight:bold':'')+'"> - '+anti.name_en+'</span> <span class="name" style="float: right; '+(anti.sensitive=='R' ? 'font-weight:bold':'')+'">'+anti.sensitive+'</span></p>';
|
||||
}
|
||||
});
|
||||
if(anti_text!=''){
|
||||
return '<p class="value-pair" style="width: 90% !important; position: relative; margin-top:2px !important;"> <span class="name" style="">'+(orgCount==1?': ':' ') +'</span>'+ ((value.is_bold==1) ? '<span class="abnormal name">' + value.organism_name +'</span>' : '<span class="name">' + value.organism_name + '</span>') +' <span class="name" style="float: right;"> '+ (value.quantity_name !=null ? value.quantity_name : '')+'</span> </p>' + anti_text;
|
||||
}
|
||||
else{
|
||||
return '' +((value.is_bold==1) ? '<span class="abnormal">'+ value.organism_name+'</span>' : value.organism_name) +' '+ (value.quantity_name !=null ? value.quantity_name : '') +'</br>'
|
||||
}
|
||||
|
||||
}).join(' '))
|
||||
} else{
|
||||
return '<span class="name" style="font-size:10.5pt;"> ' + (sample_tests.prev_result && sample_tests.prev_result.length<1 ? 'Pending' : sample_tests.prev_result) + '</span>'
|
||||
}
|
||||
}
|
||||
|
||||
function computeRefRange(sample_tests) {
|
||||
if(sample_tests.min_ref_val=='' || sample_tests.max_ref_val=='' || sample_tests.test_result=='' || sample_tests.ref_range == '') return ''
|
||||
else if(["-"].includes(sample_tests.sign)){
|
||||
if(parseFloat(sample_tests.test_result.toLowerCase().replace('>','').replace('<','').replace('positive','').replace('negative','')) > parseFloat(sample_tests.max_ref_val.replace(",", ""))) return 'H';
|
||||
if(parseFloat(sample_tests.test_result.toLowerCase().replace('>','').replace('<','').replace('positive','').replace('negative','')) < parseFloat(sample_tests.min_ref_val.replace(",", ""))) return 'L';
|
||||
else return ''
|
||||
}else if(["<=","Neg <", "Neg<","≤","<"].includes(sample_tests.sign)){
|
||||
if(parseFloat(sample_tests.test_result.toLowerCase().replace('>','').replace('<','').replace('positive','').replace('negative','')) > parseFloat(sample_tests.max_ref_val.replace(",", ""))) return 'H';
|
||||
else return ''
|
||||
}else if([">",">=","≥"].includes(sample_tests.sign)){
|
||||
if(parseFloat(sample_tests.test_result.toLowerCase().replace('>','').replace('<','').replace('positive','').replace('negative','')) < parseFloat(sample_tests.max_ref_val.replace(",", ""))){ return 'L'; }
|
||||
else { return ''; }
|
||||
}
|
||||
else if(["0.0"].includes(sample_tests.sign)){
|
||||
if(parseFloat(sample_tests.test_result.toLowerCase().replace('>','').replace('<','').replace('positive','').replace('negative','')) > parseFloat(sample_tests.max_ref_val.replace(",", ""))) return 'H';
|
||||
if(parseFloat(sample_tests.test_result.toLowerCase().replace('>','').replace('<','').replace('positive','').replace('negative','')) < parseFloat(sample_tests.min_ref_val.replace(",", ""))) return 'L';
|
||||
else return ''
|
||||
}
|
||||
else return ''
|
||||
}
|
||||
|
||||
|
||||
function manipulatePrintOrganismResult(sample_tests) {
|
||||
|
||||
if(sample_tests.field_type == 0){
|
||||
return ''
|
||||
} else if(["2","3"].includes(sample_tests.field_type)){
|
||||
let orgCount = 0;
|
||||
return (sample_tests.org_results.length<1 ? 'Pending' : sample_tests.org_results.map(function (value) {
|
||||
let anti_text =''
|
||||
orgCount+=1;
|
||||
antibiotic_results.map(function (anti) {
|
||||
if(anti.organism_id == value.organism_id && anti.test_organism_id == value.test_organism_id && anti.sensitive!=''){
|
||||
anti_text+= '<p class="value-pair line-height" style="width: 90% !important; position: relative;"><span class="name" style="padding-left: 10px; '+(anti.sensitive=='R' ? 'font-weight:bold':'')+'"> - '+anti.name_en+'</span> <span class="name" style="float: right; '+(anti.sensitive=='R' ? 'font-weight:bold':'')+'">'+anti.sensitive+'</span></p>';
|
||||
}
|
||||
});
|
||||
if(anti_text!=''){
|
||||
return '<p class="value-pair line-height" style="width: 90% !important; position: relative; margin-top:2px !important;"> <span class="name result-font">'+(orgCount==1?'':' ') +'</span>'+ ((value.is_bold==1) ? '<span class="abnormal name " style="font-size:11pt !important;">' + value.organism_name +'</span>' : '<span class="name" style="font-size:11pt !important;">' + value.organism_name + '</span>') +' <span class="name" style="float: right;"> '+ (value.quantity_name !=null ? value.quantity_name : '')+'</span> </p>' + anti_text;
|
||||
}
|
||||
else{
|
||||
return ((value.is_bold==1) ? '<span class="abnormal line-height">'+ value.organism_name+'</span>' : value.organism_name) +' '+ (value.quantity_name !=null ? value.quantity_name : '') +'</br>'
|
||||
}
|
||||
|
||||
}).join(' '))
|
||||
} else if(sample_tests.field_type == 1){
|
||||
return '<span class="name result-font line-height" style="font-size:11pt !important;"> ' + (sample_tests.test_result.length<1 ? 'Pending' : sample_tests.test_result) + '</span>'
|
||||
}
|
||||
else{
|
||||
if(sample_tests.field_type == 5) return '<span class="name result-font line-height" style="font-size:11pt !important;"> ' + (sample_tests.test_result.length<1 ? 'Pending' : 'See attachement') + '</span>'
|
||||
return '<span class="name result-font line-height" style="font-size:11pt !important;"> ' + (sample_tests.test_result.length<1 ? 'Pending' : sample_tests.test_result) + '</span>'
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,404 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<style>
|
||||
.bullet-line-list li:before{
|
||||
top: 25% !important;
|
||||
}
|
||||
.group-test-box{
|
||||
max-height: 300px;
|
||||
min-height: 300px;
|
||||
overflow: auto;
|
||||
}
|
||||
.bullet-line-list:after {
|
||||
border: 1px dashed #f3f3f3;
|
||||
top: 35px; /* 45px;*/
|
||||
}
|
||||
|
||||
.first-lv::before{
|
||||
content: "---";
|
||||
position: absolute;
|
||||
left: -30px;
|
||||
color: #f3f3f3;
|
||||
}
|
||||
.grandchildren-lv::before{
|
||||
content: "|---";
|
||||
position: absolute;
|
||||
left: -25px;
|
||||
color: #f3f3f3;
|
||||
}
|
||||
.modal-header span{font-size: 15px !important;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card min-vh-70">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> New Sample</h4>
|
||||
<hr>
|
||||
<form method="post" class="p-2" action="#" id="form-test-sample">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="form-vertical mb-4 bg-light">
|
||||
<div class="col-lg-12 pt-2 border">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Patient')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group" id="testItem">
|
||||
<div class="form-group" style="flex: 1 !important;">
|
||||
<select class="form-control select2" name="patient_id" id="patient-id" style=" width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($patients as $patient)
|
||||
<option value="{{$patient->id}}">{{$patient->patient_uuid . ' - ' . $patient->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-inverse-secondary px-3" id="searchPatientAddForm" type="button"><i class="fa fa-search"></i> Search </button>
|
||||
<button class="btn btn-info waves-effect rounded-0 px-3 ml-2" type="button" data-action="new" data-toggle="modal" data-target="#modal-patient" data-backdrop="static"><i class="typcn typcn-plus"></i> Add New Patient</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-vertical sample-creation-form border p-4" style="display: none">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Sample Number')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control rounded-0" {{$labSettings->sample_number == 1 ? ' disabled readonly ' : ''}} name="sample_number" id="sample-number" placeholder="Sample Number">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-info px-3 shadow-none rounded-0" title="Auto generate patient code" type="button" onclick="generate_uuid('S','#sample-number')"><i class="mdi mdi-autorenew"></i> </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Sample Source')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control select2 rounded-0" name="sample_source_id" id="sample-source-id" style="width: 100%">
|
||||
<option></option>
|
||||
@foreach($sampleSources as $sampleSource)
|
||||
<option value="{{$sampleSource->id}}">{{$sampleSource->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Requester')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control select2 rounded-0" name="physician_id" id="physician-id" style="width: 100%">
|
||||
<option></option>
|
||||
@foreach($physicians as $physician)
|
||||
<option value="{{$physician->id}}">{{$physician->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Collected Date')}} <span class="text-danger">*</span></label>
|
||||
<input type="datetime-local" value="{{date('Y-m-d\TH:i:s')}}" class="form-control" name="collected_date" id="collected-date">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Received Date')}} <span class="text-danger">*</span></label>
|
||||
<input type="datetime-local" value="{{date('Y-m-d\TH:i:s')}}" class="form-control" name="received_date" id="received-date">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Admission Date')}} <span class="text-danger">*</span></label>
|
||||
<input type="datetime-local" value="{{date('Y-m-d\TH:i:s')}}" class="form-control" name="admission_date" id="admission-date">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Diagnosis')}}</label>
|
||||
<input type="text" class="form-control rounded-0" name="diagnosis" id="diagnosis" placeholder="Diagnosis">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Sample Condition')}} <span class="text-danger"></span></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-append">
|
||||
<div class="form-check pr-4">
|
||||
<label class="form-check-label">
|
||||
<input type="checkbox" name="is_urgent" id="is-urgent" class="form-check-input"> Is Urgent
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<select class="form-control rounded-0" name="sample_condition" id="sample-condition">
|
||||
<option selected disabled>Sample Condition</option>
|
||||
<option value="1">Good</option>
|
||||
<option value="0">Rejected</option>
|
||||
<option value="2">Acceptable</option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="form-group mb-1 " style="flex: 1 !important;">
|
||||
<label for="lab-name-en">{{__('Reject Reason')}} <span class="text-danger text-small"></span></label>
|
||||
<div class="input-group">
|
||||
<div class="form-group" style="flex: 1 !important;">
|
||||
<select class="form-control select2 rounded-0" style="width: 100%" disabled name="reject_comment_id" id="reject-comment-id">
|
||||
<option></option>
|
||||
@foreach($rejectComments as $rejectComment)
|
||||
<option value="{{$rejectComment->id}}">{{$rejectComment->reject_comment}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-info rounded-0 px-3" type="button" onclick="addRejectComment('reject-comment-id')"><i class="typcn typcn-plus"></i> </button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12 pt-4 text-right">
|
||||
<button type="button" data-toggle="modal" class="d-none" id="show-modal-assign-test" data-target="#modal-assign-test" data-backdrop="static"></button>
|
||||
<button class="btn btn-info" type="button" id="saveSample"><i class="mdi mdi-check-all"></i> Save & Assign Test</button>
|
||||
{{-- <button class="btn btn-info mr-2" type="button"><i class="mdi mdi-content-paste"></i> Add Result</button>--}}
|
||||
{{-- <button class="btn btn-info" id="saveSample" type="button"><i class="fa fa-floppy-o"></i> Save</button>--}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Patient -->
|
||||
<div class="modal fade modal-primary" id="modal-patient">
|
||||
<div class="modal-dialog show modal-xl">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title">{{__('Patient')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form method="post" action="#" id="form" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-6 px-3">
|
||||
<div class="form-group mb-1">
|
||||
<label for="patient-code">{{__('Patient-Code')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" {{$labSettings->patient_code == 1 ? ' disabled readonly ' : ''}} name="patient_code" id="patient-code" placeholder="Patient code">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-info px-3 shadow-none rounded-0" title="Auto generate patient code" type="button" onclick="generate_uuid('P','#patient-code')"><i class="mdi mdi-autorenew"></i> </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-6 px-3">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Patient-Name')}} <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" name="patient_name" id="patient-name" placeholder="Patient name">
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-kh">Dob <b>or</b> Age <span class="text-danger">*</span></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-append" style="flex: 4 !important;">
|
||||
<input class="form-control datepicker" name="dob" type="text" id="dob" placeholder="{{__('general.date_placeholder')}}" required="" autocomplete="off">
|
||||
</div>
|
||||
<input type="number" id="age" name="age" placeholder="Age" value="" class="form-control" autocomplete="off">
|
||||
<div class="input-group-append">
|
||||
<select class="form-control" name="age_unit" id="age-unit">
|
||||
<option value="1">Day</option>
|
||||
<option value="30">Month</option>
|
||||
<option selected value="365">Year</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Gender')}} <span class="text-danger">*</span></label>
|
||||
<div class="form-group pl-3">
|
||||
<div class="row">
|
||||
<div class="form-check col-sm-12 col-md-12 col-lg-3" style="margin-bottom: 6px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" checked name="gender" data-id="1" value="1"> Male
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-12 col-md-12 col-lg-3" style="margin-bottom: 6px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="gender" data-id="2" value="2"> Female
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-12 col-md-12 col-lg-3" style="margin-bottom: 6px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="gender" data-id="3" value="3"> Other
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Marital-Status')}} <span class="text-danger">*</span></label>
|
||||
<div class="form-group pl-3">
|
||||
<div class="row">
|
||||
<div class="form-check col-sm-12 col-md-12 col-lg-3" style="margin-bottom: 6px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" checked name="marital_status" data-id="1" value="1"> Single
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-12 col-md-12 col-lg-3" style="margin-bottom: 6px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="marital_status" data-id="2" value="2"> Married
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check col-sm-12 col-md-12 col-lg-3" style="margin-bottom: 6px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="marital_status" data-id="3" value="3"> Other
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('KH-ID Number')}}</label>
|
||||
<input type="text" class="form-control" name="khid_number" id="khid-number" placeholder="Khmer-ID Number">
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Phone Number')}}</label>
|
||||
<input type="text" class="form-control" name="phone_number" id="phone-number" placeholder="Phone number">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-6 px-3">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('House-Number')}}</label>
|
||||
<input type="text" class="form-control" name="house_number" id="house-number" placeholder="House number">
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Street-Number')}}</label>
|
||||
<input type="text" class="form-control" name="street_number" id="street-number" placeholder="Street number">
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Province')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control select2" name="province_id" id="province-id" style="width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($provinces as $province)
|
||||
<option value="{{$province->id}}">{{$province->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('District')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control select2" name="district_id" id="district-id" style="width: 100% !important;">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Commune')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control select2" name="commune_id" id="commune-id" style="width: 100% !important;">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Village')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control select2" name="village_id" id="village-id" style="width: 100% !important;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info" id="savePatient"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-light" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Assign Test -->
|
||||
<div class="modal fade modal-primary" id="modal-assign-test">
|
||||
<div class="modal-dialog modal-xxl">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title"><i class="mdi mdi-playlist-check"></i> {{__('Assign Test')}}</h6>
|
||||
<span class="pl-4 text-muted">Patient's ID: <b class="pl-1 patient-code text-info">HDGD</b></span>
|
||||
<span class="pl-3 text-muted">Patient's Name: <b class="pl-1 patient-name text-info">HDGD</b></span>
|
||||
<span class="pl-3 text-muted">Sample Number: <b class="pl-1 sample-number text-info">HDGD</b></span>
|
||||
<span class="pl-3 text-muted">Sample Source: <b class="pl-1 sample-source text-info">HDGD</b></span>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body" style="min-height: 650px">
|
||||
<form method="post" action="#" id="form" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
<div class="row" id="test-item-list">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info" id="savePatient"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-light" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
<script>
|
||||
|
||||
|
||||
var patient_base_url = "{{url('patient')}}";
|
||||
var get_refs_base_url = "{{url('refs')}}";
|
||||
var sample_base_url = "{{url('sample')}}"
|
||||
var is_auto_generate_sample_number = 0;
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/sample.js')}}"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,451 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/lightgallery/lightgallery.css')}}" >
|
||||
<style>
|
||||
.center {
|
||||
height:100%;
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
|
||||
}
|
||||
.form-input {
|
||||
width:50%;
|
||||
padding:0px 0px 0px 0;
|
||||
}
|
||||
.form-input img {
|
||||
width:100%;
|
||||
display:none;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.form-input input {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.form-input label {
|
||||
height:25px;
|
||||
background:#cdcdcd26;
|
||||
color:#c9c9c9;
|
||||
cursor:pointer;
|
||||
width: 75px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.modal .table .select2-selection__rendered {
|
||||
line-height: 31px !important;
|
||||
}
|
||||
.modal .table .select2-container .select2-selection--single {
|
||||
height: 35px !important;
|
||||
}
|
||||
.modal .table .select2-selection__arrow {
|
||||
height: 34px !important;
|
||||
}
|
||||
|
||||
#purchase_detail .select2-container {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
#purchase_detail .select2-container .select2-selection--single, #purchase_detail .select2-selection--multiple
|
||||
{
|
||||
min-height: 36px !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
#purchase_detail .select2-selection__arrow,
|
||||
{
|
||||
height: 36px !important;
|
||||
}
|
||||
#purchase_detail .select2-container--default .select2-selection--single .select2-selection__rendered
|
||||
{
|
||||
line-height: 28px !important;
|
||||
position: relative;
|
||||
top: -11px !important;
|
||||
left: -20px !important;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('Goods Receive')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form method="get" action="{{url('/inventory/stock-in/search')}}">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" value="{{isset($_GET['kword']) ? $_GET['kword'] : ''}}" name="kword" id="kword" placeholder="{{__('GRN-Number or supplier name')}}">
|
||||
<input id="start-invoice-date" value="{{isset($_GET['received_date']) ? $_GET['received_date'] : ''}}" name="received_date" class="form-control" onfocus="(this.type='date')" onblur="(this.type='text')" placeholder="From date" type="text">
|
||||
<input id="end-invoice-date" value="{{isset($_GET['received_date_to']) ? $_GET['received_date_to'] : ''}}" name="received_date_to" class="form-control" onfocus="(this.type='date')" onblur="(this.type='text')" placeholder="To date" type="text">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm rounded-0 btn-inverse-secondary px-3" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['add_medicine']))
|
||||
<button class="btn btn-info rounded-0 waves-effect px-3 ml-2" type="button" data-action="new" data-toggle="modal" data-target="#modal-medicine-purchase" data-backdrop="static"><i class="typcn typcn-plus"></i> {{__('general.btn_add_new')}}</button>
|
||||
@endif
|
||||
<button type="button" class="btn btn-white rounded-0 dropdown-toggle ml-4" data-toggle="dropdown" aria-expanded="true">{{__('report.btn_action')}}</button>
|
||||
<div class="dropdown-menu" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 44px, 0px);" x-placement="bottom-start">
|
||||
<button type="button" data-toggle="modal" data-target="#print_preview_modal" data-backdrop="static" class="dropdown-item font-14">{{__('report.btn_action_print')}}</button>
|
||||
<button type="submit" value="true" name="export" class="dropdown-item font-14">{{__('report.btn_action_export')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2" width="50px">{{__('physician.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('physician.table_action')}}</th>
|
||||
<th class="py-2" width="200px">{{__('GRN-Number')}}</th>
|
||||
<th class="py-2" width="150px">{{__('PO-Number')}}</th>
|
||||
<th class="py-2">{{__('Supplier')}}</th>
|
||||
<th class="py-2" width="250px">{{__('Received Date')}}</th>
|
||||
<th class="py-2" width="250px">{{__('Total Amount')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('physician.table_status')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($medicinePurchases as $k=>$medicinePurchase)
|
||||
<tr>
|
||||
<td class="py-1 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group">
|
||||
{{-- <a href="{{url('inventory/stock-in/'.$medicinePurchase->id.'?print')}}" class="btn btn-sm btn-info mr-2" title="{{__('sample.btn_print')}}">--}}
|
||||
{{-- <i class="mdi mdi-printer"></i>--}}
|
||||
{{-- </a>--}}
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_medicine']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary mr-2" title="{{__('general.btn_edit')}}" data-action="edit" data-uid="{{$medicinePurchase->id}}" data-toggle="modal" data-target="#modal-medicine-purchase" data-backdrop="static">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_medicine']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger " title="{{__('general.btn_delete')}}" onclick="delete_data({{$medicinePurchase->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-1">{{$medicinePurchase->grn_number}}</td>
|
||||
<td class="py-1">{{$medicinePurchase->po_number}}</td>
|
||||
<td class="py-1">{{$medicinePurchase->supplier->name_en}}</td>
|
||||
<td class="py-1">{{date('d-m-Y',strtotime($medicinePurchase->received_date))}}</td>
|
||||
<td class="py-1">{{$medicinePurchase->net_amount}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<i class="mdi {{$medicinePurchase->record_status_id == 1 ? 'mdi-check-circle text-primary' : 'mdi-checkbox-blank-circle-outline'}}"></i>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $medicinePurchases->links('pagination.custom') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<div class="modal fade modal-primary" id="modal-medicine-purchase">
|
||||
<div class="modal-dialog modal-semi-xxl modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title new">{{__('New Supplier')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form method="POST" action="#" id="form-stock-in" enctype="multipart/form-data" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-3">
|
||||
<div class="form-group mb-1">
|
||||
<label class="font-weight-medium" for="lab-name-en">{{__('GRN-Number')}}</label>
|
||||
<input type="text" class="form-control clearable rounded-0" id="grn-number" name="grn_number" placeholder="{{__('Good Received Note Number')}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-3">
|
||||
<div class="form-group mb-1">
|
||||
<label class="font-weight-medium" for="lab-name-en">{{__('PO-Number')}}</label>
|
||||
<input type="text" class="form-control clearable rounded-0" id="po-number" name="po_number" placeholder="{{__('Purchase Order Number')}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-3">
|
||||
<div class="form-group mb-1">
|
||||
<label class="font-weight-medium" for="lab-name-en">{{__('Supplier')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control clearable rounded-0 select2" id="supplier" name="supplier" style=" width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($suppliers as $supplier)
|
||||
<option value="{{$supplier->id}}">{{$supplier->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-3">
|
||||
<div class="form-group mb-1">
|
||||
<label class="font-weight-medium" for="lab-name-en">{{__('Received Date')}} <span class="text-danger">*</span></label>
|
||||
<input type="date" class="form-control clearable rounded-0" id="received-date" name="received_date">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 py-0 px-4">
|
||||
<div class="row">
|
||||
<table class="table table-bordered " id="purchase_detail">
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<td style="width:15%" class="p-1">@lang('Medical Item Group')</td>
|
||||
<td style="width:25%" class="p-1">@lang('Medical Item')</td>
|
||||
<td class="p-1">@lang('Lot No.')</td>
|
||||
<td class="p-1">@lang('Expiry Date')</td>
|
||||
<td class="p-1">@lang('Medical Item Unit') </td>
|
||||
<td class="p-1">Quantity</td>
|
||||
<td class="p-1">@lang('Unit Price')</td>
|
||||
<td class="p-1">@lang('Total Amount')</td>
|
||||
<td class="p-1 text-center">
|
||||
<button type="button" onclick="addPurchasedMedicalItem()" class="btn rounded-0 btn-md btn-light"><i class="mdi mdi-plus-circle text-info" ></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="purchase_detail_body"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 p-0 mt-3">
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" rows="2" placeholder="Description..." id="note" name="note"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6" style="float:right">
|
||||
<table class="table" style="width:70%;float:right;margin-right:60px;">
|
||||
<tr>
|
||||
<td><h5>Total:</h5></td>
|
||||
<td>
|
||||
<p style="float:right;font-weight:bold;font-size:16px;color:navy" id="total_">0.00</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="col-sm-10 text-left text-muted" style="font-size:10px !important;">
|
||||
<span id="creator"></span> <span id="creator-time"></span><br>
|
||||
<span id="modifier"></span> <span id="modifier-time"></span>
|
||||
</div>
|
||||
<button type="button" class="btn btn-info rounded-0" id="btnSave"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-light rounded-0" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('modal.stock_in_print')
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script>
|
||||
|
||||
$('.select2-container').width('150px !important')
|
||||
|
||||
var save_url = "{{url('inventory/stock-in/save')}}";
|
||||
var update_url = "{{url('inventory/stock-in/update')}}";
|
||||
var delete_url = "{{url('inventory/stock-in/delete')}}";
|
||||
|
||||
var get_url = "{{url('inventory/stock-in/get')}}";
|
||||
|
||||
var inventory_base_url = "{{url('inventory')}}";
|
||||
|
||||
let modal_add_title = "{{__('New Goods Receive')}}";
|
||||
let modal_edit_title = "{{__('Edit Goods Receive')}}";
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/medicine_purchase.js?time='.time())}}"></script>
|
||||
|
||||
<script>
|
||||
|
||||
function getMedicalItemByGroupId(id, rowid) {
|
||||
var div_data = "";
|
||||
$("#medicine_name" + rowid).html("<option value=''></option>");
|
||||
$.ajax({
|
||||
url: inventory_base_url+'/medicine/group/'+id,
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
success: function (res) {
|
||||
if(res.success) {
|
||||
$.each(res.data, function (i, obj) {
|
||||
var sel = "";
|
||||
div_data += "<option value='" + obj.id + "'>" + obj.medicine.name + " (" + Number(obj.available_quantity).toFixed(0) + ")</option>";
|
||||
});
|
||||
$("#medicine_name" + rowid).html("<option value=''>Select</option>");
|
||||
$('#medicine_name' + rowid).append(div_data);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function addPurchasedMedicalItem(purchaseDetail = null) {
|
||||
var table = document.getElementById("purchase_detail_body");
|
||||
var table_len = table.rows.length;
|
||||
var id = table_len + 1
|
||||
|
||||
var opt = "<?php foreach($medicineGroups as $item){ ?>";
|
||||
opt += "<option value='<?php echo $item->id ?>'><?php echo $item->name_en ?></option>";
|
||||
opt += "<?php } ?>";
|
||||
|
||||
var medicalItemUnitOpt = "<?php foreach($medicineUnits as $item){ ?>";
|
||||
medicalItemUnitOpt += "<option value='<?php echo $item->id ?>'><?php echo $item->name_en ?></option>";
|
||||
medicalItemUnitOpt += "<?php } ?>";
|
||||
|
||||
var row_ = "<tr id='row_" + id + "'>" +
|
||||
'<td class="p-2">' +
|
||||
'<select class="form-control form-control-sm clearable rounded-0" id="cate_' + id + '" name="category_id[]" onchange=getMedicalItemByGroupId(this.value,' + id + ') required>' +
|
||||
'<option value="">Chose</option>' + opt +
|
||||
'</select>' +
|
||||
'</td>' +
|
||||
'<td class="p-2">' +
|
||||
'<select name="drug_name[]" id="medicine_name' + id + '" class="form-control clearable form-control-sm rounded-0" required></select>' +
|
||||
'</td>' +
|
||||
'<td class="p-2">' +
|
||||
' <input type="text" class="form-control-sm form-control rounded-0 lotno" name="lotno[]" id="lotno_' + id + '" value="0">' +
|
||||
'</td>' +
|
||||
'<td class="p-2">' +
|
||||
' <input type="date" class="form-control-sm clearable rounded-0 form-control" id="exp_' + id + '" data-date-format="dd-mm-yyyy" data-language="en" placeholder="dd-mm-yyyy" autocomplete="off" name="expiry_date[]" required>' +
|
||||
'</td>' +
|
||||
'<td class="p-2">' +
|
||||
'<select class="form-control form-control-sm clearable rounded-0" id="unit_' + id + '" name="medicine_unit_id[]" required>' +
|
||||
'<option value="">Chose</option>' + medicalItemUnitOpt +
|
||||
'</select>' +
|
||||
'</td>' +
|
||||
'<td class="p-2">' +
|
||||
' <input type="number" class="form-control-sm form-control rounded-0 qty" name="quantity[]" id="qty_' + id + '" value="1" onblur="calculatePurchasedPrice()" onchange="calculatePurchasedPrice()" required step="any" min="0.00">' +
|
||||
'</td>' +
|
||||
'<td class="p-2">' +
|
||||
' <input type="number" class="form-control-sm form-control rounded-0 unit-price" name="purchase_price[]" value="0" id="pur_price_' + id + '" onblur="calculatePurchasedPrice()" onchange="calculatePurchasedPrice()" required step="any" min="0.00">' +
|
||||
'</td>' +
|
||||
'<td class="p-2">' +
|
||||
' <input type="text" readonly id="subtotal_' + id + '" class="form-control-sm form-control rounded-0" name="amount[]" step="any" min="0.00" value="0">' +
|
||||
'</td>' +
|
||||
'<td style="margin-top:20px;" class="p-2">' +
|
||||
' <button type="button" onclick="removePurchasedMedicalItem(' + id + ')" class="btn rounded-0 btn-md btn-danger"><i class="mdi mdi-trash-can text-white"></i></button>' +
|
||||
'</td>' +
|
||||
'</tr>';
|
||||
|
||||
|
||||
table.insertRow(table_len).outerHTML = row_;
|
||||
|
||||
if (purchaseDetail != null) {
|
||||
$('#cate_' + id).val(purchaseDetail.medicine_group_id);
|
||||
$('#exp_' + id).val(purchaseDetail.expiry_date)
|
||||
$('#unit_' + id).val(purchaseDetail.medicine_unit_id)
|
||||
$('#lotno_' + id).val(purchaseDetail.lotno)
|
||||
$('#qty_' + id).val(purchaseDetail.quantity)
|
||||
$('#pur_price_' + id).val(purchaseDetail.unit_price)
|
||||
$('#subtotal_' + id).val(purchaseDetail.unit_price * purchaseDetail.quantity)
|
||||
$('#medicine_name' + id).empty().append('<option selected value = "'+purchaseDetail.medicine_item_id+'">'+purchaseDetail.medicine_item.medicine.name+'</option>');
|
||||
}
|
||||
|
||||
$("#medicine_name"+id).select2();
|
||||
$("#unit_"+id).select2();
|
||||
|
||||
}
|
||||
|
||||
function removePurchasedMedicalItem(id)
|
||||
{
|
||||
$("#row_"+id).remove();
|
||||
calculatePurchasedPrice();
|
||||
}
|
||||
|
||||
function calculatePurchasedPrice()
|
||||
{
|
||||
var total=0;
|
||||
var price=[];
|
||||
var qty=[];
|
||||
var sum=0;
|
||||
|
||||
$(".unit-price").each(function () {
|
||||
var pr=$(this).val();
|
||||
if(pr=="NaN" || pr==null || pr==""){
|
||||
pr=parseFloat("0");
|
||||
}
|
||||
price.push(pr);
|
||||
});
|
||||
|
||||
$(".qty").each(function () {
|
||||
var q=$(this).val();
|
||||
if(q=="NaN" || q==null || q==""){
|
||||
q=parseFloat("0");
|
||||
}
|
||||
qty.push(q);
|
||||
});
|
||||
|
||||
for(var i=0; i<price.length; i++)
|
||||
{
|
||||
var sum=(price[i]*qty[i]);
|
||||
total+=sum;
|
||||
$("input[name='amount[]']:eq("+i+")").val(sum.toFixed(2));
|
||||
}
|
||||
var amount= total
|
||||
//console.log('Riel', new Intl.NumberFormat('en-IN', { maximumSignificantDigits: 3 }).format(total))
|
||||
$("#total_").html("$ "+amount.toFixed(2));
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,370 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/lightgallery/lightgallery.css')}}" >
|
||||
<style>
|
||||
.center {
|
||||
height:100%;
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
|
||||
}
|
||||
.form-input {
|
||||
width:50%;
|
||||
padding:0px 0px 0px 0;
|
||||
}
|
||||
.form-input img {
|
||||
width:100%;
|
||||
display:none;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.form-input input {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.form-input label {
|
||||
height:25px;
|
||||
background:#cdcdcd26;
|
||||
color:#c9c9c9;
|
||||
cursor:pointer;
|
||||
width: 75px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.modal .table .select2-selection__rendered {
|
||||
line-height: 31px !important;
|
||||
}
|
||||
.modal .table .select2-container .select2-selection--single {
|
||||
height: 35px !important;
|
||||
}
|
||||
.modal .table .select2-selection__arrow {
|
||||
height: 34px !important;
|
||||
}
|
||||
|
||||
#release_detail .select2-container {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
#release_detail .select2-container .select2-selection--single, #release_detail .select2-selection--multiple
|
||||
{
|
||||
min-height: 36px !important;
|
||||
}
|
||||
#release_detail .select2-selection__arrow,
|
||||
{
|
||||
height: 36px !important;
|
||||
}
|
||||
#release_detail .select2-container--default .select2-selection--single .select2-selection__rendered
|
||||
{
|
||||
line-height: 28px !important;
|
||||
position: relative;
|
||||
top: -11px !important;
|
||||
left: -20px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('Goods Issue')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form method="get" action="{{url('/inventory/stock-out/search')}}">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-10 col-lg-10">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" value="{{isset($_GET['kword']) ? $_GET['kword'] : ''}}" name="kword" id="kword" placeholder="{{__('GIN-Number')}}">
|
||||
<input id="start-invoice-date" value="{{isset($_GET['issue_date']) ? $_GET['issue_date'] : ''}}" name="issue_date" class="form-control" onfocus="(this.type='date')" onblur="(this.type='text')" placeholder="From Date" type="text">
|
||||
<input id="end-invoice-date" value="{{isset($_GET['issue_date_to']) ? $_GET['issue_date_to'] : ''}}" name="issue_date_to" class="form-control" onfocus="(this.type='date')" onblur="(this.type='text')" placeholder="To date" type="text">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm rounded-0 btn-inverse-secondary px-3" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['add_stockout']))
|
||||
<button class="btn btn-info rounded-0 waves-effect px-3 ml-2" type="button" data-action="new" data-toggle="modal" data-target="#modal-medicine-release" data-backdrop="static"><i class="typcn typcn-plus"></i> {{__('general.btn_add_new')}}</button>
|
||||
@endif
|
||||
<button type="button" class="btn btn-white rounded-0 dropdown-toggle ml-4" data-toggle="dropdown" aria-expanded="true">{{__('report.btn_action')}}</button>
|
||||
<div class="dropdown-menu" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 44px, 0px);" x-placement="bottom-start">
|
||||
<button type="button" data-toggle="modal" data-target="#print_preview_modal" data-backdrop="static" class="dropdown-item font-14">{{__('report.btn_action_print')}}</button>
|
||||
<button type="submit" value="true" name="export" class="dropdown-item font-14">{{__('report.btn_action_export')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2" width="50px">{{__('physician.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('physician.table_action')}}</th>
|
||||
<th class="py-2" width="200px">{{__('GIN-Number')}}</th>
|
||||
<th class="py-2" width="250px">{{__('Issue Date')}}</th>
|
||||
<th class="py-2" width="250px">{{__('Description')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('physician.table_status')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($medicineReleases as $k=>$medicineRelease)
|
||||
<tr>
|
||||
<td class="py-1 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group">
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_stockout']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary mr-2" title="{{__('general.btn_edit')}}" data-action="edit" data-uid="{{$medicineRelease->id}}" data-toggle="modal" data-target="#modal-medicine-release" data-backdrop="static">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_stockout']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger " title="{{__('general.btn_delete')}}" onclick="delete_data({{$medicineRelease->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-1">{{$medicineRelease->gin_number}}</td>
|
||||
<td class="py-1">{{date('d-m-Y',strtotime($medicineRelease->issue_date))}}</td>
|
||||
<td class="py-1">{{$medicineRelease->description}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<i class="mdi {{$medicineRelease->record_status_id == 1 ? 'mdi-check-circle text-primary' : 'mdi-checkbox-blank-circle-outline'}}"></i>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $medicineReleases->links('pagination.custom') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<div class="modal fade modal-primary" id="modal-medicine-release">
|
||||
<div class="modal-dialog modal-semi-xxl modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title new">{{__('New Supplier')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form method="POST" action="#" id="form-stock-out" enctype="multipart/form-data" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="form-group mb-1">
|
||||
<label class="font-weight-medium" for="lab-name-en">{{__('GIN-Number')}}</label>
|
||||
<input type="text" class="form-control clearable rounded-0" id="gin-number" name="gin_number" placeholder="{{__('Good Issue Note Number')}}">
|
||||
</div>
|
||||
</div>
|
||||
{{-- <div class="col-sm-12 col-md-4">--}}
|
||||
{{-- <div class="form-group mb-1">--}}
|
||||
{{-- <label class="font-weight-medium" for="lab-name-en">{{__('Supplier')}} <span class="text-danger">*</span></label>--}}
|
||||
{{-- <select class="form-control clearable rounded-0 select2" id="supplier" name="supplier" style=" width: 100% !important;">--}}
|
||||
{{-- <option></option>--}}
|
||||
{{-- @foreach($suppliers as $supplier)--}}
|
||||
{{-- <option value="{{$supplier->id}}">{{$supplier->name_en}}</option>--}}
|
||||
{{-- @endforeach--}}
|
||||
{{-- </select>--}}
|
||||
{{-- </div>--}}
|
||||
{{-- </div>--}}
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="form-group mb-1">
|
||||
<label class="font-weight-medium" for="lab-name-en">{{__('Issue Date')}} <span class="text-danger">*</span></label>
|
||||
<input type="date" class="form-control clearable rounded-0" id="issue-date" name="issue_date">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 py-0 px-4">
|
||||
<div class="row">
|
||||
<table class="table table-bordered " id="release_detail">
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<td width="250px" class="p-1">@lang('Medical Item Group')</td>
|
||||
<td width="350px" class="p-1">@lang('Medical Item')</td>
|
||||
<td width="150px" class="p-1">@lang('Lot No.')</td>
|
||||
<td width="250px" class="p-1">@lang('Medical Item Unit') </td>
|
||||
<td width="150px" class="p-1">Quantity</td>
|
||||
<td class="p-1">Remark</td>
|
||||
<td width="60px" class="p-1 text-center">
|
||||
<button type="button" onclick="addReleaseMedicalItem()" class="btn rounded-0 btn-md btn-light"><i class="mdi mdi-plus-circle text-info" ></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="release_detail_body"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 p-0 mt-3">
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" rows="2" placeholder="Description..." id="note" name="note"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="col-sm-10 text-left text-muted" style="font-size:10px !important;">
|
||||
<span id="creator"></span> <span id="creator-time"></span><br>
|
||||
<span id="modifier"></span> <span id="modifier-time"></span>
|
||||
</div>
|
||||
<button type="button" class="btn btn-info rounded-0" id="btnSave"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-light rounded-0" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('modal.stock_out_print')
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script>
|
||||
|
||||
var save_url = "{{url('inventory/stock-out/save')}}";
|
||||
var update_url = "{{url('inventory/stock-out/update')}}";
|
||||
var delete_url = "{{url('inventory/stock-out/delete')}}";
|
||||
|
||||
var get_url = "{{url('inventory/stock-out/get')}}";
|
||||
|
||||
var inventory_base_url = "{{url('inventory')}}";
|
||||
|
||||
let modal_add_title = "{{__('New Goods Issue')}}";
|
||||
let modal_edit_title = "{{__('Edit Goods Issue')}}";
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/medicine_release.js?time='.time())}}"></script>
|
||||
|
||||
<script>
|
||||
|
||||
function getMedicalItemByGroupId(id, rowid) {
|
||||
var div_data = "";
|
||||
$("#medicine_name" + rowid).html("<option value=''></option>");
|
||||
$.ajax({
|
||||
url: inventory_base_url+'/medicine/group/'+id,
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
success: function (res) {
|
||||
if(res.success) {
|
||||
$.each(res.data, function (i, obj) {
|
||||
var sel = "";
|
||||
div_data += "<option value='" + obj.id + "'>" + obj.medicine.name + " (" + Number(obj.available_quantity).toFixed(0) + ")</option>";
|
||||
});
|
||||
$("#medicine_name" + rowid).html("<option value=''>Select</option>");
|
||||
$('#medicine_name' + rowid).append(div_data);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function addReleaseMedicalItem(purchaseDetail = null) {
|
||||
var table = document.getElementById("release_detail_body");
|
||||
var table_len = table.rows.length;
|
||||
var id = table_len + 1
|
||||
|
||||
var opt = "<?php foreach($medicineGroups as $item){ ?>";
|
||||
opt += "<option value='<?php echo $item->id ?>'><?php echo $item->name_en ?></option>";
|
||||
opt += "<?php } ?>";
|
||||
|
||||
var medicalItemUnitOpt = "<?php foreach($medicineUnits as $item){ ?>";
|
||||
medicalItemUnitOpt += "<option value='<?php echo $item->id ?>'><?php echo $item->name_en ?></option>";
|
||||
medicalItemUnitOpt += "<?php } ?>";
|
||||
|
||||
var row_ = "<tr id='row_" + id + "'>" +
|
||||
'<td class="p-2">' +
|
||||
'<select class="form-control form-control-sm clearable rounded-0" id="cate_' + id + '" name="category_id[]" onchange=getMedicalItemByGroupId(this.value,' + id + ') required>' +
|
||||
'<option value="">Chose</option>' + opt +
|
||||
'</select>' +
|
||||
'</td>' +
|
||||
'<td class="p-2">' +
|
||||
'<select name="drug_name[]" id="medicine_name' + id + '" class="form-control clearable form-control-sm rounded-0" required></select>' +
|
||||
'</td>' +
|
||||
'<td class="p-2">' +
|
||||
' <input type="text" class="form-control-sm form-control rounded-0 lotno" name="lotno[]" id="lotno_' + id + '" value="0">' +
|
||||
'</td>' +
|
||||
'<td class="p-2">' +
|
||||
'<select class="form-control form-control-sm clearable rounded-0" id="unit_' + id + '" name="medicine_unit_id[]" required>' +
|
||||
'<option value="">Chose</option>' + medicalItemUnitOpt +
|
||||
'</select>' +
|
||||
'</td>' +
|
||||
'<td class="p-2">' +
|
||||
' <input type="number" class="form-control-sm form-control rounded-0 qty" name="quantity[]" id="qty_' + id + '" value="1" required step="any" min="0.00">' +
|
||||
'</td>' +
|
||||
'<td class="p-2">' +
|
||||
' <input type="text" class="form-control-sm form-control rounded-0 qty" name="remark[]" id="remark_' + id + '">' +
|
||||
'</td>' +
|
||||
'<td style="margin-top:20px;" class="p-2">' +
|
||||
' <button type="button" onclick="removePurchasedMedicalItem(' + id + ')" class="btn rounded-0 btn-md btn-danger"><i class="mdi mdi-trash-can text-white"></i></button>' +
|
||||
'</td>' +
|
||||
'</tr>';
|
||||
table.insertRow(table_len).outerHTML = row_;
|
||||
|
||||
if (purchaseDetail != null) {
|
||||
$('#cate_' + id).val(purchaseDetail.medicine_group_id);
|
||||
$('#unit_' + id).val(purchaseDetail.medicine_unit_id)
|
||||
$('#qty_' + id).val(purchaseDetail.quantity)
|
||||
$('#lotno_' + id).val(purchaseDetail.lotno)
|
||||
$('#remark_' + id).val(purchaseDetail.remark)
|
||||
$('#medicine_name' + id).empty().append('<option selected value = "'+purchaseDetail.medicine_item_id+'">'+purchaseDetail.medicine_item.medicine.name+'</option>');
|
||||
}
|
||||
|
||||
$("#medicine_name"+id).select2();
|
||||
$("#unit_"+id).select2();
|
||||
|
||||
}
|
||||
|
||||
function removePurchasedMedicalItem(id)
|
||||
{
|
||||
$("#row_"+id).remove();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,240 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<style>
|
||||
.center {
|
||||
height:100%;
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
|
||||
}
|
||||
.form-input {
|
||||
width:50%;
|
||||
padding:0px 0px 0px 0;
|
||||
}
|
||||
.form-input img {
|
||||
width:100%;
|
||||
display:none;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.form-input input {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.form-input label {
|
||||
height:25px;
|
||||
background:#cdcdcd26;
|
||||
color:#c9c9c9;
|
||||
cursor:pointer;
|
||||
width: 75px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('inventory.sp_table_title')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form method="get" action="{{url('/inventory/supplier/search')}}">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" value="{{isset($_GET['kword']) ? $_GET['kword'] : ''}}" name="kword" id="kword" placeholder="{{__('Supplier name')}}">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-inverse-secondary px-3" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['add_supplier']))
|
||||
<button class="btn btn-info waves-effect px-3 ml-2" type="button" data-action="new" data-toggle="modal" data-target="#modal-supplier" data-backdrop="static"><i class="typcn typcn-plus"></i> {{__('general.btn_add_new')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2" width="50px">{{__('physician.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('physician.table_action')}}</th>
|
||||
<th class="py-2">{{__('VAT Number')}}</th>
|
||||
<th class="py-2">{{__('Suppler Name')}}</th>
|
||||
<th class="py-2">{{__('Contact Person')}}</th>
|
||||
<th class="py-2">{{__('Position')}}</th>
|
||||
<th class="py-2">{{__('Phone Number')}}</th>
|
||||
<th class="py-2">{{__('Email')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('physician.table_status')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($suppliers as $k=>$supplier)
|
||||
<tr>
|
||||
<td class="py-1 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_supplier']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary mr-2" title="{{__('general.btn_edit')}}" data-action="edit" data-uid="{{$supplier->id}}" data-toggle="modal" data-target="#modal-supplier" data-backdrop="static">
|
||||
<i class="typcn typcn-edit"></i>
|
||||
</button>
|
||||
@endif
|
||||
@if($supplier->record_status_id==0)
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary " title="Restore" onclick="restore_data({{$supplier->id}})"><i class="typcn typcn-plus"></i></button>
|
||||
@else
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_supplier']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger " title="{{__('general.btn_delete')}}" onclick="delete_data({{$supplier->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-1" width="300px">{{$supplier->vat_number}}</td>
|
||||
<td class="py-1" width="300px">{{$supplier->name_en}}</td>
|
||||
<td class="py-1" width="300px">{{$supplier->contact_name}}</td>
|
||||
<td class="py-1" width="300px">{{$supplier->position}}</td>
|
||||
<td class="py-1" width="300px">{{$supplier->phone_number}}</td>
|
||||
<td class="py-1" width="300px">{{$supplier->email}}</td>
|
||||
|
||||
|
||||
|
||||
<td class="py-1 text-center">
|
||||
<i class="mdi {{$supplier->record_status_id == 1 ? 'mdi-check-circle text-primary' : 'mdi-checkbox-blank-circle-outline'}}"></i>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $suppliers->links('pagination.custom') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<div class="modal fade modal-primary" id="modal-supplier">
|
||||
<div class="modal-dialog modal-xl">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title new">{{__('New Supplier')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form method="POST" action="#" id="form-physician" enctype="multipart/form-data" onkeydown="return event.key != 'Enter';">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical col-sm-12">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Supplier Name')}} <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" name="name_en" id="name-en" placeholder="{{__('Supplier Name')}}">
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('VAT Number')}} <span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" name="vat_number" id="vat-number" placeholder="">
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Address')}} <span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" name="address" id="address" placeholder="">
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Description')}} <span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" name="description" id="description" placeholder="">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Contact Name')}} <span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" name="contact_name" id="contact-name" placeholder="">
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Position')}} <span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" name="position" id="position" placeholder="">
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Phone Number')}} <span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" name="phone_number" id="phone-number" placeholder="">
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('E-mail')}} <span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" name="email" id="email" placeholder="">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info" id="btnSave"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-light" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
<script>
|
||||
|
||||
var save_url = "{{url('inventory/supplier/save')}}";
|
||||
var update_url = "{{url('inventory/supplier/update')}}";
|
||||
var delete_url = "{{url('inventory/supplier/delete')}}";
|
||||
var restore_url = "{{url('inventory/supplier/restore')}}";
|
||||
|
||||
var get_url = "{{url('inventory/supplier/get')}}";
|
||||
|
||||
let modal_add_title = "{{__('supplier.form_add_tittle')}}";
|
||||
let modal_edit_title = "{{__('supplier.form_edit_tittle')}}";
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/supplier.js')}}"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,577 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<style>
|
||||
#test-sample-table .dropdown .dropdown-toggle:after {
|
||||
display: none;
|
||||
}
|
||||
#test-sample-table .dropdown .dropdown-menu{
|
||||
left: -90px !important;
|
||||
top: -45px !important;
|
||||
background: #fbfbfb !important;
|
||||
}
|
||||
.btn-equation{
|
||||
width: 40px !important;
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
height: 40px !important;
|
||||
margin-right: 3px;
|
||||
}
|
||||
.btn-ins-test{
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
height: 40px !important;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--multiple {
|
||||
margin-bottom: 0px !important;
|
||||
border-radius: 0px !important;
|
||||
height: 36px !important;
|
||||
min-height: 36px !important;
|
||||
max-height: 36px !important;
|
||||
}
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||
background-color: #e4e4e4;
|
||||
border: 0px !important;
|
||||
border-radius: 0;
|
||||
cursor: default;
|
||||
float: left;
|
||||
margin-right: 3px;
|
||||
margin-top: 3px;
|
||||
padding: 0 3px;
|
||||
font-size: 11px !important;
|
||||
}
|
||||
.dropdown .dropdown-menu {
|
||||
box-shadow: 0px 1px 5px 1px rgb(133 135 139 / 35%);
|
||||
border-radius: 15px !important;
|
||||
border:1px solid #dbdada;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('test_sample.table_title')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
|
||||
<form method="get" action="{{url('test/search')}}">
|
||||
<div class="row">
|
||||
<div class="col-sm-7">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control rounded-top-left-25 rounded-bottom-left-25 rounded-right-0" value="{{isset($_GET['kword']) ? $_GET['kword'] : ''}}" name="kword" id="kword" placeholder="{{__('test_sample.search_placeholder')}}">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-inverse-secondary px-3 rounded-0" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}}</button>
|
||||
<button class="btn btn-sm btn-inverse-secondary dropdown show pl-0 ml-0 rounded-top-right-25 rounded-bottom-right-25" type="button">
|
||||
<span style="padding-left: 9px !important; padding-right: 9px !important;" class="count-indicator dropdown-toggle d-flex justify-content-center align-items-center rounded-0" data-toggle="dropdown" aria-expanded="true">
|
||||
{{__('test_sample.table_department')}}
|
||||
</span>
|
||||
<div class="dropdown-menu dropdown-menu-right navbar-dropdown preview-list" aria-labelledby="messageDropdown">
|
||||
@foreach($departments as $department)
|
||||
<a class="dropdown-item preview-item" href="{{ url('test/search?department='.$department->id) }}">
|
||||
<div class="preview-item-content flex-grow">
|
||||
<p class="font-weight-light small-text text-black font-14 mb-0 pr-5">{{ $department->name }}</p>
|
||||
</div>
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
</button>
|
||||
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['create_test_sample']))
|
||||
<button class="btn btn-inverse-success rounded-25 waves-effect px-3 ml-3" type="button" data-action="new" data-toggle="modal" data-target="#modal-test" data-backdrop="static"><i class="typcn typcn-plus"></i> {{__('general.btn_add_new')}}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr class="my-3 d-none">
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover" id="test-sample-table">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2" width="50px">{{__('test_sample.table_no')}}</th>
|
||||
<th class="py-2" width="100px">{{__('test_sample.table_action')}}</th>
|
||||
<th class="text-center py-2" width="80px">{{__('test_sample.code')}}</th>
|
||||
<th class="py-2">{{__('test_sample.table_name')}}</th>
|
||||
<th class="py-2">{{__('test_sample.table_sample_type')}}</th>
|
||||
<th class="py-2">{{__('test_sample.table_sign')}}</th>
|
||||
{{-- <th class="py-2">{{__('test_sample.table_group_result')}}</th>--}}
|
||||
<th class="py-2">{{__('test_sample.table_field_type')}}</th>
|
||||
<th class="py-2">{{__('test_sample.table_price')}} ($)</th>
|
||||
<th class="text-center py-2" width="100px">{{__('test_sample.table_sort')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($testSamples as $k=>$testSample)
|
||||
<tr>
|
||||
<td class="py-1 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group">
|
||||
<button type="button" class="btn btn-sm btn-inverse-success mr-2 btnCommission py-1" title="{{__('test_sample.table_btn_pc')}}" data-action="add_commission" data-uid="{{$testSample->id}}" data-toggle="modal" data-target="#modal-physician-commission" data-backdrop="static"><i class="mdi mdi-percent"></i></button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['update_test_sample']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-info mr-2 py-1" title="{{__('test_sample.form_edit_tittle')}}" data-action="edit" data-uid="{{$testSample->id}}" data-toggle="modal" data-target="#modal-test" data-backdrop="static"><i class="typcn typcn-edit"></i></button>
|
||||
@endif
|
||||
@if($testSample->record_status_id==0)
|
||||
<button type="button" class="btn btn-sm btn-light" disabled><i class="mdi mdi-close-circle"></i></button>
|
||||
@else
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_test_sample']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger py-1" title="{{__('general.btn_delete')}}" onclick="delete_data({{$testSample->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-1 text-center">{{$testSample->code}}</td>
|
||||
<td class="py-1">{{$testSample->test_name}}</td>
|
||||
<td class="py-1">{{$testSample->sample_type_name . ' : ' . $testSample->department_name}}</td>
|
||||
<td class="py-1">{{$testSample->unit_sign}}</td>
|
||||
{{-- <td class="py-1">{{$testSample->group_result}}</td>--}}
|
||||
<td class="py-1">
|
||||
<label class="badge badge-outline-info rounded-25">
|
||||
{{$testSample->field_type == 1 ? __('test_sample.numeric') : ( $testSample->field_type == 2 ? __('test_sample.single') : ( $testSample->field_type == 3 ? __('test_sample.multiple') : ($testSample->field_type==4 ? __('test_sample.calculate') : ( $testSample->field_type==6 ? __('test_sample.text') :($testSample->field_type==5 ? __('test_sample.attachment') : __('test_sample.heading'))))))}}
|
||||
</label>
|
||||
</td>
|
||||
<td class="py-1 text-right"><span class="float-left {{$testSample->group_result=='' ? 'd-none':''}}">$</span> {{$testSample->usd_price}}</td>
|
||||
<td class="py-1 text-right" id="tr-{{$testSample->id}}">
|
||||
<div class="dropdown float-right">
|
||||
<span class=" dropdown-toggle" type="button" id="dropdownMenuSizeButton2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{$testSample->weight}} <button class="btn btn-sm btn-inverse-warning ml-3 py-1"><i class="mdi mdi-unfold-more-horizontal"></i></button>
|
||||
</span>
|
||||
<div class="dropdown-menu p-3 bg-inverse-light">
|
||||
<form method="post" action="{{url('test-sample.reorder')}}">
|
||||
@csrf
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<input type="hidden" name="id" value="{{$testSample->id}}" required>
|
||||
<input type="number" name="order_number" min="1" step="1" value="{{$testSample->weight}}" class="form-control rounded-top-left-25 rounded-bottom-left-25 rounded-right-0 form-control-sm">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-xs btn-inverse-info rounded-top-right-25 rounded-bottom-right-25" type="submit"><i class="mdi mdi-content-save"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $testSamples->appends($_GET)->links('pagination.custom') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Test Sample -->
|
||||
<div class="modal fade modal-primary" id="modal-test">
|
||||
<div class="modal-dialog modal-semi-xxl">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title new">{{__('test_sample.form_add_tittle')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body" style="padding-bottom: 0px !important;">
|
||||
<form method="post" class="p-2" action="#" id="form-test-sample">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="uid" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<label for="lab-name-en">{{__('test_sample.form_test_name')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group" id="testItem">
|
||||
<div class="form-group" style="flex: 1 !important;">
|
||||
<select class="form-control rounded-0 rounded-right-0 select2" name="test_item" id="test-item" style=" width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($testItems as $testItem)
|
||||
<option value="{{$testItem->id}}">{{$testItem->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
@if(Auth::id()==1)<button class="btn btn-sm btn-inverse-warning px-3" type="button" onclick="editTest()"><i class="mdi mdi-table-edit"></i> </button> @endif
|
||||
<button class="btn btn-sm rounded-0 btn-inverse-info px-3" type="button" onclick="addNewTest('test-item')"><i class="typcn typcn-plus"></i> </button>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('test_sample.code')}}</label>
|
||||
<input type="text" class="form-control rounded-0" name="code" id="code" placeholder="{{__('test_sample.code')}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('test_sample.form_unit_sign')}}</label>
|
||||
<input type="text" class="form-control rounded-0" name="unit_sign" id="unit-sign" placeholder="{{__('test_sample.form_unit_sign')}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('test_sample.form_field_type')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control rounded-0" name="filed_type_id" id="field-type-id" style=" width: 100% !important;">
|
||||
<option value=""> - {{__('general.choose_option')}} - </option>
|
||||
<option value="0">{{__('test_sample.heading')}}</option>
|
||||
<option value="1">{{__('test_sample.numeric')}}</option>
|
||||
<option value="2">{{__('test_sample.single')}}</option>
|
||||
<option value="3">{{__('test_sample.multiple')}}</option>
|
||||
<option value="4">{{__('test_sample.calculate')}}</option>
|
||||
<option value="5">{{__('test_sample.attachment')}}</option>
|
||||
<option value="6">{{__('test_sample.text')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('test_sample.table_department')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control rounded-0 select2" name="department_id" id="department-id" style=" width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($departments as $department)
|
||||
<option value="{{$department->id}}">{{$department->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('test_sample.table_sample_type')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control rounded-0 select2" name="sample_type_id" id="sample-type-id" style=" width: 100% !important;">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('test_sample.table_sort')}} </label>
|
||||
<input type="number" class="form-control rounded-0" value="0" name="weight" id="weight" placeholder="{{__('test_sample.table_sort')}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('test_sample.heading')}}</label>
|
||||
<select class="form-control rounded-0 select2" name="heading_id" id="heading-id" style=" width: 100% !important;">
|
||||
<option value="0">No Heading</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('test_sample.table_group_result')}}</label>
|
||||
<input type="text" class="form-control rounded-0" name="group_result" id="group-result" placeholder="{{__('test_sample.table_group_result')}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('test_sample.table_price')}} ($)</label>
|
||||
<input type="number" value="0" min="0" step="0.5" class="form-control rounded-0" name="usd_price" id="usd-price" placeholder="{{__('test_sample.table_price')}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-4" id="formula-input-area" style="display: none;">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('test_sample.form_formula')}}</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-inverse-warning rounded dropdown-toggle rounded-right-0" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-bs-toggle="dropdown" data-bs-auto-close="false"><i class="mdi mdi-contrast"></i> {{__('test_sample.formula_equation')}}</button>
|
||||
<div class="dropdown-menu border w-100 p-3">
|
||||
<p class="dropdown-item-">
|
||||
<button onclick="insertEquation('+', 'formula')" class="btn btn-xs btn-equation btn-inverse-secondary" type="button">+</button>
|
||||
<button onclick="insertEquation('-', 'formula')" class="btn btn-sm btn-equation btn-inverse-secondary" type="button">-</button>
|
||||
<button onclick="insertEquation('*', 'formula')" class="btn btn-sm btn-equation btn-inverse-secondary" type="button">x</button>
|
||||
<button onclick="insertEquation('^', 'formula')" class="btn btn-sm btn-equation btn-inverse-secondary" type="button">^</button>
|
||||
<button onclick="insertEquation('/', 'formula')" class="btn btn-sm btn-equation btn-inverse-secondary" type="button">/</button>
|
||||
<button onclick="insertEquation('(', 'formula')" class="btn btn-sm btn-equation btn-inverse-secondary" type="button">(</button>
|
||||
<button onclick="insertEquation(')', 'formula')" class="btn btn-sm btn-equation btn-inverse-secondary" type="button">)</button>
|
||||
<button onclick="insertEquation('T0', 'formula')" class="btn btn-sm btn-ins-test btn-inverse-secondary" type="button">AGE (y)</button>
|
||||
<button onclick="insertEquation('T00', 'formula')" class="btn mt-2 btn-sm btn-ins-test btn-inverse-secondary" type="button">SEXVal- eGFR (M=1, F=0.742)</button>
|
||||
<button data-toggle="modal" data-backdrop="static" data-target="#modal-test-sample-formula" class="btn mt-2 ml-1 btn-sm btn-ins-test btn-inverse-secondary" type="button">[{{__('test_sample.table_title')}}]</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" class="form-control rounded rounded-left-0" name="formula" id="formula" placeholder="{{__('test_sample.form_formula')}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" id="format-input-area" style="display: none">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('test_sample.form_format')}}</label>
|
||||
<select class="form-control rounded-0" name="format_value" id="format">
|
||||
<option value="">-</option>
|
||||
<option value="0">0</option>
|
||||
<option value="1">0.0</option>
|
||||
<option value="2">0.00</option>
|
||||
<option value="3">0.000</option>
|
||||
<option value="4">00</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12" id="description-input-area">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('test_sample.form_description')}}</label>
|
||||
<textarea style="height: 46px !important; font-size: 13px; line-height: 20px;" class="form-control rounded-0" name="description" id="description" placeholder="{{__('test_sample.form_description')}}"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="form-check" style="width: 250px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="checkbox" name="is_bold" id="is-bold" class="form-check-input">
|
||||
{{__('test_sample.result_highlight_with_bold_text')}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<div class="form-check" style="width: 250px !important;">
|
||||
<label class="form-check-label">
|
||||
<input type="checkbox" name="autocomplete_bind" id="autocomplete_bind" class="form-check-input">
|
||||
{{__('test_sample.auto_suggest_results')}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row" id="reference-range" style="display: none;">
|
||||
<div class="col-sm-12 mt-2">
|
||||
<div class="form-group mb-1 table-responsive">
|
||||
<h6 for="reference-range">{{__('test_sample.form_ref_range')}}</h6>
|
||||
<table class="table table-bordered" style="font-size: 12px !important;" id="reference-range-table">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<td class="py-2">{{__('test_sample.form_ref_patient_type')}}</td>
|
||||
<td class="py-2">{{__('test_sample.form_ref_min')}}</td>
|
||||
<td class="py-2">{{__('test_sample.form_ref_sign')}}</td>
|
||||
<td class="py-2">{{__('test_sample.form_ref_max')}}</td>
|
||||
<td class="py-2 text-center" width="90px">
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary" id="reference-range-add"><i class="typcn typcn-plus"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="options" style="display: none;">
|
||||
<div class="col-sm-12 mt-2">
|
||||
<div class="form-group table-responsive mb-1">
|
||||
<h6 for="reference-range" style="line-height: inherit ">{{__('test_sample.form_organism')}}</h6>
|
||||
<table class="table" style="font-size: 10px !important;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="row">
|
||||
<div class="col-sm-4 p-0">
|
||||
<input type="text" id="search-organism" class="form-control form-control-sm rounded-0" placeholder="{{__('test_sample.organism_input_placeholder')}}">
|
||||
{{-- <div class="group-check-box mt-1" style="border: 1px solid #eee;">--}}
|
||||
<div id="organism-box" class="form-group overflow-auto py-2 px-3" style="height: 120px; border: 1px solid #eee;" >
|
||||
</div>
|
||||
{{-- </div>--}}
|
||||
</div>
|
||||
<div class="col-sm-1 p-0 text-center m-auto">
|
||||
<button type="button" id="btnSelectOrg" onclick="selectedOrganismRow()" class="btn btn-sm btn-info m-1"><i class="mdi mdi-chevron-right"></i></button><br>
|
||||
<button type="button" onclick="removeSelectedOrganism()" class="btn btn-sm btn-info mt-3"><i class="mdi mdi-chevron-left"></i></button>
|
||||
</div>
|
||||
<div class="col-sm-7 p-0 table-responsive">
|
||||
<div class="font-13" style="height: 160px; " >
|
||||
<table class="table font-13 table-bordered">
|
||||
<thead>
|
||||
<tr class="bg-light">
|
||||
<td class="py-0 font-13">{{__('test_sample.select_organism')}}</td>
|
||||
<td width="85px" class="py-0 font-13">Default</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="selected-organism">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info rounded-25" id="btnSave"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span><span class="update" style="display: none">{{__('lang.update')}}</span></button>
|
||||
<button type="button" class="btn btn-secondary rounded-25 mx-3" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Physician Commission -->
|
||||
<div class="modal fade modal-primary" id="modal-physician-commission">
|
||||
<div class="modal-dialog modal-lg modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title new">{{__('test_sample.table_btn_pc')}}</h6>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="mdi mdi-close"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body" style="padding-bottom: 0px !important;">
|
||||
<form method="post" class="p-2" action="{{url('test-sample/physician-commission')}}" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="test_sample_id" id="data-id" value="0" />
|
||||
<div class="form-vertical">
|
||||
<p id="physician-test-sample-name"></p>
|
||||
<input type="hidden" name="test_sample_id" id="physician-test-sample-id" value="" />
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-1">{{__('test_sample.pc_physician')}}</th>
|
||||
<th class="py-1">{{__('test_sample.table_price')}}</th>
|
||||
<th class="py-1">{{__('test_sample.pc_rate')}} <span class="text-danger">{{$labSetting->discount_type == 1 ? '(%)' : '($)'}}</span></th>
|
||||
<th class="py-1 text-center" width="110px">{{__('test_sample.table_action')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tb-physician">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<button type="submit" class="d-none" id="btn-submit-physician-commission"></button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info rounded-25" onclick="$('#btn-submit-physician-commission').click()"><i class="fa fa-floppy-o"></i> <span class="save">{{__('lang.save')}}</span></button>
|
||||
<button type="button" class="btn btn-secondary rounded-25 mx-3" data-dismiss='modal'>{{__('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('modal.test_sample_formula')
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@include('layout.common_script')
|
||||
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/calculation_results/underscore-min.js')}}"></script>
|
||||
<script>
|
||||
|
||||
var test_base_url = "{{url('test')}}";
|
||||
|
||||
var test_sample_base_url = "{{url('test-sample')}}";
|
||||
|
||||
let patientTypes = <?php echo json_encode($patientTypes);?>;
|
||||
|
||||
let btn_apply_to_all_tests = "{{__('general.apply_to_all_test')}}";
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/test.js?time='.time())}}"></script>
|
||||
<script>
|
||||
|
||||
$('#formula-input-area').on('hide.bs.dropdown', function (e) {
|
||||
if (e.clickEvent) {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
function insertEquation(equation, inputElementId) {
|
||||
let curVal = $('#'+inputElementId).val()
|
||||
curVal+=equation
|
||||
$('#'+inputElementId).val(curVal)
|
||||
}
|
||||
|
||||
function editTest(){
|
||||
let selectedOption = $('#test-item option:selected');
|
||||
let selectedText = selectedOption.text();
|
||||
let selectedVal = selectedOption.val();
|
||||
if(selectedVal>0){
|
||||
editTestName(selectedVal, selectedText, 'test-item')
|
||||
}
|
||||
}
|
||||
|
||||
function getSelectedOrgAnt(control_state_id, handler_item_class) {
|
||||
var checkedState = $('#'+control_state_id).is(':checked');
|
||||
var checkboxes = document.getElementsByClassName(handler_item_class);
|
||||
|
||||
for (var i = 0; i < checkboxes.length; i++) {
|
||||
if(!checkedState){
|
||||
checkboxes[i].closest('label').classList.remove('d-none')
|
||||
}else{
|
||||
if(!checkboxes[i].checked){
|
||||
checkboxes[i].closest('label').classList.add('d-none')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$('#department-id-search-form').change(function () {
|
||||
window.location = test_base_url + '/search?department='+$(this).val()
|
||||
})
|
||||
|
||||
$('#sample-type-id-search-form').change(function () {
|
||||
window.location = test_base_url + '/search?department='+$('#department-id-search-form').val()+'&sample_type='+$(this).val()
|
||||
})
|
||||
|
||||
getSampleTypeByDepartmentId('<?php echo @$_GET['department'] ?>', 'sample-type-id-search-form','<?php echo @$_GET['sample_type'] ?>');
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<h1>Test Profile</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -92,8 +92,10 @@
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['assign_lab']))
|
||||
<i class="mdi mdi-domain text-info" style="font-size: 17px; cursor: pointer;" title="{{__('user_account.table_labs')}}" aria-hidden="true" data-action="assign_lab" data-uid="{{$user->id}}" data-toggle="modal" data-target="#modal-user-labs" data-backdrop="static"></i>
|
||||
@endif
|
||||
@foreach($user->lab_covers as $lab_cover)
|
||||
<label class="badge badge-outline-info rounded-25" title="{{$lab_cover->lab->name_en}}">{{ substr($lab_cover->lab->name_en,0, strpos($lab_cover->lab->name_en,' ')).'..'}}</label>
|
||||
|
||||
@foreach($user->userOrganizations as $userOrganization)
|
||||
|
||||
<label class="badge badge-outline-info rounded-25" title="{{$userOrganization->organization->name}}">{{ substr($userOrganization->organization->name,0, strpos($userOrganization->organization->name,' ')).'..'}}</label>
|
||||
@endforeach
|
||||
</td>
|
||||
{{-- <td class="py-1 text-center">--}}
|
||||
@@ -119,7 +121,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Laboratory -->
|
||||
<!-- Modal Organization -->
|
||||
<div class="modal fade modal-primary" id="modal-user">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
@@ -156,16 +158,6 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1" id="physician-id" style="display: none;">
|
||||
<label for="lab-code" class="control-label">{{__('user_account.physician')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control select2" name="sample_source_id" id="sample-source-id" style="width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($sample_sources as $sample_source)
|
||||
<option value="{{$sample_source->id}}">{{$sample_source->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -206,9 +198,9 @@
|
||||
{{__('department.form_select_all_lab')}}
|
||||
</label>
|
||||
</div>
|
||||
<select class="form-control select2-multiple" multiple="multiple" name="lab_ids" id="lab_ids" style="width: 100% !important;">
|
||||
@foreach($labs as $lab)
|
||||
<option value="{{$lab->id}}">{{$lab->name_en}}</option>
|
||||
<select class="form-control select2-multiple" multiple="multiple" name="organization_ids" id="organization_ids" style="width: 100% !important;">
|
||||
@foreach($organizations as $organization)
|
||||
<option value="{{$organization->id}}">{{$organization->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@@ -283,7 +275,7 @@
|
||||
let modal_add_title = "{{__('user_account.form_add_tittle')}}";
|
||||
let modal_edit_title = "{{__('user_account.form_edit_tittle')}}";
|
||||
|
||||
let base_lab_id = "{{Session::get('base_lab_id')}}";
|
||||
let base_organization_id = "{{Session::get('base_organization_id')}}";
|
||||
|
||||
|
||||
$('#role-id').change(function () {
|
||||
@@ -294,11 +286,11 @@
|
||||
|
||||
$('#select-all-lab').click(function () {
|
||||
if( $('#select-all-lab').is(':checked')){
|
||||
$('#lab_ids > option').prop("selected", true)
|
||||
$('#lab_ids').trigger('change')
|
||||
$('#organization_ids > option').prop("selected", true)
|
||||
$('#organization_ids').trigger('change')
|
||||
}else{
|
||||
$('#lab_ids > option').prop("selected", false)
|
||||
$('#lab_ids').trigger('change')
|
||||
$('#organization_ids > option').prop("selected", false)
|
||||
$('#organization_ids').trigger('change')
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -1,155 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
<style>
|
||||
.center {
|
||||
height:100%;
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
|
||||
}
|
||||
.form-input {
|
||||
width:250px;
|
||||
padding:20px;
|
||||
}
|
||||
.form-input img {
|
||||
width:100%;
|
||||
display:{{''==''?'none':'block'}};
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.form-input input {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.form-input label {
|
||||
height:25px;
|
||||
background:#cdcdcd26;
|
||||
color:#c9c9c9;
|
||||
cursor:pointer;
|
||||
width: 75px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="row" id="x" style="display: none;">
|
||||
<div class="col-12">
|
||||
<span class="d-flex align-items-center purchase-popup">
|
||||
<i class="typcn typcn-delete-outline" id="bannerClose"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('Initial Laboratory Settings From Existing Lab Data')}}</h4>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<form method="post" action="{{url('laboratory/clone-data')}}" class="p-2" id="form-test-sample">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('Clone From Lab')}} <span class="text-danger">*</span></label>
|
||||
<div class="input-group" id="testItem">
|
||||
<div class="form-group" style="flex: 1 !important;">
|
||||
<select class="form-control rounded-0 select2" required name="source_lab" id="source-lab" style=" width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($labs as $department)
|
||||
<option value="{{$department->id}}">{{$department->name_en }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
<button id="btnViewLabData" class="btn btn-sm rounded-0 btn-info px-3" type="button">View Data</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="data">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group mb-1">
|
||||
<label for="lab-name-en">{{__('To Lab')}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control rounded-0 select2" required name="target_lab" id="target-lab" style=" width: 100% !important;">
|
||||
<option></option>
|
||||
@foreach($labs as $department)
|
||||
<option value="{{$department->id}}">{{$department->name_en}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 text-right">
|
||||
<button class="btn rounded-0 btn-info px-3" type="submit">Clone Data</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@include('layout.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
</body>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
var base_url = "{{url('laboratory-profile')}}";
|
||||
|
||||
|
||||
$("#btnViewLabData").on('click',function(e){
|
||||
e.preventDefault();
|
||||
data_id = $('#data-id').val();
|
||||
let url = "{{url('laboratory/get-data')}}/"+$('#source-lab').val();
|
||||
$.ajax({
|
||||
url: url,
|
||||
type:"get",
|
||||
success:function(res){
|
||||
if(res.success){
|
||||
let data = (res.data)
|
||||
data.map(item =>{
|
||||
console.log(item)
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
</form> <hr class="my-3 d-none">
|
||||
</div>
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
{{-- @if(!in_array(Session::get('base_lab_id'),[37,19]))--}}
|
||||
{{-- @if(!in_array(Session::get('base_organization_id'),[37,19]))--}}
|
||||
{{-- <button type="button" onclick="paddAll()" class="btn btn-danger rounded-0 btn-xs" id="mark-as-paid" disabled>Mark as paid</button>--}}
|
||||
{{-- @endif--}}
|
||||
<div class="table-responsive">
|
||||
|
||||
@@ -1,207 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@include('layout.header')
|
||||
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/lightgallery/lightgallery.css')}}" >
|
||||
<link rel="stylesheet" href="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.css')}}" >
|
||||
<script src="{{url(env("APP_URL").'storage/assets/libs/printjs/printjs.min.js')}}"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div class="container-scroller">
|
||||
@include('layout.navbar')
|
||||
<!-- partial -->
|
||||
@include('layout.breadscrum')
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
|
||||
@include('layout.sidebar')
|
||||
|
||||
<!-- partial -->
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><i class="mdi mdi-dots-vertical menu-icon"></i> {{__('vaccination.list_title')}}</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form method="get" action="{{url('vaccination/search')}}">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" value="{{isset($_GET['kword']) ? $_GET['kword'] : ''}}" name="kword" id="kword" placeholder="{{__('sample.search_placeholder')}}">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-inverse-secondary px-3" type="submit"><i class="fa fa-search"></i> {{__('general.btn_search')}} </button>
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['add_vaccination']))
|
||||
<a class="btn btn-info waves-effect px-3 ml-2" href="{{route('vaccination.create')}}"><i class="typcn typcn-plus"></i> {{__('general.btn_add_new')}} </a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form> <hr class="my-3 d-none">
|
||||
<div class="col-sm-12 p-0 mb-1 mt-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped" id="department_dt">
|
||||
<thead>
|
||||
<tr class="bg-gradient-light">
|
||||
<th class="py-2 text-center" width="50px">{{__('sample.table_no')}}</th>
|
||||
<th class="py-2 text-center" width="100px">{{__('sample.table_action')}}</th>
|
||||
<th class="py-2 text-center" width="50px">{{__('invoice.table_invoice_code')}}</th>
|
||||
<th class="py-2" width="200px">{{__('sample.table_patient_name')}}</th>
|
||||
<th class="py-2" width="200px">{{__('patient.form_age')}}</th>
|
||||
<th class="py-2" width="200px">{{__('patient.table_sex')}}</th>
|
||||
<th class="py-2" width="200px">{{__('patient.table_phon')}}</th>
|
||||
<th class="py-2 text-center" width="120px">{{__('vaccination.date')}}</th>
|
||||
<th class="py-2 text-center" width="300px">{{__('vaccination.next_visit')}}</th>
|
||||
<th class="py-2 text-center" width="90px">{{__('invoice.table_net_cost')}}</th>
|
||||
<th class="py-2 text-center" width="90px">{{__('invoice.cash_paid')}}</th>
|
||||
<th class="py-2 text-center" width="90px">{{__('invoice.bank_paid')}}</th>
|
||||
<th class="py-2 text-center" width="90px">{{__('invoice.table_owe')}}</th>
|
||||
<!--<th class="py-2 text-center" width="90px">{{__('sample.table_status')}}</th>-->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($vaccinations as $k=>$vaccination)
|
||||
<tr>
|
||||
<td class="py-1 text-center">{{($k+1) + (($_GET['page'] ?? 1) * 20) - 20}}</td>
|
||||
<td class="py-1 text-center">
|
||||
<div class="btn-group" role="group" aria-label="Basic example" >
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['print_vaccination_invoice']))
|
||||
<a href="{{url('vaccination/edit/'.$vaccination->id.'?print')}}" class="btn btn-sm btn-info mr-2" title="{{__('Print Vaccination Invoice')}}">
|
||||
<i class="mdi mdi-printer"></i>
|
||||
</a>
|
||||
|
||||
{{-- <a href="javascript:void(0)" data-toggle="modal" data-target="#print_preview_modal" data-backdrop="static" class="btn btn-sm btn-primary mr-2" title="{{__('Print Vaccination History')}}">--}}
|
||||
{{-- <i class="mdi mdi-printer-settings"></i>--}}
|
||||
{{-- </a>--}}
|
||||
|
||||
@endif
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['edit_vaccination']))
|
||||
<a href="{{route('vaccination.edit', $vaccination->id)}}" class="btn btn-sm btn-inverse-primary mr-2" title="{{__('test_sample.form_edit_tittle')}}"><i class="typcn typcn-edit"></i></a>
|
||||
@endif
|
||||
@if($vaccination->record_status_id==0)
|
||||
<button type="button" class="btn btn-sm btn-inverse-primary " title="Restore" onclick="restore_data({{$vaccination->id}})"><i class="typcn typcn-plus"></i></button>
|
||||
@else
|
||||
@if(\App\Http\Controllers\Helper\GlobalController::user_can(Auth::user()->role_id, ['delete_vaccination']))
|
||||
<button type="button" class="btn btn-sm btn-inverse-danger " title="{{__('general.btn_delete')}}" onclick="delete_data({{$vaccination->id}})"><i class="mdi mdi-close-circle"></i></button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-1">{{$vaccination->invoice_code}}</td>
|
||||
<td class="py-1">{{@$vaccination->patient->name_en}}</td>
|
||||
<td class="py-1">{{@\App\Helpers\Helpers::getAge($vaccination->patient->dob, date('Y-m-d'))}}</td>
|
||||
<td class="py-1">{{@$vaccination->patient->gender == 1 ? 'M' : 'F'}}</td>
|
||||
<td class="py-1">{{@$vaccination->patient->phone_number}}</td>
|
||||
<td class="py-1 text-center">{{date('d-m-Y',strtotime($vaccination->vaccination_date))}}</td>
|
||||
<td class="py-1 text-center">{{date('d-m-Y',strtotime($vaccination->next_visit_date))}}</td>
|
||||
<td class="py-1 text-right">{{$vaccination->gross_total}}</td>
|
||||
<td class="py-1 text-right">{{$vaccination->deposit}}</td>
|
||||
<td class="py-1 text-right">{{$vaccination->bank_deposit}}</td>
|
||||
<td class="py-1 text-right">{{$vaccination->balance}}</td>
|
||||
<!--<td class="py-1 text-center">-->
|
||||
<!-- <i class="mdi {{$vaccination->record_status_id == 1 ? 'mdi-check-circle text-primary' : 'mdi-checkbox-blank-circle-outline'}}"></i>-->
|
||||
<!--</td>-->
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
{!! $vaccinations->links('pagination.custom') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@include('layout.footer')
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@include('modal.vaccination_print')
|
||||
|
||||
</div>
|
||||
@include('layout.common_script')
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
var patient_base_url = "{{url('patient')}}";
|
||||
var vaccination_base_url = "{{url('vaccination')}}";
|
||||
|
||||
let modal_add_title = "{{__('Add Vaccination')}}";
|
||||
let modal_edit_title = "{{__('Edit Vaccination')}}";
|
||||
|
||||
|
||||
$('#vaccination-detail-add').click(function () {
|
||||
addVaccinationRow();
|
||||
})
|
||||
|
||||
function addVaccinationRow(medicine_id = 0, step=1, next_visit = ''){
|
||||
var id = 'vac-val-' + (Math.floor(Math.random() * (1000 - 100)) + 100) + (Math.floor(Math.random() * (99)) + 1)
|
||||
var medicine = '<select class="form-control select2 rounded-0" style="width: 100%" name="medicine_id" id="medicine-id'+id+'">' +
|
||||
'<option></option>' +
|
||||
'@foreach($medicineItems as $medicineItem)' +
|
||||
'<option value="{{$medicineItem->id}}">{{$medicineItem->medicine->name_en}}</option>' +
|
||||
'@endforeach' +
|
||||
'</select>';
|
||||
if($('#vaccination-detail tbody tr').length) {
|
||||
var $lastRow = $("[id$=vaccination-detail] tr:not('.ui-widget-header'):last"); //grab row before the last row
|
||||
var $newRow = $lastRow.clone().prop({id: id}); //clone it
|
||||
$newRow.find('td:last').addClass('py-0 text-center').html('<button type="button" class="btn btn-sm btn-inverse-danger " onclick="removeVaccinationRow(\'' + id + '\')"><i class="mdi mdi-close-circle"></i></button>');
|
||||
$newRow.find('td:nth(0)').html(medicine)
|
||||
$newRow.find('input[name="step"]').val(step); //clear out textbox values
|
||||
$newRow.find('input[name="next_visit"]').val(next_visit); //clear out textbox values
|
||||
$lastRow.after($newRow); //add in the new row at the end
|
||||
$newRow.find('.select2').select2({placeholder: choose_option, allowClear: true});
|
||||
}
|
||||
else{
|
||||
var tr = document.createElement('TR');
|
||||
tr.setAttribute('id', id);
|
||||
tr.insertCell(0).innerHTML = medicine
|
||||
tr.insertCell(1).innerHTML = '<input type="number" value="'+step+'" name="step" id="step" class="form-control">';
|
||||
tr.insertCell(2).innerHTML = '<input type="date" value="'+next_visit+'" class="form-control" name="next_visit" id="next-visit">';
|
||||
tr.insertCell(3).innerHTML = '<button type="button" class="btn btn-sm btn-inverse-danger " onclick="removeVaccinationRow(\'' + id + '\')"><i class="mdi mdi-close-circle"></i></button>';
|
||||
tr.cells[0].classList.add('p-2');
|
||||
tr.cells[1].classList.add('p-2');
|
||||
tr.cells[2].classList.add('p-2');
|
||||
tr.cells[3].classList.add('p-2','text-center');
|
||||
$('#vaccination-detail tbody').append(tr);
|
||||
$('.select2').select2({placeholder: choose_option, allowClear: true});
|
||||
}
|
||||
|
||||
$('#medicine-id'+id).val(medicine_id).trigger('change');
|
||||
|
||||
}
|
||||
|
||||
function removeVaccinationRow(id){
|
||||
$('#vaccination-detail tr#'+id).remove();
|
||||
}
|
||||
|
||||
</script>
|
||||
<script src="{{url(env("APP_URL").'storage/assets/js/admin/vaccination.js')}}"></script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user