wip
This commit is contained in:
parent
92179760d0
commit
17eb245daf
@ -7,13 +7,24 @@
|
||||
|
||||
class StudyViewerController extends HashidControllerBase
|
||||
{
|
||||
public function stone()
|
||||
private function loadViewer(\Closure $callback)
|
||||
{
|
||||
$this->decodeKeys();
|
||||
$study = Study::findOrFail($this->key);
|
||||
$url = $study->getStoneLink();
|
||||
$url = $callback($study);
|
||||
abort_if(blank($url), 404);
|
||||
$title = $study->patient_name;
|
||||
|
||||
return view('staff.studies.viewer', compact('url'));
|
||||
return view('staff.studies.viewer', compact('url', 'title'));
|
||||
}
|
||||
|
||||
public function stone()
|
||||
{
|
||||
return $this->loadViewer(fn (Study $study) => $study->getStoneLink());
|
||||
}
|
||||
|
||||
public function ohif()
|
||||
{
|
||||
return $this->loadViewer(fn (Study $study) => $study->getOhifLink());
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,10 @@
|
||||
@extends('layouts/layoutMaster')
|
||||
|
||||
@section('title', 'Viewer')
|
||||
|
||||
@section('content')
|
||||
<iframe src="{{ $url }}" frameborder="0"></iframe>
|
||||
@endsection
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ $title }}</title>
|
||||
</head>
|
||||
<body style="background-color:black;">
|
||||
<iframe src="{{ $url }}" frameborder="0" width="100%" height="100%"
|
||||
allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true">
|
||||
</iframe>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -127,10 +127,10 @@ class="d-flex justify-content-between align-items-start border-end pb-4 pb-sm-0
|
||||
<td>{{ $study->institution_name }}</td>
|
||||
<td>
|
||||
@if ($study->allowed()['stone'])
|
||||
<a target="_blank" href="{{ $study->links()['stone'] }}">St</a> |
|
||||
<a target="_blank" href="{{ route('viewer.stone', $study->hash) }}">St</a> |
|
||||
@endif
|
||||
@if ($study->allowed()['ohif'])
|
||||
<a target="_blank" href="{{ $study->links()['ohif'] }}">O</a> |
|
||||
<a target="_blank" href="{{ route('viewer.ohif', $study->hash) }}">Oh</a> |
|
||||
@endif
|
||||
@if ($study->allowed()['ohif.mpr'])
|
||||
<a target="_blank" href="{{ $study->links()['ohif.mpr'] }}">OM</a> |
|
||||
|
@ -40,6 +40,7 @@
|
||||
|
||||
Route::group(['prefix' => 'viewer', 'as' => 'viewer.'], function () {
|
||||
Route::get('stone/{hashid}', [StudyViewerController::class, 'stone'])->name('stone');
|
||||
Route::get('ohif/{hashid}', [StudyViewerController::class, 'ohif'])->name('ohif');
|
||||
});
|
||||
|
||||
Route::group(['as' => 'staff.'], function () {
|
||||
|
Loading…
Reference in New Issue
Block a user