diff --git a/app/Http/Controllers/Staff/StudyViewerController.php b/app/Http/Controllers/Staff/StudyViewerController.php index 9ab6e07..eacb680 100644 --- a/app/Http/Controllers/Staff/StudyViewerController.php +++ b/app/Http/Controllers/Staff/StudyViewerController.php @@ -4,6 +4,7 @@ use App\Http\Controllers\HashidControllerBase; use App\Models\Study; +use Illuminate\Support\Str; class StudyViewerController extends HashidControllerBase { @@ -13,7 +14,7 @@ private function loadViewer(\Closure $callback) $study = Study::findOrFail($this->key); $url = $callback($study); abort_if(blank($url), 404); - $title = $study->patient_name; + $title = Str::limit($study->patient_name, 20) . ' | ' . config('app.name'); return view('staff.studies.viewer', compact('url', 'title')); } diff --git a/app/Http/Controllers/Staff/WorklistController.php b/app/Http/Controllers/Staff/WorklistController.php index 176d110..95acbff 100644 --- a/app/Http/Controllers/Staff/WorklistController.php +++ b/app/Http/Controllers/Staff/WorklistController.php @@ -13,4 +13,11 @@ public function index() return view('staff.worklist.index', compact('studies')); } + + public function details($hashid) + { + $study = WorklistFactory::getViewer($hashid)->get(); + + return view('staff.worklist.details', compact('study')); + } } diff --git a/app/Http/Controllers/System/SyncOrthancController.php b/app/Http/Controllers/System/SyncOrthancController.php index da03301..8cca62a 100644 --- a/app/Http/Controllers/System/SyncOrthancController.php +++ b/app/Http/Controllers/System/SyncOrthancController.php @@ -11,6 +11,6 @@ public function __invoke() { (new StudiesSync)->execute(); - return redirect()->route('woklist.index'); + return redirect()->route('staff.worklist.index'); } } diff --git a/resources/views/staff/worklist/index.blade.php b/resources/views/staff/worklist/index.blade.php index 384b949..0c840d6 100644 --- a/resources/views/staff/worklist/index.blade.php +++ b/resources/views/staff/worklist/index.blade.php @@ -1,6 +1,6 @@ -@extends('layouts/layoutMaster') +@extends('layouts.layoutMaster') -@section('title', 'Studies List') +@section('title', 'Worklist') @section('vendor-style') @vite([ diff --git a/routes/web.php b/routes/web.php index ca4e2b9..7c0603a 100644 --- a/routes/web.php +++ b/routes/web.php @@ -33,10 +33,6 @@ Route::get('/report-write/{id}', ReportWriteController::class)->name('report-write'); }); - 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'); @@ -45,6 +41,11 @@ Route::group(['as' => 'staff.'], function () { + 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' => 'history', 'as' => 'history.'], function () { Route::get('{hashid}', [StudyHistoryController::class, 'view'])->name('view'); Route::get('{hashid}/edit', [StudyHistoryController::class, 'edit'])->name('edit');