From 381f01ff6baa9a37d749cd1d0f48974de3f11504 Mon Sep 17 00:00:00 2001 From: Dr Masroor Ehsan Date: Mon, 13 Jan 2025 19:21:22 +0600 Subject: [PATCH] wip - edit --- app/DataTables/WorklistDataTable.php | 2 +- .../Controllers/Staff/MetadataController.php | 5 +- app/Models/StudyDetails.php | 1 + resources/views/staff/meta/edit.blade.php | 78 ++++++++++++++----- .../staff/meta/partials/_check.blade.php | 4 + .../views/staff/meta/partials/_text.blade.php | 4 + routes/web.php | 5 -- 7 files changed, 72 insertions(+), 27 deletions(-) create mode 100644 resources/views/staff/meta/partials/_check.blade.php create mode 100644 resources/views/staff/meta/partials/_text.blade.php diff --git a/app/DataTables/WorklistDataTable.php b/app/DataTables/WorklistDataTable.php index f0be736..f4422e7 100644 --- a/app/DataTables/WorklistDataTable.php +++ b/app/DataTables/WorklistDataTable.php @@ -336,7 +336,7 @@ private function generateActionButtons(Study $study): string $btns[] = $this->renderButton($study->hash, 'fa-user-doctor', 'btn-outline-youtube show-assign', 'Assign'); break; case WorklistButton::Attachment: - // $btns[] = $this->renderButton($study->hash, 'fa-trash', 'btn-danger archive-study', 'Archive'); + $btns[] = ''; break; } } diff --git a/app/Http/Controllers/Staff/MetadataController.php b/app/Http/Controllers/Staff/MetadataController.php index ece8514..3dadf62 100644 --- a/app/Http/Controllers/Staff/MetadataController.php +++ b/app/Http/Controllers/Staff/MetadataController.php @@ -4,8 +4,8 @@ use App\Domain\ACL\Permission; use App\Http\Controllers\HashidControllerBase; -use App\Http\Requests\StudyMetadataUpdateRequest; use App\Models\Study; +use Illuminate\Http\Request; class MetadataController extends HashidControllerBase { @@ -27,8 +27,9 @@ public function edit() return view('staff.meta.edit', compact('study')); } - public function save(StudyMetadataUpdateRequest $request) + public function save(Request $request) { + dd($request); abort_unless(auth()->user()->may(Permission::StudyMetadataEdit), 403); $this->decodeKeys(); $study = Study::find($this->key); diff --git a/app/Models/StudyDetails.php b/app/Models/StudyDetails.php index c50a444..6509c46 100644 --- a/app/Models/StudyDetails.php +++ b/app/Models/StudyDetails.php @@ -38,6 +38,7 @@ protected function casts(): array { return [ 'properties' => 'array', + 'dicom_properties' => 'array', 'series' => 'array', 'assignment_log' => 'array', ]; diff --git a/resources/views/staff/meta/edit.blade.php b/resources/views/staff/meta/edit.blade.php index c60bf44..c40cf43 100644 --- a/resources/views/staff/meta/edit.blade.php +++ b/resources/views/staff/meta/edit.blade.php @@ -1,28 +1,68 @@ - - -

- {{ __('Metadata View') }} -

-
+@extends('layouts.layoutMaster') -
-
+@section('title', 'Edit Study') -
-

Clinical Information

