refx - details
This commit is contained in:
parent
fb85254d01
commit
ba3fc9d806
@ -16,9 +16,9 @@ class Study extends BaseModel
|
|||||||
'report_status' => ReportStatus::class,
|
'report_status' => ReportStatus::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
public function history(): HasOne
|
public function details(): HasOne
|
||||||
{
|
{
|
||||||
return $this->hasOne(StudyHistory::class);
|
return $this->hasOne(StudyDetails::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function attachments(): HasMany
|
public function attachments(): HasMany
|
||||||
|
@ -4,8 +4,10 @@
|
|||||||
|
|
||||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
|
||||||
class StudyHistory extends BaseModel
|
class StudyDetails extends BaseModel
|
||||||
{
|
{
|
||||||
|
protected $table = 'study_details';
|
||||||
|
|
||||||
public function study(): BelongsTo
|
public function study(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Study::class);
|
return $this->belongsTo(Study::class);
|
@ -31,11 +31,6 @@ public function up(): void
|
|||||||
$table->string('accession_number')->nullable();
|
$table->string('accession_number')->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('station_name')->nullable();
|
|
||||||
$table->string('operators_name')->nullable();
|
|
||||||
$table->string('manufacturer')->nullable();
|
|
||||||
$table->string('manufacturer_model_name')->nullable();
|
|
||||||
$table->string('software_versions')->nullable();
|
|
||||||
|
|
||||||
$table->string('referring_physician_name')->nullable();
|
$table->string('referring_physician_name')->nullable();
|
||||||
$table->string('study_modality', 4)->nullable();
|
$table->string('study_modality', 4)->nullable();
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
{
|
{
|
||||||
public function up(): void
|
public function up(): void
|
||||||
{
|
{
|
||||||
Schema::create('study_histories', function (Blueprint $table) {
|
Schema::create('study_details', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->foreignId('study_id')->index()->constrained('studies')->cascadeOnDelete();
|
$table->foreignId('study_id')->index()->constrained('studies')->cascadeOnDelete();
|
||||||
$table->foreignId('user_id')->constrained('users');
|
$table->foreignId('user_id')->constrained('users');
|
||||||
@ -16,12 +16,17 @@ public function up(): void
|
|||||||
$table->text('surgical_history')->nullable();
|
$table->text('surgical_history')->nullable();
|
||||||
$table->text('lab_results')->nullable();
|
$table->text('lab_results')->nullable();
|
||||||
$table->text('clinical_diagnosis')->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->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(): void
|
public function down(): void
|
||||||
{
|
{
|
||||||
Schema::dropIfExists('study_histories');
|
Schema::dropIfExists('study_details');
|
||||||
}
|
}
|
||||||
};
|
};
|
Loading…
Reference in New Issue
Block a user