This commit is contained in:
Dr Masroor Ehsan 2025-01-21 12:28:48 +06:00
parent 29927c4922
commit 708496ea7e
6 changed files with 39 additions and 62 deletions

View File

@ -579,7 +579,7 @@ private function generateActionButtons(Study $study): string
foreach (WorklistGuard::worklistButtons($study) as $button) {
switch ($button) {
case WorklistButton::StudyMetadata:
$btns[] = $this->renderImageLink($study->hash, 'info.png', 'showStudy', 'Info');
$btns[] = $this->renderImageLink($study->hash, 'info.png', 'show-study', 'Info');
break;
case WorklistButton::Assign:
$btns[] = $this->renderImageLink($study->hash, 'assign.png', 'show-assign', 'Assign');
@ -587,6 +587,9 @@ private function generateActionButtons(Study $study): string
case WorklistButton::Notes:
$btns[] = $this->renderImageLink($study->hash, 'chat.png', 'show-notes', 'Chat');
break;
case WorklistButton::Audit:
$btns[] = $this->renderImageLink($study->hash, 'audit.png', 'show-audit', 'Audit Trail');
break;
}
}

View File

@ -10,4 +10,5 @@ enum WorklistButton: string
case Attachment = 'attachment';
case Assign = 'assign';
case Report = 'report';
case Audit = 'audit';
}

View File

@ -51,6 +51,7 @@ public static function worklistButtons(Study $study, User|int|null $usr = null):
return collect([
WorklistButton::StudyMetadata,
WorklistButton::Notes,
WorklistButton::Audit,
]);
}
@ -63,6 +64,7 @@ public static function worklistButtons(Study $study, User|int|null $usr = null):
if ($study->canAssignRad()) {
$buttons->push(WorklistButton::Assign);
}
$buttons->push(WorklistButton::Audit);
return $buttons;
}

View File

@ -69,7 +69,7 @@
<script type="text/javascript">
$(function () {
@include('staff.worklist.partials._modal-js', ['selector' => '.showStudy', 'url' => route('staff.studies.show'), 'type' => 'study'])
@include('staff.worklist.partials._modal-js', ['selector' => '.show-study', 'url' => route('staff.studies.show'), 'type' => 'study'])
@include('staff.worklist.partials._modal-js', ['selector' => '.show-attach', 'url' => route('staff.studies.attach'), 'type' => 'attach'])
@include('staff.worklist.partials._modal-js', ['selector' => '.show-assign', 'url' => route('staff.assign.show'), 'type' => 'assign'])
@include('staff.worklist.partials._modal-js', ['selector' => '.show-reports', 'url' => route('staff.report.popup'), 'type' => 'report'])
@ -85,7 +85,19 @@ function resetParams() {
function generateUrl() {
const url = new URL("{{ route('staff.worklist.index') }}");
const params = { _status, _study_from, _study_to, _receive_from, _receive_to, _assign_from, _assign_to, _read_from, _read_to, _modality, _read_by };
const params = {
_status,
_study_from,
_study_to,
_receive_from,
_receive_to,
_assign_from,
_assign_to,
_read_from,
_read_to,
_modality,
_read_by
};
Object.keys(params).forEach(key => {
if (params[key]) url.searchParams.set(strip_dash(key), params[key]);
});
@ -211,62 +223,9 @@ function formatDate(date) {
</div>
</div>
<div class="modal fade" id="study-modal" tabindex="-1" aria-labelledby="studyModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="studyModalLabel">Study Information</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div id="study-details"></div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="attach-modal" tabindex="-1" aria-labelledby="label-attach" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="label-attach">Attached Docs</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div id="attach-details"></div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="assign-modal" tabindex="-1" aria-labelledby="label-assign" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="label-assign">Assign Radiologist</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div id="assign-details"></div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="report-modal" tabindex="-1" aria-labelledby="label-report" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="label-report">Reports</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div id="report-details"></div>
</div>
</div>
</div>
</div>
@include('staff.worklist.partials._modal', ['type' => 'study', 'title' => 'Study Information'])
@include('staff.worklist.partials._modal', ['type' => 'attach', 'title' => 'Attached Docs'])
@include('staff.worklist.partials._modal', ['type' => 'assign', 'title' => 'Assign Radiologist'])
@include('staff.worklist.partials._modal', ['type' => 'report', 'title' => 'Reports'])
@endsection

View File

@ -1,7 +1,7 @@
$('body').on('click', '{{ $selector }}', function () {
var study_id = $(this).data('id');
$.get("{{ $url }}", {hashid: study_id}, function (data) {
$('#{{ $type }}-details').html(data);
$('#{{ $type }}-body').html(data);
$('#{{ $type }}-modal').modal('show');
});
});

View File

@ -1 +1,13 @@
<?php
<div class="modal fade" id="{{ $type }}-modal" tabindex="-1" aria-labelledby="label-{{ $type }}" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="label-{{ $type }}">{{ $title }}</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div id="{{ $type }}-body"></div>
</div>
</div>
</div>
</div>