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; - } }