Изменил формулу расчета койко-дня для вывода из статистики

This commit is contained in:
brusnitsyn
2026-07-20 16:59:44 +09:00
parent a9e032f658
commit d80068bcd6
2 changed files with 3 additions and 2 deletions

View File

@@ -217,6 +217,7 @@ class StatisticsService
21 => $preoperativeAverageSum += $value, 21 => $preoperativeAverageSum += $value,
26 => $preoperativeSum += $value, 26 => $preoperativeSum += $value,
27 => $preoperativePatientCount += (int) $value, 27 => $preoperativePatientCount += (int) $value,
18 => $avgBedDays += $value,
// 24 => $completePlanProgress = (int)$value, // 24 => $completePlanProgress = (int)$value,
default => null default => null
}; };
@@ -240,7 +241,7 @@ class StatisticsService
$percentLoaded = $bedsCount > 0 ? round($currentCount * 100 / $bedsCount) : 0; $percentLoaded = $bedsCount > 0 ? round($currentCount * 100 / $bedsCount) : 0;
// Средний койко-день // Средний койко-день
$avgBedDays = $outcome > 0 ? round($bedDaysSum / $outcome, 1) : 0; $avgBedDays = $outcome > 0 ? round($bedDaysSum / ($outcome + $currentCount), 1) : 0;
// Предоперационный койко-день // Предоперационный койко-день
$canUsePreoperativeTotals = $preoperativePatientCount > 0 $canUsePreoperativeTotals = $preoperativePatientCount > 0