139 lines
5.2 KiB
PHP
139 lines
5.2 KiB
PHP
@extends('staff.reports.viewer.layout')
|
|
|
|
@push('header')
|
|
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/toastr.js/2.1.4/toastr.min.css"
|
|
crossorigin="anonymous" referrerpolicy="no-referrer"/>
|
|
@endpush
|
|
|
|
@section('content')
|
|
<div class="container container-main">
|
|
|
|
@isset($notice)
|
|
<section class="pt-4" name="notice">
|
|
<div class="container-md px-md-3">
|
|
<div class="alert alert-warning" role="alert">
|
|
<h5 class="alert-heading d-flex align-items-center">
|
|
<span class="alert-icon rounded"><i
|
|
class="fa-solid fs-4 fa-circle-radiation me-2"></i></span>Notice
|
|
</h5>
|
|
<hr>
|
|
<p class="mb-0">{{ $notice }}</p>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@endisset
|
|
|
|
<section class="pt-4" name="patient">
|
|
<div class="mx-2">
|
|
<table class="table table-bordered border-gray">
|
|
<tr>
|
|
<td class="text-muted">Patient Name</td>
|
|
<td class="fw-semibold">{{ $report->study->patient_name }}</td>
|
|
<td class="text-muted">ID</td>
|
|
<td class="fw-semibold">{{ $report->study->patient_id }}</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="text-muted">Age / Gender</td>
|
|
<td class="fw-semibold">{{ $report->study->sexAge() }}</td>
|
|
<td class="text-muted">Accession No</td>
|
|
<td class="fw-semibold">{{ $report->study->accession_number }}</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="text-muted">Referred By</td>
|
|
<td class="fw-semibold">{{ $report->study->referring_physician_name }}</td>
|
|
<td class="text-muted">Date</td>
|
|
<td class="fw-semibold">{{ $report->created_at->format('d-M-Y') }}</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
|
|
<header class="py-2">
|
|
<div class="p-2 bg-light rounded-1">
|
|
<div class="text-center">
|
|
<h6 class="text-muted">
|
|
{{ $report->study->modality }} Report
|
|
</h6>
|
|
<h3>
|
|
{{ $report->study->study_description }}
|
|
</h3>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<div id="report_content">
|
|
<section class="pt-4" name="report">
|
|
<div class="px-lg-3">
|
|
<div class="mb-8">
|
|
{!! $report->getContent() !!}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
@isset($signature)
|
|
<section class="pt-4" name="signature">
|
|
<div class="px-lg-3">
|
|
<img src="{{ $signature }}">
|
|
</div>
|
|
</section>
|
|
@endisset
|
|
</div>
|
|
|
|
@if ($copy_button)
|
|
<div class="d-flex justify-content-end">
|
|
<button class="btn btn-outline-primary btn-sm" onclick="copyToClipboard('report_content')">
|
|
<i class="fa-regular fa-copy"></i> Copy to Clipboard
|
|
</button>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
@endsection
|
|
|
|
@push('footer')
|
|
<footer class="footer">
|
|
<div class="container">
|
|
<span class="text-muted">
|
|
{{ config('app.name') }} © {{ now()->year }} Dr. Masroor Ehsan
|
|
</span>
|
|
</div>
|
|
</footer>
|
|
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" crossorigin="anonymous"
|
|
referrerpolicy="no-referrer"></script>
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/toastr.js/2.1.4/toastr.min.js" crossorigin="anonymous"
|
|
referrerpolicy="no-referrer"></script>
|
|
|
|
<script>
|
|
function copyToClipboard(div_id) {
|
|
const content_div = document.getElementById(div_id);
|
|
const range = document.createRange();
|
|
range.selectNode(content_div);
|
|
window.getSelection().removeAllRanges();
|
|
window.getSelection().addRange(range);
|
|
|
|
try {
|
|
if (navigator.clipboard && window.isSecureContext) {
|
|
navigator.clipboard.writeText(content_div.innerText)
|
|
.then(() => {
|
|
toastr.info('Report copied to clipboard');
|
|
})
|
|
.catch(() => {
|
|
toastr.warning("Failed to copy report");
|
|
});
|
|
} else {
|
|
const success = document.execCommand("copy");
|
|
if (success) {
|
|
toastr.info('Report copied to clipboard')
|
|
} else {
|
|
toastr.warning("Failed to copy report");
|
|
}
|
|
}
|
|
} finally {
|
|
window.getSelection().removeAllRanges();
|
|
}
|
|
}
|
|
</script>
|
|
@endpush
|