54 lines
1.4 KiB
PHP
54 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Services\Pacs;
|
|
|
|
use App\Models\OrthancHost;
|
|
use App\Models\Study;
|
|
use Uri;
|
|
|
|
final class PacsUrlGen
|
|
{
|
|
public static function stoneViewer(OrthancHost $host, Study $study): string
|
|
{
|
|
$url = $host->stoneViewerUrl()->withQuery(['study' => $study->study_instance_uid]);
|
|
|
|
return (string) $url;
|
|
}
|
|
|
|
public static function ohifViewer(OrthancHost $host, Study $study): string
|
|
{
|
|
$url = $host->ohifViewerUrl()
|
|
->withQuery(['StudyInstanceUIDs' => $study->study_instance_uid]);
|
|
|
|
return (string) $url;
|
|
}
|
|
|
|
public static function ohifViewerMpr(OrthancHost $host, Study $study): string
|
|
{
|
|
$url = $host->ohifViewerUrl()
|
|
->withQuery([
|
|
'hangingprotocolId' => 'mprAnd3DVolumeViewport',
|
|
'StudyInstanceUIDs' => $study->study_instance_uid,
|
|
]);
|
|
|
|
return (string) $url;
|
|
}
|
|
|
|
public static function ohifSegmentation(OrthancHost $host, Study $study): string
|
|
{
|
|
$url = $host->ohifViewerUrl()
|
|
->withPath('/ohif/segmentation')
|
|
->withQuery(['StudyInstanceUIDs' => $study->study_instance_uid]);
|
|
|
|
return (string) $url;
|
|
}
|
|
|
|
public static function archive(OrthancHost $host, Study $study): string
|
|
{
|
|
$url = Uri::of($host->rest_api_endpoint)
|
|
->withPath('/studies/' . $study->study_instance_uid . '/archive');
|
|
|
|
return (string) $url;
|
|
}
|
|
}
|