Добавил возможность ограничения выборки пациентов по диагнозу
This commit is contained in:
@@ -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 (еще лежат)
|
||||
|
||||
Reference in New Issue
Block a user