Обновлен стартовый экран
Переписаны запросы для статистики, отчетов Добавлена интеграция отчета сестры
This commit is contained in:
@@ -116,11 +116,10 @@ class MigrationPatient extends MaterializedViewModel
|
||||
{
|
||||
return $query->where('medical_history_id', $historyId)
|
||||
->department($departmentId)
|
||||
->orderBy('ingoing_date', 'desc')
|
||||
->limit(1)->first();
|
||||
->orderBy('ingoing_date', 'desc');
|
||||
}
|
||||
|
||||
public function getAdmittedInCurrentAttribute(): bool
|
||||
public function getAdmittedInCurrentAttribute(DateRange $dateRange): bool
|
||||
{
|
||||
// Получаем дату поступления из последнего движения
|
||||
$ingoing = $this->ingoing_date;
|
||||
@@ -130,7 +129,7 @@ class MigrationPatient extends MaterializedViewModel
|
||||
}
|
||||
|
||||
$ingoingLocal = Carbon::parse($ingoing)->setTimezone(config('app.timezone', 'Europe/Moscow'));
|
||||
$now = Carbon::now(config('app.timezone', 'Europe/Moscow'));
|
||||
$now = $dateRange->endDate;//Carbon::now(config('app.timezone', 'Europe/Moscow'));
|
||||
|
||||
// Окно смены: вчера 09:00 → сегодня 09:00
|
||||
$shiftStart = $now->copy()->subDay()->setTime(9, 0);
|
||||
|
||||
Reference in New Issue
Block a user