Добавил вывод метрик для врача дежурного

This commit is contained in:
brusnitsyn
2026-07-13 16:25:13 +09:00
parent d194ea3030
commit 6b3a4bfceb
5 changed files with 62 additions and 18 deletions

View File

@@ -70,6 +70,11 @@ class ReportDuty extends Model
return $this->hasMany(DutyUnwantedEvent::class, 'report_duty_id', 'id');
}
public function metrikaResult()
{
return $this->hasMany(DutyReportMetricResult::class, 'rf_report_id', 'id');
}
public function getLoadedDepartmentAttribute(int $patientsInDepartment)
{
$beds = DutyReportMetricResult::where('rf_report_id', $this->id)