diff --git a/app/DAL/Studies/WorklistBase.php b/app/DAL/Studies/WorklistBase.php index a321a71..969f15d 100644 --- a/app/DAL/Studies/WorklistBase.php +++ b/app/DAL/Studies/WorklistBase.php @@ -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 diff --git a/app/DAL/Studies/WorklistFactory.php b/app/DAL/Studies/WorklistFactory.php index 394e10a..42aa29e 100644 --- a/app/DAL/Studies/WorklistFactory.php +++ b/app/DAL/Studies/WorklistFactory.php @@ -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, diff --git a/app/Http/Controllers/Staff/StudyViewerController.php b/app/Http/Controllers/Staff/StudyViewerController.php new file mode 100644 index 0000000..4032141 --- /dev/null +++ b/app/Http/Controllers/Staff/StudyViewerController.php @@ -0,0 +1,19 @@ +decodeKeys(); + $study = Study::findOrFail($this->key); + $url = $study->getStoneLink(); + abort_if(blank($url), 404); + + return view('staff.studies.viewer', compact('url')); + } +} diff --git a/app/Http/Controllers/Staff/WorklistController.php b/app/Http/Controllers/Staff/WorklistController.php index c5196b8..176d110 100644 --- a/app/Http/Controllers/Staff/WorklistController.php +++ b/app/Http/Controllers/Staff/WorklistController.php @@ -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')); } diff --git a/resources/views/staff/studies/viewer.blade.php b/resources/views/staff/studies/viewer.blade.php new file mode 100644 index 0000000..243413c --- /dev/null +++ b/resources/views/staff/studies/viewer.blade.php @@ -0,0 +1,7 @@ +@extends('layouts/layoutMaster') + +@section('title', 'Viewer') + +@section('content') + +@endsection diff --git a/resources/views/staff/worklist/index.blade.php b/resources/views/staff/worklist/index.blade.php new file mode 100644 index 0000000..5670deb --- /dev/null +++ b/resources/views/staff/worklist/index.blade.php @@ -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') + + +
Accession Number | +Patient ID | +Patient Name | +Patient Sex | +Modality | +Study Date | +Receive Date | +Series | +Institute Name | ++ |
---|---|---|---|---|---|---|---|---|---|
{{ $study->accession_number }} | ++ + {{ $study->patient_id }} + + | ++ + {{ $study->patient_name }} + + | +{{ $study->sexAge() }} | +{{ $study->study_modality }} | +{{ $study->study_date }} | +{{ $study->received_at }} | +{{ $study->numInstances() }} | +{{ $study->institution_name }} | ++ @if ($study->allowed()['stone']) + St | + @endif + @if ($study->allowed()['ohif']) + O | + @endif + @if ($study->allowed()['ohif.mpr']) + OM | + @endif + @if ($study->allowed()['ohif.seg']) + OS | + @endif + @if ($study->allowed()['zip']) + Z | + @endif + + Reported + + @can(\App\Models\Enums\Permission::ReportCreate) + TXT + @endcan + | +