Добавил реанимацию

Правки окна операций
This commit is contained in:
brusnitsyn
2026-05-07 22:37:07 +09:00
parent bb9e67ab3d
commit 6cf1ffbb2b
11 changed files with 137 additions and 45 deletions

View File

@@ -36,6 +36,11 @@ class MedicalHistory extends MaterializedViewModel
->latest('ingoing_date');
}
public function reanimations()
{
return $this->hasMany(Reanimation::class, 'medical_history_id', 'id');
}
public function operationsInDepartment($query, $departmentId)
{
return $this->operations()->where('department_id', $departmentId);