diff --git a/app/Http/Controllers/Staff/DicomViewerController.php b/app/Http/Controllers/Staff/DicomViewerController.php index 63bf2a0..e287ef6 100644 --- a/app/Http/Controllers/Staff/DicomViewerController.php +++ b/app/Http/Controllers/Staff/DicomViewerController.php @@ -4,6 +4,7 @@ use App\Http\Controllers\HashidControllerBase; use App\Models\Study; +use App\Services\AuditTrail\Activity; use Closure; use Illuminate\Support\Str; @@ -26,6 +27,7 @@ private function loadViewer(Closure $callback) $url = $callback($study); abort_if(blank($url), 404); $title = Str::limit($study->getPatientDemographic(), 40); + audit()->on($study)->did(Activity::Image_View)->log(); return view('staff.studies.viewer', compact('url', 'title')); } diff --git a/app/Http/Controllers/Staff/HistoryController.php b/app/Http/Controllers/Staff/HistoryController.php index 67c7e21..a933c75 100644 --- a/app/Http/Controllers/Staff/HistoryController.php +++ b/app/Http/Controllers/Staff/HistoryController.php @@ -43,7 +43,7 @@ public function save(StudyHistoryRequest $request) $details->update($payload); audit() - ->did(Activity::Study_History_Update) + ->did(Activity::Study_History_Edit) ->on($this->key) ->log(); diff --git a/app/Services/AuditTrail/Activity.php b/app/Services/AuditTrail/Activity.php index 851baf5..c9b1aad 100644 --- a/app/Services/AuditTrail/Activity.php +++ b/app/Services/AuditTrail/Activity.php @@ -13,7 +13,7 @@ enum Activity: int case Study_History_View = 104; - case Study_History_Update = 105; + case Study_History_Edit = 105; case Study_Create = 106; @@ -29,6 +29,9 @@ enum Activity: int case Attachment_Download = 113; case Attachment_Delete = 114; + // image + case Image_View = 150; + // report case Report_Save = 201;