diff --git a/app/Models/Study.php b/app/Models/Study.php index 0b4dc9b..d7aec90 100644 --- a/app/Models/Study.php +++ b/app/Models/Study.php @@ -395,6 +395,11 @@ public function setReportStatus(ReportStatus $status, User|int|null $user = null $this->update($params); } + public function canEditReport(): bool + { + $this->report_status <= ReportStatus::Finalized; + } + protected function casts(): array { return [ @@ -409,9 +414,4 @@ protected function casts(): array 'patient_birthdate' => 'immutable_date', ]; } - - public function canEditReport(): bool - { - $this->report_status <= ReportStatus::Finalized; - } } diff --git a/app/Models/StudyDetails.php b/app/Models/StudyDetails.php index ebe83ed..c50a444 100644 --- a/app/Models/StudyDetails.php +++ b/app/Models/StudyDetails.php @@ -2,7 +2,6 @@ namespace App\Models; -use App\Casts\Compressed; use App\Models\Traits\HashableId; use Illuminate\Database\Eloquent\Relations\BelongsTo; @@ -41,10 +40,6 @@ protected function casts(): array 'properties' => 'array', 'series' => 'array', 'assignment_log' => 'array', - 'clinical_history' => Compressed::class, - 'surgical_history' => Compressed::class, - 'lab_results' => Compressed::class, - 'clinical_diagnosis' => Compressed::class, ]; } } diff --git a/database/migrations/2024_12_28_144858_create_study_details_table.php b/database/migrations/2024_12_28_144858_create_study_details_table.php index 690b1aa..bad9858 100644 --- a/database/migrations/2024_12_28_144858_create_study_details_table.php +++ b/database/migrations/2024_12_28_144858_create_study_details_table.php @@ -13,10 +13,10 @@ public function up(): void $table->foreignId('study_id')->unique()->constrained('studies')->cascadeOnDelete(); $table->string('orthanc_uuid')->unique(); // $table->foreignId('user_id')->constrained('users'); - $table->binary('clinical_history')->nullable(); - $table->binary('surgical_history')->nullable(); - $table->binary('lab_results')->nullable(); - $table->binary('clinical_diagnosis')->nullable(); + $table->text('clinical_history')->nullable(); + $table->text('surgical_history')->nullable(); + $table->text('lab_results')->nullable(); + $table->text('clinical_diagnosis')->nullable(); $table->jsonb('dicom_properties')->nullable(); $table->jsonb('properties')->nullable(); $table->jsonb('series')->nullable(); diff --git a/resources/views/staff/history/partials/_history-card.blade.php b/resources/views/staff/history/partials/_history-card.blade.php index d087a71..9902baf 100644 --- a/resources/views/staff/history/partials/_history-card.blade.php +++ b/resources/views/staff/history/partials/_history-card.blade.php @@ -2,7 +2,7 @@
{{ $title }}

- {{ $content }} + {!! nl2br(e($content)) !!}