* добавил объединение изменений движений
* добавил автоматическое создание движения при редактировании * добавил функционал для сохранения отчета и пациентов * изменил форматирование дат * добавил частичную перезагрузку при сохранении изменений
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
use App\Models\ReportNurse;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('report_nurse_patients', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignIdFor(ReportNurse::class, 'report_nurse_id');
|
||||
$table->string('source_type');
|
||||
$table->bigInteger('original_id');
|
||||
$table->string('medical_card_number')->nullable();
|
||||
$table->string('full_name');
|
||||
$table->date('birth_date')->nullable();
|
||||
$table->dateTime('recipient_date');
|
||||
$table->dateTime('extract_date')->nullable();
|
||||
$table->dateTime('death_date')->nullable();
|
||||
$table->boolean('male')->default(true);
|
||||
$table->integer('urgency_id')->nullable();
|
||||
$table->integer('hospital_result_id')->nullable();
|
||||
$table->integer('visit_result_id')->nullable();
|
||||
$table->text('comment')->nullable();
|
||||
$table->foreignIdFor(\App\Models\User::class, 'user_id');
|
||||
$table->unique(['report_nurse_id', 'source_type', 'original_id']); // защита от дублей
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('report_nurse_patients');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('migration_patient_corrections', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('migration_patient_id');
|
||||
$table->integer('medical_history_id');
|
||||
$table->dateTime('ingoing_date')->nullable();
|
||||
$table->dateTime('out_date')->nullable();
|
||||
$table->integer('diagnosis_id')->nullable();
|
||||
$table->string('diagnosis_code')->nullable();
|
||||
$table->string('diagnosis_name')->nullable();
|
||||
$table->integer('interrupted_event_id')->nullable();
|
||||
$table->integer('stationar_branch_id')->nullable();
|
||||
$table->integer('department_id')->nullable();
|
||||
$table->integer('visit_result_id')->nullable();
|
||||
$table->integer('stat_cure_result_id')->nullable();
|
||||
|
||||
$table->foreignIdFor(\App\Models\User::class, 'user_id');
|
||||
$table->integer('mis_user_id')->nullable();
|
||||
$table->text('comment')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('migration_patient_corrections');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('migration_patient_nurses', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignIdFor( \App\Models\MedicalHistoryNurse::class, 'medical_history_id');
|
||||
$table->dateTime('ingoing_date')->nullable();
|
||||
$table->dateTime('out_date')->nullable();
|
||||
$table->integer('diagnosis_id')->nullable();
|
||||
$table->string('diagnosis_code')->nullable();
|
||||
$table->string('diagnosis_name')->nullable();
|
||||
$table->integer('interrupted_event_id')->nullable();
|
||||
$table->integer('stationar_branch_id')->nullable();
|
||||
$table->integer('department_id')->nullable();
|
||||
$table->integer('visit_result_id')->nullable();
|
||||
$table->integer('stat_cure_result_id')->nullable();
|
||||
$table->foreignIdFor(\App\Models\User::class, 'user_id')->nullable();
|
||||
$table->integer('mis_user_id')->nullable();
|
||||
$table->text('comment')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('migration_patient_nurses');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user