89 lines
2.6 KiB
PHP
89 lines
2.6 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Domain\Rule\NameMatchModes;
|
|
use App\Models\DicomServer;
|
|
use App\Models\Facility;
|
|
use App\Models\Institute;
|
|
use Illuminate\Database\Seeder;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
class InstituteSeeder extends Seeder
|
|
{
|
|
public function run(): void
|
|
{
|
|
Institute::create([
|
|
'name' => 'Catch-all',
|
|
'is_active' => true,
|
|
]);
|
|
$chev = Institute::create([
|
|
'name' => 'Chevron',
|
|
'is_active' => true,
|
|
]);
|
|
$cmch = Institute::create([
|
|
'name' => 'CMCH',
|
|
'is_active' => true,
|
|
]);
|
|
$dummy = Institute::create([
|
|
'name' => 'Dummy Site',
|
|
'is_active' => false,
|
|
]);
|
|
|
|
$chev_xr = Facility::create(
|
|
[
|
|
'is_active' => true,
|
|
'name' => 'Chevron XR',
|
|
'institute_id' => $chev->id,
|
|
]
|
|
);
|
|
$cmch_mr = Facility::create(
|
|
[
|
|
'is_active' => false,
|
|
'name' => 'CMCH MR',
|
|
'institute_id' => $cmch->id,
|
|
]
|
|
);
|
|
|
|
DB::table('institute_names')->insert([
|
|
'name' => 'CHEVRON CLINICAL LABORATORY , PANCHLAISH,CTG',
|
|
'institute_id' => $chev->id,
|
|
'match_mode' => NameMatchModes::Exact->value,
|
|
]);
|
|
DB::table('institute_names')->insert([
|
|
'name' => 'CHEVRON CLINICAL',
|
|
'institute_id' => $chev->id,
|
|
'match_mode' => NameMatchModes::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,
|
|
]
|
|
);
|
|
}
|
|
}
|