minor
This commit is contained in:
parent
45d692968e
commit
927c51e16d
@ -15,8 +15,9 @@
|
|||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
class StudiesSync
|
final class StudiesSync
|
||||||
{
|
{
|
||||||
|
public const string SYNC_AGENT = '$$_pacs_agent_$$';
|
||||||
private Collection $study_ids;
|
private Collection $study_ids;
|
||||||
|
|
||||||
private Collection $insert_queue;
|
private Collection $insert_queue;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
use App\Models\Study;
|
use App\Models\Study;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\Services\AuditTrail\ActivityLogger;
|
use App\Services\AuditTrail\ActivityLogger;
|
||||||
|
use App\Services\Pacs\Sync\StudiesSync;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Spatie\MediaLibrary\MediaCollections\Models\Media;
|
use Spatie\MediaLibrary\MediaCollections\Models\Media;
|
||||||
|
|
||||||
@ -52,7 +53,7 @@ function array_trim_strings(array $ary): array
|
|||||||
function sync_agent_id(): int
|
function sync_agent_id(): int
|
||||||
{
|
{
|
||||||
return cache()->rememberForever('sync_agent_id',
|
return cache()->rememberForever('sync_agent_id',
|
||||||
fn () => User::where('username', '$$_pacs_sync_$$')->first()->id);
|
fn () => User::where('username', StudiesSync::SYNC_AGENT)->first()->id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
use App\Models\Department;
|
use App\Models\Department;
|
||||||
use App\Models\Organization;
|
use App\Models\Organization;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
|
use App\Services\Pacs\Sync\StudiesSync;
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
|
|
||||||
class UserSeeder extends Seeder
|
class UserSeeder extends Seeder
|
||||||
@ -17,7 +18,7 @@ public function run(): void
|
|||||||
$usr = User::factory()->create([
|
$usr = User::factory()->create([
|
||||||
'first_name' => 'PACS Agent',
|
'first_name' => 'PACS Agent',
|
||||||
'display_name' => 'PACS Agent',
|
'display_name' => 'PACS Agent',
|
||||||
'username' => '$$_pacs_agent_$$',
|
'username' => StudiesSync::SYNC_AGENT,
|
||||||
'password' => bcrypt(fake()->password(20)),
|
'password' => bcrypt(fake()->password(20)),
|
||||||
'is_active' => false,
|
'is_active' => false,
|
||||||
]);
|
]);
|
||||||
|
Loading…
Reference in New Issue
Block a user