diff --git a/app/Services/DutyMedicalHistoryService.php b/app/Services/DutyMedicalHistoryService.php index 4f80f10..74263f2 100644 --- a/app/Services/DutyMedicalHistoryService.php +++ b/app/Services/DutyMedicalHistoryService.php @@ -122,7 +122,7 @@ class DutyMedicalHistoryService // Операции $operations = $sorted->map(function ($h) { - return $h['operations']; + return $h['latest_migration']['operations']; })->flatten(1); // 4. Возвращаем плоский массив + метаданные для фронтенда diff --git a/app/Services/MedicalHistoryService.php b/app/Services/MedicalHistoryService.php index 04e6f73..446fb3b 100644 --- a/app/Services/MedicalHistoryService.php +++ b/app/Services/MedicalHistoryService.php @@ -105,7 +105,7 @@ class MedicalHistoryService // Операции $operations = $sorted->map(function ($h) { - return $h['operations']; + return $h['latest_migration']['operations']; })->flatten(1); $countInDepartment = $sorted->where('patient_status', 'in_department')->count();