91 lines
2.8 KiB
PHP
91 lines
2.8 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Domain\Rule\MatchMode;
|
|
use App\Models\Department;
|
|
use App\Models\DicomServer;
|
|
use App\Models\Organization;
|
|
use Illuminate\Database\Seeder;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
class InstituteSeeder 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,
|
|
]);
|
|
|
|
$chev_xr = Department::create(
|
|
[
|
|
'is_active' => true,
|
|
'name' => 'Chevron XR',
|
|
'institute_id' => $chev->id,
|
|
]
|
|
);
|
|
$cmch_mr = Department::create(
|
|
[
|
|
'is_active' => false,
|
|
'name' => 'CMCH MR',
|
|
'institute_id' => $cmch->id,
|
|
]
|
|
);
|
|
|
|
DB::table('dicom_mapping_rules')->insert([
|
|
'dicom_tag' => 'InstitutionName',
|
|
'name' => 'CHEVRON CLINICAL LABORATORY , PANCHLAISH,CTG',
|
|
'search_pattern' => $chev->id,
|
|
'match_mode' => MatchMode::Exact->value,
|
|
]);
|
|
DB::table('dicom_mapping_rules')->insert([
|
|
'dicom_tag' => 'InstitutionName',
|
|
'search_pattern' => 'CHEVRON CLINICAL',
|
|
'institute_id' => $chev->id,
|
|
'match_mode' => MatchMode::StartsWith->value,
|
|
]);
|
|
|
|
DicomServer::create(
|
|
[
|
|
'is_active' => true,
|
|
'server_name' => 'Orthanc Main',
|
|
'host' => 'pacs.mylabctg.com',
|
|
'port' => 8042,
|
|
'rest_api_endpoint' => 'http://pacs.mylabctg.com:8042/',
|
|
'wado_path' => 'dicom-web',
|
|
'ae_title' => 'RADFUSION',
|
|
'stone_viewer_path' => 'stone-webviewer/index.html',
|
|
'ohif_viewer_path' => 'ohif/viewer',
|
|
]
|
|
);
|
|
DicomServer::create(
|
|
[
|
|
'is_active' => false,
|
|
'server_name' => 'Orthanc XR',
|
|
'host' => 'pacs.mylabctg.com',
|
|
'port' => 8043,
|
|
'rest_api_endpoint' => 'http://pacs.mylabctg.com:8042/',
|
|
'ae_title' => 'RADFUSION',
|
|
'wado_path' => 'dicom-web',
|
|
'stone_viewer_path' => 'stone-webviewer/index.html',
|
|
'ohif_viewer_path' => 'ohif/viewer',
|
|
'institute_id' => $chev->id,
|
|
'facility_id' => $chev_xr->id,
|
|
]
|
|
);
|
|
}
|
|
}
|