wip
This commit is contained in:
parent
c5a4d9a178
commit
92179760d0
@ -164,7 +164,7 @@ public function setSearchTerm(string $search): self
|
||||
|
||||
private function getPageSize(?int $user_id = null): int
|
||||
{
|
||||
return $this->perPage ?? $this->getPageSize($user_id);
|
||||
return $this->perPage ?? user_per_page($user_id);
|
||||
}
|
||||
|
||||
private function applySearch(Builder $query): Builder
|
||||
|
@ -14,7 +14,8 @@
|
||||
public static function getLister(): IUserStudyLister
|
||||
{
|
||||
// $role = auth()->user()->roles()->first()->name;
|
||||
$role = Cache::remember('user_role:'.auth()->id(), now()->addMinutes(5), fn () => auth()->user()->roles()->first()->name);
|
||||
$key = sprintf('user_role:%d', auth()->id());
|
||||
$role = Cache::remember($key, now()->addMinutes(5), fn (): string => auth()->user()->roles()->first()->name);
|
||||
|
||||
return match (UserRole::from($role)) {
|
||||
UserRole::Admin => new AdminWorklist,
|
||||
|
19
app/Http/Controllers/Staff/StudyViewerController.php
Normal file
19
app/Http/Controllers/Staff/StudyViewerController.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Staff;
|
||||
|
||||
use App\Http\Controllers\HashidControllerBase;
|
||||
use App\Models\Study;
|
||||
|
||||
class StudyViewerController extends HashidControllerBase
|
||||
{
|
||||
public function stone()
|
||||
{
|
||||
$this->decodeKeys();
|
||||
$study = Study::findOrFail($this->key);
|
||||
$url = $study->getStoneLink();
|
||||
abort_if(blank($url), 404);
|
||||
|
||||
return view('staff.studies.viewer', compact('url'));
|
||||
}
|
||||
}
|
@ -4,13 +4,12 @@
|
||||
|
||||
use App\DAL\Studies\WorklistFactory;
|
||||
use App\Http\Controllers\HashidControllerBase;
|
||||
use App\Presenters\StudyPresenter;
|
||||
|
||||
class WorklistController extends HashidControllerBase
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
$studies = StudyPresenter::pagination(WorklistFactory::getLister()->get());
|
||||
$studies = WorklistFactory::getLister()->get();
|
||||
|
||||
return view('staff.worklist.index', compact('studies'));
|
||||
}
|
||||
|
7
resources/views/staff/studies/viewer.blade.php
Normal file
7
resources/views/staff/studies/viewer.blade.php
Normal file
@ -0,0 +1,7 @@
|
||||
@extends('layouts/layoutMaster')
|
||||
|
||||
@section('title', 'Viewer')
|
||||
|
||||
@section('content')
|
||||
<iframe src="{{ $url }}" frameborder="0"></iframe>
|
||||
@endsection
|
162
resources/views/staff/worklist/index.blade.php
Normal file
162
resources/views/staff/worklist/index.blade.php
Normal file
@ -0,0 +1,162 @@
|
||||
@extends('layouts/layoutMaster')
|
||||
|
||||
@section('title', 'Studies List')
|
||||
|
||||
@section('vendor-style')
|
||||
@vite([
|
||||
'resources/assets/vendor/libs/datatables-bs5/datatables.bootstrap5.scss',
|
||||
'resources/assets/vendor/libs/datatables-responsive-bs5/responsive.bootstrap5.scss',
|
||||
'resources/assets/vendor/libs/datatables-checkboxes-jquery/datatables.checkboxes.scss',
|
||||
'resources/assets/vendor/libs/datatables-buttons-bs5/buttons.bootstrap5.scss'
|
||||
])
|
||||
@endsection
|
||||
|
||||
@section('vendor-script')
|
||||
@vite([
|
||||
'resources/assets/vendor/libs/moment/moment.js',
|
||||
'resources/assets/vendor/libs/datatables-bs5/datatables-bootstrap5.js'
|
||||
])
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<!-- Invoice List Widget -->
|
||||
|
||||
<div class="card mb-6">
|
||||
<div class="card-widget-separator-wrapper">
|
||||
<div class="card-body card-widget-separator">
|
||||
<div class="row gy-4 gy-sm-1">
|
||||
<div class="col-sm-6 col-lg-3">
|
||||
<div
|
||||
class="d-flex justify-content-between align-items-start card-widget-1 border-end pb-4 pb-sm-0">
|
||||
<div>
|
||||
<h4 class="mb-0">24</h4>
|
||||
<p class="mb-0">Clients</p>
|
||||
</div>
|
||||
<div class="avatar me-sm-6">
|
||||
<span class="avatar-initial rounded-3">
|
||||
<i class="ri-user-line text-heading ri-26px"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="d-none d-sm-block d-lg-none me-6">
|
||||
</div>
|
||||
<div class="col-sm-6 col-lg-3">
|
||||
<div
|
||||
class="d-flex justify-content-between align-items-start card-widget-2 border-end pb-4 pb-sm-0">
|
||||
<div>
|
||||
<h4 class="mb-0">165</h4>
|
||||
<p class="mb-0">Invoices</p>
|
||||
</div>
|
||||
<div class="avatar me-lg-6">
|
||||
<span class="avatar-initial rounded-3">
|
||||
<i class="ri-pages-line text-heading ri-26px"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="d-none d-sm-block d-lg-none">
|
||||
</div>
|
||||
<div class="col-sm-6 col-lg-3">
|
||||
<div
|
||||
class="d-flex justify-content-between align-items-start border-end pb-4 pb-sm-0 card-widget-3">
|
||||
<div>
|
||||
<h4 class="mb-0">$2.46k</h4>
|
||||
<p class="mb-0">Paid</p>
|
||||
</div>
|
||||
<div class="avatar me-sm-6">
|
||||
<span class="avatar-initial rounded-3">
|
||||
<i class="ri-wallet-line text-heading ri-26px"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-lg-3">
|
||||
<div class="d-flex justify-content-between align-items-start">
|
||||
<div>
|
||||
<h4 class="mb-0">$876</h4>
|
||||
<p class="mb-0">Unpaid</p>
|
||||
</div>
|
||||
<div class="avatar">
|
||||
<span class="avatar-initial rounded-3">
|
||||
<i class="ri-money-dollar-circle-line text-heading ri-26px"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Invoice List Table -->
|
||||
<div class="card">
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="invoice-list-table table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Accession Number</th>
|
||||
<th>Patient ID</th>
|
||||
<th>Patient Name</th>
|
||||
<th>Patient Sex</th>
|
||||
<th>Modality</th>
|
||||
<th>Study Date</th>
|
||||
<th>Receive Date</th>
|
||||
<th>Series</th>
|
||||
<th>Institute Name</th>
|
||||
<th class="cell-fit"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($studies as $study)
|
||||
<tr>
|
||||
<td>{{ $study->accession_number }}</td>
|
||||
<td>
|
||||
<a href="{{ $study->getMetadataLink() }}">
|
||||
{{ $study->patient_id }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ $study->getHistoryLink() }}">
|
||||
{{ $study->patient_name }}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ $study->sexAge() }}</td>
|
||||
<td>{{ $study->study_modality }}</td>
|
||||
<td>{{ $study->study_date }}</td>
|
||||
<td>{{ $study->received_at }}</td>
|
||||
<td>{{ $study->numInstances() }}</td>
|
||||
<td>{{ $study->institution_name }}</td>
|
||||
<td>
|
||||
@if ($study->allowed()['stone'])
|
||||
<a target="_blank" href="{{ $study->links()['stone'] }}">St</a> |
|
||||
@endif
|
||||
@if ($study->allowed()['ohif'])
|
||||
<a target="_blank" href="{{ $study->links()['ohif'] }}">O</a> |
|
||||
@endif
|
||||
@if ($study->allowed()['ohif.mpr'])
|
||||
<a target="_blank" href="{{ $study->links()['ohif.mpr'] }}">OM</a> |
|
||||
@endif
|
||||
@if ($study->allowed()['ohif.seg'])
|
||||
<a target="_blank" href="{{ $study->links()['ohif.seg'] }}">OS</a> |
|
||||
@endif
|
||||
@if ($study->allowed()['zip'])
|
||||
<a target="_blank" href="{{ $study->links()['zip'] }}">Z</a> |
|
||||
@endif
|
||||
|
||||
<span class="badge bg-success">Reported</span>
|
||||
|
||||
@can(\App\Models\Enums\Permission::ReportCreate)
|
||||
<a target="_blank" class="btn"
|
||||
href="{{ route('radiologist.report-write', $study->id) }}">TXT</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="mb-4 me-4">
|
||||
{!! $studies->links() !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -3,8 +3,9 @@
|
||||
use App\Http\Controllers\Guest\ViewSharedStudyController;
|
||||
use App\Http\Controllers\Radiologist\ReportWriteController;
|
||||
use App\Http\Controllers\SocialLoginController;
|
||||
use App\Http\Controllers\Staff\StudiesController;
|
||||
use App\Http\Controllers\Staff\StudyHistoryController;
|
||||
use App\Http\Controllers\Staff\StudyViewerController;
|
||||
use App\Http\Controllers\Staff\WorklistController;
|
||||
use App\Http\Controllers\StudyMetadataController;
|
||||
use App\Http\Controllers\System\SyncOrthancController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
@ -32,9 +33,13 @@
|
||||
Route::get('/report-write/{id}', ReportWriteController::class)->name('report-write');
|
||||
});
|
||||
|
||||
Route::group(['prefix' => '/studies', 'as' => 'studies.'], function () {
|
||||
Route::get('/', [StudiesController::class, 'index'])->name('index');
|
||||
Route::get('{hashid}/details', [StudiesController::class, 'details'])->name('details');
|
||||
Route::group(['prefix' => 'worklist', 'as' => 'worklist.'], function () {
|
||||
Route::get('/', [WorklistController::class, 'index'])->name('index');
|
||||
Route::get('{hashid}/details', [WorklistController::class, 'details'])->name('details');
|
||||
});
|
||||
|
||||
Route::group(['prefix' => 'viewer', 'as' => 'viewer.'], function () {
|
||||
Route::get('stone/{hashid}', [StudyViewerController::class, 'stone'])->name('stone');
|
||||
});
|
||||
|
||||
Route::group(['as' => 'staff.'], function () {
|
||||
|
Loading…
Reference in New Issue
Block a user