diff --git a/app/Models/Enums/Permission.php b/app/Models/Enums/Permission.php index a5e2270..78200cf 100644 --- a/app/Models/Enums/Permission.php +++ b/app/Models/Enums/Permission.php @@ -6,6 +6,8 @@ enum Permission: string { case StudyMetadataView = 'study_metadata_view'; case StudyMetadataEdit = 'study_metadata_edit'; + case StudyHistoryView = 'study_history_view'; + case StudyHistoryEdit = 'study_history_edit'; case StudyDownload = 'study_download'; case StudyDelete = 'study_delete'; case StudyArchive = 'study_archive'; diff --git a/app/Models/User.php b/app/Models/User.php index 1538445..97a4dc8 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -30,13 +30,18 @@ class User extends Authenticatable * @var array */ protected $fillable = [ - 'name', + 'is_active', + 'first_name', + 'last_name', + 'display_name', 'username', 'email', 'phone', - 'role', 'site_id', + 'facility_id', 'profile_photo_path', + 'timezone', + 'last_seen_at', 'password', ]; @@ -69,7 +74,9 @@ class User extends Authenticatable protected function casts(): array { return [ + 'is_active' => 'bool', 'email_verified_at' => 'datetime', + 'last_seen_at' => 'datetime', 'password' => 'hashed', ]; } diff --git a/app/Services/Pacs/PacsUrlGen.php b/app/Services/Pacs/PacsUrlGen.php index 70e8430..fbc7dd7 100644 --- a/app/Services/Pacs/PacsUrlGen.php +++ b/app/Services/Pacs/PacsUrlGen.php @@ -2,33 +2,33 @@ namespace App\Services\Pacs; -use Spatie\Url\Url; +use Uri; final class PacsUrlGen { public static function stoneViewer(string $study_uid): string { - $url = Url::fromString(config('pacs.viewer.stone.endpoint')) + $url = Uri::of(config('pacs.viewer.stone.endpoint')) ->withPath('/stone-webviewer/index.html') - ->withQueryParameters(['study' => $study_uid]); + ->withQuery(['study' => $study_uid]); return (string) $url; } public static function ohifViewer(string $study_uid): string { - $url = Url::fromString(config('pacs.viewer.ohif.endpoint')) + $url = Uri::of(config('pacs.viewer.ohif.endpoint')) ->withPath('/ohif/viewer') - ->withQueryParameters(['StudyInstanceUIDs' => $study_uid]); + ->withQuery(['StudyInstanceUIDs' => $study_uid]); return (string) $url; } public static function ohifViewerMpr(string $study_uid): string { - $url = Url::fromString(config('pacs.viewer.ohif.endpoint')) + $url = Uri::of(config('pacs.viewer.ohif.endpoint')) ->withPath('/ohif/viewer') - ->withQueryParameters([ + ->withQuery([ 'hangingprotocolId' => 'mprAnd3DVolumeViewport', 'StudyInstanceUIDs' => $study_uid, ]); @@ -38,16 +38,16 @@ public static function ohifViewerMpr(string $study_uid): string public static function ohifSegmentation(string $study_uid): string { - $url = Url::fromString(config('pacs.viewer.ohif.endpoint')) + $url = Uri::of(config('pacs.viewer.ohif.endpoint')) ->withPath('/ohif/segmentation') - ->withQueryParameters(['StudyInstanceUIDs' => $study_uid]); + ->withQuery(['StudyInstanceUIDs' => $study_uid]); return (string) $url; } public static function archive(string $study_uid): string { - $url = Url::fromString(config('pacs.api.endpoint')) + $url = Uri::of(config('pacs.api.endpoint')) ->withPath('/studies/'.$study_uid.'/archive'); return (string) $url; diff --git a/composer.json b/composer.json index cafb155..5c372ef 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,6 @@ "rawilk/laravel-settings": "^3.4", "sentry/sentry-laravel": "^4.10", "spatie/laravel-permission": "^6.10", - "spatie/url": "^2.4", "vinkla/hashids": "^12.0", "yajra/laravel-datatables-oracle": "^11.1" }, diff --git a/database/seeders/RoleSeeder.php b/database/seeders/RoleSeeder.php index 732545d..b7cc548 100644 --- a/database/seeders/RoleSeeder.php +++ b/database/seeders/RoleSeeder.php @@ -29,6 +29,7 @@ public function run(): void Permission::ReportDownload, Permission::StudyDownload, Permission::StudyMetadataView, + Permission::StudyHistoryView, Permission::StudyNotesCreate, Permission::StudyNotesView, Permission::AttachmentDownload, @@ -38,6 +39,8 @@ public function run(): void Permission::StudyDownload, Permission::StudyMetadataView, Permission::StudyMetadataEdit, + Permission::StudyHistoryView, + Permission::StudyHistoryEdit, Permission::StudyNotesCreate, Permission::StudyNotesView, Permission::AttachmentUpload,