modified: .gitignore

This commit is contained in:
brusnitsyn
2026-04-21 10:08:14 +09:00
parent 0e8b6f61b4
commit 2041ab54ea
74 changed files with 7533 additions and 1544 deletions

View File

@@ -11,7 +11,26 @@ class MedicalHistorySnapshot extends Model
protected $fillable = [
'rf_report_id',
'rf_medicalhistory_id',
'rf_department_patient_id',
'patient_type',
'patient_uid',
'patient_source_type',
'patient_kind',
'full_name',
'birth_date',
'diagnosis_code',
'diagnosis_name',
'admitted_at',
'outcome_type',
'outcome_at',
'is_manual',
];
protected $casts = [
'birth_date' => 'date',
'admitted_at' => 'datetime',
'outcome_at' => 'datetime',
'is_manual' => 'boolean',
];
/**
@@ -30,6 +49,11 @@ class MedicalHistorySnapshot extends Model
return $this->belongsTo(MisMedicalHistory::class, 'rf_medicalhistory_id', 'MedicalHistoryID');
}
public function departmentPatient()
{
return $this->belongsTo(DepartmentPatient::class, 'rf_department_patient_id', 'department_patient_id');
}
// Скоупы для фильтрации
public function scopeForReport($query, $reportId)
{