Форматирование

This commit is contained in:
brusnitsyn
2026-04-24 16:46:10 +09:00
parent fd0e6ee817
commit 63daa62888
87 changed files with 1380 additions and 791 deletions

View File

@@ -1,12 +1,13 @@
<?php
// app/Services/MetricCalculators/PreoperativeDaysCalculator.php
namespace App\Services\MetricCalculators;
use App\Services\Base\BaseMetricService;
use App\Contracts\MetricCalculatorInterface;
use App\Models\MedicalHistorySnapshot;
use App\Models\Report;
use App\Services\Base\BaseMetricService;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB;
@@ -68,7 +69,7 @@ class PreoperativeDaysCalculator extends BaseMetricService implements MetricCalc
$deptId = $reports[$snapshot->rf_report_id]->rf_department_id;
$historyId = $snapshot->rf_medicalhistory_id;
if (!isset($operations[$historyId])) {
if (! isset($operations[$historyId])) {
continue;
}
@@ -77,7 +78,7 @@ class PreoperativeDaysCalculator extends BaseMetricService implements MetricCalc
->diffInDays(Carbon::parse($op->first_operation));
if ($days >= 0) {
if (!isset($results[$deptId])) {
if (! isset($results[$deptId])) {
$results[$deptId] = ['total' => 0, 'count' => 0];
}
$results[$deptId]['total'] += $days;