+@section('vendor-style') +@endsection -
patient_name
-
- {{ $study->patient_name }} +@section('vendor-script') +@endsection + +@section('page-script') +@endsection + +@section('content') +
+ @csrf + +
+
+
+
+
Patient Information
+
+
+ @include('staff.meta.partials._text', ['name' => 'patient_id', 'label' => 'Patient ID', 'value' => $study->patient_id]) + @include('staff.meta.partials._text', ['name' => 'patient_name', 'label' => 'Patient Name', 'value' => $study->patient_name]) + @include('staff.meta.partials._text', ['name' => 'patient_sex', 'label' => 'Sex', 'value' => $study->patient_sex]) +
+ + +
+ @include('staff.meta.partials._text', ['name' => 'accession_number', 'label' => 'Accession number', 'value' => $study->accession_number]) +
- +
- @if (may(\App\Domain\ACL\Permission::StudyMetadataEdit)) - Edit - @endif +
+
+
+
Study Information
+
+
+ @include('staff.meta.partials._text', ['name' => 'study_description', 'label' => 'Study Description', 'value' => $study->study_description]) + @include('staff.meta.partials._text', ['name' => 'body_part_examined', 'label' => 'Body Part Examined', 'value' => $study->body_part_examined]) + @include('staff.meta.partials._text', ['name' => 'institution_name', 'label' => 'Institution', 'value' => $study->institution_name]) + @include('staff.meta.partials._text', ['name' => 'referring_physician_name', 'label' => 'Referring Physician', 'value' => $study->referring_physician_name]) + +
+ @include('staff.meta.partials._check', ['name' => 'priority', 'id' => 'pri_0', 'label' => 'Low', 'value' => \App\Domain\Study\Priority::Low->value, 'checked' => $study->priority->value == \App\Domain\Study\Priority::Low->value]) + @include('staff.meta.partials._check', ['name' => 'priority', 'id' => 'pri_1', 'label' => 'Routine', 'value' => \App\Domain\Study\Priority::Routine->value, 'checked' => $study->priority->value == \App\Domain\Study\Priority::Routine->value]) + @include('staff.meta.partials._check', ['name' => 'priority', 'id' => 'pri_2', 'label' => 'High', 'value' => \App\Domain\Study\Priority::High->value, 'checked' => $study->priority->value == \App\Domain\Study\Priority::High->value]) + @include('staff.meta.partials._check', ['name' => 'priority', 'id' => 'pri_3', 'label' => 'Stat', 'value' => \App\Domain\Study\Priority::Stat->value, 'checked' => $study->priority->value == \App\Domain\Study\Priority::Stat->value]) +
+ + +
+
-
- + + + +@endsection diff --git a/resources/views/staff/meta/partials/_check.blade.php b/resources/views/staff/meta/partials/_check.blade.php new file mode 100644 index 0000000..6fdccbd --- /dev/null +++ b/resources/views/staff/meta/partials/_check.blade.php @@ -0,0 +1,4 @@ +
+ + +
diff --git a/resources/views/staff/meta/partials/_text.blade.php b/resources/views/staff/meta/partials/_text.blade.php new file mode 100644 index 0000000..215e4e2 --- /dev/null +++ b/resources/views/staff/meta/partials/_text.blade.php @@ -0,0 +1,4 @@ +
+ + +
diff --git a/routes/web.php b/routes/web.php index dc56026..3b6d416 100644 --- a/routes/web.php +++ b/routes/web.php @@ -2,7 +2,6 @@ use App\Http\Controllers\Api\WorklistController as ApiWorklistController; use App\Http\Controllers\Guest\ViewSharedStudyController; -use App\Http\Controllers\Radiologist\ReportWriteController; use App\Http\Controllers\SocialLoginController; use App\Http\Controllers\Staff\AssignmentController; use App\Http\Controllers\Staff\AttachmentController; @@ -39,10 +38,6 @@ Route::get('studies', [ApiWorklistController::class, 'studies'])->name('studies'); }); - Route::group(['prefix' => 'radiologist', 'as' => 'radiologist.'], function () { - Route::get('report-write/{id}', ReportWriteController::class)->name('report-write'); - }); - Route::group(['prefix' => 'viewer', 'as' => 'viewer.'], function () { Route::get('stone/{hashid}', [DicomViewerController::class, 'stone'])->name('stone'); Route::get('ohif/{hashid}', [DicomViewerController::class, 'ohif'])->name('ohif');