wip DDL
This commit is contained in:
parent
8f941d039c
commit
3c7bb6faed
@ -62,13 +62,6 @@ public function html(): HtmlBuilder
|
|||||||
public function getColumns(): array
|
public function getColumns(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
Column::computed('action')
|
|
||||||
->exportable(false)
|
|
||||||
->printable(false)
|
|
||||||
->width(60)
|
|
||||||
->addClass('text-center'),
|
|
||||||
|
|
||||||
Column::make('id'),
|
|
||||||
Column::make('study_priority'),
|
Column::make('study_priority'),
|
||||||
Column::make('study_modality'),
|
Column::make('study_modality'),
|
||||||
|
|
||||||
@ -83,9 +76,15 @@ public function getColumns(): array
|
|||||||
Column::make('study_description'),
|
Column::make('study_description'),
|
||||||
Column::make('reporting_physician_id'),
|
Column::make('reporting_physician_id'),
|
||||||
Column::make('body_part_examined'),
|
Column::make('body_part_examined'),
|
||||||
Column::make('image_count'),
|
Column::make('num_instances'),
|
||||||
|
|
||||||
// Column::make('xxx'),
|
// Column::make('xxx'),
|
||||||
|
Column::computed('action')
|
||||||
|
->exportable(false)
|
||||||
|
->printable(false)
|
||||||
|
->width(60)
|
||||||
|
->addClass('text-center'),
|
||||||
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
11
app/Models/Enums/Priority.php
Normal file
11
app/Models/Enums/Priority.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models\Enums;
|
||||||
|
|
||||||
|
enum Priority: int
|
||||||
|
{
|
||||||
|
case Low = 0;
|
||||||
|
case Normal = 50;
|
||||||
|
case High = 75;
|
||||||
|
case Urgent = 100;
|
||||||
|
}
|
@ -3,6 +3,7 @@
|
|||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use App\Models\Enums\Permission;
|
use App\Models\Enums\Permission;
|
||||||
|
use App\Models\Enums\Priority;
|
||||||
use App\Models\Enums\ReportStatus;
|
use App\Models\Enums\ReportStatus;
|
||||||
use App\Models\Enums\StudyLevelStatus;
|
use App\Models\Enums\StudyLevelStatus;
|
||||||
use App\Models\Traits\HashableId;
|
use App\Models\Traits\HashableId;
|
||||||
@ -22,6 +23,7 @@ protected function casts(): array
|
|||||||
'is_archived' => 'boolean',
|
'is_archived' => 'boolean',
|
||||||
'study_status' => StudyLevelStatus::class,
|
'study_status' => StudyLevelStatus::class,
|
||||||
'report_status' => ReportStatus::class,
|
'report_status' => ReportStatus::class,
|
||||||
|
'study_priority' => Priority::class,
|
||||||
'received_at' => 'datetime',
|
'received_at' => 'datetime',
|
||||||
'reported_at' => 'datetime',
|
'reported_at' => 'datetime',
|
||||||
'assigned_at' => 'datetime',
|
'assigned_at' => 'datetime',
|
||||||
@ -184,4 +186,13 @@ public function toArray(): array
|
|||||||
'allowed' => $this->allowed(),
|
'allowed' => $this->allowed(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getPriorityIconAttribute(): string
|
||||||
|
{
|
||||||
|
return match ($this->study_priority) {
|
||||||
|
1 => 'fa fa-star text-warning',
|
||||||
|
2 => 'fa fa-star text-danger',
|
||||||
|
default => 'fa fa-star text-primary',
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -116,7 +116,7 @@ public function transformData(mixed $orthanc_src): array
|
|||||||
'referring_physician_name' => data_get($orthanc_src, 'MainDicomTags.ReferringPhysicianName'),
|
'referring_physician_name' => data_get($orthanc_src, 'MainDicomTags.ReferringPhysicianName'),
|
||||||
'study_id' => data_get($orthanc_src, 'MainDicomTags.StudyID'),
|
'study_id' => data_get($orthanc_src, 'MainDicomTags.StudyID'),
|
||||||
'study_instance_uid' => data_get($orthanc_src, 'MainDicomTags.StudyInstanceUID'),
|
'study_instance_uid' => data_get($orthanc_src, 'MainDicomTags.StudyInstanceUID'),
|
||||||
'study_modality' => data_get($orthanc_src, 'RequestedTags.Modality'),
|
'modality' => data_get($orthanc_src, 'RequestedTags.Modality'),
|
||||||
'body_part_examined' => data_get($orthanc_src, 'RequestedTags.BodyPartExamined'),
|
'body_part_examined' => data_get($orthanc_src, 'RequestedTags.BodyPartExamined'),
|
||||||
|
|
||||||
'study_date' => DicomUtils::dateTimeToCarbon($orthanc_src['MainDicomTags']['StudyDate'], $orthanc_src['MainDicomTags']['StudyTime']) ?? now('UTC'),
|
'study_date' => DicomUtils::dateTimeToCarbon($orthanc_src['MainDicomTags']['StudyDate'], $orthanc_src['MainDicomTags']['StudyTime']) ?? now('UTC'),
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use App\Models\Enums\Priority;
|
||||||
use App\Models\Enums\ReportStatus;
|
use App\Models\Enums\ReportStatus;
|
||||||
use App\Models\Enums\StudyLevelStatus;
|
use App\Models\Enums\StudyLevelStatus;
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
@ -14,7 +15,7 @@ public function up(): void
|
|||||||
$table->id();
|
$table->id();
|
||||||
$table->string('orthanc_uuid')->unique();
|
$table->string('orthanc_uuid')->unique();
|
||||||
$table->boolean('is_archived')->default(false);
|
$table->boolean('is_archived')->default(false);
|
||||||
$table->unsignedTinyInteger('study_priority')->default(0);
|
$table->unsignedTinyInteger('priority')->default(Priority::Normal);
|
||||||
|
|
||||||
$table->string('patient_id')->nullable();
|
$table->string('patient_id')->nullable();
|
||||||
$table->string('patient_uuid')->nullable()->index();
|
$table->string('patient_uuid')->nullable()->index();
|
||||||
@ -24,13 +25,13 @@ public function up(): void
|
|||||||
|
|
||||||
$table->string('study_instance_uid')->index();
|
$table->string('study_instance_uid')->index();
|
||||||
$table->string('study_id')->nullable();
|
$table->string('study_id')->nullable();
|
||||||
$table->string('institution_name')->nullable();
|
|
||||||
$table->string('accession_number')->nullable();
|
$table->string('accession_number')->nullable();
|
||||||
|
$table->string('institution_name')->nullable();
|
||||||
$table->string('study_description')->nullable();
|
$table->string('study_description')->nullable();
|
||||||
$table->string('body_part_examined')->nullable();
|
$table->string('body_part_examined')->nullable();
|
||||||
|
$table->string('modality', 4)->nullable();
|
||||||
|
|
||||||
$table->string('referring_physician_name')->nullable();
|
$table->string('referring_physician_name')->nullable();
|
||||||
$table->string('study_modality', 4)->nullable();
|
|
||||||
$table->timestamp('study_date');
|
$table->timestamp('study_date');
|
||||||
$table->timestamp('received_at');
|
$table->timestamp('received_at');
|
||||||
$table->timestamp('assigned_at')->nullable();
|
$table->timestamp('assigned_at')->nullable();
|
||||||
|
Loading…
Reference in New Issue
Block a user