wip
This commit is contained in:
parent
752af113b4
commit
35c03978a3
@ -65,6 +65,8 @@ AWS_USE_PATH_STYLE_ENDPOINT=false
|
||||
|
||||
VITE_APP_NAME="${APP_NAME}"
|
||||
|
||||
PACS_API_ENDPOINT=http://27.147.241.214:8042/
|
||||
PACS_API_ENDPOINT=http://pacs.mylabctg.com:8042/
|
||||
PACS_API_USERNAME=
|
||||
PACS_API_PASSWORD=
|
||||
STONE_VIEWER_ENDPOINT=http://pacs.mylabctg.com:8042/
|
||||
OHIF_VIEWER_ENDPOINT=http://pacs.mylabctg.com:8042/
|
||||
|
@ -2,20 +2,17 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Study;
|
||||
use App\Services\Pacs\OrthancRestClient;
|
||||
use App\Services\Pacs\StudyImporter;
|
||||
use Arr;
|
||||
|
||||
class PacsController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
$studies = (new OrthancRestClient)->getStudies();
|
||||
//dd($studies[0]);
|
||||
$study = array_pop($studies);
|
||||
//dd(Arr::get($study, 'MainDicomTags.StudyDate'));
|
||||
//dd(collect($study)->get('MainDicomTags.StudyDate'));
|
||||
dd($study);
|
||||
$studies = Study::where('is_active', true)
|
||||
->orderBy('study_date', 'desc')
|
||||
->paginate(15);
|
||||
|
||||
return view('pacs.studies', compact('studies'));
|
||||
}
|
||||
|
35
app/Services/Pacs/PacsUrlGen.php
Normal file
35
app/Services/Pacs/PacsUrlGen.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Pacs;
|
||||
|
||||
use League\Url\Url;
|
||||
|
||||
final class PacsUrlGen
|
||||
{
|
||||
public static function stoneViewer(string $study_uid): string
|
||||
{
|
||||
$url = Url::createFromUrl(config('pacs.viewer.stone.endpoint'));
|
||||
$url->setPath('/stone-webviewer/index.html');
|
||||
$url->setQuery(['study' => $study_uid]);
|
||||
|
||||
return (string) $url;
|
||||
}
|
||||
|
||||
public static function ohifViewer(string $study_uid): string
|
||||
{
|
||||
$url = Url::createFromUrl(config('pacs.viewer.ohif.endpoint'));
|
||||
$url->setPath('/ohif/viewer');
|
||||
$url->setQuery(['StudyInstanceUIDs' => $study_uid]);
|
||||
|
||||
return (string) $url;
|
||||
}
|
||||
|
||||
public static function ohifViewerMpr(string $study_uid): string
|
||||
{
|
||||
$url = Url::createFromUrl(config('pacs.viewer.ohif.endpoint'));
|
||||
$url->setPath('/ohif/viewer');
|
||||
$url->setQuery(['StudyInstanceUIDs' => $study_uid, 'hangingprotocolId' => 'mprAnd3DVolumeViewport']);
|
||||
|
||||
return (string) $url;
|
||||
}
|
||||
}
|
@ -3,9 +3,20 @@
|
||||
return [
|
||||
|
||||
'api' => [
|
||||
'endpoint' => env('PACS_API_ENDPOINT', 'http://27.147.241.214:8042/'),
|
||||
'endpoint' => env('PACS_API_ENDPOINT', 'http://pacs.mylabctg.com:8042/'),
|
||||
'username' => env('PACS_API_USERNAME'),
|
||||
'password' => env('PACS_API_PASSWORD'),
|
||||
],
|
||||
|
||||
'viewer' => [
|
||||
|
||||
'stone' => [
|
||||
'endpoint' => env('STONE_VIEWER_ENDPOINT', 'http://pacs.mylabctg.com:8042/'),
|
||||
],
|
||||
|
||||
'ohif' => [
|
||||
'endpoint' => env('OHIF_VIEWER_ENDPOINT', 'http://pacs.mylabctg.com:8042/'),
|
||||
],
|
||||
|
||||
],
|
||||
];
|
||||
|
@ -7,43 +7,43 @@
|
||||
|
||||
<div class="py-12">
|
||||
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
|
||||
<div class="bg-white overflow-hidden shadow-xl sm:rounded-lg">
|
||||
<table class="table">
|
||||
<div class="bg-white overflow-hidden shadow-xl sm:rounded-lg mb-4">
|
||||
|
||||
<table class="min-w-full divide-y divide-gray-200">
|
||||
<thead class="bg-gray-50">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Patient ID</th>
|
||||
<th>Name</th>
|
||||
<th>Sex</th>
|
||||
<th>Study Dt</th>
|
||||
<th>Uploaded</th>
|
||||
<th>Institution</th>
|
||||
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">ID</th>
|
||||
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Accession Number</th>
|
||||
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Patient ID</th>
|
||||
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Patient Name</th>
|
||||
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Patient Sex</th>
|
||||
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Patient Birth Date</th>
|
||||
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Study Date</th>
|
||||
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Receive Date</th>
|
||||
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Institute Name</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="bg-white divide-y divide-gray-200">
|
||||
@foreach($studies as $study)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('studies.show', [$study['ID']]) }}">{{ $study['ID'] }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ $study['PatientMainDicomTags']['PatientID'] }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $study['PatientMainDicomTags']['PatientName'] }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $study['PatientMainDicomTags']['PatientSex'] }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $study['StudyDateTime'] }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $study['ReceiveDateTime'] }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $study['MainDicomTags']['InstitutionName'] }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ $study->id }}</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ $study->accession_number }}</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ $study->patient_id }}</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ $study->patient_name }}</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ $study->patient_sex }}</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ $study->patient_birthdate }}</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ $study->study_date }}</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ $study->receive_date }}</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ $study->institution_name }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="mb-4 me-4">
|
||||
{!! $studies->links() !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user