resolved conflicts

This commit is contained in:
2025-03-31 03:46:05 +03:00
6454 changed files with 1520539 additions and 9 deletions
@@ -0,0 +1,152 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
@endpush
@section('content')
<div class="row bg-title">
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('prescription_errors.prescription_errors') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('prescription_errors.dashboard') }}</a></li>
<li class="active">{{ __('prescription_errors.prescription_errors') }}</li>
</ol>
</div>
</div>
<div class="white-box">
{{ Form::open(['route' => 'view_prescription_errors' , 'data-toggle' => 'validator']) }}
<div class="row">
<div class="col-md-1"></div>
<div class="col-md-4">
<div class="form-group">
{{ Form::label('start_date',__('prescription_errors.date_from')) }}
{{ Form::text('start_date','',['class' => 'form-control compulsory', 'required','readonly','id'=>'start_date']) }}
</div>
</div>
<div class="col-md-4">
<div class="form-group">
{{ Form::label('end_date',__('prescription_errors.date_to')) }}
{{ Form::text('end_date','',['class' => 'form-control compulsory', 'required','readonly','id'=>'end_date']) }}
</div>
</div>
<div class="col-md-3">
<br>
{{ Form::button(__('prescription_errors.search'),['type'=>'submit','class'=>'btn btn-rounded btn-success waves-effect waves-light m-r-10']) }}
</div>
</div>
{{ Form::close() }}
</div>
<div class="panel panel-default">
<div class="panel-body">
<p><code>{{ $search_text }}</code></p>
<p class="text-muted m-b-30">{{ __('prescription_errors.export_data_to_copy_csv_pdf_print') }}</p>
<div class="table-responsive">
<table id="table" class="table table-striped color-bordered-table success-bordered-table">
<thead>
<tr>
<th>{{ __('prescription_errors.name_of_prescriber') }}</th>
<th>{{ __('prescription_errors.error_type') }}</th>
<th>{{ __('prescription_errors.severity') }}</th>
<th>{{ __('prescription_errors.date') }}</th>
<th>{{ __('prescription_errors.patient') }}</th>
<th>{{ __('prescription_errors.pharmacist') }}</th>
<th>{{ __('prescription_errors.comments') }}</th>
<th colspan="2"></th>
</tr>
</thead>
<tbody>
@foreach($prescription_errors as $record)
@php
// an error fixed on 30 Jan 2020 where all prescriptions where
// creating a prescription error
if (is_null($record->severity_of_error)){
continue;
}
// old system was serializing and the new system is using comma separeted
if (@unserialize($record->type_of_error)){
$error_types_array = @unserialize($record->type_of_error);
} else {
$error_types_array = explode(",", $record->type_of_error);
}
@endphp
<tr>
<td>{{ get_full_name($record->prescriber, 'id', 'first_name', 'last_name', 'users') }}</td>
<td>
<ol>
@foreach ($error_types_array as $error_type)
<li>{{ $error_type }}</li>
@endforeach
</ol>
</td>
<td>{{ $record->severity_of_error }}</td>
<td>{{ streamline_date_time($record->created_at) }}</td>
<td>{{ get_full_name($record->patient_id, 'id', 'first_name', 'last_name', 'patients') }} ({{ get_name($record->patient_id, 'id', 'number', 'patients') }})</td>
<td>{{ get_full_name($record->pharmacist, 'id', 'first_name', 'last_name', 'users') }}</td>
<td>{{ $record->comment }}</td>
<td>
<a href="/view_prescription_error_details/{{ $record->id }}" class="btn btn-primary btn-sm">{{ __('prescription_errors.view_details') }}</a>
</td>
<td>
<a href="/patient_episodes/set_patient_id/{{ $record->patient_id }}" class="btn btn-success btn-sm">{{ __('prescription_errors.select_patient') }}</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
{{ $prescription_errors->links() }}
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
<script>
$('#table').DataTable({
dom: 'Bfrtip',
bInfo: false,
bPaginate: false,
buttons: [
'csv', 'excel', 'pdf', 'print'
]
});
$(document).ready(function() {
$('#start_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd/mm/yyyy'
});
$('#end_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd/mm/yyyy'
});
});
</script>
@endpush
@@ -0,0 +1,182 @@
@extends('layouts.main')
@push('styles')
@endpush
@section('content')
<div class="row bg-title">
<div class="col-md-6">
<h4 class="page-title">{{ __('prescription_errors.prescription_error_details') }}</h4>
</div>
<div class="col-md-6">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('prescription_errors.dashboard') }}</a></li>
<li><a href="{{ route('view_prescription_errors') }}">{{ __('prescription_errors.prescription_errors') }}</a></li>
<li class="active">{{ __('prescription_errors.details') }}</li>
</ol>
</div>
</div>
<div class="white-box">
@php
// old system was serializing and the new system is using comma separeted
if (@unserialize($prescription_error->type_of_error)){
$error_types_array = @unserialize($prescription_error->type_of_error);
} else {
$error_types_array = explode(",", $prescription_error->type_of_error);
}
@endphp
<table class="table table-striped table-bordered color-bordered-table success-bordered-table">
<tr>
<th style="color: black">{{ __('prescription_errors.patient') }}</th>
<td>{{ get_full_name($prescription_error->patient_id, 'id', 'first_name', 'last_name', 'patients') }} ({{ get_name($prescription_error->patient_id, 'id', 'number', 'patients') }})</td>
<th style="color: black">{{ __('prescription_errors.date') }}</th>
<td>{{ streamline_date_time($prescription_error->created_at) }}</td>
<th style="color: black">{{ __('prescription_errors.error_type') }}</th>
<td>
<ol>
@foreach ($error_types_array as $error_type)
<li>{{ $error_type }}</li>
@endforeach
</ol>
</td>
</tr>
<tr>
<th style="color: black">{{ __('prescription_errors.severity') }}</th>
<td>{{ $prescription_error->severity_of_error }}</td>
<th style="color: black">{{ __('prescription_errors.prescriber') }}</th>
<td>{{ get_full_name($prescription_error->prescriber, 'id', 'first_name', 'last_name', 'users') }}</td>
<th style="color: black">{{ __('prescription_errors.pharmacist') }}</th>
<td>{{ get_full_name($prescription_error->pharmacist, 'id', 'first_name', 'last_name', 'users') }}</td>
</tr>
<tr>
<th style="color: black">{{ __('prescription_errors.comments') }}</th>
<td colspan="4">{{ $prescription_error->comment }}</td>
<td class="text-center"><a href="/patient_episodes/set_patient_id/{{ $prescription_error->patient_id }}">{{ __('prescription_errors.view_patient_details') }}</a></td>
</tr>
</table>
<hr>
<div class="table-responsive">
<table class="table table-striped table-bordered color-bordered-table success-bordered-table">
<thead>
<tr>
<th></th>
<th class="text-center">{{ __('prescription_errors.prescribed_record') }}</th>
<th class="text-center">{{ __('prescription_errors.altered_record') }}</th>
</tr>
</thead>
<tbody>
<tr>
<th style="color: black">{{ __('prescription_errors.drugs') }}</th>
@php
$prescribed_records = explode(",", $prescribed_drugs_array['drugs']);
$altered_records = explode(",", $altered_drugs_array['drugs']);
@endphp
<td>
@foreach($prescribed_records as $record)
-> {{ get_name($record, 'id', 'name', 'drugs') }} <br>
@endforeach
</td>
<td>
@foreach($altered_records as $record)
-> {{ get_name($record, 'id', 'name', 'drugs') }} <br>
@endforeach
</td>
</tr>
<tr>
<th style="color: black">{{ __('prescription_errors.dose') }}</th>
@php
$prescribed_records = explode(",", $prescribed_drugs_array['dose']);
$altered_records = explode(",", $altered_drugs_array['dose']);
@endphp
<td>
@foreach($prescribed_records as $record)
-> {{ $record }} <br>
@endforeach
</td>
<td>
@foreach($altered_records as $record)
-> {{ $record }} <br>
@endforeach
</td>
</tr>
<tr>
<th style="color: black">{{ __('prescription_errors.frequency') }}</th>
@php
$prescribed_records = explode(",", $prescribed_drugs_array['drug_frequency']);
$altered_records = explode(",", $altered_drugs_array['drug_frequency']);
@endphp
<td>
@foreach($prescribed_records as $record)
-> {{ get_name($record, 'id', 'name', 'dosage_frequencies') }} <br>
@endforeach
</td>
<td>
@foreach($altered_records as $record)
-> {{ get_name($record, 'id', 'name', 'dosage_frequencies') }} <br>
@endforeach
</td>
</tr>
<tr>
<th style="color: black">{{ __('prescription_errors.instructions') }}</th>
@php
$prescribed_records = explode(",", $prescribed_drugs_array['instructions']);
$altered_records = explode(",", $altered_drugs_array['instructions']);
@endphp
<td>
@foreach($prescribed_records as $record)
-> {{ $record }} <br>
@endforeach
</td>
<td>
@foreach($altered_records as $record)
-> {{ $record }} <br>
@endforeach
</td>
</tr>
<tr>
<th style="color: black">{{ __('prescription_errors.duration') }}</th>
@php
$prescribed_records = explode(",", $prescribed_drugs_array['duration']);
$altered_records = explode(",", $altered_drugs_array['duration']);
@endphp
<td>
@foreach($prescribed_records as $record)
-> {{ $record }} <br>
@endforeach
</td>
<td>
@foreach($altered_records as $record)
-> {{ $record }} {{ __('prescription_errors.days') }} <br>
@endforeach
</td>
</tr>
<tr>
<th style="color: black">{{ __('prescription_errors.quantity_dispensed') }}</th>
@php
$prescribed_records = explode(",", $prescribed_drugs_array['quantity_dispensed']);
$altered_records = explode(",", $altered_drugs_array['quantity_dispensed']);
@endphp
<td>
@foreach($prescribed_records as $record)
-> {{ $record }} <br>
@endforeach
</td>
<td>
@foreach($altered_records as $record)
-> {{ $record }} <br>
@endforeach
</td>
</tr>
</tbody>
</table>
</div>
</div>
@endsection
@push('scripts')
@endpush