study details/series -> JSON
This commit is contained in:
parent
9288f1b71d
commit
3c7d43542b
@ -12,4 +12,12 @@ public function study(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Study::class);
|
||||
}
|
||||
|
||||
protected function casts()
|
||||
{
|
||||
return [
|
||||
'properties' => 'array',
|
||||
'series' => 'array',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class StudySeries extends Model
|
||||
{
|
||||
public function study(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Study::class);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'series_date' => 'datetime',
|
||||
];
|
||||
}
|
||||
}
|
@ -30,10 +30,12 @@ class UserFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => fake()->name(),
|
||||
'first_name' => fake()->firstName(),
|
||||
'last_name' => fake()->lastName(),
|
||||
'display_name' => fake()->name(),
|
||||
'username' => fake()->unique()->userName(),
|
||||
'email' => fake()->unique()->safeEmail(),
|
||||
'email_verified_at' => now(),
|
||||
'email_verified_at' => fake()->dateTime(),
|
||||
'last_seen_at' => fake()->dateTime(),
|
||||
'phone' => fake()->phoneNumber(),
|
||||
'user_role' => static::$role ??= UserRole::Guest->value,
|
||||
@ -44,6 +46,7 @@ public function definition(): array
|
||||
'profile_photo_path' => null,
|
||||
'current_team_id' => null,
|
||||
'institute_id' => null,
|
||||
'is_active' => fake()->boolean(),
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -24,13 +24,13 @@ public function up(): void
|
||||
$table->string('email')->nullable()->index();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->rememberToken();
|
||||
$table->unsignedTinyInteger('user_role')->default(UserRole::Guest->value);
|
||||
$table->foreignId('current_team_id')->nullable();
|
||||
$table->string('profile_photo_path')->nullable();
|
||||
$table->foreignIdFor(Institute::class)->nullable()->index();
|
||||
$table->string('timezone')->default('Asia/Dhaka');
|
||||
$table->timestamp('last_seen_at')->nullable();
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
|
@ -16,11 +16,8 @@ public function up(): void
|
||||
$table->text('surgical_history')->nullable();
|
||||
$table->text('lab_results')->nullable();
|
||||
$table->text('clinical_diagnosis')->nullable();
|
||||
$table->string('station_name')->nullable();
|
||||
$table->string('operators_name')->nullable();
|
||||
$table->string('manufacturer')->nullable();
|
||||
$table->string('manufacturer_model_name')->nullable();
|
||||
$table->string('software_versions')->nullable();
|
||||
$table->json('properties')->nullable();
|
||||
$table->json('series')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
@ -1,33 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('study_series', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('study_id')->constrained('studies')->cascadeOnDelete();
|
||||
$table->string('orthanc_uid')->unique();
|
||||
$table->dateTime('series_date');
|
||||
$table->string('series_instance_uid')->nullable();
|
||||
$table->string('body_part_examined')->nullable();
|
||||
$table->string('series_description')->nullable();
|
||||
$table->string('modality', 4)->nullable();
|
||||
$table->string('series_number')->nullable();
|
||||
$table->string('protocol_name')->nullable();
|
||||
$table->string('sequence_name')->nullable();
|
||||
$table->string('performed_procedure_step_description')->nullable();
|
||||
$table->unsignedSmallInteger('num_instances')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('study_series');
|
||||
}
|
||||
};
|
@ -14,9 +14,12 @@ public function run(): void
|
||||
// User::factory(10)->create();
|
||||
|
||||
User::factory()->create([
|
||||
'name' => 'Administrator',
|
||||
'first_name' => 'Administrator',
|
||||
'display_name' => 'Administrator',
|
||||
'username' => 'admin',
|
||||
'email' => 'test@example.com',
|
||||
'email_verified_at' => now(),
|
||||
'phone' => '+8801733938582',
|
||||
'user_role' => UserRole::Admin->value,
|
||||
]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user