169 lines
5.7 KiB
PHP
169 lines
5.7 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\Department;
|
|
use App\Models\DicomRoutingRule;
|
|
use App\Models\DicomServer;
|
|
use App\Models\Organization;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class OrganizationSeeder extends Seeder
|
|
{
|
|
public function run(): void
|
|
{
|
|
Organization::create([
|
|
'name' => 'CATCH-ALL',
|
|
'is_active' => true,
|
|
]);
|
|
$chev = Organization::create([
|
|
'name' => 'Chevron',
|
|
'is_active' => true,
|
|
]);
|
|
$cmch = Organization::create([
|
|
'name' => 'CMCH',
|
|
'is_active' => true,
|
|
]);
|
|
$dummy = Organization::create([
|
|
'name' => 'Dummy Site',
|
|
'is_active' => false,
|
|
]);
|
|
|
|
$dept_chev_xr = Department::create(
|
|
[
|
|
'is_active' => true,
|
|
'name' => 'Chev-CR',
|
|
'organization_id' => $chev->id,
|
|
]
|
|
);
|
|
$chev_dep_ct_mr = Department::create(
|
|
[
|
|
'is_active' => true,
|
|
'name' => 'Chev-MR',
|
|
'organization_id' => $chev->id,
|
|
]
|
|
);
|
|
$dept_cmch_mr = Department::create(
|
|
[
|
|
'is_active' => false,
|
|
'name' => 'CMCH MR',
|
|
'organization_id' => $cmch->id,
|
|
]
|
|
);
|
|
|
|
$rul_chev_mr_ct = DicomRoutingRule::create(
|
|
[
|
|
'is_active' => true,
|
|
'name' => 'Chevron MR/CT',
|
|
'organization_id' => $chev->id,
|
|
'department_id' => $chev_dep_ct_mr->id,
|
|
'condition' => '(study.institution_name ?? "" starts with "chevron") and (study.modality not in ["CR", "DX", "MG"])',
|
|
]
|
|
);
|
|
|
|
$rul_chev_xr = DicomRoutingRule::create(
|
|
[
|
|
'is_active' => true,
|
|
'name' => 'Chevron X-ray',
|
|
'organization_id' => $chev->id,
|
|
'department_id' => $dept_chev_xr->id,
|
|
'condition' => '(study.institution_name ?? "" starts with "chevron") and (study.modality in ["CR", "DX", "MG"])',
|
|
'priority' => 99,
|
|
]
|
|
);
|
|
|
|
DicomServer::create(
|
|
[
|
|
'is_active' => true,
|
|
'server_name' => 'CTG-1',
|
|
'geo_code' => 'BD',
|
|
'host' => 'pacs.mylabctg.com',
|
|
'http_port' => 8042,
|
|
'dicom_port' => 4242,
|
|
'rest_api_endpoint' => 'http://pacs.mylabctg.com:8042/',
|
|
'wado_path' => 'dicom-web',
|
|
'ae_title' => 'BLACKFISH',
|
|
'stone_viewer_path' => 'stone-webviewer/index.html',
|
|
'ohif_viewer_path' => 'ohif/viewer',
|
|
]
|
|
);
|
|
DicomServer::create(
|
|
[
|
|
'is_active' => true,
|
|
'server_name' => 'HEL-1',
|
|
'geo_code' => 'FI',
|
|
'host' => 'helsinki.mylabctg.com',
|
|
'http_port' => 8042,
|
|
'dicom_port' => 4242,
|
|
'rest_api_endpoint' => 'http://helsinki.mylabctg.com:8042/',
|
|
'wado_path' => 'dicom-web',
|
|
'ae_title' => 'BLACKFISH',
|
|
'stone_viewer_path' => 'stone-webviewer/index.html',
|
|
'ohif_viewer_path' => 'ohif/viewer',
|
|
]
|
|
);
|
|
DicomServer::create(
|
|
[
|
|
'is_active' => true,
|
|
'server_name' => 'SGP-1',
|
|
'geo_code' => 'SG',
|
|
'host' => 'singapore.mylabctg.com',
|
|
'http_port' => 8042,
|
|
'dicom_port' => 4242,
|
|
'rest_api_endpoint' => 'http://singapore.mylabctg.com:8042/',
|
|
'wado_path' => 'dicom-web',
|
|
'ae_title' => 'BLACKFISH',
|
|
'stone_viewer_path' => 'stone-webviewer/index.html',
|
|
'ohif_viewer_path' => 'ohif/viewer',
|
|
]
|
|
);
|
|
DicomServer::create(
|
|
[
|
|
'is_active' => true,
|
|
'server_name' => 'Texas',
|
|
'geo_code' => 'US',
|
|
'host' => 'texas.mylabctg.com',
|
|
'http_port' => 8042,
|
|
'dicom_port' => 4242,
|
|
'rest_api_endpoint' => 'http://texas.mylabctg.com:8042/',
|
|
'wado_path' => 'dicom-web',
|
|
'ae_title' => 'BLACKFISH',
|
|
'stone_viewer_path' => 'stone-webviewer/index.html',
|
|
'ohif_viewer_path' => 'ohif/viewer',
|
|
]
|
|
);
|
|
DicomServer::create(
|
|
[
|
|
'is_active' => true,
|
|
'server_name' => 'San Jose',
|
|
'geo_code' => 'US',
|
|
'host' => 'san-jose.mylabctg.com',
|
|
'http_port' => 8042,
|
|
'dicom_port' => 4242,
|
|
'rest_api_endpoint' => 'http://san-jose.mylabctg.com:8042/',
|
|
'wado_path' => 'dicom-web',
|
|
'ae_title' => 'BLACKFISH',
|
|
'stone_viewer_path' => 'stone-webviewer/index.html',
|
|
'ohif_viewer_path' => 'ohif/viewer',
|
|
]
|
|
);
|
|
DicomServer::create(
|
|
[
|
|
'is_active' => false,
|
|
'server_name' => 'MAA-1',
|
|
'host' => 'pacs.mylabctg.com',
|
|
'geo_code' => 'IN',
|
|
'http_port' => 8043,
|
|
'dicom_port' => 4242,
|
|
'rest_api_endpoint' => 'http://pacs.mylabctg.com:8042/',
|
|
'ae_title' => 'BLACKFISH',
|
|
'wado_path' => 'dicom-web',
|
|
'stone_viewer_path' => 'stone-webviewer/index.html',
|
|
'ohif_viewer_path' => 'ohif/viewer',
|
|
'organization_id' => $chev->id,
|
|
'department_id' => $dept_chev_xr->id,
|
|
]
|
|
);
|
|
}
|
|
}
|