From 587d9c7e582a49393ddee3748822ec8634c19d68 Mon Sep 17 00:00:00 2001 From: Brusnitsyn Date: Mon, 6 Jul 2026 11:05:09 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=20=D0=B2=D1=81?= =?UTF-8?q?=D0=B5=D1=85=20=D0=BF=D0=B0=D1=86=D0=B8=D0=B5=D0=BD=D1=82=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=B5=D1=81=D0=BB=D0=B8=20$reportIds=20=3D=20null?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/DutyMedicalHistoryService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/DutyMedicalHistoryService.php b/app/Services/DutyMedicalHistoryService.php index 74263f2..9160504 100644 --- a/app/Services/DutyMedicalHistoryService.php +++ b/app/Services/DutyMedicalHistoryService.php @@ -39,7 +39,7 @@ class DutyMedicalHistoryService // 1. Один запрос: получаем "сырые" данные (без вычисляемых статусов) $all = ReportDutyPatient::query() - ->when($reportIds, function ($query, $reportIds) { + ->when($reportIds !== null, function ($query) use ($reportIds) { return $query->whereIn('report_duty_id', $reportIds); }) ->whereHas('migrations', $periodMigrationFilter)