From 70ceecd966b67975a0f20fbc110e56b93b1cb224 Mon Sep 17 00:00:00 2001 From: brusnitsyn Date: Thu, 16 Jul 2026 16:09:15 +0900 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=B2=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D1=8C=20=D0=BE=D0=B3=D1=80=D0=B0=D0=BD=D0=B8=D1=87=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=B2=D1=8B=D0=B1=D0=BE=D1=80=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=BF=D0=B0=D1=86=D0=B8=D0=B5=D0=BD=D1=82=D0=BE=D0=B2=20=D0=BF?= =?UTF-8?q?=D0=BE=20=D0=B4=D0=B8=D0=B0=D0=B3=D0=BD=D0=BE=D0=B7=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/DutyReportService.php | 1 + app/Services/MedicalHistoryService.php | 1 + app/Services/NurseReportService.php | 2 ++ 3 files changed, 4 insertions(+) diff --git a/app/Services/DutyReportService.php b/app/Services/DutyReportService.php index a821f0c..0a584ff 100644 --- a/app/Services/DutyReportService.php +++ b/app/Services/DutyReportService.php @@ -127,6 +127,7 @@ class DutyReportService return MedicalHistory::query() ->whereHas('migrations', function ($q) use ($departmentId, $dateRange, $startYear) { $q->where('department_id', $departmentId) + // ->whereNotIn('diagnosis_code', ['Z00.8', 'Z76.1', 'Z76.2', 'Z76.3']) // Исключаем осмотры и наблюдения ->where('ingoing_date', '<=', $dateRange->endSql()) ->where(function ($sub) use ($dateRange, $startYear) { // Миграции без out_date (еще лежат) diff --git a/app/Services/MedicalHistoryService.php b/app/Services/MedicalHistoryService.php index 446fb3b..24c606b 100644 --- a/app/Services/MedicalHistoryService.php +++ b/app/Services/MedicalHistoryService.php @@ -14,6 +14,7 @@ class MedicalHistoryService $startYear = $dateRange->startDate->copy()->startOfYear()->format('Y-m-d'); $periodMigrationFilter = function ($q) use ($departmentId, $dateRange, $startYear) { $q->where('department_id', $departmentId) + // ->whereNotIn('diagnosis_code', ['Z76.1', 'Z76.2', 'Z76.3']) // Исключаем осмотры и наблюдения ->where('ingoing_date', '<=', $dateRange->endSql()) ->where(function ($sub) use ($dateRange, $startYear) { // Миграции без out_date (еще лежат) diff --git a/app/Services/NurseReportService.php b/app/Services/NurseReportService.php index 9409781..3fe4f6b 100644 --- a/app/Services/NurseReportService.php +++ b/app/Services/NurseReportService.php @@ -96,6 +96,7 @@ class NurseReportService $query = UnifiedMedicalHistory::query() ->whereHas('migrations', function ($q) use ($departmentId, $dateRange, $startYear) { $q->where('department_id', $departmentId) + // ->whereNotIn('diagnosis_code', ['Z00.8', 'Z76.1', 'Z76.2', 'Z76.3']) // Исключаем осмотры и наблюдения ->where('ingoing_date', '<=', $dateRange->endSql()) ->where(function ($sub) use ($dateRange, $startYear) { $sub->whereNull('out_date') @@ -110,6 +111,7 @@ class NurseReportService }) ->with(['migrations' => function ($q) use ($departmentId, $dateRange, $startYear) { $q->where('department_id', $departmentId) + // ->whereNotIn('diagnosis_code', ['Z00.8', 'Z76.1', 'Z76.2', 'Z76.3']) // Исключаем осмотры и наблюдения ->where('ingoing_date', '<=', $dateRange->endSql()) ->where(function ($sub) use ($dateRange, $startYear) { $sub->whereNull('out_date')