modified: .gitignore
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user