diff --git a/app/Models/Enums/PatientSex.php b/app/Models/Enums/PatientSex.php new file mode 100644 index 0000000..08aedea --- /dev/null +++ b/app/Models/Enums/PatientSex.php @@ -0,0 +1,10 @@ +boolean('is_locked')->default(false); $table->unsignedTinyInteger('study_priority')->default(0); $table->string('patient_id')->nullable(); - $table->string('patient_uid')->nullable(); + $table->string('patient_uuid')->nullable()->index(); $table->string('patient_name'); $table->string('patient_sex')->nullable(); $table->date('patient_birthdate')->nullable(); @@ -52,7 +52,7 @@ public function up(): void $table->timestamps(); $table->index(['referring_physician_id', 'receive_date']); - $table->index(['institute_id', 'receive_date']); + $table->index(['institute_id', 'receive_date', 'is_archived']); $table->index(['institute_id', 'report_status', 'study_priority', 'receive_date']); $table->index(['assigned_physician_id', 'report_status', 'study_priority', 'receive_date']); }); 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 f2bbb25..73197ad 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 @@ -16,8 +16,8 @@ public function up(): void $table->text('surgical_history')->nullable(); $table->text('lab_results')->nullable(); $table->text('clinical_diagnosis')->nullable(); - $table->json('properties')->nullable(); - $table->json('series')->nullable(); + $table->jsonb('properties')->nullable(); + $table->jsonb('series')->nullable(); $table->timestamps(); }); }