Добавлен общий % загруженности
This commit is contained in:
@@ -303,6 +303,8 @@ class StatisticsService
|
|||||||
'preoperativeSum' => 0,
|
'preoperativeSum' => 0,
|
||||||
'preoperativePatientCount' => 0,
|
'preoperativePatientCount' => 0,
|
||||||
|
|
||||||
|
'percentLoaded' => 0,
|
||||||
|
|
||||||
'staff_sum' => 0,
|
'staff_sum' => 0,
|
||||||
'observable_sum' => 0,
|
'observable_sum' => 0,
|
||||||
'unwanted_sum' => 0,
|
'unwanted_sum' => 0,
|
||||||
@@ -385,12 +387,14 @@ class StatisticsService
|
|||||||
{
|
{
|
||||||
$outcomeSum = $total['outcome_sum'];
|
$outcomeSum = $total['outcome_sum'];
|
||||||
$preopPatients = $total['preoperativePatientCount'];
|
$preopPatients = $total['preoperativePatientCount'];
|
||||||
|
$consistSum = $total['consist_sum'] ?? 0;
|
||||||
|
$bedsSum = $total['beds_sum'] ?? 0;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'isTotalRow' => ! $isGrandTotal,
|
'isTotalRow' => ! $isGrandTotal,
|
||||||
'isGrandTotal' => $isGrandTotal,
|
'isGrandTotal' => $isGrandTotal,
|
||||||
'department' => $isGrandTotal ? 'ОБЩИЕ ИТОГИ:' : 'ИТОГО:',
|
'department' => $isGrandTotal ? 'ОБЩИЕ ИТОГИ:' : 'ИТОГО:',
|
||||||
'beds' => $total['beds_sum'],
|
'beds' => $bedsSum,
|
||||||
'recipients' => [
|
'recipients' => [
|
||||||
'all' => $total['recipients_all_sum'],
|
'all' => $total['recipients_all_sum'],
|
||||||
'plan' => $total['recipients_plan_sum'],
|
'plan' => $total['recipients_plan_sum'],
|
||||||
@@ -398,8 +402,10 @@ class StatisticsService
|
|||||||
'transferred' => $total['recipients_transferred_sum'],
|
'transferred' => $total['recipients_transferred_sum'],
|
||||||
],
|
],
|
||||||
'outcome' => $outcomeSum,
|
'outcome' => $outcomeSum,
|
||||||
'consist' => $total['consist_sum'],
|
'consist' => $consistSum,
|
||||||
'percentLoadedBeds' => '—',
|
'percentLoadedBeds' => $consistSum > 0
|
||||||
|
? round(($consistSum / $bedsSum) * 100)
|
||||||
|
: 0, // '—',
|
||||||
'surgical' => [
|
'surgical' => [
|
||||||
'plan' => $total['plan_surgical_sum'],
|
'plan' => $total['plan_surgical_sum'],
|
||||||
'emergency' => $total['emergency_surgical_sum'],
|
'emergency' => $total['emergency_surgical_sum'],
|
||||||
|
|||||||
Reference in New Issue
Block a user