This commit is contained in:
Dr Masroor Ehsan 2025-01-20 15:26:25 +06:00
parent 7c7e8c0832
commit 89ffcae528
7 changed files with 73 additions and 1 deletions

View File

@ -6,6 +6,7 @@
use App\Domain\ACL\Role; use App\Domain\ACL\Role;
use App\Http\Controllers\HashidControllerBase; use App\Http\Controllers\HashidControllerBase;
use App\Models\User; use App\Models\User;
use App\Services\Pacs\DicomModalities;
use App\Services\SessionHelper; use App\Services\SessionHelper;
class WorklistController extends HashidControllerBase class WorklistController extends HashidControllerBase
@ -13,7 +14,7 @@ class WorklistController extends HashidControllerBase
public function index(WorklistDataTable $dataTable) public function index(WorklistDataTable $dataTable)
{ {
SessionHelper::setIntendedUrl(); SessionHelper::setIntendedUrl();
$modalities = ['CT', 'MR', 'CR', 'MG', 'US', 'DX', 'XA']; $modalities = array_map(static fn ($m) => $m->value, DicomModalities::cases());
$rads = User::active() $rads = User::active()
->role(Role::Radiologist) ->role(Role::Radiologist)
->orderBy('display_name') ->orderBy('display_name')

View File

@ -0,0 +1,25 @@
<?php
namespace App\Services\Pacs;
enum DicomModalities: string
{
case CT = 'CT'; // Computed Tomography
case MR = 'MR'; // Magnetic Resonance
case CR = 'CR'; // Computed Radiography
case DX = 'DX'; // Digital Radiography
case MG = 'MG'; // Mammography
case US = 'US'; // Ultrasound
case XA = 'XA'; // X-ray Angiography
case OPG = 'OPG'; // Orthopantomogram
case ECG = 'ECG'; // Electrocardiography
/*
case CBCT = 'CBCT'; // Cone Beam Computed Tomography
case NM = 'NM'; // Nuclear Medicine
case PT = 'PT'; // Positron Emission Tomography
case RF = 'RF'; // Radio Fluoroscopy
case SC = 'SC'; // Secondary Capture
case OT = 'OT'; // Other
*/
}

View File

@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Print Table</title>
<meta charset="UTF-8">
<meta name=description content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap CSS -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<style>
body {margin: 20px}
</style>
</head>
<body>
<table class="table table-bordered table-condensed table-striped">
@foreach($data as $row)
@if ($loop->first)
<tr>
@foreach($row as $key => $value)
<th>{!! $key !!}</th>
@endforeach
</tr>
@endif
<tr>
@foreach($row as $key => $value)
@if(is_string($value) || is_numeric($value))
<td>{!! $value !!}</td>
@else
<td></td>
@endif
@endforeach
</tr>
@endforeach
</table>
</body>
</html>

View File

@ -0,0 +1 @@
<img{!! $attributeString !!}@if($loadingAttributeValue) loading="{{ $loadingAttributeValue }}"@endif src="{{ $media->getUrl($conversion) }}" alt="{{ $media->name }}">

View File

@ -0,0 +1,6 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" x="0"
y="0" viewBox="0 0 {{ $originalImageWidth }} {{ $originalImageHeight }}">
<image width="{{ $originalImageWidth }}" height="{{ $originalImageHeight }}" xlink:href="{{ $tinyImageBase64 }}">
</image>
</svg>

After

Width:  |  Height:  |  Size: 429 B

View File

@ -0,0 +1 @@
<img{!! $attributeString !!}@if($loadingAttributeValue) loading="{{ $loadingAttributeValue }}"@endif srcset="{{ $media->getSrcset($conversion) }}" src="{{ $media->getUrl($conversion) }}" width="{{ $width }}" height="{{ $height }}">

View File

@ -0,0 +1 @@
<img{!! $attributeString !!} @if($loadingAttributeValue) loading="{{ $loadingAttributeValue }}"@endif srcset="{{ $media->getSrcset($conversion) }}" onload="window.requestAnimationFrame(function(){if(!(size=getBoundingClientRect().width))return;onload=null;sizes=Math.ceil(size/window.innerWidth*100)+'vw';});" sizes="1px" src="{{ $media->getUrl($conversion) }}" width="{{ $width }}" height="{{ $height }}">