Форматирование
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user