Изменил привязку id при добавлении пациента
Изменил приоритет вывода карты после репликации
This commit is contained in:
36
app/Models/MisMKSBMigration.php
Normal file
36
app/Models/MisMKSBMigration.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
/**
|
||||
* Стационарная карта больного
|
||||
*/
|
||||
class MisMKSBMigration extends MaterializedViewModel
|
||||
{
|
||||
protected $connection = 'mis';
|
||||
protected $table = 'stt_MigrationPatient';
|
||||
protected $primaryKey = 'MigrationPatientID';
|
||||
|
||||
protected $casts = [
|
||||
'id' => 'int',
|
||||
'ingoing_date' => 'datetime:Y-m-d H:i:s',
|
||||
'out_date' => 'datetime:Y-m-d H:i:s',
|
||||
'diagnosis_id' => 'int',
|
||||
'interrupted_event_id' => 'int',
|
||||
'stationar_branch_id' => 'int',
|
||||
'visit_result_id' => 'int',
|
||||
'hospital_result_id' => 'int',
|
||||
];
|
||||
|
||||
public static function workColumns() {
|
||||
return [
|
||||
'MigrationPatientID as id', 'rf_MedicalHistoryID as medical_history_id', 'DateIngoing as ingoing_date',
|
||||
'DateOut as out_date', 'rf_DiagnosID as diagnosis_id', 'rf_InterruptEventID as interrupted_event_id',
|
||||
'rf_StationarBranchID as stationar_branch_id', 'rf_kl_VisitResultID as visit_result_id',
|
||||
'rf_kl_StatCureResultID as hospital_result_id'
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user