From 2885fc5c05106b57715a7f654a2fe3a61b22dddc Mon Sep 17 00:00:00 2001 From: Masroor Ehsan Date: Wed, 8 Jan 2025 20:32:05 +0600 Subject: [PATCH] fix --- app/Models/Study.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/Models/Study.php b/app/Models/Study.php index 508bd4b..d8ed549 100644 --- a/app/Models/Study.php +++ b/app/Models/Study.php @@ -361,6 +361,16 @@ public function getPatientDemographic(): string return ''; } + public function isLockedBy(User|int|null $user = null): bool + { + return $this->locking_physician_id === me($user)->id; + } + + public function isAssignedTo(User|int|null $user = null): bool + { + return $this->assigned_physician_id === me($user)->id; + } + protected function casts(): array { return [ @@ -375,14 +385,4 @@ protected function casts(): array 'patient_birthdate' => 'immutable_date', ]; } - - public function isLockedBy(User|int|null $user = null): bool - { - return $this->locking_physician_id === me($user)->id; - } - - public function isAssignedTo(User|int|null $user = null): bool - { - return $this->assigned_physician_id === me($user)->id; - } }