19 lines
469 B
PHP
19 lines
469 B
PHP
<?php
|
|
|
|
namespace App\DAL;
|
|
|
|
use Illuminate\Support\Facades\Cache;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
final readonly class Studies
|
|
{
|
|
public static function getStudyIdByOrthancUuid(string $orthanc_uuid): ?int
|
|
{
|
|
return Cache::remember("studies.orthanc_uuid.{$orthanc_uuid}",
|
|
now()->addHours(1),
|
|
fn () => DB::table('studies')
|
|
->where('orthanc_uuid', strtolower($orthanc_uuid))
|
|
->value('id'));
|
|
}
|
|
}
|